Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/elastic-path-tax-items-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Carts, Checkout, Orders Introduction Tax Items API
description: 'A cart contains a list of the products that a shopper adds to the cart while browsing your catalog. In the context of a cart, a selected product is called a cart item.
A cart item identifies the product, the product price, the quantity selected, and the total price for the quantity selected. The cart displays a running total of the cost for the selected products plus the calculated tax.
You can allow your shoppers to add custom text to a product when adding an item to their carts. This is useful, for example, if you have a product like a T-shirt that can be personalized. See [Add product to cart](/docs/api/carts/manage-carts#add-product-to-cart).
After a shopper checks out, the cart is converted to an order, and you can manually delete the cart. If you don''t delete the cart, it is purged automatically after seven days.
The preview cart feature allows you to set a future date for your shopping cart and view the promotions that will be available during that time period. This feature enables you to validate your promotion settings and observe how they will be applied in the cart. See [Create a Preview Cart](/docs/api/carts/create-a-cart#preview-cart).
The following diagram shows a typical cart workflow:

### Multiple Carts
Buyers often make purchases based on jobs that they need to perform or outcomes they need to achieve and therefore require more than one shopping cart. For example, a corporate buyer places orders for multiple locations. Each location has a different frequency of ordering and require different products. The buyer can create one cart per location, fill the carts, and then check out the carts quickly. Similarly, shoppers can also create multiple carts for the ease of managing various shopping experiences, such as birthdays or holidays.
Each cart is discrete and separate. Any updates or changes to one cart has no effect on the other carts. A cart persists, that is, it stays with the buyer or shopper even after they use the cart in a checkout. Carts remain available after a checkout.
'
contact:
name: Elastic Path
url: https://elasticpath.com
version: 26.0313.7324347
x-version-timestamp: 2026-03-13 21:22:42+00:00
license:
name: MIT
url: assets/LICENSE
servers:
- url: https://useast.api.elasticpath.com
description: US East Production Server
variables: {}
- url: https://euwest.api.elasticpath.com
description: EU West Production Server
variables: {}
security:
- bearerAuth: []
tags:
- name: Tax Items
description: "Taxes differ by country and can differ within the country by region, state, or province. Each jurisdiction has a unique tax code and rate. If your store serves many jurisdictions, integrate a third-party tax generator to manage taxes. If your store serves a few jurisdictions, you can use the API to define the tax codes and rates in Composable Commerce.\n\nTaxes are calculated after all promotional discounts have been applied. When calculating taxes on a cart or order, you can choose from the following methods for calculating taxes:\n\n - Simple calculation method: Taxes are calculated at the unit level and are rounded to the nearest penny for the unit.\n - Line calculation method: Default. Taxes are calculated at the line level and are rounded to the nearest penny for the line.\n For more information about calculation methods, see [Calculate cart and order totals](/guides/How-To/Carts/calculate-totals).\n\nTax values can be either `rate` or `amount`.\n - `rate` - Represents the tax as a percentage in decimal form.\n - `amount` - Represents a tax amount.\n\n:::note\nTax items can be added and removed using [client_credentials access tokens](/docs/api/authentication/create-an-access-token). Only administrators with `client-credentials` access tokens are able to manage tax items.\n:::\n"
paths:
/v2/carts/{cartID}/items/{cartitemID}/taxes:
parameters: []
post:
tags:
- Tax Items
summary: Add Tax Item to Cart
description: '
Use this endpoint to add a tax item to a cart.
:::note
There is a soft limit of 5 unique tax items per cart item at any one time.
:::
'
operationId: addTaxItemToCart
parameters:
- name: cartID
in: path
description: The unique identifier of the cart.
required: true
style: simple
schema:
type: string
- name: cartitemID
in: path
description: The unique identifier of the cart item.
required: true
style: simple
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
rateTaxItem:
summary: Add a rate-based tax item
value:
data:
type: tax_item
code: VAT
jurisdiction: UK
name: Value Added Tax
rate: 0.2
amountTaxItem:
summary: Add an amount-based tax item
value:
data:
type: tax_item
code: GST
jurisdiction: AU
name: Goods and Services Tax
amount: 1000
required: true
responses:
'200':
description: ''
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
rateTaxItem:
summary: Rate-based tax item
value:
data:
id: 662461ad-ddcb-4dbd-8ed7-ade9aa63b5f9
type: tax_item
code: VAT
jurisdiction: UK
name: Value Added Tax
rate: 0.2
'201':
description: Created
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
amountTaxItem:
summary: Amount-based tax item
value:
data:
id: 3f3b5e26-7e7e-4d2d-a3a7-5e9b1f72fabc
type: tax_item
code: GST
jurisdiction: AU
name: Goods and Services Tax
amount: 1000
'422':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
deprecated: false
/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes:
parameters: []
post:
tags:
- Tax Items
summary: Add Tax Item to Bundle Component
description: '
Use this endpoint to add a tax item to a specific bundle component (component product) within a cart item.
:::note
There is a soft limit of 5 unique tax items per component product at any one time.
:::
'
operationId: addTaxItemToCartItemComponent
parameters:
- name: cartID
in: path
description: The unique identifier of the cart.
required: true
style: simple
schema:
type: string
- name: cartitemID
in: path
description: The unique identifier of the cart item.
required: true
style: simple
schema:
type: string
- name: productID
in: path
description: The unique identifier of the component product within the bundle.
required: true
style: simple
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
rateTaxItemComponent:
summary: Add a rate-based tax item to a bundle component
value:
data:
type: tax_item
code: VAT
jurisdiction: UK
name: Value Added Tax
rate: 0.2
amountTaxItemComponent:
summary: Add an amount-based tax item to a bundle component
value:
data:
type: tax_item
code: PST
jurisdiction: CA-BC
name: Provincial Sales Tax
amount: 250
required: true
responses:
'201':
description: Created
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
componentRateTaxItem:
summary: Rate-based tax item on bundle component
value:
data:
id: 4f4e6d37-8c8c-4a1a-b8a3-6cd2efab12de
type: tax_item
code: VAT
jurisdiction: UK
name: Value Added Tax
rate: 0.2
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
deprecated: false
/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes/{taxitemID}:
parameters: []
put:
tags:
- Tax Items
summary: Update Tax Item on Bundle Component
description: Use this endpoint to update a tax item on a specific bundle component (component product) within a cart item. To change tax value from `rate` to `amount`, set `rate` to `null`, then set `amount` value and vice versa.
operationId: updateTaxItemFromCartItemComponent
parameters:
- name: cartID
in: path
description: The unique identifier of the cart.
required: true
style: simple
schema:
type: string
- name: cartitemID
in: path
description: The unique identifier of the cart item.
required: true
style: simple
schema:
type: string
- name: productID
in: path
description: The unique identifier of the component product within the bundle.
required: true
style: simple
schema:
type: string
- name: taxitemID
in: path
description: The unique identifier of the tax item on the component product.
required: true
style: simple
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
updateRateTaxItemComponent:
summary: Update a bundle component tax item using rate
value:
data:
type: tax_item
code: VAT
jurisdiction: UK
name: Value Added Tax
rate: 0.18
updateAmountTaxItemComponent:
summary: Update a bundle component tax item using amount
value:
data:
type: tax_item
code: GST
jurisdiction: AU
name: Goods and Services Tax
amount: 1200
required: false
responses:
'200':
description: ''
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
componentUpdatedAmountTaxItem:
summary: Updated bundle component tax item (amount)
value:
data:
id: 7aa2ddad-2c5b-4d9b-9ce9-3e8cff778a10
type: tax_item
code: GST
jurisdiction: AU
name: Goods and Services Tax
amount: 1200
deprecated: false
delete:
tags:
- Tax Items
summary: Delete Tax Item from Bundle Component
description: '
Use this endpoint to delete a tax item from a specific bundle component (component product) within a cart item.
'
operationId: deleteTaxItemFromCartItemComponent
parameters:
- name: cartID
in: path
description: The unique identifier of the cart.
required: true
style: simple
schema:
type: string
- name: cartitemID
in: path
description: The unique identifier of the cart item.
required: true
style: simple
schema:
type: string
- name: productID
in: path
description: The unique identifier of the component product within the bundle.
required: true
style: simple
schema:
type: string
- name: taxitemID
in: path
description: The unique identifier of the tax item on the component product.
required: true
style: simple
schema:
type: string
responses:
'204':
description: No Content
headers: {}
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
deprecated: false
/v2/carts/{cartID}/taxes:
parameters: []
post:
tags:
- Tax Items
summary: Bulk Add Tax Items to Cart
description: "Use this endpoint to bulk add tax items to cart items and bundle component products.\n\n:::note\n\nA cart item can only have a maximum of five tax items.\nA bundle component product can only have a maximum of five tax items.\n\n:::\n\n### Bundle Component Taxes\n\nTo add tax items to bundle component products, include a `meta` object with `component_product_id` in each tax item:\n\n```json\n{\n \"data\": [\n {\n \"type\": \"tax_item\",\n \"code\": \"GST\",\n \"name\": \"Goods and Services Tax\",\n \"rate\": 0.1,\n \"meta\": {\n \"component_product_id\": \"12345678-1234-5678-9012-123456789012\"\n },\n \"relationships\": {\n \"item\": {\n \"data\": {\n \"type\": \"cart_item\",\n \"id\": \"cart-item-id\"\n }\n }\n }\n }\n ]\n}\n```\n\n### Errors\n\n\n`422 Unprocessable Entity`\n\n\nIn this example, when `options.add_all_or_nothing` is set to `true` and if\none of cart items is not found or has reached its maximum tax item limit,\nthe following error response is returned:\n\n\n```json\n\n{\n \"status\": 422,\n \"title\": \"Add all or nothing.\",\n \"detail\": \"Add all or nothing set to (true). Could not bulk add tax items to cart.\"\n }\n\n```\n\n\nIn this example, if you add more than five tax items to the same cart item,\nthe following error response is returned:\n\n\n```json\n\n{\n \"status\": 422,\n \"title\": \"Tax item not added to cart item.\",\n \"detail\": \"Cannot exceed tax item limit of (5) on cart item.\",\n \"meta\": {\n \"id\": \"f88e6370-cb35-40b2-a998-c759f31dec0a\"\n }\n }\n```\n\n\n`404`\n\n\nIn this example, if there is a mismatch between `cart_item`/`custom_item`\nand the `relationships.item.data.type` specified in the bulk add tax item,\nthe following error response is returned:\n\n\n```json\n\n{\n \"data\": [],\n \"errors\": [\n {\n \"status\": 404,\n \"title\": \"Tax item not added to cart item.\",\n \"detail\": \"Mismatch between bulk tax item type(cart_item) and cart item type(custom_item).\",\n \"meta\": {\n \"id\": \"56aab5d1-1dd4-45ed-88ed-4d0cc396b62d\"\n }\n },\n {\n \"status\": 404,\n \"title\": \"Tax item not added to cart item.\",\n \"detail\": \"Mismatch between bulk tax item type(cart_item) and cart item type(custom_item).\",\n \"meta\": {\n \"id\": \"56aab5d1-1dd4-45ed-88ed-4d0cc396b62d\"\n }\n }\n ]\n}\n\n```\n"
operationId: bulkAddTaxItemsToCart
parameters:
- name: cartID
in: path
description: The unique identifier of the cart.
required: true
style: simple
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/CartsBulkTaxes'
examples:
bulkRateTaxItems:
summary: Bulk add rate-based tax items to cart items
value:
data:
- type: tax_item
code: VAT
name: Value Added Tax
jurisdiction: UK
rate: 0.2
relationships:
item:
data:
type: cart_item
id: 5601a4b1-9d13-42d3-8fb7-03b35169d1b6
options:
add_all_or_nothing: false
bulkAmountTaxItems:
summary: Bulk add amount-based tax items to cart and custom items
value:
data:
- type: tax_item
code: GST
name: Goods and Services Tax
jurisdiction: AU
amount: 1000
relationships:
item:
data:
type: cart_item
id: 1a2b3c4d-5e6f-7a8b-9c0d-abcdefabcdef
- type: tax_item
code: PST
name: Provincial Sales Tax
jurisdiction: CA-BC
amount: 250
relationships:
item:
data:
type: custom_item
id: 9f8e7d6c-5b4a-3210-fedc-ba9876543210
options:
add_all_or_nothing: true
bulkBundleComponentTaxItems:
summary: Bulk add tax items to bundle component products using meta
value:
data:
- type: tax_item
code: GST
name: Goods and Services Tax
jurisdiction: AU
rate: 0.1
meta:
component_product_id: 12345678-1234-5678-9012-123456789012
relationships:
item:
data:
type: cart_item
id: 22223333-4444-5555-6666-777788889999
options:
add_all_or_nothing: false
required: false
responses:
'200':
description: ''
headers: {}
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/CartsBulkTaxes'
examples:
bulkAddedRateItems:
summary: Bulk add response with generated IDs (rate)
value:
data:
- id: 98c2b4de-7f33-4b3a-8f2e-8c1b2a3d4e5f
type: tax_item
code: VAT
name: Value Added Tax
jurisdiction: UK
rate: 0.2
relationships:
item:
data:
type: cart_item
id: 5601a4b1-9d13-42d3-8fb7-03b35169d1b6
'201':
description: Created
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/CartsBulkTaxes'
examples:
bulkAddedAmountAndComponentItems:
summary: Bulk add response with amount and component taxes
value:
data:
- id: 2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d
type: tax_item
code: GST
name: Goods and Services Tax
jurisdiction: AU
amount: 1000
relationships:
item:
data:
type: cart_item
id: 1a2b3c4d-5e6f-7a8b-9c0d-abcdefabcdef
- id: 5e4d3c2b-1a0f-4b8a-9c0d-7f6e5d4c3b2a
type: tax_item
code: PST
name: Provincial Sales Tax
jurisdiction: CA-BC
amount: 250
relationships:
item:
data:
type: custom_item
id: 9f8e7d6c-5b4a-3210-fedc-ba9876543210
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
deprecated: false
delete:
tags:
- Tax Items
summary: Bulk Delete Tax Items from Cart
description: "Use this endpoint to bulk delete all tax items from all cart items and bundle component products in the cart.\n\n:::warning\n\nThis operation will remove ALL tax items from:\n- All cart items in the cart\n- All bundle component products within bundle cart items\n\n:::\n\n### Behavior\n\n- Removes all tax items from every cart item\n- Removes all tax items from every component product in bundle cart items\n- If no tax items exist anywhere in the cart, returns a 404 error\n\n### Errors\n\n`404 Not Found`\n\nIf no tax items exist in the cart (on cart items or component products):\n\n```json\n{\n \"status\": 404,\n \"title\": \"Resource Not Found\",\n \"detail\": \"No tax items exist in the cart\"\n}\n```\n"
operationId: bulkDeleteTaxItemsFromCart
parameters:
- name: cartID
in: path
description: The unique identifier of the cart.
required: true
style: simple
schema:
type: string
responses:
'204':
description: No Content
headers: {}
content: {}
'404':
description: Not Found - No tax items exist in the cart
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
deprecated: false
/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}:
parameters: []
put:
tags:
- Tax Items
summary: Update a Tax Item
description: Use this endpoint to update a tax item. To change tax value from `rate` to `amount`, set `rate` to `null`, then set `amount` value and vice versa.
operationId: updateATaxItem
parameters:
- name: cartID
in: path
description: The unique identifier of the cart.
required: true
style: simple
schema:
type: string
- name: cartitemID
in: path
description: The unique identifier of the cart item.
required: true
style: simple
schema:
type: string
- name: taxitemID
in: path
description: The unique identifier of the tax item.
required: true
style: simple
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
updateRateTaxItem:
summary: Update a tax item using rate
value:
data:
type: tax_item
code: VAT
jurisdiction: UK
name: Value Added Tax
rate: 0.15
updateAmountTaxItem:
summary: Update a tax item using amount
value:
data:
type: tax_item
code: GST
jurisdiction: AU
name: Goods and Services Tax
amount: 1500
required: false
responses:
'200':
description: ''
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemTaxesEntityResponse'
examples:
updatedRateTaxItem:
summary: Updated tax item (rate)
value:
data:
id: 662461ad-ddcb-4dbd-8ed7-ade9aa63b5f9
type: tax_item
code: VAT
jurisdiction: UK
name: Value Added Tax
rate: 0.15
deprecated: false
delete:
tags:
- Tax Items
summary: Delete a Tax Item
description: Use this endpoint to delete a tax item.
operationId: deleteATaxItem
parameters:
- name: cartID
in: path
description: The unique identifier of the cart.
required: true
style: simple
schema:
type: string
- name: cartitemID
in: path
description: The unique identifier of the cart item.
required: true
style: simple
schema:
type: string
- name: taxitemID
in: path
description: The unique identifier of the tax item.
required: true
style: simple
schema:
type: string
responses:
'204':
description: No Content
headers: {}
content: {}
deprecated: false
components:
schemas:
CartsItemsTaxesWithRate:
title: Tax Object (With Rate)
allOf:
- $ref: '#/components/schemas/CartsItemsTaxesCommon'
- type: object
required:
- rate
properties:
rate:
description: 'The tax rate as a decimal (12.5% -> 0.125). Required when using rate-based taxation.
'
type: number
examples:
- 0.2
amount:
description: 'The tax as an absolute amount. Not allowed when rate is specified.
'
type: number
examples:
- 1000
not:
type: object
required:
- amount
properties:
amount:
type: number
CartsBulkTaxes:
title: CartsBulkTaxes
type: object
properties:
data:
type: array
items:
allOf:
- $ref: '#/components/schemas/CartsItemsTaxesObject'
- $ref: '#/components/schemas/CartItemRelationship'
errors:
type: array
items:
$ref: '#/components/schemas/Response.ErrorItem'
options:
$ref: '#/components/schemas/AddAllOrNothingOptionsObject'
Response.ErrorResponse:
type: object
required:
- errors
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Response.ErrorItem'
AddAllOrNothingOptionsObject:
title: Add All Or Nothing Options Object
type: object
properties:
add_all_or_nothing:
description: When `true`, if an error occurs for any item, no items are added to the cart. When `false`, valid items are added to the cart and the items with errors are reported in the response. Default is `false`.
type: boolean
examples:
- false
CartsItemsTaxesWithAmount:
title: Tax Object (With Amount)
allOf:
- $ref: '#/components/schemas/CartsItemsTaxesCommon'
- type: object
required:
- amount
properties:
amount:
description: 'The tax as an absolute amount in the smallest currency unit (e.g., $10 -> 1000). Required when using amount-based taxation.
'
type: number
examples:
- 1000
rate:
description: 'The tax rate as a decimal. Not allowed when amount is specified.
'
type: number
examples:
- 0.2
not:
type: object
required:
- rate
properties:
rate:
type: number
CartsItemsTaxesObject:
title: Carts Items Taxes Object
description: 'A tax item that can be applied to cart items or bundle components. You must specify either a rate (percentage) or an amount (fixed value), but not both.
'
oneOf:
- $ref: '#/components/schemas/CartsItemsTaxesWithRate'
- $ref: '#/components/schemas/CartsItemsTaxesWithAmount'
examples:
- type: tax_item
code: VAT
jurisdiction: UK
name: Value Added Tax
rate: 0.2
- type: tax_item
code: EXCISE
jurisdiction: US
name: Excise Tax
amount: 500
Response.ErrorItem:
type: object
required:
- status
- title
properties:
title:
type: string
description: A brief summary of the error.
examples:
- Bad Request
status:
type:
- string
- integer
description: The HTTP response code of the error.
examples:
- '400'
detail:
type: string
description: Optional additional detail about the error.
examples:
- The field 'name' is required
source:
type: string
description: The field or location that caused the validation error. For JSON schema validation errors, this contains the JSON path to the invalid field (e.g., 'data.name', 'request', 'data.items[0].quantity').
meta:
type: object
description: Additional metadata associated with the error. May include arbitrary keys.
properties:
id:
type: string
description: The resource id associated with the error
ids:
type: array
items:
type: string
description: The resource ids associated with the error
item_ids:
type: array
items:
type: string
description: The cart_item ids associated with the error
shipping_group_id:
t
# --- truncated at 32 KB (35 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elastic-path/refs/heads/main/openapi/elastic-path-tax-items-api-openapi.yml