---
title: "Add Shipment Info"
method: POST
path: "/line-items/shipments"
tags: ["Line Items"]
---

# Add Shipment Info

`POST /line-items/shipments`

This endpoint allows shipping information to be added to an existing order by using the Extend Line Item ID or Line Item Transaction ID (the merchant’s unique identifier for the order line item) of the Shipping Protection Contract line from the existing order.<div class='wrapper important'><h3>Important:</h3>Shipment information is only required when creating an order for shipping protection contracts. Shipments need to be added to an order for products shipped after order creation.</div>

## Headers

- `Content-Type` string, required
- `X-Extend-Access-Token` string, required
- `Accept` string, required

## Request body

- union
  - object — Information related to the shipment of the product associated to the order line item
    - `lineItemId` string, required — Unique identifier for the Extend order line item.
    - `productIds` string[], required — List of Extend Product IDs associated to the shipment.
    - `shipmentDate` integer, required — Date package was shipped by the shipping provider. NOTE - This will be automatically updated with a valid Shipping Provider and Tracking ID on the shipment.
    - `shippingProvider` string, required — Shipping provider code associated to the package. Merchants must provide this shipping provider code to properly track the statuses of the shipment. NOTE - This is the current list of codes that we support shipment tracking updates for: 'fedex', 'ups', 'usps'. If a different code value is sent, the shipment will be created but we will not be able to automatically track shipment updates.
    - `trackingId` string, required — Tracking number from the shipping provider. Merchants must provide this tracking number to properly track the statuses of the shipment.
    - `destination` object — Destination location of the shipment associated to the package.
      - `address1` string, required — Address line 1.
      - `address2` string — Address line 2.
      - `city` string, required — Address city.
      - `companyName` string — Address company name.
      - `countryCode` string, required — Address country code. NOTE - This should be in a two letter format (e.g. United States = US).
      - `personName` string — Contact full name.
      - `phone` string — Phone number.
      - `postalCode` string, required — Address postal code.
      - `provinceCode` string — Address state or province code.
    - `source` object — Source location of the shipment associated to the package.
      - `address1` string, required — Address line 1.
      - `address2` string — Address line 2.
      - `city` string, required — Address city.
      - `companyName` string — Address company name.
      - `countryCode` string, required — Address country code. NOTE - This should be in a two letter format (e.g. United States = US).
      - `personName` string — Contact full name.
      - `phone` string — Phone number.
      - `postalCode` string, required — Address postal code.
      - `provinceCode` string — Address state or province code.
    - `trackingUrl` string — URL generated by the shipping provider for the associated tracking number. NOTE - This will be automatically updated with a valid Shipping Provider and Tracking ID on the shipment.
  - object — Information related to the shipment of the product associated to the order line item
    - `lineItemTransactionId` string, required — Unique identifier for the Extend order line item.
    - `productIds` string[], required — List of Extend Product IDs associated to the shipment.
    - `shipmentDate` integer, required — Date package was shipped by the shipping provider. NOTE - This will be automatically updated with a valid Shipping Provider and Tracking ID on the shipment.
    - `shippingProvider` string, required — Shipping provider code associated to the package. Merchants must provide this shipping provider code to properly track the statuses of the shipment. NOTE - This is the current list of codes that we support shipment tracking updates for: 'fedex', 'ups', 'usps'. If a different code value is sent, the shipment will be created but we will not be able to automatically track shipment updates.
    - `trackingId` string, required — Tracking number from the shipping provider. Merchants must provide this tracking number to properly track the statuses of the shipment.
    - `destination` object — Destination location of the shipment associated to the package.
      - `address1` string, required — Address line 1.
      - `address2` string — Address line 2.
      - `city` string, required — Address city.
      - `companyName` string — Address company name.
      - `countryCode` string, required — Address country code. NOTE - This should be in a two letter format (e.g. United States = US).
      - `personName` string — Contact full name.
      - `phone` string — Phone number.
      - `postalCode` string, required — Address postal code.
      - `provinceCode` string — Address state or province code.
    - `source` object — Source location of the shipment associated to the package.
      - `address1` string, required — Address line 1.
      - `address2` string — Address line 2.
      - `city` string, required — Address city.
      - `companyName` string — Address company name.
      - `countryCode` string, required — Address country code. NOTE - This should be in a two letter format (e.g. United States = US).
      - `personName` string — Contact full name.
      - `phone` string — Phone number.
      - `postalCode` string, required — Address postal code.
      - `provinceCode` string — Address state or province code.
    - `trackingUrl` string — URL generated by the shipping provider for the associated tracking number. NOTE - This will be automatically updated with a valid Shipping Provider and Tracking ID on the shipment.

