Line items
Last updated
Last updated
Use this method to obtain the prices and details of all products added to the cart. Note that this operation requires an authentication token.
/v1/shoppers/me/carts/active/line-items
Provide the authorized or anonymous token for a shopper.
Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.
Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.
Use this method to add or update one or more products in a cart. Adding a product to a cart creates a corresponding line item. You can update one or more line items using the productID or externalReferenceID query parameter. Alternatively, you can post multiple line items with a single request with an XML payload in the request body. The method behavior differs depending on which action query mechanism you use to post line items to a cart. The action query parameter provides flexibility for the update behavior. Add is the default action for this method.
/v1/shoppers/me/carts/active/line-items
Provide the authorized or anonymous token for a shopper.
Provide the identifier for the company that owns the product. If you do not provide the companyId, the call will use the default company associated with the API key.
Provide a comma-separated list of one or more external reference identifiers. The externalReferenceId is your company's internal identifier or stock keeping unit (SKU) for a product used when creating a line item with companyId. If you do not explicitly provide the companyId when creating a line item using the externalReferenceId, the system will use the companyId associated with the API key.
Provide the offer's identifier.
Provide a comma-separated list of one or more product IDs. A product identifier is a product's unique stock keeping unit (SKU). Use this product ID when adding a product to a cart and creating a line item.
Provide the line item ID for the parent product when adding a child product to the cart to ensure the child product is correctly associated with the parent product line item. Remember also to include the offer ID.
Provide the number of products added to the cart. The value must be a valid integer. If the quantity is not explicitly specified, the default is 1.
When set to true, this parameter suppresses an order's confirmation email. To use this feature, contact Customer Success.
Use this method to remove multiple or all line items from your cart with just one request. Note that this method requires an authentication token.
/v1/shoppers/me/carts/active/line-items
Provide the authorized or anonymous token for a shopper.
Provide a comma-separated list of one or more line item identifiers.
No body
To get all line items for an order, specify the order ID in the {id} URI path parameter.
/v1/shoppers/me/orders/{orderId}/line-items
Provide the order's identifier.
Provide the authorized token for a shopper.
Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.
Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.
To retrieve a specific line item, provide its ID in the {id} URI path parameter. Note that this method requires an authentication token.
/v1/shoppers/me/carts/active/line-items/{lineItemsId}
Provide the line item identifier.
Provide the authorized or anonymous token for a shopper.
Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.
Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.
Use this method to add one or more products to a cart. Adding a product to a cart creates a corresponding line item. You can update one or more line items using the productID or externalReferenceID query parameter. Alternatively, you can post multiple line items with a single request with an XML payload in the request body. The method behavior differs depending on which action query mechanism you use to post line items to a cart. The action query parameter provides flexibility for the update behavior. Add is the default action for this method.
/v1/shoppers/me/carts/active/line-items/{lineItemsId}
Provide the line item identifier.
Provide the authorized or anonymous token for a shopper.
Modifies the POST behavior. The action parameter determines the method behavior for handling the quantity associated with a posted line item. The valid values are: add, update, and subtract. Update is the default action for the POST shoppers/me/carts/active/line-items/{lineItemsId} resource method. Add is the default action for the POST shoppers/me/carts/active/line-items resource method. To override the default method behavior for handling quantity, explicitly specify the value of the action query parameter.
Provide a positive integer value (1, 2, 3, etc., excluding zero) for the line item quantity. If the quantity is not explicitly specified, the default is 1. Providing a negative integer or zero value returns an error. The action query parameter determines whether to add, update, or subtract the quantity from existing line item quantities.
Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.
Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.
To delete a particular line item for a product, you need to provide the ID of the line item in the {id} URI path parameter. Note that this method requires an authentication token.
/v1/shoppers/me/carts/active/line-items/{lineItemsId}
Provide the line item identifier.
Provide the authorized or anonymous token for a shopper.
No body
To get a line item for an order, specify the order ID in the first {id} uri path parameter. Specify the line item ID in the second {id} URI path parameter.
/v1/shoppers/me/orders/{orderId}/line-items/{lineItemId}
Provide the order's identifier.
Provide the line item identifier.
Provide the authorized token for a shopper.
Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.
Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.