Skip to main content
POST
Create a new customer

Authorizations

Authorization
string
header
required

Authorization: Bearer <SPIRII_API_KEY>

Body

application/json

The customer to be created.

name
string
required

The complete name of the customer.

Maximum string length: 80
Example:

"John Smith"

country
string | null
required

The country of the billing address.

Required string length: 2
Example:

"DK"

contactDetails
object | null
required

The contact details of the person who can be contacted regarding any concerns about this customer.

ownerId
integer
required

The unique identifier of the owner also known as the parent customer.

Example:

234

type
enum<string>
required

The type of customer. You can create private, business or CPOSubsidiary customers.

Available options:
Private,
Business,
CPOSubsidiary
externalId
string | null

The string identifier of the customer from the external system.

Maximum string length: 40
Example:

"CU-12345"

payoutInformation
object | null

The payout information of the customer. It's important to pass this information if you use Spirii financial services. This ensures correct invoicing.

billingDetails
object | null

The billing details of the customer. It's important to pass this information if you use Spirii financial services.

financialSetup
object | null

This financial setup ensures the customer receives accurate invoices in the correct language and currency, and on time.

billingSettings
object | null

The billing settings of the customer.

receiptSettings
object | null

The receipt settings of the customer.

isTaxableDealer
boolean
default:false

Whether the customer is registered as a taxable dealer. Used for tax handling. Manageable by Spirii admins only.

Example:

false

Response

name
string
required

The complete name of the customer.

Maximum string length: 80
Example:

"John Smith"

contactDetails
object | null
required

The contact details of the person who can be contacted regarding any concerns about this customer.

billingDetails
object | null
required

The billing details of the customer. It's important to pass this information if you use Spirii financial services.

id
integer
required

The unique identifier of the customer.

Example:

123

type
enum<string>
required

The type of customer. You can create private and business customers.

Available options:
Private,
Business,
CPO,
CPOSubsidiary
cpo
object
required

The CPO of the customer.

locations
integer[]
required

The location IDs associated with the customer.

Example:
createdAt
string<date-time>
required

The creation date of the customer.

updatedAt
string<date-time>
required

The last update date of the customer.

externalId
string | null

This field can be used as a reference to your own system, e.g. an internal customer number.

Maximum string length: 40
Example:

"CU-12345"

country
string | null

The country of the billing address.

Required string length: 2
Example:

"DK"

payoutInformation
object | null

The payout information of the customer. It's important to pass this information if you use Spirii financial services. This ensures correct invoicing.

financialSetup
object | null

This financial setup ensures the customer receives accurate invoices in the correct language and currency, and on time.

billingSettings
object | null

The billing settings of the customer.

receiptSettings
object | null

The receipt settings of the customer.

isTaxableDealer
boolean
default:false

Whether the customer is registered as a taxable dealer. Used for tax handling. Manageable by Spirii admins only.

Example:

false

owner
object

The owner of the customer.