Business Units
Business Units
Manage entity-owned business units used for document branding, defaults, and integrations.
The Business Unit object
Attributes
{
"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
/business-unitsCreate a business unit
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
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"
}'Returns
{
"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
}List business units
/business-unitsList business units
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
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.
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.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
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
{
"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
/business-units/{id}Get a business unit
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
Query parameters
curl "https://eu.spaceinvoices.com/business-units/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"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
/business-units/{id}Update a business unit
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
Body parameters
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"
}'Returns
{
"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
/business-units/{id}Archive a business unit
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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"