# updateShippingMethodForShipment - Sets a shipping method for a specific shipment of a basket.

Sets a shipping method for a specific shipment of a basket.

Endpoint: PUT /baskets/{basketId}/shipments/{shipmentId}/shipping-method

## Path parameters:

  - `basketId` (string, required)
    The ID of the basket to be modified.

  - `shipmentId` (string, required)
    The ID of the shipment to be modified.

## Query parameters:

  - `siteId` (string, required)
    The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

## Request fields (application/json):

  - `c_marketplaceData` (array)
    Marketplace-specific data.

  - `c_marketplaceData.offers` (array)

  - `c_marketplaceData.offers.id` (string)
    Identifier of the offer.

  - `c_marketplaceData.selectedShippingMethod` (string)
    Selected shipping method for the offer.

  - `id` (string)
    Identifier for the marketplace data.

## Response 200 fields (application/json):

  - `shipments` (array)
    List of the shipment items of the basket.

  - `shipments.c_marketplaceData` (object)
    Additional Mirakl data related to the shipment.

  - `shipments.c_marketplaceData.errors` (array)
    Marketplace shipping errors related to the shipment and the offers.

  - `shipments.c_marketplaceData.errors.code` (string, required)
    Code of the shipping error.
    Example: "offer_quantity_not_available"

  - `shipments.c_marketplaceData.errors.maximumQuantity` (integer)
    The maximum quantity available for an offer.
    Example: 12

  - `shipments.c_marketplaceData.errors.offerId` (string)
    The offer ID concerned by the error.
    Example: "2258"

  - `shipments.c_marketplaceData.errors.price` (object)

  - `shipments.c_marketplaceData.errors.price.originValue` (number)
    Original price value before any discounts or changes.
    Example: 45

  - `shipments.c_marketplaceData.errors.price.value` (number, required)
    Current price value.
    Example: 40

  - `shipments.c_marketplaceData.errors.shippingTypeCode` (string)
    The shipping type code concerned by the error.
    Example: "EXP"

  - `shipments.c_marketplaceData.isSH02Done` (boolean, required)
    A boolean indicating whether SH02 has been called.
    Example: true

  - `shipments.c_marketplaceData.shipments` (array)
    The marketplace shipments data.

  - `shipments.c_marketplaceData.shipments.shippingMethods` (array)

  - `shipments.c_marketplaceData.shipments.shippingMethods.cutOffNextDate` (string)
    Cut-off date and time for the shipping method.

  - `shipments.c_marketplaceData.shipments.shippingMethods.deliveryDateTime` (object)

  - `shipments.c_marketplaceData.shipments.shippingMethods.id` (string)
    Identifier of the shipping method.

  - `shipments.c_marketplaceData.shipments.shippingMethods.price` (object)

  - `shipments.c_marketplaceData.shipments.shippingMethods.selected` (boolean)
    Whether this shipping method is selected.

  - `shipments.c_marketplaceData.shippingPrice` (object, required)

  - `shipments.c_marketplaceData.shippingTaxes` (object, required)

## Response 400 fields (application/json):

  - `detail` (string)
    Error detail.
    Example: "The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications"

  - `status` (string)
    Error status
    Example: "400"

  - `title` (string)
    Error title.
    Example: "Bad Request"

  - `type` (string)
    Error type.
    Example: "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request"


