Order Taxes

Get All Order Taxes

GET /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

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • order_id in path - integer
    required
    ID of the order.
  • page in query with default of 1 - number
    The page to return in the response.
  • limit in query with default of 50 - number
    Number of results to return.
  • details in query with default of false - 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: {{token}}'

Response

Body

array | application/json
  • id
    integer

    The unique numeric identifier of the taxes object.
    Example: 1
  • order_id
    integer

    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_id
    integer

    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_id
    integer

    The unique numeric identifier of the tax rate.
    Example: 1
  • tax_class_id
    integer or null

    A unique numeric identifier for the tax class. If not provided or null, the default fee tax class from the control panel is used.
  • name
    string

    The name of the tax class object.
    Example: State Tax
  • class
    string

    The name of the type of tax that was applied. NOTE: It will be "Automatic Tax" if automatic tax was enabled. It will be "API Tax Override" if the order was created with V2 Orders API.
    Example: Gift Wrapping
  • rate
    string

    The tax rate. The priority order in which the tax is applied (Float, Float-As-String, Integer)
    Example: 8.0000
  • priority
    number

    The order in which the tax is applied.
  • priority_amount
    string

    The amount of tax calculated on the order. (Float, Float-As-String, Integer)
    Example: 1.5200
  • line_amount
    string

    (Float, Float-As-String, Integer)
    Example: 1.5200
  • order_pickup_method_id
    number

    The ID of the order pickup method object (which contains pickup location details) associated with the order.
  • order_product_id
    string

    If the line_item_type is item or handling then this field will be the order product id. Otherwise the field will return as null.
  • line_item_type
    string

    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",
"order_pickup_method_id": 0
},
{
"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",
"order_pickup_method_id": 0
}
Did you find what you were looking for?