Skip to main content
POST
/
v2
/
customers
Create a new customer
curl --request POST \
  --url https://api.spirii.com/v2/customers \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "John Smith",
  "country": "DK",
  "contactDetails": {
    "name": "John Smith",
    "email": "john.smith@email.com",
    "phone": "+11 22 33 44"
  },
  "ownerId": 234,
  "externalId": "CU-12345",
  "payoutInformation": {
    "iban": "DK5000400440116243",
    "swiftCode": "ROYCCAT2XXX",
    "bankAccountHolderName": "John Smith",
    "bankRegistrationNumber": "1234",
    "bankAccount": "1234567890"
  },
  "financialSetup": {
    "language": "EN",
    "currency": "EUR"
  }
}
'
{
  "name": "John Smith",
  "contactDetails": {
    "name": "John Smith",
    "email": "john.smith@email.com",
    "phone": "+11 22 33 44"
  },
  "billingDetails": {
    "paymentMethod": "Invoice",
    "invoiceFormat": "Email",
    "gln": "0799439112768",
    "invoiceEmail": "john.smith@email.com",
    "vatNumber": "87687766",
    "address": "Street Avenue, 123",
    "city": "Copenhagen",
    "zipCode": "2300"
  },
  "id": 123,
  "cpo": {
    "id": 123,
    "name": "Charge Point Operator Inc."
  },
  "locations": [
    1,
    2,
    3
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "externalId": "CU-12345",
  "country": "DK",
  "payoutInformation": {
    "iban": "DK5000400440116243",
    "swiftCode": "ROYCCAT2XXX",
    "bankAccountHolderName": "John Smith",
    "bankRegistrationNumber": "1234",
    "bankAccount": "1234567890"
  },
  "financialSetup": {
    "language": "EN",
    "currency": "EUR"
  },
  "billingSettings": {
    "chargeKeyDocumentAggregation": "customer",
    "chargeKeyLineAggregation": "location",
    "companyCarReimbursementMethod": "MANUAL"
  },
  "owner": {
    "id": 234,
    "name": "Company Inc."
  }
}

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
required

The country of the billing address.

Required string length: 2
Example:

"DK"

contactDetails
object
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

The string identifier of the customer from the external system.

Maximum string length: 40
Example:

"CU-12345"

payoutInformation
object

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

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

financialSetup
object

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

billingSettings
object

The billing settings of the customer.

Response

name
string
required

The complete name of the customer.

Maximum string length: 80
Example:

"John Smith"

contactDetails
object
required

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

billingDetails
object
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:
[1, 2, 3]
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

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

The country of the billing address.

Required string length: 2
Example:

"DK"

payoutInformation
object

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

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

billingSettings
object

The billing settings of the customer.

owner
object

The owner of the customer.