---
title: "Cancel an Order Line Item"
method: POST
path: "/line-items/{lineItemId}/cancel"
tags: ["Line Items"]
---

# Cancel an Order Line Item

`POST /line-items/{lineItemId}/cancel`

This endpoint enables order line item cancelation using the Extend Line Item ID. Order line items may need to be canceled if only one or several line items have been canceled on the merchant’s order. Line items may also need to be canceled when associated extended warranty or shipping protection Extend contracts need to be canceled.

When an order line item cancelation request is made, a cancelation request will be made to any associated Extend contract on the line item. Here are helpful definitions that could be updated on the order line item status after a cancelation request is made:

*   canceled - The order line item has been canceled. When a line item is canceled, this will trigger a cancellation of an associated Extend contract on the line item.
    
*   cancel\_failed - 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).

## Path parameters

- `lineItemId` string, uuid, required

## Headers

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

## Response `200`

Successful line item cancelation. Note - This is an example response for an extended warranty contract.

- object — Object containing line items array property with the line item that was cancelled from the order
  - `lineItems` object[], required
    - `type` 'contract', required
    - `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.
    - `lineItemTransactionId` string — Unique identifier provided by the merchant for querying.
    - `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.
    - `plan` object, required — Information about the plan being purchased.
      - `id` string, required — Unique identifier for Extend plan.
      - `purchasePrice` integer, required — Purchase price of the Extend contract purchased.<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>
      - `termsId` string — Unique identifier for the terms associated to the Extend plan.
      - `termsVersion` string — Version number for the terms associated to the Extend plan.
      - `version` string — Version number for the Extend plan.
    - `product` object
      - `deliveryStatus` 'awaiting_shipment' | 'shipped' — Various shipping statuses
      - `id` string, required — Unique ID of product created in Extend during product catalog mapping.
      - `purchasePrice` integer, required — Price paid for the product by the customer.<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>
      - `serialNumber` string — Merchant-assigned product serial number.
      - `purchaseDate` integer — Purchase date of the original product (10 or 13 digit timestamp).
      - `fulfillmentDate` integer — Fulfillment date of the product (10 or 13 digit timestamp).
      - `listPrice` integer — Original list price of the product (before any discounts).
      - `name` string — Name of product given by the merchant.
      - `mfrWarranty` object — Manufacturer warranty information.
        - `parts` integer — manufacturer warranty parts in months
        - `labor` integer — manufacturer warranty labor in months
        - `url` string — manufacturer warranty URL
      - `parentReferenceId` string — The parent reference ID of the product.
    - `leadToken` string — Unique identifier for the lead associated to a line item.
    - `id` string, required — Unique identifier for line item in Extend's system.
    - `accountId` string, required — Unique identifier for the account associated with the order line item creation.
    - `status` 'canceled' | 'cancel_failed' | 'contract_failed' | 'contract_pending' | 'fulfilled' | 'lead_failed' | 'quote_failed' | 'pending' | 'refunded' | 'unfulfilled', required — 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>
    - `storeId` string, required — Unique identifier for merchant’s store in Extend’s system.
    - `orderId` string, required — Unique identifier provided by merchant for transaction associated to Extend order.
    - `transactionId` string, required — Unique identifier provided by merchant for transaction associated to Extend order.
    - `isProductWarrantabilityVerified` boolean — Indicates whether our system skipped product warrantability validation when creating a contract.
    - `fulfilledAt` integer — Date the line item was fulfilled. NOTE - This field is formatted as a 13 digit Epoch timestamp
    - `refundedAt` integer — Date the line item was refunded. NOTE - This field is formatted as a 13 digit Epoch timestamp
    - `cancelledAt` integer — Date the line item was cancelled. NOTE - This field is formatted as a 13 digit Epoch timestamp
    - `createdAt` integer, required — Date the line item was created. NOTE - This field is formatted as a 13 digit Epoch timestamp
    - `updatedAt` integer, required — Date the line item was updated. NOTE - This field is formatted as a 13 digit Epoch timestamp
    - `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>
    - `adjustments` object — Contains different fields related to adjustments made that should be tracked for analytics purposes.
      - `calculatedListPrice` integer — The calculated expected list price for a contract on the order that may need to be referenced during order line item fulfillment.
      - `originalPlanId` string — A unique identifier for the original plan that was used to create a contract.
    - `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
    - `finalSalesPrice` integer — The line item final sales price charged to the customer, inclusive of any line item tax costs, other costs for the product, and any discounts applied to the line item. Amount should be expressed in terms of the smallest currency unit.
    - `perUnitFinalSalesPrice` integer — The per unit final sales price, inclusive of any tax costs, other costs for the product, and any discounts applied to the product. Amount should be expressed in terms of the smallest currency unit.
    - `perUnitDiscountAmount` integer — The per unit discount amount applicable to a single quantity of the order line. Amount should be expressed in terms of the smallest currency unit.
    - `perUnitTaxCost` integer — The per unit tax amount applicable to a single quantity of the order line. Amount should be expressed in terms of the smallest currency unit.

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