Skip to main content
PUT
/
v2
/
customers
/
{id}
Update a customer
curl --request PUT \
  --url https://api.spirii.com/v2/customers/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "John Smith",
  "externalId": "CU-12345",
  "country": "DK",
  "payoutInformation": {
    "iban": "DK5000400440116243",
    "swiftCode": "ROYCCAT2XXX",
    "bankAccountHolderName": "John Smith",
    "bankRegistrationNumber": "1234",
    "bankAccount": "1234567890"
  },
  "billingDetails": {
    "invoiceFormat": "Email",
    "gln": "0799439112768",
    "invoiceEmail": "john.smith@email.com",
    "vatNumber": "87687766",
    "address": "Street Avenue, 123",
    "city": "Copenhagen",
    "zipCode": "2300"
  },
  "financialSetup": {
    "language": "EN",
    "currency": "EUR"
  },
  "ownerId": 123
}
'
{
  "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>

Path Parameters

id
number
required

Body

application/json

The customer data to update.

name
string

The complete name of the customer.

Maximum string length: 80
Example:

"John Smith"

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"

contactDetails
object

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

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.

ownerId
number

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.