Tax API reference
The checkout module provides REST and GraphQL APIs to configure out-of-process tax integrations.
REST
/V1/oope_tax_management/tax_integration/:code/V1/oope_tax_management/tax_integration/V1/oope_tax_management/tax_integrationCreate or modify a new OOPE tax integration
The POST /V1/oope_tax_management/tax_integration/:code endpoint creates an out-of-process tax integration in the Adobe Commerce instance.
data-variant=info
data-slots=text
Payload parameters:
codetitleactivestorescredit_memo_tax_enableddata-slots=heading, code
data-repeat=2
data-languages=bash, json
Example request
curl --request POST \
--url <ADOBE_COMMERCE_API_URL>/V1/oope_tax_management/tax_integration \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"tax_integration": {
"code": "tax-1",
"title": "Tax Integration 1",
"active": true,
"stores": ["store-1", "store-2"],
"credit_memo_tax_enabled": false
}
}'
Example response
{
"success": true,
"message": {
"id": 1,
"code": "tax-1",
"title": "Tax Integration 1",
"active": true,
"stores": ["store-1", "store-2"],
"credit_memo_tax_enabled": false
}
}
Get an OOPE tax integration by code
The GET /V1/oope_tax_management/tax_integration/:code retrieves one out-of-process tax integration by code from the Adobe Commerce instance.
Payload parameters:
codedata-slots=heading, code
data-repeat=2
data-languages=bash, json
Example request
curl --request GET \
--url <ADOBE_COMMERCE_API_URL>/V1/oope_tax_management/tax_integration/:code' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json'
Example response
{
"success": true,
"message": {
"id": 1,
"code": "tax-1",
"title": "Tax Integration 1",
"active": true,
"stores": ["store-1", "store-2"],
"credit_memo_tax_enabled": false
}
}
List all OOPE tax integrations
The GET /V1/oope_tax_management/tax_integration retrieves a list of all out-of-process tax integrations from the Adobe Commerce instance.
data-slots=heading, code
data-repeat=2
data-languages=bash, json
Example request
curl --request GET \
--url <ADOBE_COMMERCE_API_URL>/V1/oope_tax_management/tax_integration' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json'
Example response
{
"success": true,
"message": [
{
"id": 1,
"code": "tax-1",
"title": "Tax Integration 1",
"active": true,
"stores": ["store-1", "store-2"],
"credit_memo_tax_enabled": false
}
]
}
Create a tax class with custom attributes
The out-of-process tax module extends the POST /V1/taxClasses endpoint to allow creating tax classes with custom attributes.
data-slots=heading, code
data-repeat=2
data-languages=bash, json
Example request
curl --request POST \
--url <ADOBE_COMMERCE_API_URL>/V1/taxClasses \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"class_name": "Test Tax Class",
"class_type": "PRODUCT",
"custom_attributes": [
{
"attribute_code": "tax_code",
"value": "005"
}
]
}'
Example response
"3"
Update a tax class with custom attributes
The out-of-process tax module extends the PUT /V1/taxClasses/:classId endpoint to update an existing tax class with custom attributes.
data-slots=heading, code
data-repeat=2
data-languages=bash, json
Example request
curl --request POST \
--url <ADOBE_COMMERCE_API_URL>/V1/taxClasses/4 \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"class_id": 4,
"class_name": "Updated Tax Class",
"class_type": "PRODUCT",
"custom_attributes": [
{
"attribute_code": "tax_code",
"value": "005"
}
]
}'
Example response
"4"
List all tax classes with custom attributes
The out-of-process tax module extends the GET /V1/taxClasses/search endpoint to include custom attributes in the response when available.
data-slots=heading, code
data-repeat=2
data-languages=bash, json
Example request
curl --request GET \
--url '<ADOBE_COMMERCE_API_URL>/V1/taxClasses/search?searchCriteria[pageSize]=100' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json'
Example response
{
"items": [
{
"class_id": 1,
"class_name": "Retail Tax Class",
"class_type": "CUSTOMER",
"extension_attributes": {},
"custom_attributes": [
{
"attribute_code": "tax_code",
"value": "005"
},
{
"attribute_code": "tax_label",
"value": "Retail"
}
]
}
],
"search_criteria": {
"filter_groups": [],
"sort_orders": [],
"page_size": 100,
"current_page": 1
},
"total_count": 1
}
GraphQL
The following are GraphQL query examples to check the taxes applied by the tax integration.
Cart taxes
To check the taxes applied to the cart, you can use the getCart query to retrieve the cart/prices/applied_taxes field. This field contains information about the taxes applied to the cart.
data-variant=info
data-slots=text
Yes