Skip to content

Customers

Customers

Customer management for invoice recipients.
Store customer details including address and tax information for use in invoice creation.

The Customer object

object

Attributes

idstring
namestring
emailstring
tax_numberstring
addressstring
post_codestring
citystring
countrystring
country_codestring
metadata
Other attributes
address_2string
statestring
company_numberstring
peppol_idstring
is_tax_subjectboolean
is_end_consumerboolean
entity_idstring
vies
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
Examplejson
{
  "id": "cust_7595a27b5d35015c3ef0c3fe",
  "name": "Horizon Launch Systems Inc.",
  "email": "procurement@horizonlaunch.com",
  "address": "100 Rocket Row",
  "address_2": "Building 7",
  "post_code": "77058",
  "city": "Houston",
  "state": "TX",
  "country": "US",
  "country_code": "US",
  "tax_number": "74-1234567",
  "is_tax_subject": true,
  "is_end_consumer": false,
  "company_number": "0412345678",
  "peppol_id": null,
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "metadata": {
    "payment_terms": "Net 30",
    "account_manager": "Mission Control"
  },
  "vies": null,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Create a new customer

POST/customers

Create a new customer for use in invoices.
Store customer details including name, address, and tax information.
All fields except name are optional.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

namestringrequired
emailstringoptional
tax_numberstringoptional
addressstringoptional
post_codestringoptional
citystringoptional
countrystringoptional
country_codestringoptional
metadataobjectoptional

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringoptional
statestringoptional
company_numberstringoptional
peppol_idstringoptional
is_tax_subjectbooleanoptional
is_end_consumerbooleanoptional
curl -X POST "https://eu.spaceinvoices.com/customers" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alex Starfield"
  }'
Example:

Returns

idstring
namestring
emailstring
tax_numberstring
addressstring
post_codestring
citystring
countrystring
country_codestring
metadata
Other parameters
address_2string
statestring
company_numberstring
peppol_idstring
is_tax_subjectboolean
is_end_consumerboolean
entity_idstring
vies
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "cust_6595a27b5d35015c3ef0c3fd",
  "name": "Alex Starfield",
  "email": null,
  "address": null,
  "address_2": null,
  "post_code": null,
  "city": null,
  "state": null,
  "country": null,
  "country_code": null,
  "tax_number": null,
  "is_tax_subject": true,
  "is_end_consumer": false,
  "company_number": null,
  "peppol_id": null,
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "metadata": {},
  "vies": null,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}
Example:

List all customers

GET/customers

Retrieve a paginated list of customers with optional filtering and sorting.
Supports cursor-based pagination, flexible JSON querying with MongoDB-style operators, full-text search, and sorting.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

order_byoptional

Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with - for descending order. When paginating, reuse cursors only with the same effective ordering.

querystring<json>optional

JSON query object for filtering results. Supports MongoDB-style operators.

Supported operators:
- equals or direct value - Exact match (default)
- gte - Greater than or equal
- lte - Less than or equal
- gt - Greater than
- lt - Less than
- in - Value in array
- notIn - Value not in array
- contains - String contains (case-insensitive)
- startsWith - String starts with
- endsWith - String ends with
- between - Value between two numbers/dates [min, max]

Allowed fields: id, name, address, city, country, tax_number, email, created_at, updated_at

Examples:
- {"total": {"gte": 1000}} - Invoices over 1000
- {"customer.name": {"contains": "Acme"}} - Customer name contains "Acme"
- {"date": {"between": ["2025-01-01", "2025-12-31"]}} - Date range

searchstringoptional

Full-text search query to filter results across multiple fields.
Searches are case-insensitive and match partial strings.
Searches across all text fields including names, descriptions, addresses, and metadata values.

deletedbooleanoptional

When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.

curl "https://eu.spaceinvoices.com/customers" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "cust_6595a27b5d35015c3ef0c3fd",
      "name": "Alex Starfield",
      "email": null,
      "address": null,
      "address_2": null,
      "post_code": null,
      "city": null,
      "state": null,
      "country": null,
      "country_code": null,
      "tax_number": null,
      "is_tax_subject": true,
      "is_end_consumer": false,
      "company_number": null,
      "peppol_id": null,
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "metadata": {},
      "vies": null,
      "created_at": "2024-01-01T00:00:00.000Z",
      "updated_at": "2024-09-01T00:00:00.000Z",
      "deleted_at": null
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

