Managing tax identifiers
Learn how to manage tax identifiers.
Customer type
Attaching a tax identifier to a cart
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/carts/active/tax-registrations/schema' \
--header 'authorization: Basic ***\
...{
"$schema": http://json-schema.org/draft-04/schema#,
"id": https://api.digitalriver.com:443/cart-api/active/tax-registrations/schema,
"oneOf": [
{
"type": "object",
"title": "Individual",
"additionalProperties": false,
"required": [
"customerType"
],
"properties": {
"customerType": {
"type": "string",
"readOnly": true,
"enum": [
"I"
]
},
"taxRegistrations": {
"type": "array",
"title": "Tax Registrations",
"minItems": 1,
"maxItems": 1,
"items": [
{
"$ref": "#/definitions/CPF"
}
]
},
"companyId": {
"type": "string"
},
"siteId": {
"type": "string"
}
}
},
{
"type": "object",
"title": "Business",
"additionalProperties": false,
"required": [
"customerType"
],
"properties": {
"customerType": {
"type": "string",
"readOnly": true,
"enum": [
"B"
]
},
"taxRegistrations": {
"type": "array",
"title": "Tax Registrations",
"minItems": 2,
"maxItems": 2,
"items": [
{
"$ref": "#/definitions/CNPJ"
},
{
"$ref": "#/definitions/IE"
}
]
},
"companyId": {
"type": "string"
},
"siteId": {
"type": "string"
}
}
}
],
"definitions": {
"CPF": {
"type": "object",
"additionalProperties": false,
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"readOnly": true,
"enum": [
"CPF"
]
},
"value": {
"type": "string",
"title": "CPF",
"description": "Digite seu número CPF individual. O número deve ter 11 dígitos e ser inserido sem espaços, períodos ou hifens como 12345678901.",
"pattern": "^[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}$"
}
}
},
"IE": {
"type": "object",
"additionalProperties": false,
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"readOnly": true,
"enum": [
"IE"
]
},
"value": {
"type": "string",
"title": "Inscrição Estadual (IE)",
"description": "Por favor, insira a Inscrição Estadual da sua empresa. O número deve ter 8-13 dígitos e ser inserido sem espaços, períodos ou hifens como 12345678, 1234567890123 ou ISENTO. Para encontrar a sua Inscrição Estadual, visite o site SINTEGRA.",
"pattern": "^[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}$,^[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}$,^[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}$,^[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}$,^[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}$,^[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}$,^[Ii]{1}[Ss]{1}[Ee]{1}[Nn]{1}[Tt]{1}[Oo]{1}$"
}
}
},
"CNPJ": {
"type": "object",
"additionalProperties": false,
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"readOnly": true,
"enum": [
"CNPJ"
]
},
"value": {
"type": "string",
"title": "CNPJ",
"description": "Digite o número CNPJ da sua empresa. O número deve ter 14 dígitos e ser inserido sem espaços, períodos ou hifens como 12345678901234.",
"pattern": "^[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}[0-9]{1}$"
}
}
}
},
"liveMode": false
}curl --location --request POST 'https://api.digitalriver.com/v1/shoppers/me/carts/active/tax-registrations' \
--header 'authorization: Basic ***\
...{
"customerType": "B",
"taxRegistrations": [
{
"key": "CNPJ",
"value": "77844699000109"
},
{
"key": "IE",
"value": "ISENTO"
}
]
}{
"customerType": "I",
"taxRegistrations": [
{
"key": "CPF",
"value": "03927107492"
}
]
}
{
"errors": [
{
"code": "vat-exemption-failure",
"subcode": "vat-exemption-unavailable",
"description": "Tax Exemption Rest of the World is not enabled on this site."
}
]
}Removing a tax identifier from a cart
Removing a tax identifier with the cart identifier
Removing a tax identifier without the cart identifier
Last updated