Clients in Space Invoices represent businesses, end users, organizations, or any other entities that can receive a document from an Organization. Clients can be saved and later referenced using their unique ID or email address. This feature simplifies the process of creating and managing documents, allowing you to efficiently associate documents with specific clients and maintain a clear record of all transactions. Storing client information also streamlines future interactions, enabling you to easily access and update client details as needed.
When creating a document in Space Invoices, you can easily reference a client by including the clientId
property in the root of the create Document API call. Alternatively, you can pass the client's email address in _documentClient.email
property of the same API call. Both methods allow you to associate the document with the specified client, ensuring accurate record-keeping and seamless communication. This approach simplifies document management and helps maintain an organized history of transactions with each client.
Endpoints:
- POST /v1/Organizations/:id/clients
- GET /v1/Clients/:id
- GET /v1/Organizations/:id/clients
- GET /v1/Organizations/:id/clients/count
- GET /v1/Organizations/:id/clients/search
- PUT /v1/Clients/:id
- PATCH /v1/Clients/:id
- DELETE /v1/Clients/:id
- POST /v1/Clients/:id/send-reminder
The Client object
Parameters
-
id string readonly
-
name string
-
address string
-
address2 string
-
city string
-
zip string
-
state string
-
country string
-
taxNumber string
-
taxSubject boolean
-
companyNumber string
-
fiscalRegionCode string
-
contact string
-
note string
-
isEndCustomer boolean
-
Type of client, customer, supplier or both.
-
countryAlpha2Code string
-
IBAN string
-
bank string
-
SWIFT string
-
website string
-
email string
-
phone string
-
businessType string
-
createdAt date readonly
-
updatedAt date readonly
-
Custom field for freeform data input
-
deletedAt date readonly
-
_isDeleted boolean readonly
-
deletedId string readonly
-
organizationId string readonly
-
unitId string readonly
- show nested properties
Additional propertiesExpand all
{
"contact": "string",
"note": "string",
"isEndCustomer": false,
"type": "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",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"organizationId": "string",
"unitId": "string",
"unitIds": ["string"],
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
Create Client
POST /v1/Organizations/:id/clients
Parameters
Path
-
id string required
Organization id
Properties
-
name string required
-
address string optional
-
address2 string optional
-
city string optional
-
zip string optional
-
state string optional
-
country string optional
-
taxNumber string optional
-
taxSubject boolean optional
-
companyNumber string optional
-
fiscalRegionCode string optional
-
contact string optional
-
note string optional
-
isEndCustomer boolean optional
Default is: false
-
Type of client, customer, supplier or both.
-
countryAlpha2Code string optional
-
IBAN string optional
-
bank string optional
-
SWIFT string optional
-
website string optional
-
email string optional
-
phone string optional
-
businessType 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}/clients', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
contact: 'string',
note: 'string',
isEndCustomer: false,
type: '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/Organizations/{id}/clients \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"contact": "string", \
"note": "string", \
"isEndCustomer": false, \
"type": "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}/clients'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'contact': 'string',
'note': 'string',
'isEndCustomer': False,
'type': '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:
{
"contact": "string",
"note": "string",
"isEndCustomer": false,
"type": "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",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"organizationId": "string",
"unitId": "string",
"unitIds": ["string"],
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
Get Client
GET /v1/Clients/: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/Clients/{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/Clients/{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/Clients/{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:
{
"contact": "string",
"note": "string",
"isEndCustomer": false,
"type": "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",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"organizationId": "string",
"unitId": "string",
"unitIds": ["string"],
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
Find Clients
GET /v1/Organizations/:id/clients
Parameters
Path
-
id string required
Organization id
Query
-
filter string optional
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/clients', {
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}/clients \
-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}/clients'
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:
[
{
"contact": "string",
"note": "string",
"isEndCustomer": false,
"type": "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",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"organizationId": "string",
"unitId": "string",
"unitIds": ["string"],
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
]
Count Clients
GET /v1/Organizations/:id/clients/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}/clients/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}/clients/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}/clients/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
}
Search Clients
GET /v1/Organizations/:id/clients/search
Parameters
Path
-
id string required
Organization id
Query
-
term string required
-
type string optional
Optionally limit search to customer or supplier
const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/clients/search', {
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}/clients/search \
-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}/clients/search'
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:
[
{
}
]
Replace Client
PUT /v1/Clients/:id
Parameters
Path
-
id string required
Model id
Properties
-
name string required
-
address string optional
-
address2 string optional
-
city string optional
-
zip string optional
-
state string optional
-
country string optional
-
taxNumber string optional
-
taxSubject boolean optional
-
companyNumber string optional
-
fiscalRegionCode string optional
-
contact string optional
-
note string optional
-
isEndCustomer boolean optional
Default is: false
-
Type of client, customer, supplier or both.
-
countryAlpha2Code string optional
-
IBAN string optional
-
bank string optional
-
SWIFT string optional
-
website string optional
-
email string optional
-
phone string optional
-
businessType 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/Clients/{id}', {
method: 'PUT',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
contact: 'string',
note: 'string',
isEndCustomer: false,
type: '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 PUT https://api.spaceinvoices.com/v1/Clients/{id} \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"contact": "string", \
"note": "string", \
"isEndCustomer": false, \
"type": "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/Clients/{id}'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'contact': 'string',
'note': 'string',
'isEndCustomer': False,
'type': '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.put(url, json=params, headers=headers)
Login to auto-insert your own access token.
Your access token displayed in examples.
Response:
{
"contact": "string",
"note": "string",
"isEndCustomer": false,
"type": "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",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"organizationId": "string",
"unitId": "string",
"unitIds": ["string"],
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
Patch Client
PATCH /v1/Clients/:id
Parameters
Path
-
id string required
Client id
Properties
-
name string required
-
address string optional
-
address2 string optional
-
city string optional
-
zip string optional
-
state string optional
-
country string optional
-
taxNumber string optional
-
taxSubject boolean optional
-
companyNumber string optional
-
fiscalRegionCode string optional
-
contact string optional
-
note string optional
-
isEndCustomer boolean optional
Default is: false
-
Type of client, customer, supplier or both.
-
countryAlpha2Code string optional
-
IBAN string optional
-
bank string optional
-
SWIFT string optional
-
website string optional
-
email string optional
-
phone string optional
-
businessType 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/Clients/{id}', {
method: 'PATCH',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
contact: 'string',
note: 'string',
isEndCustomer: false,
type: '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/Clients/{id} \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"contact": "string", \
"note": "string", \
"isEndCustomer": false, \
"type": "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/Clients/{id}'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'contact': 'string',
'note': 'string',
'isEndCustomer': False,
'type': '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:
{
"contact": "string",
"note": "string",
"isEndCustomer": false,
"type": "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",
"id": "string",
"createdAt": "2022-04-20T10:10:30+00:00Z",
"updatedAt": "2022-04-20T10:10:30+00:00Z",
"custom": {},
"deletedAt": "2022-04-20T10:10:30+00:00Z",
"_isDeleted": false,
"deletedId": "string",
"organizationId": "string",
"unitId": "string",
"unitIds": ["string"],
"_data": [{
"id": "string",
"name": "string",
"value": {},
"options": {}
}]
}
const response = await fetch('https://api.spaceinvoices.com/v1/Clients/{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/Clients/{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/Clients/{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
}
Send Reminder to Client
POST /v1/Clients/:id/send-reminder
Parameters
Path
-
id string required
Client id
Properties
-
l string optional
-
email string optional
Additional propertiesExpand all
const response = await fetch('https://api.spaceinvoices.com/v1/Clients/{id}/send-reminder', {
method: 'POST',
headers: {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json'
},
body: JSON.stringify({
email: 'string',
l: '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/Clients/{id}/send-reminder \
-H 'Authorization: ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"email": "string", \
"l": "string"
}'
Login to auto-insert your own access token.
Your access token displayed in examples.
import requests
url = 'https://api.spaceinvoices.com/v1/Clients/{id}/send-reminder'
headers = {
'Authorization': 'ACCESS_TOKEN',
'content-type': 'application/json',
}
params = {
'email': 'string',
'l': '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
}