> ## 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.

# Get shipping details for a line item in the cart

> With this endpoint, you can get the shipping details for line items within a cart. The shipping details include a unique ID, delivery address, configuration settings, pickup person's info, warehouse ID, store ID, and more.



## OpenAPI

````yaml cart.openapi get /carts/{cartId}/line-items/{lineItemId}/shipping-details
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}/line-items/{lineItemId}/shipping-details:
    get:
      tags:
        - Line Items
      summary: Get shipping details for a line item in the cart
      description: >-
        With this endpoint, you can get the shipping details for line items
        within a cart. The shipping details include a unique ID, delivery
        address, configuration settings, pickup person's info, warehouse ID,
        store ID, and more.
      operationId: getLineItemShippingDetails
      parameters:
        - $ref: '#/components/parameters/cartId'
        - $ref: '#/components/parameters/lineItemId'
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lineItemResponse'
        '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/error400'
        '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/lineItemNotFound'
                  - $ref: '#/components/schemas/lineItemShippingDetailsNotFound'
        '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
    lineItemId:
      name: lineItemId
      in: path
      description: Line item ID
      required: true
      schema:
        type: string
        example: d7e78a21-bee3-4448-bf1c-d5b5461dbda2
    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
  headers:
    xFabricRequestId:
      description: Unique request ID
      schema:
        type: string
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
  schemas:
    lineItemResponse:
      description: Line item details
      type: object
      properties:
        id:
          type: string
          description: Line item ID
          nullable: true
          example: 12gved0f-7645-40cb-y7b0-167f8bggdb3z
        itemId: 798ab69d-923b-453c-ada2-4fe4e1e359a6
        position:
          minimum: 1
          type: integer
          description: Line item position number (starts at 1)
          format: int32
          example: 1
        name:
          type: string
          description: Line item name
          nullable: true
          example: Varnet Garden Light Kit
        sku:
          type: string
          description: Line item SKU
          example: 16B2GS8LD5FDS
        productAttributes:
          description: Additional line item options
          type: array
          nullable: true
          items:
            description: Product attribute as defined within Product Catalog.
            required:
              - value
              - name
            type: object
            properties:
              attributeId:
                type: string
                description: Attribute ID
                example: 60c2a358eb2ec30008ae70a1
              name:
                type: string
                description: Attribute name
                example: gift wrapping (small)
              description:
                type: string
                description: Attribute description
                nullable: true
                example: Gift wrapping for a small package
              mapping:
                type: string
                description: Attribute mapping
                nullable: true
                example: ITEM
              type:
                type: string
                description: Attribute type
                example: GIFT
                nullable: true
              value:
                type: string
                description: Attribute value
                nullable: true
                example: 'true'
              price:
                type: number
                format: double
                nullable: true
                description: Attribute price
                example: 10
              level:
                type: string
                description: Attribute level
                nullable: true
                example: order
        createdAt:
          allOf:
            - $ref: '#/components/schemas/baseTime'
            - description: Time line item was created
        updatedAt:
          allOf:
            - $ref: '#/components/schemas/baseTime'
            - description: Time line item was last updated
        quantity:
          type: integer
          format: int32
          description: Line item quantity
          example: 15
        priceListId:
          type: integer
          description: Line item price list ID
          nullable: true
          format: int32
          example: 108674
        isActive:
          description: 'true: Item is active<br />false: Item is inactive'
          type: boolean
          nullable: true
          example: true
        price:
          description: Individual line item price
          allOf:
            - 4beadef5-95d7-4ca2-8dc5-888227ed2b50
            - nullable: true
        discounts:
          description: Individual line item discount
          type: array
          items: 7506aca7-e848-4b12-a8cf-390aa46550d1
        groups:
          type: array
          nullable: true
          items:
            type: string
            description: Group or category ID to which line item belongs
            example: 61d38e117162b7dba69c3d6d
        attributes:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
          description: Attributes passed by caller
          nullable: true
          example:
            productFamily: Laptop computers
        channel:
          $ref: '#/components/schemas/salesChannel'
        isPickup:
          description: 'true: Item is set for pickup<br />false: Item is set for delivery'
          type: boolean
          example: true
        warehouseId:
          type: string
          description: Warehouse ID
          nullable: true
          example: XYZ-1234
        shippingDetails:
          description: Shipping details
          allOf:
            - $ref: '#/components/schemas/shippingDetailResponse'
            - nullable: true
        fulfillment:
          $ref: '#/components/schemas/fulfillmentResponse'
        fees:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/fees'
        adjustments:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/priceAdjustment'
    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
    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
    lineItemNotFound:
      type: object
      description: Line item not found error
      properties:
        type:
          description: Error code
          type: string
          example: NOT_FOUND
        message:
          description: Error description
          type: string
          example: >-
            Line item was not found with id:
            dd23f254-ba28-420c-8dad-fe2f4477fe68
    lineItemShippingDetailsNotFound:
      type: object
      description: Line item shipping details not found error
      properties:
        type:
          description: Error code
          type: string
          example: NOT_FOUND
        message:
          description: Error description
          type: string
          example: >-
            Line item shipping details not found for cartId:
            62aec82b-9659-4dcc-9d73-7cbc5520b12e and lineItemId:
            dd23f254-ba28-420c-8dad-fe2f4477fe68
    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
    baseTime:
      description: Date time in ISO-8601 format
      type: string
      format: date-time
      example: '2022-09-06T14:07:17.000Z'
    salesChannel:
      description: Sales channel
      type: string
      example: '12'
    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
    fulfillmentResponse:
      description: The fulfillment details.
      type: object
      nullable: true
      properties:
        inventory:
          description: The inventory response.
          nullable: true
          type: object
          properties:
            inventoryId:
              type: string
              description: >-
                System-generated inventory ID. This ID is generated during
                inventory creation.
              example: 723910d81723
            sku:
              type: string
              description: >-
                Product SKU (Stock Keeping Unit) identifier. It serves as the
                primary reference key for the inventory and provides uniqueness
                to the item.
              example: SKU1
            itemId:
              type: integer
              description: >-
                Merchant-defined item ID whose inventory is created or updated.
                If omitted, fabric Inventory service generates the `itemId`. If
                you choose to use the `itemId` in your environment, you must
                include it in all inventory *Write* requests.
              format: int32
              example: 12345
            locationNumber:
              type: integer
              description: >-
                Represents the warehouse or store location where the inventory
                is stored. It's recommended to link `locationNumber` to the
                corresponding value in the fabric Locations service.
              format: int32
              example: 12345
            region:
              type: string
              description: Region where inventory is managed
              example: North America
            channelId:
              type: string
              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.;
                identifies business operations location.
              example: channel_xyz
            vendorId:
              type: string
              description: >-
                ID of the vendor who will replenish the inventory for the
                retailer
              example: vendor1
            createdAt:
              type: string
              description: Time of inventory creation
              format: date-time
              example: '2022-08-01T18:03:28.483971941Z'
            updatedAt:
              type: string
              description: Time when inventory was last updated
              format: date-time
              example: '2022-08-01T20:03:28.483971941Z'
            leadTime:
              type: string
              description: >-
                Time between when an order is placed to replenish inventory and
                when the order is received at warehouse
              example: 5 days
            type:
              type: string
              description: >-
                Inventory type - a classifier attribute that provides
                flexibility to define inventory types
              example: primary
            hasInfiniteInventory:
              type: boolean
              description: >-
                Infinite inventory flag.<br />true: Inventory can be used any
                number of times and doesn't have any consumption limit.<br
                />false: Inventory can't be used infinitely, and has a
                consumption limit.
              example: false
              default: false
            backorderShipmentAt:
              type: string
              description: Time when backorder is shipped
              format: date-time
              example: '2022-08-01T20:03:28.483971941Z'
            preorderShipmentAt:
              type: string
              description: Time when preorder is shipped
              format: date-time
              example: '2022-08-01T20:03:28.483971941Z'
            backorderLimit:
              type: integer
              description: Maximum restock inventory quantity
              format: int32
              example: 50
            preorderLimit:
              type: integer
              description: Maximum first-shipping inventory quantity
              format: int32
              example: 40
            safetyStock:
              type: integer
              description: Reserved inventory quantity at the location
              format: int32
              example: 10
            lowStock:
              type: integer
              description: >-
                Inventory quantity below which consumer service wants to be
                alerted as low stock at the location
              format: int32
              example: 10
            networkCode:
              type: string
              description: Code of the network to which the inventory belongs
              example: ShipToHome
            counters:
              type: object
              additionalProperties:
                type: integer
                description: >-
                  Merchant-defined inventory counter (also known as inventory
                  position)
                format: int32
              description: >-
                Merchant-defined inventory counter (also known as inventory
                position)
              example:
                onHand: 100
                allocated: 10
                shipped: 20
            customAttributes:
              type: object
              additionalProperties:
                type: string
                description: Placeholder for additional info
                example: '{"isBopis":true}'
              description: Placeholder for additional info
              example:
                isBopis: true
            networkCounters:
              type: object
              additionalProperties:
                type: integer
                description: Indicates inventory positions at network
                format: int32
              description: Indicates inventory positions at network
              example:
                softReserve: 10
            virtualCounters:
              type: object
              additionalProperties:
                type: integer
                format: int32
                description: Virtual counters are calculated at run time from counters
              description: Virtual counters are calculated at run time from counters
              example:
                availableToPurchase: 60
      allOf:
        - $ref: '#/components/schemas/fulfillmentRequest'
        - description: Fulfillment details
        - nullable: true
    fees:
      type: object
      properties:
        feeId:
          type: string
          description: >-
            System-generated fee ID, in UUID format. While creating a cart or
            line item with fee, fabric generates this ID for the specified fee.
          example: 73bc09d0-874a-4c3d-84d0-df1670d03578
        name:
          type: string
          description: Attribute for which fee is applied
          nullable: true
          example: gift
        type:
          type: string
          description: Fee type
          nullable: true
          example: gift_wrap
        amount:
          type: number
          format: double
          description: Fee amount
          default: 0
          example: 10.5
        attributes:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
          description: Placeholder for additional information in `key:value` pairs
          nullable: true
          example:
            from: sam
    priceAdjustment:
      description: >-
        Price adjustment details for the specified line item or the specified
        cart
      required:
        - id
        - amount
        - reason
      type: object
      properties:
        id:
          type: string
          description: >-
            Price adjustment ID; it identifies a single price adjustment object
            within the price adjustments array.
          example: c695af14-5e33-402c-9d8d-71edcf4856a8
          nullable: false
        amount:
          type: number
          description: >-
            Amount by which the line item's total amount or the specified cart's
            total amount is adjusted
          format: double
          example: 60.5
        reason:
          type: string
          description: Price adjustment reason
          example: CSR Adjustment
        attributes:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
          description: Placeholder for additional information
          nullable: true
          example:
            productFamily: Laptop computers
        createdAt:
          allOf:
            - $ref: '#/components/schemas/baseTime'
            - description: Time cart was created
              nullable: true
        updatedAt:
          allOf:
            - $ref: '#/components/schemas/baseTime'
            - description: Time cart was last updated
              nullable: true
    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
    fulfillmentRequest:
      description: Fulfillment request details
      type: object
      nullable: true
      properties:
        type:
          type: string
          description: Fulfillment type
          nullable: true
          example: WEB_SDD
        networkCode:
          type: string
          description: Inventory network code
          nullable: true
          example: ShipToHome
        channelId:
          $ref: '#/components/schemas/salesChannel'
        inventoryType:
          type: string
          description: >-
            Inventory type - a classifier attribute that provides flexibility to
            define inventory types
          default: availableToPurchase
          example: availableToPurchase
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````