Taxes Configuration API (1.0.0)
Download OpenAPI specification:Download
Use this API to set tenant/store level tax configuration.
Create tax configuration for a store
Create tax calculation configuration for the given store identifier.
Authorizations:
header Parameters
x-request-id | string Request identifier. |
Request Body schema: application/json
store_id required | string Store identifier within the NewStore platform. |
country_code required | string Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "KH" "CM" "CA" "CV" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KR" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MK" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "AN" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SK" "SI" "SB" "SO" "ZA" "GS" "ES" "LK" "SD" "SR" "SJ" "SZ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "US" "UM" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW" Country code in upper-case ISO 3166 Alpha-2 format. |
tax_calculation_strategy | string Enum: "fixedrate" "fixed_rate_per_country" "avalara" "vertex" "custom" Tax calculation strategy. |
object Fixed rate configuration.
| |
object Fixed rate configuration per country.
| |
object Avalara configuration.
| |
object Vertex configuration.
| |
object Custom provider configuration.
|
Responses
Request samples
- Payload
Example configuration setting the tax calculation strategy to be used for this store. Overrides the strategy set on the tenant level.
{- "store_id": "123e4567-e89b-12d3-a456-426614174000",
- "country_code": "AT",
- "tax_calculation_strategy": "fixedrate"
}
Response samples
- 201
- 400
- 401
- 403
- 409
- default
{- "store_id": "123",
- "country_code": "DE",
- "tax_calculation_strategy": "fixedrate",
- "fixed_rate": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "fixed_rate_per_country": {
- "AT": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "DE": {
- "tax_rate": 0.19,
- "tax_name": "Standard VAT rate for Germany"
}
}, - "avalara": {
- "account_number": "2000123456",
- "company_code": "NEWSTOREINC",
- "default_customer_code": "Anonymous customer",
- "license_key": "C1234567890ABCFE",
- "environment": "sandbox"
}, - "vertex": {
- "company_code": "1234",
- "division_code": "1234",
- "login_type": "trusted_id",
- "trusted_id": "9SDPdc9bo3",
- "flexible_fields": [
- {
- "extended_attribute_name": "productClass",
- "target_field_id": 1,
- "target_field_type": "flexible_code_field"
}, - {
- "extended_attribute_name": "shoeSize",
- "target_field_id": 1,
- "target_field_type": "flexible_numeric_field"
}
], - "administrative_origin": {
- "street_address_1": "Potsdamer Str. 7",
- "street_address_2": "Potsdamer Platz",
- "city": "Berlin",
- "main_division": "Berlin",
- "postal_code": "10785",
- "country": "DE",
- "currency_code": "EUR",
- "currency_value": 1.1
}
}, - "tenant": "dodici",
- "version": 1,
- "created_at": "2023-02-28T16:58:46.961Z",
- "updated_at": "2023-02-28T16:58:46.961Z",
- "updated_by": "2136871599",
- "is_deleted": false
}
List store tax configurations
List store tax calculation configurations with the given query.
Authorizations:
query Parameters
limit required | integer [ 1 .. 100 ] Default: 10 Example: limit=10 Limit number of results to this value. |
tax_calculation_strategy | string Enum: "fixedrate" "fixed_rate_per_country" "avalara" "vertex" "custom" Example: tax_calculation_strategy=fixedrate Tax calculation strategy to filter by. |
next_page_key | string Key to be used to get the next page of results. |
header Parameters
x-request-id | string Request identifier. |
Responses
Response samples
- 200
- 400
- 401
- 403
- default
{- "items": [
- {
- "store_id": "123",
- "country_code": "DE",
- "tax_calculation_strategy": "fixedrate",
- "fixed_rate": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "fixed_rate_per_country": {
- "AT": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "DE": {
- "tax_rate": 0.19,
- "tax_name": "Standard VAT rate for Germany"
}
}, - "avalara": {
- "account_number": "2000123456",
- "company_code": "NEWSTOREINC",
- "default_customer_code": "Anonymous customer",
- "license_key": "C1234567890ABCFE",
- "environment": "sandbox"
}, - "vertex": {
- "company_code": "1234",
- "division_code": "1234",
- "login_type": "trusted_id",
- "trusted_id": "9SDPdc9bo3",
- "flexible_fields": [
- {
- "extended_attribute_name": "productClass",
- "target_field_id": 1,
- "target_field_type": "flexible_code_field"
}, - {
- "extended_attribute_name": "shoeSize",
- "target_field_id": 1,
- "target_field_type": "flexible_numeric_field"
}
], - "administrative_origin": {
- "street_address_1": "Potsdamer Str. 7",
- "street_address_2": "Potsdamer Platz",
- "city": "Berlin",
- "main_division": "Berlin",
- "postal_code": "10785",
- "country": "DE",
- "currency_code": "EUR",
- "currency_value": 1.1
}
}, - "tenant": "dodici",
- "version": 1,
- "created_at": "2023-02-28T16:58:46.961Z",
- "updated_at": "2023-02-28T16:58:46.961Z",
- "updated_by": "2136871599",
- "is_deleted": false
}
], - "next_page_key": "string",
- "scan_count": 1
}
Get tax configuration of a store
Get tax configuration for the given store identifier.
Authorizations:
path Parameters
id required | string Store identifier. |
query Parameters
version | integer <int32> >= 0 Specific configuration version number to fetch. If left empty, the latest version of the configuration will be returned. |
merged_tenant_fallback | boolean Default: true Flag that indicates if the store configuration should be merged with the tenant configuration to provide tenant level fallbacks to the store. This flag defaults to true if it is not sent. |
header Parameters
x-request-id | string Request identifier. |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- default
{- "tax_calculation_strategy": "fixedrate",
- "tax_committing_enabled": true,
- "fixed_rate": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "fixed_rate_per_country": {
- "AT": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "DE": {
- "tax_rate": 0.19,
- "tax_name": "Standard VAT rate for Germany"
}
}, - "avalara": {
- "account_number": "2000123456",
- "company_code": "NEWSTOREINC",
- "default_customer_code": "Anonymous customer",
- "license_key": "C1234567890ABCFE",
- "environment": "sandbox"
}, - "vertex": {
- "company_code": "1234",
- "division_code": "1234",
- "login_type": "trusted_id",
- "trusted_id": "9SDPdc9bo3",
- "flexible_fields": [
- {
- "extended_attribute_name": "productClass",
- "target_field_id": 1,
- "target_field_type": "flexible_code_field"
}, - {
- "extended_attribute_name": "shoeSize",
- "target_field_id": 1,
- "target_field_type": "flexible_numeric_field"
}
], - "administrative_origin": {
- "street_address_1": "Potsdamer Str. 7",
- "street_address_2": "Potsdamer Platz",
- "city": "Berlin",
- "main_division": "Berlin",
- "postal_code": "10785",
- "country": "DE",
- "currency_code": "EUR",
- "currency_value": 1.1
}
},
}
Partially update tax configuration of a store
Partially update the tax configuration of a store by merging the given fields with the existing fields.
Authorizations:
path Parameters
id required | string Store identifier. |
header Parameters
x-request-id | string Request identifier. |
Request Body schema: application/json
country_code | string Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "KH" "CM" "CA" "CV" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KR" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MK" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "AN" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SK" "SI" "SB" "SO" "ZA" "GS" "ES" "LK" "SD" "SR" "SJ" "SZ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "US" "UM" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW" Country code in upper-case ISO 3166 Alpha-2 format. |
tax_calculation_strategy | string Enum: "fixedrate" "fixed_rate_per_country" "avalara" "vertex" "custom" Tax calculation strategy. |
object Fixed rate configuration.
| |
object Fixed rate configuration per country.
| |
object Avalara configuration.
| |
object Vertex configuration.
| |
object Custom provider configuration.
|
Responses
Request samples
- Payload
Example configuration updating the tax calculation strategy.
{- "tax_calculation_strategy": "fixedrate"
}
Response samples
- 200
- 401
- 403
- 404
- default
{- "store_id": "123",
- "country_code": "DE",
- "tax_calculation_strategy": "fixedrate",
- "fixed_rate": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "fixed_rate_per_country": {
- "AT": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "DE": {
- "tax_rate": 0.19,
- "tax_name": "Standard VAT rate for Germany"
}
}, - "avalara": {
- "account_number": "2000123456",
- "company_code": "NEWSTOREINC",
- "default_customer_code": "Anonymous customer",
- "license_key": "C1234567890ABCFE",
- "environment": "sandbox"
}, - "vertex": {
- "company_code": "1234",
- "division_code": "1234",
- "login_type": "trusted_id",
- "trusted_id": "9SDPdc9bo3",
- "flexible_fields": [
- {
- "extended_attribute_name": "productClass",
- "target_field_id": 1,
- "target_field_type": "flexible_code_field"
}, - {
- "extended_attribute_name": "shoeSize",
- "target_field_id": 1,
- "target_field_type": "flexible_numeric_field"
}
], - "administrative_origin": {
- "street_address_1": "Potsdamer Str. 7",
- "street_address_2": "Potsdamer Platz",
- "city": "Berlin",
- "main_division": "Berlin",
- "postal_code": "10785",
- "country": "DE",
- "currency_code": "EUR",
- "currency_value": 1.1
}
}, - "tenant": "dodici",
- "version": 1,
- "created_at": "2023-02-28T16:58:46.961Z",
- "updated_at": "2023-02-28T16:58:46.961Z",
- "updated_by": "2136871599",
- "is_deleted": false
}
Delete tax configuration of a store
Delete tax configuration for the given store identifier.
Authorizations:
path Parameters
id required | string Store identifier. |
header Parameters
x-request-id | string Request identifier. |
Responses
Response samples
- 401
- 403
- 404
- default
{- "status_code": 500,
- "error": "Internal server error"
}
Create tax configuration
Create tax calculation configuration for your business.
Authorizations:
header Parameters
x-request-id | string Request identifier. |
Request Body schema: application/json
tax_calculation_strategy required | string Enum: "fixedrate" "fixed_rate_per_country" "avalara" "vertex" "custom" Tax calculation strategy. |
required | object Fixed rate configuration.
|
object Fixed rate configuration per country.
| |
object Avalara configuration.
| |
object Vertex configuration.
| |
object Custom provider configuration.
| |
tax_committing_enabled | boolean Enable tax committing to the selected tax calculation strategy. The tax committing feature is only supported for in-store orders. |
Responses
Request samples
- Payload
Example configuration using fixed rate strategy.
{- "tax_calculation_strategy": "fixedrate",
- "fixed_rate": {
- "tax_name": "Standard VAT rate for Austria",
- "tax_rate": 0.2,
- "exemption_classes": [
- {
- "exemption_class": "CUSTOM_ITALY_1",
- "valid_countries": [
- "IT"
], - "display_text": {
- "en": "Diplomatic sales",
- "it": "Vendite diplomatiche"
}
}, - {
- "exemption_class": "CUSTOM_CANADA_1",
- "valid_countries": [
- "CA"
], - "display_text": {
- "en": "First Nation Citizen",
- "fr": "Premières Nations"
}
}
]
}
}
Response samples
- 201
- 400
- 401
- 403
- 409
- default
{- "tax_calculation_strategy": "fixedrate",
- "fixed_rate": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "fixed_rate_per_country": {
- "AT": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "DE": {
- "tax_rate": 0.19,
- "tax_name": "Standard VAT rate for Germany"
}
}, - "avalara": {
- "account_number": "2000123456",
- "company_code": "NEWSTOREINC",
- "default_customer_code": "Anonymous customer",
- "license_key": "C1234567890ABCFE",
- "environment": "sandbox"
}, - "vertex": {
- "company_code": "1234",
- "division_code": "1234",
- "login_type": "trusted_id",
- "trusted_id": "9SDPdc9bo3",
- "flexible_fields": [
- {
- "extended_attribute_name": "productClass",
- "target_field_id": 1,
- "target_field_type": "flexible_code_field"
}, - {
- "extended_attribute_name": "shoeSize",
- "target_field_id": 1,
- "target_field_type": "flexible_numeric_field"
}
], - "administrative_origin": {
- "street_address_1": "Potsdamer Str. 7",
- "street_address_2": "Potsdamer Platz",
- "city": "Berlin",
- "main_division": "Berlin",
- "postal_code": "10785",
- "country": "DE",
- "currency_code": "EUR",
- "currency_value": 1.1
}
}, - "tax_committing_enabled": true,
- "tenant": "dodici",
- "version": 1,
- "created_at": "2023-02-28T16:58:46.961Z",
- "updated_at": "2023-02-28T16:58:46.961Z",
- "updated_by": "2136871599",
- "is_deleted": false
}
Get tax configuration
Get tax calculation configuration of your business.
Authorizations:
query Parameters
version | integer <int32> >= 0 Specific configuration version number to fetch. If left empty, the latest version of the configuration will be returned. |
header Parameters
x-request-id | string Request identifier. |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- default
{- "tax_calculation_strategy": "fixedrate",
- "fixed_rate": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "fixed_rate_per_country": {
- "AT": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "DE": {
- "tax_rate": 0.19,
- "tax_name": "Standard VAT rate for Germany"
}
}, - "avalara": {
- "account_number": "2000123456",
- "company_code": "NEWSTOREINC",
- "default_customer_code": "Anonymous customer",
- "license_key": "C1234567890ABCFE",
- "environment": "sandbox"
}, - "vertex": {
- "company_code": "1234",
- "division_code": "1234",
- "login_type": "trusted_id",
- "trusted_id": "9SDPdc9bo3",
- "flexible_fields": [
- {
- "extended_attribute_name": "productClass",
- "target_field_id": 1,
- "target_field_type": "flexible_code_field"
}, - {
- "extended_attribute_name": "shoeSize",
- "target_field_id": 1,
- "target_field_type": "flexible_numeric_field"
}
], - "administrative_origin": {
- "street_address_1": "Potsdamer Str. 7",
- "street_address_2": "Potsdamer Platz",
- "city": "Berlin",
- "main_division": "Berlin",
- "postal_code": "10785",
- "country": "DE",
- "currency_code": "EUR",
- "currency_value": 1.1
}
}, - "tax_committing_enabled": true,
- "tenant": "dodici",
- "version": 1,
- "created_at": "2023-02-28T16:58:46.961Z",
- "updated_at": "2023-02-28T16:58:46.961Z",
- "updated_by": "2136871599",
- "is_deleted": false
}
Partially update tax configuration
Partially update the tax configuration of your business by merging the given fields with the existing fields.
Authorizations:
header Parameters
x-request-id | string Request identifier. |
Request Body schema: application/json
tax_calculation_strategy | string Enum: "fixedrate" "fixed_rate_per_country" "avalara" "vertex" "custom" Tax calculation strategy. |
object Fixed rate configuration.
| |
object Fixed rate configuration per country.
| |
object Avalara configuration.
| |
object Vertex configuration.
| |
object Custom provider configuration.
| |
tax_committing_enabled | boolean Enable tax committing to the selected tax calculation strategy. The tax committing feature is only supported for in-store orders. |
Responses
Request samples
- Payload
Example configuration updating the tax calculation strategy.
{- "tax_calculation_strategy": "fixedrate"
}
Response samples
- 200
- 401
- 403
- 404
- default
{- "tax_calculation_strategy": "fixedrate",
- "fixed_rate": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "fixed_rate_per_country": {
- "AT": {
- "tax_rate": 0.2,
- "tax_name": "Standard VAT rate for Austria"
}, - "DE": {
- "tax_rate": 0.19,
- "tax_name": "Standard VAT rate for Germany"
}
}, - "avalara": {
- "account_number": "2000123456",
- "company_code": "NEWSTOREINC",
- "default_customer_code": "Anonymous customer",
- "license_key": "C1234567890ABCFE",
- "environment": "sandbox"
}, - "vertex": {
- "company_code": "1234",
- "division_code": "1234",
- "login_type": "trusted_id",
- "trusted_id": "9SDPdc9bo3",
- "flexible_fields": [
- {
- "extended_attribute_name": "productClass",
- "target_field_id": 1,
- "target_field_type": "flexible_code_field"
}, - {
- "extended_attribute_name": "shoeSize",
- "target_field_id": 1,
- "target_field_type": "flexible_numeric_field"
}
], - "administrative_origin": {
- "street_address_1": "Potsdamer Str. 7",
- "street_address_2": "Potsdamer Platz",
- "city": "Berlin",
- "main_division": "Berlin",
- "postal_code": "10785",
- "country": "DE",
- "currency_code": "EUR",
- "currency_value": 1.1
}
}, - "tax_committing_enabled": true,
- "tenant": "dodici",
- "version": 1,
- "created_at": "2023-02-28T16:58:46.961Z",
- "updated_at": "2023-02-28T16:58:46.961Z",
- "updated_by": "2136871599",
- "is_deleted": false
}