Skip to content

Business Units

Business Units

Manage entity-owned business units used for document branding, defaults, and integrations.

The Business Unit object

object

Attributes

idstring
Other attributes
entity_idstring
namestring
addressstringnullable
address_2stringnullable
post_codestringnullable
citystringnullable
statestringnullable
countrystringnullable
country_codestringnullable
emailstringnullable
phonestringnullable
websitestringnullable
settingsobject
numbering_indexinteger
logo_file_idstringnullable
signature_file_idstringnullable
is_activeboolean
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Examplejson
{
  "id": "unit_7595a27b5d35015c3ef0c3fe",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "Ljubljana Store",
  "address": "Dunajska cesta 15",
  "address_2": "Floor 2",
  "post_code": "1000",
  "city": "Ljubljana",
  "state": "Ljubljana",
  "country": "Slovenia",
  "country_code": "SI",
  "email": "ljubljana@example.com",
  "phone": "+386 1 234 56 78",
  "website": "https://ljubljana.example.com",
  "settings": {
    "pdf_template": "modern",
    "primary_color": "#1D4ED8",
    "logo_scale_percent": 110,
    "default_invoice_note": "Issued by {entity_name} / {unit_name}",
    "default_invoice_payment_terms": "Payment due in 15 days.",
    "document_footer": "Questions? Contact {entity_email}.",
    "default_document_signature": "Ljubljana Store team",
    "bank_accounts": [
      {
        "id": "ba_6595a27b5d35015c3ef0c3fd",
        "iban": "SI56020170014356205",
        "bic": "LJBASI2X",
        "bank_name": "NLB d.d.",
        "name": "Ljubljana Store Account",
        "is_default": true
      }
    ],
    "delivery_note_hide_prices": false,
    "credit_note_negative_values": true,
    "show_payment_amounts": true,
    "email_defaults": {
      "invoice": {
        "subject": "Invoice {document_number} from {entity_name}",
        "body": "Hello {customer_name},\n\nPlease find your invoice attached."
      }
    }
  },
  "numbering_index": 2,
  "logo_file_id": "file_6595a27b5d35015c3ef0c3ff",
  "signature_file_id": "file_8595a27b5d35015c3ef0c400",
  "is_active": true,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Create a business unit

POST/business-units

Create a business unit

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
Other parameters
addressstringoptionalnullable
address_2stringoptionalnullable
post_codestringoptionalnullable
citystringoptionalnullable
statestringoptionalnullable
countrystringoptionalnullable
country_codestringoptionalnullable
emailstringoptionalnullable
phonestringoptionalnullable
websitestringoptionalnullable
settingsobjectoptional
logo_file_idstringoptionalnullable
signature_file_idstringoptionalnullable
curl -X POST "https://eu.spaceinvoices.com/business-units" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ljubljana Store"
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
namestring
addressstringnullable
address_2stringnullable
post_codestringnullable
citystringnullable
statestringnullable
countrystringnullable
country_codestringnullable
emailstringnullable
phonestringnullable
websitestringnullable
settingsobject
numbering_indexinteger
logo_file_idstringnullable
signature_file_idstringnullable
is_activeboolean
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "unit_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "Ljubljana Store",
  "address": null,
  "address_2": null,
  "post_code": null,
  "city": null,
  "state": null,
  "country": null,
  "country_code": null,
  "email": null,
  "phone": null,
  "website": null,
  "settings": {},
  "numbering_index": 1,
  "logo_file_id": null,
  "signature_file_id": null,
  "is_active": true,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "deleted_at": null
}
Example:

List business units

GET/business-units

List business units

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.

include_archivedbooleanoptionalnullable

Include archived business units in the response.

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

Returns

