Add Custom Item to Cart
You will want to add a custom item to the cart to handle things like shipping, taxes and inventory you don't manage with Moltin.
Any requests to add a product to cart will return a collection of cart items.
Tax items may optionally be added with the custom item, although client credentials must be used to do this. If included, they replace any existing taxes on the item.
Custom Cart Items are available via implicit authentication. You should always check each order has the correct details for each item, most importantly, price.
Add Custom Item to Cart
POST
https://api.moltin.com/v2/carts/:reference/items
Path Parameters
Name | Type | Description |
---|---|---|
reference | string | A custom reference for this cart created by you |
Headers
Name | Type | Description |
---|---|---|
X-MOLTIN-CURRENCY | string | Specifies the currency to be used for the products in the cart. Your site's default will be used if not specified |
Authorization | string | The Bearer token to grant access to the API |
Request Body
Name | Type | Description |
---|---|---|
tax | array | A list of tax items to apply to this cart item |
type | string |
|
name | string | The name of the custom item |
sku | string | The SKU code to use for the custom item |
description | string | A description of the custom item |
quantity | integer | The amount of custom items to add to cart |
price.amount | integer | The price of the custom item |
price.includes_tax | boolean |
|
Last updated