> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a shipping detail

> Updates information for the specified shipping detail ID. Shipping details include the shipment's delivery address, settings, pickup person's details, warehouse ID, store ID, and more.



## OpenAPI

````yaml cart.openapi put /carts/{cartId}/shipping-details/{shippingDetailId}
openapi: 3.0.1
info:
  title: Cart
  description: >-
    fabric's **Cart API** lets you add, update, and remove items from your
    Storefront cart, either as a guest user or as a logged-in user. It also
    provides functionality to merge carts when you switch from guest user to
    logged-in user, and apply coupons and other attributes (for example, gift
    wrapping) to the line items. Additionally, the API supports more advanced
    tasks such as using multiple carts within a B2B organization, sharing carts,
    and supporting a unified cart experience for multi-region and multi-brand
    businesses. The Cart API provides high performance, scalability,
    multi-tenancy, and configurability to the end-to-end order processing
    actions that start from an item being added to the cart; through the
    pre-checkout stage that includes billing, shipping, and payment details; to
    the checkout stage where the order is processed and confirmed by fabric's
    Order Management System (OMS).
  version: 3.0.0
  x-audience: external-public
  contact:
    name: Cart Support
    email: support.cnc@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
servers:
  - url: https://api.fabric.inc/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Carts
    description: >-
      Carts endpoints let you perform basic cart operations, including finding,
      creating, updating, and merging carts. You can also apply or remove a
      promotion code to or from a cart.
  - name: Line Items
    description: >-
      Line Items endpoints let you perform basic line item operations, including
      creating, updating, and deleting line items in a cart. You can also get
      and update line item attributes and shipping details.
  - name: Shipping Details
    description: >-
      Shipping details endpoints let you get, create, and update cart shipping
      details.
  - name: Adjustments
    description: >-
      Using these endpoints, you can make adjustments to a cart or line items in
      a cart.
externalDocs:
  description: Find out more about Cart
  url: https://developer.fabric.inc/v3/reference/cart-getting-started
paths:
  /carts/{cartId}/shipping-details/{shippingDetailId}:
    put:
      tags:
        - Shipping Details
      summary: Update a shipping detail
      description: >-
        Updates information for the specified shipping detail ID. Shipping
        details include the shipment's delivery address, settings, pickup
        person's details, warehouse ID, store ID, and more.
      operationId: updateShippingDetails
      parameters:
        - $ref: '#/components/parameters/cartId'
        - $ref: '#/components/parameters/shippingDetailId'
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        description: Request body containing shipping details to be updated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateShippingDetailsRequest'
        required: true
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingDetailResponse'
        '400':
          description: Client error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestId'
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/cartNotFound'
                  - $ref: '#/components/schemas/shippingDetailsNotFound'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
