Get All Order Taxes
GET /stores/{store_hash}/v2/orders/{order_id}/taxes
Request
Gets all order taxes using order_id
.
Each tax applied to an order. This information can be useful for reporting purposes.
Pass in the query parameter ?details=true
to return extra details about order taxes.
order_product_id
and line_item_type
are also returned.
All values are read-only.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- page in query - number
The page to return in the response.
- limit in query - number
Number of results to return.
- details in query with default of true - string
To return detailed tax information, pass in the details query.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/orders/[order_id]/taxes' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
idinteger
The unique numeric identifier of the taxes object.
Example: 1
order_idinteger
The unique numeric identifier of the order to which the tax was applied. NOTE: Not included if the store was using the automatic tax feature.
Example: 129
order_address_idinteger
The unique numeric identifier of the order address object associated with the order. NOTE: Not included if the store was using the automatic tax feature.
Example: 29
tax_rate_idinteger
The unique numeric identifier of the tax rate.
Example: 1
tax_class_idinteger
The unique numeric identifier of the tax class object. NOTE: Will be 0 if automatic tax was enabled, or if the default tax class was used.
Example: 0
namestring
The name of the tax class object.
Example: "State Tax"
classstring
The name of the type of tax that was applied. NOTE: will be "Automatic Tax" if automatic tax was enabled. Will be "API Tax Override" if the order was created with V2 Orders API.
Example: Gift Wrapping
ratestring
The tax rate. The priority order in which the tax is applied (Float, Float-As-String, Integer)
Example: 8.0000
prioritynumber
The order in which the tax is applied.
Example: 0
priority_amountstring
The amount of tax calculated on the order. (Float, Float-As-String, Integer)
Example: 1.5200
line_amountstring
(Float, Float-As-String, Integer)
Example: 1.5200
order_product_idstring
If the
line_item_type
isitem
orhandling
then this field will be the order product id. Otherwise the field will return as null.line_item_typestring
Type of tax on item.
Allowed: item | shipping | handling | gift-wrapping
response
[ { "id": 13, "order_id": 138, "order_address_id": 39, "tax_rate_id": 1, "tax_class_id": 0, "name": "Tax", "class": "Default Tax Class", "rate": "8.0000", "priority": 0, "priority_amount": "17.6400", "line_amount": "17.6400" }, { "id": 14, "order_id": 138, "order_address_id": 40, "tax_rate_id": 1, "tax_class_id": 0, "name": "Tax", "class": "Default Tax Class", "rate": "8.0000", "priority": 0, "priority_amount": "4.4000", "line_amount": "4.4000" } ]