curl --request PUT \
--url https://api.fabric.inc/v3/carts/{cartId}/line-items/{lineItemId}/shipping-details \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"shippingDetailId": "fef78121-bee3-4448-bf1c-d5b5461dbda2"
}
'{
"id": "12gved0f-7645-40cb-y7b0-167f8bggdb3z",
"itemId": "<unknown>",
"position": 1,
"name": "Varnet Garden Light Kit",
"sku": "16B2GS8LD5FDS",
"productAttributes": [
{
"name": "gift wrapping (small)",
"value": "true",
"attributeId": "60c2a358eb2ec30008ae70a1",
"description": "Gift wrapping for a small package",
"mapping": "ITEM",
"type": "GIFT",
"price": 10,
"level": "order"
}
],
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"quantity": 15,
"priceListId": 108674,
"isActive": true,
"price": "<unknown>",
"discounts": [
"<unknown>"
],
"groups": [
"61d38e117162b7dba69c3d6d"
],
"attributes": {
"productFamily": "Laptop computers"
},
"channel": "12",
"isPickup": true,
"warehouseId": "XYZ-1234",
"shippingDetails": {
"id": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"address": {
"addressLine1": "123 Main St.",
"city": "Seattle",
"region": "WA",
"country": "USA",
"postalCode": "98121",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"attention": "Billing manager",
"email": "[email protected]",
"type": "shipping",
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
}
},
"type": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"isPickup": true,
"altPickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"pickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"warehouseId": "XYZ-1234",
"storeId": "ABC-123",
"shippingCost": 150.25,
"shippingMethodId": "dfsae-2d32113-32lpdd",
"shippingDiscount": 150.25,
"shippingMethodName": "Express Delivery"
},
"fulfillment": {
"type": "WEB_SDD",
"networkCode": "ShipToHome",
"channelId": "12",
"inventoryType": "availableToPurchase",
"inventory": {
"inventoryId": "723910d81723",
"sku": "SKU1",
"itemId": 12345,
"locationNumber": 12345,
"region": "North America",
"channelId": "channel_xyz",
"vendorId": "vendor1",
"createdAt": "2022-08-01T18:03:28.483971941Z",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"leadTime": "5 days",
"type": "primary",
"hasInfiniteInventory": false,
"backorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"preorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"backorderLimit": 50,
"preorderLimit": 40,
"safetyStock": 10,
"lowStock": 10,
"networkCode": "ShipToHome",
"counters": {
"onHand": 100,
"allocated": 10,
"shipped": 20
},
"customAttributes": {
"isBopis": true
},
"networkCounters": {
"softReserve": 10
},
"virtualCounters": {
"availableToPurchase": 60
}
}
},
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"adjustments": [
{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"amount": 60.5,
"reason": "CSR Adjustment",
"attributes": {
"productFamily": "Laptop computers"
},
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z"
}
]
}Update shipping details of a specified line item in the cart. Shipping details have a unique ID, and include the shipping delivery address, settings, pickup person’s details, warehouse ID, store ID, and more.
curl --request PUT \
--url https://api.fabric.inc/v3/carts/{cartId}/line-items/{lineItemId}/shipping-details \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"shippingDetailId": "fef78121-bee3-4448-bf1c-d5b5461dbda2"
}
'{
"id": "12gved0f-7645-40cb-y7b0-167f8bggdb3z",
"itemId": "<unknown>",
"position": 1,
"name": "Varnet Garden Light Kit",
"sku": "16B2GS8LD5FDS",
"productAttributes": [
{
"name": "gift wrapping (small)",
"value": "true",
"attributeId": "60c2a358eb2ec30008ae70a1",
"description": "Gift wrapping for a small package",
"mapping": "ITEM",
"type": "GIFT",
"price": 10,
"level": "order"
}
],
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"quantity": 15,
"priceListId": 108674,
"isActive": true,
"price": "<unknown>",
"discounts": [
"<unknown>"
],
"groups": [
"61d38e117162b7dba69c3d6d"
],
"attributes": {
"productFamily": "Laptop computers"
},
"channel": "12",
"isPickup": true,
"warehouseId": "XYZ-1234",
"shippingDetails": {
"id": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"address": {
"addressLine1": "123 Main St.",
"city": "Seattle",
"region": "WA",
"country": "USA",
"postalCode": "98121",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"attention": "Billing manager",
"email": "[email protected]",
"type": "shipping",
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
}
},
"type": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"isPickup": true,
"altPickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"pickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"warehouseId": "XYZ-1234",
"storeId": "ABC-123",
"shippingCost": 150.25,
"shippingMethodId": "dfsae-2d32113-32lpdd",
"shippingDiscount": 150.25,
"shippingMethodName": "Express Delivery"
},
"fulfillment": {
"type": "WEB_SDD",
"networkCode": "ShipToHome",
"channelId": "12",
"inventoryType": "availableToPurchase",
"inventory": {
"inventoryId": "723910d81723",
"sku": "SKU1",
"itemId": 12345,
"locationNumber": 12345,
"region": "North America",
"channelId": "channel_xyz",
"vendorId": "vendor1",
"createdAt": "2022-08-01T18:03:28.483971941Z",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"leadTime": "5 days",
"type": "primary",
"hasInfiniteInventory": false,
"backorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"preorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"backorderLimit": 50,
"preorderLimit": 40,
"safetyStock": 10,
"lowStock": 10,
"networkCode": "ShipToHome",
"counters": {
"onHand": 100,
"allocated": 10,
"shipped": 20
},
"customAttributes": {
"isBopis": true
},
"networkCounters": {
"softReserve": 10
},
"virtualCounters": {
"availableToPurchase": 60
}
}
},
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"adjustments": [
{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"amount": 60.5,
"reason": "CSR Adjustment",
"attributes": {
"productFamily": "Laptop computers"
},
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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. This header is required.
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.
Unique request ID
Cart ID
"b8a64b52-dab4-8137-8d6a-f2c2337abc1"
Line item ID
"d7e78a21-bee3-4448-bf1c-d5b5461dbda2"
A sample request to add shipping details to a line item in the cart.
Request body used to update line item shipping details
Unique shipping detail identifier
"fef78121-bee3-4448-bf1c-d5b5461dbda2"
OK
Line item details
Line item ID
"12gved0f-7645-40cb-y7b0-167f8bggdb3z"
Line item position number (starts at 1)
x >= 11
Line item name
"Varnet Garden Light Kit"
Line item SKU
"16B2GS8LD5FDS"
Additional line item options
Show child attributes
Attribute name
"gift wrapping (small)"
Attribute value
"true"
Attribute ID
"60c2a358eb2ec30008ae70a1"
Attribute description
"Gift wrapping for a small package"
Attribute mapping
"ITEM"
Attribute type
"GIFT"
Attribute price
10
Attribute level
"order"
Time line item was created
"2022-09-06T14:07:17.000Z"
Time line item was last updated
"2022-09-06T14:07:17.000Z"
Line item quantity
15
Line item price list ID
108674
true: Item is active
false: Item is inactive
true
Individual line item price
Individual line item discount
Group or category ID to which line item belongs
Sales channel
"12"
true: Item is set for pickup
false: Item is set for delivery
true
Warehouse ID
"XYZ-1234"
Shipping details
Show child attributes
Shipping details ID
"fef78121-bee3-4448-bf1c-d5b5461dbda2"
Time shipping detail was created
"2022-09-06T14:07:17.000Z"
Time shipping detail was last updated
"2022-09-06T14:07:17.000Z"
Shipping address
Show child attributes
Address line 1
"123 Main St."
City
"Seattle"
Region or state
"WA"
Country (can be full name, or ISO 3166-1 alpha-2 or alpha-3 code)
"USA"
Postal or ZIP code
"98121"
Address line 2
"Suite 100"
Address line 3
"Seventh floor"
Address line 4
"Attention: Pat E. Kake"
Address recipient
"Billing manager"
Receiver's email address
Address type
"shipping"
Recipient's name
"Pat E Kake"
Shipping type
"SHIP_TO_ADDRESS"
Shipping tax code
"FR1000"
true: Item is set for pickup
false: Item is set for delivery
true
Alternative pickup person
Show child attributes
Person's full name
"Pat E Kake"
Receiver's email address
Designated pickup person
Show child attributes
Person's full name
"Pat E Kake"
Receiver's email address
Warehouse ID
"XYZ-1234"
Store ID
"ABC-123"
Shipping cost
150.25
Shipping method ID
"dfsae-2d32113-32lpdd"
Discount amount
150.25
Shipping method name
"Express Delivery"
The fulfillment details. Fulfillment details
Show child attributes
Fulfillment type
"WEB_SDD"
Inventory network code
"ShipToHome"
Sales channel
"12"
Inventory type - a classifier attribute that provides flexibility to define inventory types
"availableToPurchase"
The inventory response.
Show child attributes
System-generated inventory ID. This ID is generated during inventory creation.
"723910d81723"
Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item.
"SKU1"
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.
12345
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.
12345
Region where inventory is managed
"North America"
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.
"channel_xyz"
ID of the vendor who will replenish the inventory for the retailer
"vendor1"
Time of inventory creation
"2022-08-01T18:03:28.483971941Z"
Time when inventory was last updated
"2022-08-01T20:03:28.483971941Z"
Time between when an order is placed to replenish inventory and when the order is received at warehouse
"5 days"
Inventory type - a classifier attribute that provides flexibility to define inventory types
"primary"
Infinite inventory flag.
true: Inventory can be used any number of times and doesn't have any consumption limit.
false: Inventory can't be used infinitely, and has a consumption limit.
false
Time when backorder is shipped
"2022-08-01T20:03:28.483971941Z"
Time when preorder is shipped
"2022-08-01T20:03:28.483971941Z"
Maximum restock inventory quantity
50
Maximum first-shipping inventory quantity
40
Reserved inventory quantity at the location
10
Inventory quantity below which consumer service wants to be alerted as low stock at the location
10
Code of the network to which the inventory belongs
"ShipToHome"
Merchant-defined inventory counter (also known as inventory position)
Show child attributes
Merchant-defined inventory counter (also known as inventory position)
{
"onHand": 100,
"allocated": 10,
"shipped": 20
}Show child attributes
System-generated fee ID, in UUID format. While creating a cart or line item with fee, fabric generates this ID for the specified fee.
"73bc09d0-874a-4c3d-84d0-df1670d03578"
Attribute for which fee is applied
"gift"
Fee type
"gift_wrap"
Fee amount
10.5
Show child attributes
Price adjustment ID; it identifies a single price adjustment object within the price adjustments array.
"c695af14-5e33-402c-9d8d-71edcf4856a8"
Amount by which the line item's total amount or the specified cart's total amount is adjusted
60.5
Price adjustment reason
"CSR Adjustment"
Time cart was created
"2022-09-06T14:07:17.000Z"
Time cart was last updated
"2022-09-06T14:07:17.000Z"
Was this page helpful?