dataarray of objects
paginationobject
json
{
  "data": [
    {
      "id": "unit_6595a27b5d35015c3ef0c3fd",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "name": "Ljubljana Store",
      "address": null,
      "address_2": null,
      "post_code": null,
      "city": null,
      "state": null,
      "country": null,
      "country_code": null,
      "email": null,
      "phone": null,
      "website": null,
      "settings": {},
      "numbering_index": 1,
      "logo_file_id": null,
      "signature_file_id": null,
      "is_active": true,
      "created_at": "2024-01-01T00:00:00.000Z",
      "updated_at": "2024-01-01T00:00:00.000Z",
      "deleted_at": null
    },
    {
      "id": "unit_7595a27b5d35015c3ef0c3fe",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "name": "Ljubljana Store",
      "address": "Dunajska cesta 15",
      "address_2": "Floor 2",
      "post_code": "1000",
      "city": "Ljubljana",
      "state": "Ljubljana",
      "country": "Slovenia",
      "country_code": "SI",
      "email": "ljubljana@example.com",
      "phone": "+386 1 234 56 78",
      "website": "https://ljubljana.example.com",
      "settings": {
        "pdf_template": "modern",
        "primary_color": "#1D4ED8",
        "logo_scale_percent": 110,
        "default_invoice_note": "Issued by {entity_name} / {unit_name}",
        "default_invoice_payment_terms": "Payment due in 15 days.",
        "document_footer": "Questions? Contact {entity_email}.",
        "default_document_signature": "Ljubljana Store team",
        "bank_accounts": [
          {
            "id": "ba_6595a27b5d35015c3ef0c3fd",
            "iban": "SI56020170014356205",
            "bic": "LJBASI2X",
            "bank_name": "NLB d.d.",
            "name": "Ljubljana Store Account",
            "is_default": true
          }
        ],
        "delivery_note_hide_prices": false,
        "credit_note_negative_values": true,
        "show_payment_amounts": true,
        "email_defaults": {
          "invoice": {
            "subject": "Invoice {document_number} from {entity_name}",
            "body": "Hello {customer_name},\n\nPlease find your invoice attached."
          }
        }
      },
      "numbering_index": 2,
      "logo_file_id": "file_6595a27b5d35015c3ef0c3ff",
      "signature_file_id": "file_8595a27b5d35015c3ef0c400",
      "is_active": true,
      "created_at": "2024-01-01T00:00:00.000Z",
      "updated_at": "2024-09-01T00:00:00.000Z",
      "deleted_at": null
    }
  ],
  "pagination": {
    "total": 2,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

Get a business unit

GET/business-units/{id}

Get a business unit

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

Query parameters

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

Returns

idstring
Other parameters
entity_idstring
namestring
addressstringnullable
address_2stringnullable
post_codestringnullable
citystringnullable
statestringnullable
countrystringnullable
country_codestringnullable
emailstringnullable
phonestringnullable
websitestringnullable
settingsobject
numbering_indexinteger
logo_file_idstringnullable
signature_file_idstringnullable
is_activeboolean
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "unit_7595a27b5d35015c3ef0c3fe",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "Ljubljana Store",
  "address": "Dunajska cesta 15",
  "address_2": "Floor 2",
  "post_code": "1000",
  "city": "Ljubljana",
  "state": "Ljubljana",
  "country": "Slovenia",
  "country_code": "SI",
  "email": "ljubljana@example.com",
  "phone": "+386 1 234 56 78",
  "website": "https://ljubljana.example.com",
  "settings": {
    "pdf_template": "modern",
    "primary_color": "#1D4ED8",
    "logo_scale_percent": 110,
    "default_invoice_note": "Issued by {entity_name} / {unit_name}",
    "default_invoice_payment_terms": "Payment due in 15 days.",
    "document_footer": "Questions? Contact {entity_email}.",
    "default_document_signature": "Ljubljana Store team",
    "bank_accounts": [
      {
        "id": "ba_6595a27b5d35015c3ef0c3fd",
        "iban": "SI56020170014356205",
        "bic": "LJBASI2X",
        "bank_name": "NLB d.d.",
        "name": "Ljubljana Store Account",
        "is_default": true
      }
    ],
    "delivery_note_hide_prices": false,
    "credit_note_negative_values": true,
    "show_payment_amounts": true,
    "email_defaults": {
      "invoice": {
        "subject": "Invoice {document_number} from {entity_name}",
        "body": "Hello {customer_name},\n\nPlease find your invoice attached."
      }
    }
  },
  "numbering_index": 2,
  "logo_file_id": "file_6595a27b5d35015c3ef0c3ff",
  "signature_file_id": "file_8595a27b5d35015c3ef0c400",
  "is_active": true,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Update a business unit

PATCH/business-units/{id}

Update a business unit

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
addressstringoptionalnullable
address_2stringoptionalnullable
post_codestringoptionalnullable
citystringoptionalnullable
statestringoptionalnullable
countrystringoptionalnullable
country_codestringoptionalnullable
emailstringoptionalnullable
phonestringoptionalnullable
websitestringoptionalnullable
settingsobjectoptional
logo_file_idstringoptionalnullable
signature_file_idstringoptionalnullable
curl -X PATCH "https://eu.spaceinvoices.com/business-units/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ljubljana Flagship"
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
namestring
addressstringnullable
address_2stringnullable
post_codestringnullable
citystringnullable
statestringnullable
countrystringnullable
country_codestringnullable
emailstringnullable
phonestringnullable
websitestringnullable
settingsobject
numbering_indexinteger
logo_file_idstringnullable
signature_file_idstringnullable
is_activeboolean
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "unit_7595a27b5d35015c3ef0c3fe",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "Ljubljana Flagship",
  "address": "Dunajska cesta 15",
  "address_2": "Floor 2",
  "post_code": "1000",
  "city": "Ljubljana",
  "state": "Ljubljana",
  "country": "Slovenia",
  "country_code": "SI",
  "email": "ljubljana@example.com",
  "phone": "+386 1 234 56 78",
  "website": "https://ljubljana.example.com",
  "settings": {
    "pdf_template": "minimal",
    "primary_color": "#0F172A",
    "logo_scale_percent": 110,
    "default_invoice_note": "Issued by {entity_name} / {unit_name}",
    "default_invoice_payment_terms": "Payment due in 15 days.",
    "document_footer": "Questions? Contact {entity_email}.",
    "default_document_signature": "Ljubljana Store team",
    "bank_accounts": [
      {
        "id": "ba_6595a27b5d35015c3ef0c3fd",
        "iban": "SI56020170014356205",
        "bic": "LJBASI2X",
        "bank_name": "NLB d.d.",
        "name": "Ljubljana Store Account",
        "is_default": true
      }
    ],
    "delivery_note_hide_prices": false,
    "credit_note_negative_values": true,
    "show_payment_amounts": true,
    "email_defaults": {
      "invoice": {
        "subject": "Invoice {document_number} from {entity_name}",
        "body": "Hello {customer_name},\n\nPlease find your invoice attached."
      }
    }
  },
  "numbering_index": 2,
  "logo_file_id": "file_6595a27b5d35015c3ef0c3ff",
  "signature_file_id": "file_8595a27b5d35015c3ef0c400",
  "is_active": true,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Archive a business unit

DELETE/business-units/{id}

Archive a business unit

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/business-units/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"