Get customer by ID

GET/customers/{id}

Retrieve a single customer by its unique identifier.
Returns the complete customer details including name, address, and tax information.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl "https://eu.spaceinvoices.com/customers/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

idstring
namestring
emailstring
tax_numberstring
addressstring
post_codestring
citystring
countrystring
country_codestring
metadata
Other parameters
address_2string
statestring
company_numberstring
peppol_idstring
is_tax_subjectboolean
is_end_consumerboolean
entity_idstring
vies
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "cust_7595a27b5d35015c3ef0c3fe",
  "name": "Horizon Launch Systems Inc.",
  "email": "procurement@horizonlaunch.com",
  "address": "100 Rocket Row",
  "address_2": "Building 7",
  "post_code": "77058",
  "city": "Houston",
  "state": "TX",
  "country": "US",
  "country_code": "US",
  "tax_number": "74-1234567",
  "is_tax_subject": true,
  "is_end_consumer": false,
  "company_number": "0412345678",
  "peppol_id": null,
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "metadata": {
    "payment_terms": "Net 30",
    "account_manager": "Mission Control"
  },
  "vies": null,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Update a customer

PATCH/customers/{id}

Update an existing customer.
Only the provided fields will be updated.
All fields are optional for partial updates.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Body parameters

namestringoptional
emailstringoptional
tax_numberstringoptional
addressstringoptional
post_codestringoptional
citystringoptional
countrystringoptional
country_codestringoptional
metadataobjectoptional

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringoptional
statestringoptional
company_numberstringoptional
peppol_idstringoptional
is_tax_subjectbooleanoptional
is_end_consumerbooleanoptional
curl -X PATCH "https://eu.spaceinvoices.com/customers/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Horizon Launch Systems LLC"
  }'
Example:

Returns

idstring
namestring
emailstring
tax_numberstring
addressstring
post_codestring
citystring
countrystring
country_codestring
metadata
Other parameters
address_2string
statestring
company_numberstring
peppol_idstring
is_tax_subjectboolean
is_end_consumerboolean
entity_idstring
vies
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "cust_7595a27b5d35015c3ef0c3fe",
  "name": "Horizon Launch Systems Inc.",
  "email": "procurement@horizonlaunch.com",
  "address": "100 Rocket Row",
  "address_2": "Building 7",
  "post_code": "77058",
  "city": "Houston",
  "state": "TX",
  "country": "US",
  "country_code": "US",
  "tax_number": "74-1234567",
  "is_tax_subject": true,
  "is_end_consumer": false,
  "company_number": "0412345678",
  "peppol_id": null,
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "metadata": {
    "payment_terms": "Net 30",
    "account_manager": "Mission Control"
  },
  "vies": null,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Delete a customer

DELETE/customers/{id}

Soft delete a customer by its unique identifier. The customer is moved to the trash and can be restored.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl -X DELETE "https://eu.spaceinvoices.com/customers/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Permanently delete a customer

DELETE/customers/{id}/permanent

Permanently delete a soft-deleted customer. Only customers in the trash can be permanently deleted.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl -X DELETE "https://eu.spaceinvoices.com/customers/{id}/permanent" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Restore a deleted customer

POST/customers/{id}/restore

Restore a soft-deleted customer from the trash.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl -X POST "https://eu.spaceinvoices.com/customers/{id}/restore" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

idstring
namestring
emailstring
tax_numberstring
addressstring
post_codestring
citystring
countrystring
country_codestring
metadata
Other parameters
address_2string
statestring
company_numberstring
peppol_idstring
is_tax_subjectboolean
is_end_consumerboolean
entity_idstring
vies
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "cust_7595a27b5d35015c3ef0c3fe",
  "name": "Horizon Launch Systems Inc.",
  "email": "procurement@horizonlaunch.com",
  "address": "100 Rocket Row",
  "address_2": "Building 7",
  "post_code": "77058",
  "city": "Houston",
  "state": "TX",
  "country": "US",
  "country_code": "US",
  "tax_number": "74-1234567",
  "is_tax_subject": true,
  "is_end_consumer": false,
  "company_number": "0412345678",
  "peppol_id": null,
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "metadata": {
    "payment_terms": "Net 30",
    "account_manager": "Mission Control"
  },
  "vies": null,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}