Taxes in Space Invoices are stored for each Organization and are associated with Items on which tax is applicable. Each tax may have different rates and the rates can be set for a specific date range during which the rate is in effect. When creating a document, the system selects the appropriate tax rate based on the document's date, ensuring the correct tax rates are applied.
When you create a new Organization in Space Invoices, the system automatically pre-loads it with default taxes based on the country of the Organization. This feature saves time and effort, as you don't have to manually input common tax rates applicable in that country. You can start invoicing right away, knowing that your tax setup is accurate and compliant with local regulations.
When adding taxes to document items or items, you have the flexibility to reference the tax (in order of priority): by its ID, rate, or classification. This feature makes it easier for you to manage and apply taxes, keeping your invoicing process accurate and efficient.
Endpoints:
- POST /v1/Organizations/:id/taxes
- GET /v1/Taxes/:id
- GET /v1/Organizations/:id/taxes
- GET /v1/Organizations/:id/taxes/count
- PUT /v1/Taxes/:id
- DELETE /v1/Taxes/:id
- POST /v1/Taxes/:id/taxRates
- DELETE /v1/Taxes/:id/taxRates/:fk
- POST /v1/Taxes/clause-type
The Tax object
Parameters
-
id string readonly
-
name string
-
abbreviation string
-
_taxRates array[object]
show nested properties -
classification string
-
Country the tax belongs to Defaults to organization country
-
countryAlpha2Code string
-
recoverable boolean
-
compound boolean
-
Tax number associated with this tax.
-
createdAt date readonly
-
updatedAt date readonly
-
deletedAt date readonly
-
_isDeleted boolean readonly
-
deletedId string readonly
-
Custom field for freeform data input
-
organizationId string readonly
Additional propertiesExpand all
{
"classification": "string",
"country": "string",
"countryAlpha2Code": "string",
"name": "string",
"abbreviation": "string",
"recoverable": true,
"compound": false,
"taxNumber": "string",
"id": "string",
"_taxRates": [{
"id": "string",
"dateValidFrom": "2022-04-20T10:10:30+00:00Z",
"rate": 42,
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {}
}],
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"custom": {},
"organizationId": "string"
}
Create Tax
POST /v1/Organizations/:id/taxes
Parameters
Path
-
id string required
Organization id
Properties
-
name string optional
-
abbreviation string optional
-
_taxRates array[object] optional
show nested properties -
classification string optional
-
Country the tax belongs to Defaults to organization country
-
countryAlpha2Code string optional
-
Default is: true
-
Default is: false
-
Tax number associated with this tax.
-
Default is: {}
Custom field for freeform data input
Additional propertiesExpand all
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/taxes', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
classification: 'string',
country: 'string',
countryAlpha2Code: 'string',
name: 'string',
abbreviation: 'string',
recoverable: true,
compound: false,
taxNumber: 'string',
_taxRates: [{
dateValidFrom: '2022-04-20T10:10:30+00:00Z',
rate: 42,
custom: {}
}],
custom: {}
})
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X POST https://api.spaceinvoices.com/v1/Organizations/{id}/taxes \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"classification": "string", \
"country": "string", \
"countryAlpha2Code": "string", \
"name": "string", \
"abbreviation": "string", \
"recoverable": true, \
"compound": false, \
"taxNumber": "string", \
"_taxRates": [{ \
"dateValidFrom": "2022-04-20T10:10:30+00:00Z", \
"rate": 42, \
"custom": {}
}], \
"custom": {}
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/taxes'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'classification': 'string',
'country': 'string',
'countryAlpha2Code': 'string',
'name': 'string',
'abbreviation': 'string',
'recoverable': True,
'compound': False,
'taxNumber': 'string',
'_taxRates': [{
'dateValidFrom': '2022-04-20T10:10:30+00:00Z',
'rate': 42,
'custom': {}
}],
'custom': {}
}
response = requests.post(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"classification": "string",
"country": "string",
"countryAlpha2Code": "string",
"name": "string",
"abbreviation": "string",
"recoverable": true,
"compound": false,
"taxNumber": "string",
"id": "string",
"_taxRates": [{
"id": "string",
"dateValidFrom": "2022-04-20T10:10:30+00:00Z",
"rate": 42,
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {}
}],
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"custom": {},
"organizationId": "string"
}
Get Tax
GET /v1/Taxes/:id
Parameters
Path
-
id string required
Model id
Query
-
filter string optional
Filter defining fields and include - must be a JSON-encoded string ({"something":"value"})
const response = await fetch('https://api.spaceinvoices.com/v1/Taxes/{id}', {
method: 'GET',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
}
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X GET https://api.spaceinvoices.com/v1/Taxes/{id} \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Taxes/{id}'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"classification": "string",
"country": "string",
"countryAlpha2Code": "string",
"name": "string",
"abbreviation": "string",
"recoverable": true,
"compound": false,
"taxNumber": "string",
"id": "string",
"_taxRates": [{
"id": "string",
"dateValidFrom": "2022-04-20T10:10:30+00:00Z",
"rate": 42,
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {}
}],
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"custom": {},
"organizationId": "string"
}
Find Taxs
GET /v1/Organizations/:id/taxes
Parameters
Path
-
id string required
Organization id
Query
-
filter string optional
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/taxes', {
method: 'GET',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
}
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X GET https://api.spaceinvoices.com/v1/Organizations/{id}/taxes \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/taxes'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
[
{
"classification": "string",
"country": "string",
"countryAlpha2Code": "string",
"name": "string",
"abbreviation": "string",
"recoverable": true,
"compound": false,
"taxNumber": "string",
"id": "string",
"_taxRates": [{
"id": "string",
"dateValidFrom": "2022-04-20T10:10:30+00:00Z",
"rate": 42,
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {}
}],
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"custom": {},
"organizationId": "string"
}
]
Count Taxs
GET /v1/Organizations/:id/taxes/count
Parameters
Path
-
id string required
Organization id
Query
-
where string optional
Criteria to match model instances
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/taxes/count', {
method: 'GET',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
}
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X GET https://api.spaceinvoices.com/v1/Organizations/{id}/taxes/count \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/taxes/count'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"count": 42
}
Replace Tax
PUT /v1/Taxes/:id
Parameters
Path
-
id string required
Model id
Properties
-
name string optional
-
abbreviation string optional
-
_taxRates array[object] optional
show nested properties -
classification string optional
-
Country the tax belongs to Defaults to organization country
-
countryAlpha2Code string optional
-
Default is: true
-
Default is: false
-
Tax number associated with this tax.
-
Default is: {}
Custom field for freeform data input
Additional propertiesExpand all
const response = await fetch('https://api.spaceinvoices.com/v1/Taxes/{id}', {
method: 'PUT',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
classification: 'string',
country: 'string',
countryAlpha2Code: 'string',
name: 'string',
abbreviation: 'string',
recoverable: true,
compound: false,
taxNumber: 'string',
_taxRates: [{
dateValidFrom: '2022-04-20T10:10:30+00:00Z',
rate: 42,
custom: {}
}],
custom: {}
})
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X PUT https://api.spaceinvoices.com/v1/Taxes/{id} \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"classification": "string", \
"country": "string", \
"countryAlpha2Code": "string", \
"name": "string", \
"abbreviation": "string", \
"recoverable": true, \
"compound": false, \
"taxNumber": "string", \
"_taxRates": [{ \
"dateValidFrom": "2022-04-20T10:10:30+00:00Z", \
"rate": 42, \
"custom": {}
}], \
"custom": {}
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Taxes/{id}'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'classification': 'string',
'country': 'string',
'countryAlpha2Code': 'string',
'name': 'string',
'abbreviation': 'string',
'recoverable': True,
'compound': False,
'taxNumber': 'string',
'_taxRates': [{
'dateValidFrom': '2022-04-20T10:10:30+00:00Z',
'rate': 42,
'custom': {}
}],
'custom': {}
}
response = requests.put(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"classification": "string",
"country": "string",
"countryAlpha2Code": "string",
"name": "string",
"abbreviation": "string",
"recoverable": true,
"compound": false,
"taxNumber": "string",
"id": "string",
"_taxRates": [{
"id": "string",
"dateValidFrom": "2022-04-20T10:10:30+00:00Z",
"rate": 42,
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {}
}],
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"custom": {},
"organizationId": "string"
}
const response = await fetch('https://api.spaceinvoices.com/v1/Taxes/{id}', {
method: 'DELETE',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
}
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X DELETE https://api.spaceinvoices.com/v1/Taxes/{id} \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Taxes/{id}'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
response = requests.delete(url, params={}, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"count": 1
}
Create TaxRate for Tax
POST /v1/Taxes/:id/taxRates
Parameters
Path
-
id string required
Tax id
Properties
-
dateValidFrom date required
-
rate number required
-
Default is: {}
Custom field for freeform data input
Additional propertiesExpand all
const response = await fetch('https://api.spaceinvoices.com/v1/Taxes/{id}/taxRates', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
dateValidFrom: '2022-04-20T10:10:30+00:00Z',
rate: 42,
custom: {}
})
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X POST https://api.spaceinvoices.com/v1/Taxes/{id}/taxRates \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"dateValidFrom": "2022-04-20T10:10:30+00:00Z", \
"rate": 42, \
"custom": {}
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Taxes/{id}/taxRates'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'dateValidFrom': '2022-04-20T10:10:30+00:00Z',
'rate': 42,
'custom': {}
}
response = requests.post(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"id": "string",
"dateValidFrom": "2022-04-20T10:10:30+00:00Z",
"rate": 42,
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {}
}
Delete TaxRate for Tax
DELETE /v1/Taxes/:id/taxRates/:fk
Parameters
Path
-
id string required
Tax id
-
fk string required
Foreign key for taxRates
const response = await fetch('https://api.spaceinvoices.com/v1/Taxes/{id}/taxRates/{fk}', {
method: 'DELETE',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
}
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X DELETE https://api.spaceinvoices.com/v1/Taxes/{id}/taxRates/{fk} \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Taxes/{id}/taxRates/{fk}'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
response = requests.delete(url, params={}, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
}
Get tax clause Tax
Returns the aplicable tax clause type based on the provided _documentIssuer and _documentClient data.
POST /v1/Taxes/clause-type
Properties
const response = await fetch('https://api.spaceinvoices.com/v1/Taxes/clause-type', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
})
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X POST https://api.spaceinvoices.com/v1/Taxes/clause-type \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Taxes/clause-type'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
}
response = requests.post(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"taxClauseType": "string",
"issuerCountry": {},
"clientCountry": {}
}