components:
  parameters:
    cartId:
      name: cartId
      in: path
      description: Cart ID
      required: true
      schema:
        type: string
        example: b8a64b52-dab4-8137-8d6a-f2c2337abc1
    shippingDetailId:
      name: shippingDetailId
      in: path
      description: Shipping detail identifier
      required: true
      schema:
        type: string
        example: a1b26d22-cad2-6242-a2b4-e3c4282bad4
    xFabricTenantId:
      in: header
      name: x-fabric-tenant-id
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      schema:
        type: string
      example: 617329dfd5288b0011332311
      required: true
    xFabricChannelId:
      in: header
      name: x-fabric-channel-id
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
      schema:
        type: string
      example: '12'
      required: false
    xFabricRequestId:
      in: header
      name: x-fabric-request-id
      description: Unique request ID
      schema:
        type: string
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
  schemas:
    updateShippingDetailsRequest:
      description: Request body to update shipping details
      allOf:
        - $ref: '#/components/schemas/createShippingDetailsRequest'
    shippingDetailResponse:
      description: Shipping Details
      type: object
      properties:
        id:
          type: string
          description: Shipping details ID
          example: fef78121-bee3-4448-bf1c-d5b5461dbda2
        createdAt:
          allOf:
            - $ref: '#/components/schemas/baseTime'
            - description: Time shipping detail was created
        updatedAt:
          allOf:
            - $ref: '#/components/schemas/baseTime'
            - description: Time shipping detail was last updated
        address:
          description: Shipping address
          allOf:
            - $ref: '#/components/schemas/address'
            - nullable: true
        type:
          type: string
          description: Shipping type
          example: SHIP_TO_ADDRESS
        taxCode:
          type: string
          description: Shipping tax code
          nullable: true
          example: FR1000
        isPickup:
          description: 'true: Item is set for pickup<br />false: Item is set for delivery'
          type: boolean
          example: true
        altPickupPerson:
          description: Alternative pickup person
          allOf:
            - $ref: '#/components/schemas/pickupPerson'
            - nullable: true
        pickupPerson:
          description: Designated pickup person
          allOf:
            - $ref: '#/components/schemas/pickupPerson'
            - nullable: true
        warehouseId:
          type: string
          description: Warehouse ID
          nullable: true
          example: XYZ-1234
        storeId:
          type: string
          description: Store ID
          nullable: true
          example: ABC-123
        shippingCost:
          type: number
          format: double
          description: Shipping cost
          example: 150.25
        shippingMethodId:
          type: string
          description: Shipping method ID
          example: dfsae-2d32113-32lpdd
        shippingDiscount:
          type: number
          format: double
          description: Discount amount
          example: 150.25
        shippingMethodName:
          type: string
          description: Shipping method name
          nullable: true
          example: Express Delivery
    error400:
      type: object
      description: Bad request error
      properties:
        type:
          description: Error code
          type: string
          example: BAD_REQUEST
        message:
          description: Error description
          type: string
          example: Bad Request
    error401:
      type: object
      description: Unauthorized
      properties:
        type:
          description: Error code
          type: string
          example: UNAUTHORIZED
        message:
          description: Error description
          type: string
          example: Unauthorized User
    cartNotFound:
      type: object
      description: Cart not found error
      properties:
        type:
          description: Error code
          type: string
          example: NOT_FOUND
        message:
          description: Error description
          type: string
          example: Cart not found
    shippingDetailsNotFound:
      type: object
      description: Shipping details not found error
      properties:
        type:
          description: Error code
          type: string
          example: NOT_FOUND
        message:
          description: Error description
          type: string
          example: >-
            Shipping Details Not Found for Id:
            0c964516-29ca-4a39-8eac-0f6bf38e75c6 and cart:
            62aec82b-9659-4dcc-9d73-7cbc5520b12e
    error500:
      type: object
      description: Internal server error
      properties:
        type:
          description: Error code
          type: string
          example: INTERNAL_SERVER_ERROR
        message:
          description: Error description
          type: string
          example: Internal server error
    createShippingDetailsRequest:
      description: Request body to create shipping details
      required:
        - type
      type: object
      properties:
        address:
          description: Shipping address
          allOf:
            - $ref: '#/components/schemas/address'
            - nullable: true
        type:
          type: string
          description: Shipping type
          example: SHIP_TO_ADDRESS
        taxCode:
          type: string
          description: Shipping tax code
          nullable: true
          example: FR1000
        isPickup:
          description: 'true: Item is set for pickup<br />false: Item is set for delivery'
          type: boolean
          example: true
        locationNumber:
          description: Number of location where item is to be picked up
          type: integer
          format: int32
          example: 15
        altPickupPerson:
          description: Alternative pickup person
          allOf:
            - $ref: '#/components/schemas/pickupPerson'
            - nullable: true
        pickupPerson:
          description: Designated pickup person
          allOf:
            - $ref: '#/components/schemas/pickupPerson'
            - nullable: true
        warehouseId:
          type: string
          description: Warehouse ID
          nullable: true
          example: XYZ-1234
        storeId:
          type: string
          description: Store ID
          nullable: true
          example: ABC-123
        shippingCost:
          type: number
          format: double
          description: Shipping cost
          example: 150.25
        shippingMethodId:
          type: string
          description: Shipping method ID
          example: dfsae-2d32113-32lpdd
        shippingDiscount:
          type: number
          format: double
          description: Discount amount
          example: 150.25
        shippingMethodName:
          type: string
          description: Shipping method name
          nullable: true
          example: Express Delivery
    baseTime:
      description: Date time in ISO-8601 format
      type: string
      format: date-time
      example: '2022-09-06T14:07:17.000Z'
    address:
      allOf:
        - $ref: '#/components/schemas/baseAddress'
        - description: Shipping address details
          required:
            - city
            - country
            - region
            - addressLine1
            - postalCode
          type: object
          properties:
            attention:
              type: string
              description: Address recipient
              nullable: true
              example: Billing manager
            email:
              type: string
              description: Receiver's email address
              nullable: true
              example: test@example.com
            type:
              type: string
              description: Address type
              nullable: true
              example: shipping
            name:
              description: Recipient's name
              allOf:
                - $ref: '#/components/schemas/name'
                - nullable: true
            phone:
              description: Recipient's phone number and type
              allOf:
                - $ref: '#/components/schemas/phone'
                - nullable: true
    pickupPerson:
      description: Designated person who will pick up the line items
      type: object
      properties:
        name:
          allOf:
            - $ref: '#/components/schemas/name'
            - nullable: true
        phone:
          allOf:
            - $ref: '#/components/schemas/phone'
            - nullable: true
        email:
          type: string
          description: Receiver's email address
          nullable: true
          example: test@example.com
    baseAddress:
      type: object
      description: Base address object
      properties:
        addressLine1:
          type: string
          description: Address line 1
          example: 123 Main St.
        addressLine2:
          type: string
          description: Address line 2
          example: Suite 100
          nullable: true
        addressLine3:
          type: string
          description: Address line 3
          example: Seventh floor
          nullable: true
        addressLine4:
          type: string
          description: Address line 4
          example: 'Attention: Pat E. Kake'
          nullable: true
        city:
          type: string
          description: City
          example: Seattle
        region:
          type: string
          description: Region or state
          example: WA
        country:
          description: Country (can be full name, or ISO 3166-1 alpha-2 or alpha-3 code)
          type: string
          example: USA
        postalCode:
          type: string
          description: Postal or ZIP code
          example: '98121'
    name:
      description: Person's full name
      type: string
      example: Pat E Kake
    phone:
      description: Phone number details
      required:
        - number
      type: object
      properties:
        number:
          type: string
          description: Phone number
          example: 123-456-7899
        type:
          type: string
          description: Phone type
          nullable: true
          example: MOBILE
  headers:
    xFabricRequestId:
      description: Unique request ID
      schema:
        type: string
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````