---
title: "Update shipping policy by ID"
method: PUT
path: "/api/logistics/pvt/shipping-policies/{id}"
tags: ["Shipping policies"]
---

# Update shipping policy by ID

`PUT /api/logistics/pvt/shipping-policies/{id}`

Updates information about a [shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) of your store, searching by shipping policy ID. 

>⚠️ While most endpoints return time fields in UTC format, this endpoint returns **Scheduled Delivery** related time fields adjusted to the time zone configured for the VTEX account. 

## Permissions

Any user or [API key](https://developers.vtex.com/docs/guides/api-authentication-using-api-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:

| **Product** | **Category** | **Resource** |
| --------------- | ----------------- | ----------------- |
| Logistics | Logistics access | **Logistics full access** |
| Logistics | Logistics access | **Logistics shipping full access** |

You can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):

| **Role** | **Resource** | 
| --------------- | ----------------- | 
| Logistics - Full access | Logistics full access |
| OMS - Full access | Logistics full access |
| Logistics - Full access | Logistics shipping full access |
| OMS - Full access | Logistics shipping full access |

>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-api-keys--7b6nD1VMHa49aI5brlOvJm). To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).

## Path parameters

- `id` string, required

## Headers

- `Accept` string, required
- `Content-Type` string, required

## Request body

- object
  - `name` string, required — [Shipping policy]((https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) name.
  - `shippingMethod` string, required — Type of shipping available for this shipping policy (carrier). Options are shown on [shipping simulation](https://help.vtex.com/en/tutorial/shipping-simulation--tutorials_144).
  - `deliveryOnWeekends` boolean, required — Defines if the delivery on weekends configuration is active (`true`) or not (`false`).
  - `maxDimension` object, required — Object containing attributes of maximum dimension permitted by the shipping policy (carrier).
    - `largestMeasure` number, required — Largest measure acceptable of the package.
    - `maxMeasureSum` number, required — Sum of all maximum measures of the package.
  - `cubicWeightSettings` object — Settings for the cubic weight of a package, which accounts for the [package's volume](https://help.vtex.com/en/tutorial/understanding-the-cubic-weight-factor--tutorials_128), and not only weight.
    - `volumetricFactor` number — Factor that will be used on the cubic weight calculation, usually given by the carrier.
    - `minimunAcceptableVolumetricWeight` number — Packages' minimum acceptable [volumetric weight](https://help.vtex.com/en/tutorial/understanding-the-cubic-weight-factor--tutorials_128).
  - `modalSettings` object — Configurations for the [modal](https://help.vtex.com/en/tutorial/how-does-the-modal-work--tutorials_125), which is the attachement of a specific product to a carrier specialized in delivering that type of product.
    - `modals` string[] — Type of special freight.
    - `useOnlyItemsWithDefinedModal` boolean — When set as `true`, the modal's configurations will apply only for items with a defined modal, when `false`, the modal configuration will not be set.
  - `isActive` boolean, required — Defines if the shipping policy is active (`true`) or inactive (`false`).
  - `deliveryScheduleSettings` object — [Scheduled delivery](https://help.vtex.com/en/tutorial/scheduled-delivery--22g3HAVCGLFiU7xugShOBi) settings.
    - `useDeliverySchedule` boolean, required — Defines if the scheduled delivery configuration is active (`true`) or inactive (`false`).
    - `maxRangeDelivery` number, required — Range of days available within a delivery window, for the customer to choose the scheduled delivery. For example, if the configured maxRangeDelivery is equal 7, and the customer buys something on a Tuesday, the options for scheduled delivery will be shown until the following Tuesday (7 days from the purchase day). If no options are available within the maxRangeDelivery set, this shipping policy won't be shown on the checkout.
    - `dayOfWeekForDelivery` object[], required — Select the chosen days of the week for delivery, from `0` (sunday) to `6` (saturday). Make sure to add the available hours, as shown in the example.
      - `dayOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6, required — Day of the week, from `0` (Sunday) to `6` (Saturday).
      - `deliveryRanges` object[], required — Reservation windows for scheduled delivery.
        - `startTime` string, required — Start time for day of the week.
        - `endTime` string, required — End time for day of the week.
        - `listPrice` number, required — List price for day of the week.
        - `deliveryCapacity` object[] — Sets maximum delivery capacity for a given reservation window for scheduled delivery.
          - `capacityType` string, required — Defines how the delivery capacity is measured for this reservation window, by maximum number of orders (`"ORDERS_QUANTITY"`) or SKUs (`"SKUS_QUANTITY"`).
          - `maxValue` number, required — Maximum number of orders or SKUs that the store is capable of fulfilling.

## Response `200`

OK

---

[API](https://skmtc.net/vtex/apis/logistics-api.md) · [All operations](https://skmtc.net/vtex/apis/logistics-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vtex/logistics-api/revisions/c08af805d8b3/schema)
