Organizations are the central unit of Space Invoices, representing various entities such as businesses, NGOs, clubs, sole proprietors, and more.
An Account in Space Invoices can manage multiple Organizations, achieved either by creating new Organizations using an Account's access token or by being granted access rights to an existing Organization. This feature is especially useful when there's a need to oversee multiple Organizations, such as when users sign up for a particular product or service.
Most of the models created through the API are associated with an Organization instance, ensuring a clear and organized structure for managing the various aspects of each Organization. This streamlined approach allows for efficient handling of resources and data across different entities.
Endpoints:
- POST /v1/Accounts/:id/organizations
- GET /v1/Organizations/:id
- GET /v1/Accounts/:id/organizations
- GET /v1/Accounts/:id/organizations/count
- PATCH /v1/Organizations/:id
- POST /v1/Organizations/:id/activate
- POST /v1/Organizations/:id/deactivate
- GET /v1/Organizations/:id/subscription
- POST /v1/Organizations/:id/images
- GET /v1/Organizations/:id/images
- DELETE /v1/Organizations/:id/images
- GET /v1/Organizations/:id/download-image
- GET /v1/Organizations/:id/images/logo
- GET /v1/Organizations/:id/export
- POST /v1/Organizations/:id/import
- POST /v1/Organizations/:id/invite
- GET /v1/Organizations/:id/business-stats
- GET /v1/Organizations/:id/total-stats
- GET /v1/Organizations/:id/payment-total-stats
- GET /v1/Organizations/:id/category-total-stats
- GET /v1/Organizations/:id/document-total-stats
- GET /v1/Organizations/:id/reports/profit-and-loss
- GET /v1/Organizations/:id/reports/balance-sheet
- DELETE /v1/AccountOrganizations/:id
- POST /v1/AccountOrganizations/:id/accept
- POST /v1/AccountOrganizations/:id/reject
- POST /v1/AccountOrganizations/:id/enable
- POST /v1/AccountOrganizations/:id/disable
- POST /v1/AccountOrganizations/:id/change-role
- GET /v1/Organizations/:id/accountOrganizations
- GET /v1/Organizations/:id/accountOrganizations/count
The Organization object
Parameters
-
id string readonly
-
locale string
-
name string
-
address string
-
address2 string
-
city string
-
zip string
-
state string
-
country string
-
timezone string
-
active boolean readonly
-
size string
-
industry string
-
Billing email used for SI customers if is billing organization
-
activatedAt date readonly
-
deactivatedAt date readonly
-
countryAlpha2Code string
-
taxNumber string
-
taxSubject boolean
-
companyNumber string
-
IBAN string
-
bank string
-
SWIFT string
-
website string
-
email string
-
phone string
-
businessType string
-
fiscalRegionCode string
-
createdAt date readonly
-
updatedAt date readonly
-
Custom field for freeform data input
- show nested properties
Additional propertiesExpand all
{
"locale": "string",
"timezone": "string",
"active": true,
"size": "string",
"industry": "string",
"billingEmail": "string",
"activatedAt": "2022-04-20T10:10:30+00:00Z",
"deactivatedAt": "2022-04-20T10:10:30+00:00Z",
"name": "string",
"address": "string",
"address2": "string",
"city": "string",
"zip": "string",
"state": "string",
"country": "string",
"countryAlpha2Code": "string",
"taxNumber": "string",
"taxSubject": true,
"companyNumber": "string",
"IBAN": "string",
"bank": "string",
"SWIFT": "string",
"website": "string",
"email": "string",
"phone": "string",
"businessType": "string",
"fiscalRegionCode": "string",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
Create Organization
POST /v1/Accounts/:id/organizations
Parameters
Path
-
id string required
Account id
Properties
-
name string required
-
locale string optional
-
address string optional
-
address2 string optional
-
city string optional
-
zip string optional
-
state string optional
-
country string optional
-
timezone string optional
-
size string optional
-
industry string optional
-
Billing email used for SI customers if is billing organization
-
countryAlpha2Code string optional
-
taxNumber string optional
-
taxSubject boolean optional
-
companyNumber string optional
-
IBAN string optional
-
bank string optional
-
SWIFT string optional
-
website string optional
-
email string optional
-
phone string optional
-
businessType string optional
-
fiscalRegionCode string optional
-
Default is: {}
Custom field for freeform data input
- show nested properties
Additional propertiesExpand all
const response = await fetch('https://api.spaceinvoices.com/v1/Accounts/{id}/organizations', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
locale: 'string',
timezone: 'string',
size: 'string',
industry: 'string',
billingEmail: 'string',
name: 'string',
address: 'string',
address2: 'string',
city: 'string',
zip: 'string',
state: 'string',
country: 'string',
countryAlpha2Code: 'string',
taxNumber: 'string',
taxSubject: true,
companyNumber: 'string',
IBAN: 'string',
bank: 'string',
SWIFT: 'string',
website: 'string',
email: 'string',
phone: 'string',
businessType: 'string',
fiscalRegionCode: 'string',
custom: {},
_data: [{
name: 'string',
value: {},
options: {}
}]
})
});
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/Accounts/{id}/organizations \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"locale": "string", \
"timezone": "string", \
"size": "string", \
"industry": "string", \
"billingEmail": "string", \
"name": "string", \
"address": "string", \
"address2": "string", \
"city": "string", \
"zip": "string", \
"state": "string", \
"country": "string", \
"countryAlpha2Code": "string", \
"taxNumber": "string", \
"taxSubject": true, \
"companyNumber": "string", \
"IBAN": "string", \
"bank": "string", \
"SWIFT": "string", \
"website": "string", \
"email": "string", \
"phone": "string", \
"businessType": "string", \
"fiscalRegionCode": "string", \
"custom": {}, \
"_data": [{ \
"name": "string", \
"value": {}, \
"options": {}
}]
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Accounts/{id}/organizations'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'locale': 'string',
'timezone': 'string',
'size': 'string',
'industry': 'string',
'billingEmail': 'string',
'name': 'string',
'address': 'string',
'address2': 'string',
'city': 'string',
'zip': 'string',
'state': 'string',
'country': 'string',
'countryAlpha2Code': 'string',
'taxNumber': 'string',
'taxSubject': True,
'companyNumber': 'string',
'IBAN': 'string',
'bank': 'string',
'SWIFT': 'string',
'website': 'string',
'email': 'string',
'phone': 'string',
'businessType': 'string',
'fiscalRegionCode': 'string',
'custom': {},
'_data': [{
'name': 'string',
'value': {},
'options': {}
}]
}
response = requests.post(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"locale": "string",
"timezone": "string",
"active": true,
"size": "string",
"industry": "string",
"billingEmail": "string",
"activatedAt": "2022-04-20T10:10:30+00:00Z",
"deactivatedAt": "2022-04-20T10:10:30+00:00Z",
"name": "string",
"address": "string",
"address2": "string",
"city": "string",
"zip": "string",
"state": "string",
"country": "string",
"countryAlpha2Code": "string",
"taxNumber": "string",
"taxSubject": true,
"companyNumber": "string",
"IBAN": "string",
"bank": "string",
"SWIFT": "string",
"website": "string",
"email": "string",
"phone": "string",
"businessType": "string",
"fiscalRegionCode": "string",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
Get Organization
GET /v1/Organizations/: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/Organizations/{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/Organizations/{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/Organizations/{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:
{
"locale": "string",
"timezone": "string",
"active": true,
"size": "string",
"industry": "string",
"billingEmail": "string",
"activatedAt": "2022-04-20T10:10:30+00:00Z",
"deactivatedAt": "2022-04-20T10:10:30+00:00Z",
"name": "string",
"address": "string",
"address2": "string",
"city": "string",
"zip": "string",
"state": "string",
"country": "string",
"countryAlpha2Code": "string",
"taxNumber": "string",
"taxSubject": true,
"companyNumber": "string",
"IBAN": "string",
"bank": "string",
"SWIFT": "string",
"website": "string",
"email": "string",
"phone": "string",
"businessType": "string",
"fiscalRegionCode": "string",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
Find Organizations
GET /v1/Accounts/:id/organizations
Parameters
Path
-
id string required
Account id
Query
-
filter string optional
const response = await fetch('https://api.spaceinvoices.com/v1/Accounts/{id}/organizations', {
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/Accounts/{id}/organizations \
-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/Accounts/{id}/organizations'
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:
[
{
"locale": "string",
"timezone": "string",
"active": true,
"size": "string",
"industry": "string",
"billingEmail": "string",
"activatedAt": "2022-04-20T10:10:30+00:00Z",
"deactivatedAt": "2022-04-20T10:10:30+00:00Z",
"name": "string",
"address": "string",
"address2": "string",
"city": "string",
"zip": "string",
"state": "string",
"country": "string",
"countryAlpha2Code": "string",
"taxNumber": "string",
"taxSubject": true,
"companyNumber": "string",
"IBAN": "string",
"bank": "string",
"SWIFT": "string",
"website": "string",
"email": "string",
"phone": "string",
"businessType": "string",
"fiscalRegionCode": "string",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
]
Count Organizations
GET /v1/Accounts/:id/organizations/count
Parameters
Path
-
id string required
Account id
Query
-
where string optional
Criteria to match model instances
const response = await fetch('https://api.spaceinvoices.com/v1/Accounts/{id}/organizations/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/Accounts/{id}/organizations/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/Accounts/{id}/organizations/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
}
Patch Organization
PATCH /v1/Organizations/:id
Parameters
Path
-
id string required
Organization id
Properties
-
name string required
-
locale string optional
-
address string optional
-
address2 string optional
-
city string optional
-
zip string optional
-
state string optional
-
country string optional
-
timezone string optional
-
size string optional
-
industry string optional
-
Billing email used for SI customers if is billing organization
-
countryAlpha2Code string optional
-
taxNumber string optional
-
taxSubject boolean optional
-
companyNumber string optional
-
IBAN string optional
-
bank string optional
-
SWIFT string optional
-
website string optional
-
email string optional
-
phone string optional
-
businessType string optional
-
fiscalRegionCode string optional
-
Default is: {}
Custom field for freeform data input
- show nested properties
Additional propertiesExpand all
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}', {
method: 'PATCH',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
locale: 'string',
timezone: 'string',
size: 'string',
industry: 'string',
billingEmail: 'string',
name: 'string',
address: 'string',
address2: 'string',
city: 'string',
zip: 'string',
state: 'string',
country: 'string',
countryAlpha2Code: 'string',
taxNumber: 'string',
taxSubject: true,
companyNumber: 'string',
IBAN: 'string',
bank: 'string',
SWIFT: 'string',
website: 'string',
email: 'string',
phone: 'string',
businessType: 'string',
fiscalRegionCode: 'string',
custom: {},
_data: [{
name: 'string',
value: {},
options: {}
}]
})
});
Login to auto-populate your access token.
Your access token is displayed in examples.
Prerequisite: npm install node-fetch
curl -X PATCH https://api.spaceinvoices.com/v1/Organizations/{id} \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"locale": "string", \
"timezone": "string", \
"size": "string", \
"industry": "string", \
"billingEmail": "string", \
"name": "string", \
"address": "string", \
"address2": "string", \
"city": "string", \
"zip": "string", \
"state": "string", \
"country": "string", \
"countryAlpha2Code": "string", \
"taxNumber": "string", \
"taxSubject": true, \
"companyNumber": "string", \
"IBAN": "string", \
"bank": "string", \
"SWIFT": "string", \
"website": "string", \
"email": "string", \
"phone": "string", \
"businessType": "string", \
"fiscalRegionCode": "string", \
"custom": {}, \
"_data": [{ \
"name": "string", \
"value": {}, \
"options": {}
}]
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'locale': 'string',
'timezone': 'string',
'size': 'string',
'industry': 'string',
'billingEmail': 'string',
'name': 'string',
'address': 'string',
'address2': 'string',
'city': 'string',
'zip': 'string',
'state': 'string',
'country': 'string',
'countryAlpha2Code': 'string',
'taxNumber': 'string',
'taxSubject': True,
'companyNumber': 'string',
'IBAN': 'string',
'bank': 'string',
'SWIFT': 'string',
'website': 'string',
'email': 'string',
'phone': 'string',
'businessType': 'string',
'fiscalRegionCode': 'string',
'custom': {},
'_data': [{
'name': 'string',
'value': {},
'options': {}
}]
}
response = requests.patch(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"locale": "string",
"timezone": "string",
"active": true,
"size": "string",
"industry": "string",
"billingEmail": "string",
"activatedAt": "2022-04-20T10:10:30+00:00Z",
"deactivatedAt": "2022-04-20T10:10:30+00:00Z",
"name": "string",
"address": "string",
"address2": "string",
"city": "string",
"zip": "string",
"state": "string",
"country": "string",
"countryAlpha2Code": "string",
"taxNumber": "string",
"taxSubject": true,
"companyNumber": "string",
"IBAN": "string",
"bank": "string",
"SWIFT": "string",
"website": "string",
"email": "string",
"phone": "string",
"businessType": "string",
"fiscalRegionCode": "string",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
Activate Organization
POST /v1/Organizations/:id/activate
Parameters
Path
-
id string required
Organization id
Properties
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/activate', {
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/Organizations/{id}/activate \
-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/Organizations/{id}/activate'
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:
{
"success": true
}
Deactivate Organization
POST /v1/Organizations/:id/deactivate
Parameters
Path
-
id string required
Organization id
Properties
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/deactivate', {
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/Organizations/{id}/deactivate \
-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/Organizations/{id}/deactivate'
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:
{
"success": true
}
Get Organizations subscription
GET /v1/Organizations/:id/subscription
Parameters
Path
-
id string required
Organization id
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/subscription', {
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}/subscription \
-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}/subscription'
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:
{
}
Upload image for Organization
POST /v1/Organizations/:id/images
Parameters
Path
-
id string required
Organization id
Properties
-
type string required
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/images', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
type: 'string'
})
});
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}/images \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"type": "string"
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/images'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'type': 'string'
}
response = requests.post(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
}
Get Organizations image
GET /v1/Organizations/:id/images
Parameters
Path
-
id string required
Organization id
Query
-
type string required
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/images', {
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}/images \
-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}/images'
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:
{
}
Delete Organizations image
DELETE /v1/Organizations/:id/images
Parameters
Path
-
id string required
Organization id
Query
-
type string required
Type of image to delete
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/images', {
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/Organizations/{id}/images \
-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}/images'
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
}
Download Organizations image
GET /v1/Organizations/:id/download-image
Parameters
Path
-
id string required
Organization id
Query
-
type string required
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/download-image', {
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}/download-image \
-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}/download-image'
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:
{
}
Find Organizations
GET /v1/Organizations/:id/images/logo
Parameters
Path
-
id string required
Organization id
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/images/logo', {
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}/images/logo \
-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}/images/logo'
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:
{
}
Export Organizations data
GET /v1/Organizations/:id/export
Parameters
Path
-
id string required
Organization id
Query
-
type string required
-
where string optional
-
email boolean optional
-
lang string optional
-
options string optional
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/export', {
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}/export \
-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}/export'
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:
{
"success": true,
"link": "string"
}
Import data to Organization
POST /v1/Organizations/:id/import
Parameters
Path
-
id string required
Organization id
Properties
-
type string required
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/import', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
type: 'string'
})
});
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}/import \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"type": "string"
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/import'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'type': 'string'
}
response = requests.post(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"success": true
}
Invite Account to Organization
POST /v1/Organizations/:id/invite
Parameters
Path
-
id string required
Organization id
Properties
-
accountId string optional
Id of account being invited, optional if email is provided
-
requireConfirmation boolean optional
Indicates if invitee must accept the invitation before getting access. Only verified top level Space Invoices accounts can set this to false.
-
sendEmail boolean optional
Should an email be sent to the invitee. Can only be turned off for invitations that don't require confirmation.
-
role string optional
Role of invitee, 'default' for normal, 'readonly' for limited and 'admin' for full access. Defaults to 'default'.
-
Email of user to invite, optional if inviteeId is provided
Additional propertiesExpand all
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/invite', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
accountId: 'string',
email: 'string',
requireConfirmation: true,
sendEmail: true,
role: 'string'
})
});
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}/invite \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"accountId": "string", \
"email": "string", \
"requireConfirmation": true, \
"sendEmail": true, \
"role": "string"
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/invite'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'accountId': 'string',
'email': 'string',
'requireConfirmation': True,
'sendEmail': True,
'role': 'string'
}
response = requests.post(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
}
Get Organizations business stats
GET /v1/Organizations/:id/business-stats
Parameters
Path
-
id string required
Organization id
Query
-
from date optional
Optional from date to generate report for
-
to date optional
Optional to date to generate report for
-
accountId string optional
Optional id of account to limit report for
-
unitId string optional
Optional id of unit to limit report for
-
text boolean optional
Optional if a text report should be created
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/business-stats', {
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}/business-stats \
-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}/business-stats'
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:
{
}
Get Organizations total stats
GET /v1/Organizations/:id/total-stats
Parameters
Path
-
id string required
Organization id
Query
-
date string optional
Optional value to use as today's date
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/total-stats', {
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}/total-stats \
-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}/total-stats'
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:
{
}
Get Organizations payment total stats
GET /v1/Organizations/:id/payment-total-stats
Parameters
Path
-
id string required
Organization id
Query
-
from string required
-
to string required
-
dist string required
Dist of data ie. day, week, month, year
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/payment-total-stats', {
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}/payment-total-stats \
-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}/payment-total-stats'
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:
{
"stats": [{}],
"total": [{}],
"customColors": [{}]
}
Get Organizations category total stats
GET /v1/Organizations/:id/category-total-stats
Parameters
Path
-
id string required
Organization id
Query
-
from string required
-
to string required
-
dist string required
Dist of data ie. day, week, month, year
-
categoryId string optional
Optional id of category to limit results to
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/category-total-stats', {
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}/category-total-stats \
-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}/category-total-stats'
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:
{
"stats": [{}],
"total": [{}]
}
Get Organizations document total stats
GET /v1/Organizations/:id/document-total-stats
Parameters
Path
-
id string required
Organization id
Query
-
type string required
Document type
-
from string required
-
to string required
-
dist string required
Dist of data ie. day, week, month, year
-
gross boolean optional
If set to true, it will calculate the prices with gross values otherwise with net values
-
incoming boolean optional
If incoming document statistics should be returned.
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/document-total-stats', {
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}/document-total-stats \
-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}/document-total-stats'
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:
{
"stats": [{}],
"total": [{}]
}
Get Organizations profit and loss (beta)
GET /v1/Organizations/:id/reports/profit-and-loss
Parameters
Path
-
id string required
Organization id
Query
-
from string required
from date
-
to string required
from date
-
options string optional
Additional report generation options
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/reports/profit-and-loss', {
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}/reports/profit-and-loss \
-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}/reports/profit-and-loss'
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:
[
{
}
]
Get Organizations balance sheet (beta)
GET /v1/Organizations/:id/reports/balance-sheet
Parameters
Path
-
id string required
Organization id
Query
-
from string required
from date
-
to string required
from date
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/reports/balance-sheet', {
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}/reports/balance-sheet \
-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}/reports/balance-sheet'
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:
[
{
}
]
Delete AccountOrganization
DELETE /v1/AccountOrganizations/:id
Parameters
Path
-
id string required
Model id
const response = await fetch('https://api.spaceinvoices.com/v1/AccountOrganizations/{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/AccountOrganizations/{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/AccountOrganizations/{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
}
Accept invitation for Organization
POST /v1/AccountOrganizations/:id/accept
Parameters
Path
-
id string required
AccountOrganization id
Properties
const response = await fetch('https://api.spaceinvoices.com/v1/AccountOrganizations/{id}/accept', {
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/AccountOrganizations/{id}/accept \
-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/AccountOrganizations/{id}/accept'
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:
{
"success": true
}
Reject invitation for Organization
POST /v1/AccountOrganizations/:id/reject
Parameters
Path
-
id string required
AccountOrganization id
Properties
const response = await fetch('https://api.spaceinvoices.com/v1/AccountOrganizations/{id}/reject', {
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/AccountOrganizations/{id}/reject \
-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/AccountOrganizations/{id}/reject'
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:
{
"success": true
}
Enable access for Organization
POST /v1/AccountOrganizations/:id/enable
Parameters
Path
-
id string required
AccountOrganization id
Properties
const response = await fetch('https://api.spaceinvoices.com/v1/AccountOrganizations/{id}/enable', {
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/AccountOrganizations/{id}/enable \
-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/AccountOrganizations/{id}/enable'
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:
{
"success": true
}
Disable access for Organization
POST /v1/AccountOrganizations/:id/disable
Parameters
Path
-
id string required
AccountOrganization id
Properties
const response = await fetch('https://api.spaceinvoices.com/v1/AccountOrganizations/{id}/disable', {
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/AccountOrganizations/{id}/disable \
-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/AccountOrganizations/{id}/disable'
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:
{
"success": true
}
Change Account role in Organization
POST /v1/AccountOrganizations/:id/change-role
Parameters
Path
-
id string required
AccountOrganization id
Properties
-
role string optional
Role of invitee, one of 'default', 'readonly' and 'admin'. Defaults to 'default'.
const response = await fetch('https://api.spaceinvoices.com/v1/AccountOrganizations/{id}/change-role', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
role: 'string'
})
});
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/AccountOrganizations/{id}/change-role \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"role": "string"
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/AccountOrganizations/{id}/change-role'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'role': 'string'
}
response = requests.post(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"success": true
}
Get AccountOrganizations
GET /v1/Organizations/:id/accountOrganizations
Parameters
Path
-
id string required
Organization id
Query
-
filter string optional
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/accountOrganizations', {
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}/accountOrganizations \
-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}/accountOrganizations'
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:
[
{
"role": "admin",
"active": true,
"disabled": false,
"rejected": false,
"invitationEmail": "string",
"inviterId": "string",
"inviterMasterId": "string",
"id": "string",
"accountId": "string",
"organizationId": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {}
}
]
Count AccountOrganizations
GET /v1/Organizations/:id/accountOrganizations/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}/accountOrganizations/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}/accountOrganizations/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}/accountOrganizations/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
}