## Response `200`

Successful shipment info addition.

- object — Line item model required to create a Shipping Protection contract.
  - `quoteId` string, required — Unique identifier for the quote provided when a shipping protection offer is made.
  - `premium` integer — Purchase price or premium of shipping protection
  - `shipmentInfo` object[], required
    - `destination` object — Destination location of the shipment associated to the package.
      - `address1` string, required — Address line 1.
      - `address2` string — Address line 2.
      - `city` string, required — Address city.
      - `companyName` string — Address company name.
      - `countryCode` string, required — Address country code. NOTE - This should be in a two letter format (e.g. United States = US).
      - `personName` string — Contact full name.
      - `phone` string — Phone number.
      - `postalCode` string, required — Address postal code.
      - `provinceCode` string — Address state or province code.
    - `lineItemId` string — Unique identifier for the Extend order line item.
    - `lineItemTransactionId` string — Unique identifier for the Extend order line item.
    - `productIds` string[], required — List of Extend Product IDs associated to the shipment.
    - `shipmentDate` integer, required — Date package was shipped by the shipping provider. NOTE - This will be automatically updated with a valid Shipping Provider and Tracking ID on the shipment.
    - `shippingProvider` string, required — Shipping provider code associated to the package. Merchants must provide this shipping provider code to properly track the statuses of the shipment. NOTE - This is the current list of codes that we support shipment tracking updates for: 'fedex', 'ups', 'usps'. If a different code value is sent, the shipment will be created but we will not be able to automatically track shipment updates.
    - `source` object — Source location of the shipment associated to the package.
      - `address1` string, required — Address line 1.
      - `address2` string — Address line 2.
      - `city` string, required — Address city.
      - `companyName` string — Address company name.
      - `countryCode` string, required — Address country code. NOTE - This should be in a two letter format (e.g. United States = US).
      - `personName` string — Contact full name.
      - `phone` string — Phone number.
      - `postalCode` string, required — Address postal code.
      - `provinceCode` string — Address state or province code.
    - `trackingId` string, required — Tracking number from the shipping provider. Merchants must provide this tracking number to properly track the statuses of the shipment.
    - `trackingUrl` string — URL generated by the shipping provider for the associated tracking number. NOTE - This will be automatically updated with a valid Shipping Provider and Tracking ID on the shipment.
    - `shipmentId` string — Unique uuid identifier for the shipment.
  - `contractId` string — Unique identifier associating a generated contract to a line item. This field can be optionally generated by the merchant as a GUID. NOTE: You must be an approved merchant to send a unique identifier for Extend contracts. Please reach out to your merchant success manager for more details.
  - `charitableDonation` object — An object that stores data related to a charitable donation that a customer made.
    - `id` string, required — Unique identifier for the charity organization.
    - `donationAmount` integer, required — Amount donated to the charity organization.<p>Should be expressed in terms of the smallest currency unit.</p> <ul> <li>$19.99 would be 1999</li> <li>1.234,56 € would be 123456</li> <li>£ 1,999.99 would be 199999</li> </ul>
    - `name` string — Name of the charity organization.
  - `lineItemTransactionId` string — Unique identifier from the merchant’s system for the order line item.
  - `discountAmount` integer — Discount amount applied for the product line item. NOTE - If you have multiple quantities for this line item, only provide the amount for a single quantity of this product.<br><br>Amount should be expressed in terms of the smallest currency unit.<ul><li>$19.99 would be 1999</li><li>1.234,56 € would be 123456</li><li>£ 1,999.99 would be 199999</li></ul>
  - `taxCost` integer — Tax cost associated to the product line item. NOTE - If you have multiple quantities for this line item, only provide the cost for a single quantity of this product.<br><br>Amount should be expressed in terms of the smallest currency unit.<ul><li>$19.99 would be 1999</li><li>1.234,56 € would be 123456</li><li>£ 1,999.99 would be 199999</li></ul>
  - `type` 'shipments', required
  - `lineItemIds` string[]
  - `offerId` string — Unique identifier of the offer made for a product or cart identifier for the order line item. This will be be used for analytics like AB testing experiments.
  - `offerPlanId` string — Unique identifier for the offer used for a contract.
  - `accountId` string — Unique identifier for the account associated with the order line item creation.
  - `orderId` string — Unique identifier provided by merchant for transaction associated to Extend order.
  - `id` string — Unique identifier for line item in Extend's system.
  - `transactionId` string — Unique identifier provided by merchant for transaction associated to Extend order.
  - `storeId` string — Unique identifier for merchant’s store in Extend’s system.
  - `status` 'canceled' | 'cancel_failed' | 'contract_failed' | 'contract_pending' | 'fulfilled' | 'lead_failed' | 'quote_failed' | 'pending' | 'refunded' | 'unfulfilled' — Status of the line item.<ul><li><strong>canceled</strong> - The order line item has been canceled. When a line item is canceled, a cancellation of an associated Extend contract will be triggered.</li><li><strong>cancel_failed</strong> - The attempt to cancel the order line item has failed. This is typically due to logic in Extend’s system preventing the cancelation (e.g. attempt to cancel a line item when there is an associated shipment).</li><li><strong>contract_failed</strong> - The attempt to create an Extend contract from the order line item has failed. This is typically due to expected fields or values being invalid or incorrect on the order line item, specifically at the product, plan, or offers level.</li><li><strong>contract_pending</strong> - A contract that will be created from the order line item is pending a wait period provided on the order.</li><li><strong>fulfilled</strong> - The product on the order line item has been fulfilled. Once an order line item is in the fulfilled status, any associated Extend contract to the line item will be created.</li><li><strong>lead_failed</strong> - The attempt to create an Extend lead contract from the order line item has failed. This is typically due to expected fields or values being invalid or incorrect on the order line item.</li><li><strong>quote_failed</strong> - The attempt to create a shipping protection contract from the order line item has failed. This is typically due to expected fields or values being invalid or incorrect on the order line item.</li><li><strong>pending</strong> - An order line item that has been created where the order has a wait period value. This is typically used to create an order that requires a certain time period to pass before it is considered a valid order.</li><li><strong>refunded</strong> - A successful refund has been made by the merchant to the customer on the order line item.</li><li><strong>unfulfilled</strong> - An order line item has been created but the product associated has not been fulfilled yet.</li></ul>
  - `fulfilledAt` integer — Date the line item was fulfilled. NOTE - This field is formatted as a 13 digit Epoch timestamp
  - `createdAt` integer — Date the line item was created. NOTE - This field is formatted as a 13 digit Epoch timestamp
  - `updatedAt` integer — Date the line item was updated. NOTE - This field is formatted as a 13 digit Epoch timestamp
  - `adjustments` object — Contains different fields related to adjustments made that should be tracked for analytics purposes.
    - `adjustedQuoteId` string — A new Quote ID that was generated by the Orders service when a product mismatch or other discrepancy was detected from the original Quote ID.
    - `calculatedListPrice` integer — The calculated expected list price for a contract on the order that may need to be referenced during order line item fulfillment.
    - `isCreateQuote` boolean — A flag that indicates no Quote ID was provided for a shipping protection contract and one was generated automatically by the Orders service.
    - `previousContracts` string[]
    - `productsRemoved` object[]
      - `quantity` integer
      - `referenceId` string
    - `newPremium` integer — Premium of new shipping quote if partially refunded.
  - `isCreateQuote` boolean — A flag that indicates no Quote ID was provided for a shipping protection contract and one was generated automatically by the Orders service.
  - `contractFailedReasons` string[] — List of reasons of why the contract failed to be created.
  - `analytics` object — Contains additional information about an order line item that helps with reporting and analytics.
    - `fulfillmentMethod` string — The method used to fulfill the order. F.e., BOPIS, DoorDash Delivery, Ship To Home

## Other responses

- `404` — The specified resource was not found
- `500` — Internal server error

---

[API](https://skmtc.dev/extend/apis/leads-api.md) · [All operations](https://skmtc.dev/extend/apis/leads-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/extend/leads-api/revisions/76403e33d7d6/schema)
