Codat · Schema

Commerce: Tax component

The Tax Components endpoints return tax rates data from the commerce software, including tax rate names and values. This is to support the mapping of tax rates from the commerce software to those in the accounting software.

Unified_API
View JSON Schema on GitHub

JSON Schema

codat-commercetaxcomponent-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CommerceTaxComponent",
  "title": "Commerce: Tax component",
  "description": "The Tax Components endpoints return tax rates data from the commerce software, including tax rate names and values. This is to support the mapping of tax rates from the commerce software to those in the accounting software.",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/0"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the Tax Rate Component in the source commerce software.",
          "example": "Sales Tax"
        },
        "rate": {
          "description": "Rate of taxation represented as a fraction of the net price (typically in the range 0.00 - 1.00).",
          "type": "number",
          "format": "decimal",
          "examples": [
            0.15,
            0.2
          ]
        },
        "isCompound": {
          "description": "The Boolean flag to indicate when a Tax Rate Component compounds on a sale.",
          "type": "boolean",
          "examples": [
            true,
            false
          ]
        }
      }
    },
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/3",
      "required": [
        "name"
      ]
    }
  ],
  "definitions": {
    "taxComponentAllocation": {
      "title": "Tax Component Allocation",
      "type": "object",
      "properties": {
        "taxComponentRef": {
          "$ref": "#/components/schemas/CommerceTaxComponent/definitions/taxComponentRef"
        },
        "rate": {
          "description": "Tax amount on order line sale as available from source commerce software.",
          "type": "number",
          "format": "decimal",
          "nullable": true
        }
      }
    },
    "taxComponentRef": {
      "type": "object",
      "description": "Taxes rates reference object depending on the rates being available on source commerce software.",
      "properties": {
        "id": {
          "description": "The unique identitifer of the tax component being referenced.",
          "type": "string",
          "examples": [
            "13d946f0-c5d5-42bc-b092-97ece17923ab",
            "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2",
            7110701885,
            "EILBDVJVNUAGVKRQ"
          ]
        },
        "name": {
          "description": "Name of the tax component being referenced.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ]
    }
  },
  "examples": [
    {
      "id": "13d946f0-c5d5-42bc-b092-97ece17923ab",
      "name": "Sales Tax (15%)",
      "rate": 0.15,
      "isCompound": true,
      "modifiedDate": "2022-10-23T00:00:00Z",
      "sourceModifiedDate": "2022-10-23T00:00:00Z"
    }
  ]
}