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"
},
"billingDetails": {
"address": "Street Avenue, 123",
"city": "Copenhagen",
"zipCode": "2300",
"invoiceFormat": "Email",
"gln": "0799439112768",
"invoiceEmail": "john.smith@email.com",
"vatNumber": "87687766",
"address2": "Apt. 4B"
},
"financialSetup": {
"language": "EN",
"currency": "EUR"
},
"billingSettings": {
"companyCarReimbursementMethod": "MANUAL",
"cpmsRevenueSharingRate": 0.15,
"cpmsRevenueSharingCurrency": "EUR",
"cpmsRevenueSharingEnabled": true,
"canEnableRevenueShare": true
},
"receiptSettings": {
"customText": "<string>"
},
"isTaxableDealer": false
}
'import requests
url = "https://api.spirii.com/v2/customers"
payload = {
"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"
},
"billingDetails": {
"address": "Street Avenue, 123",
"city": "Copenhagen",
"zipCode": "2300",
"invoiceFormat": "Email",
"gln": "0799439112768",
"invoiceEmail": "john.smith@email.com",
"vatNumber": "87687766",
"address2": "Apt. 4B"
},
"financialSetup": {
"language": "EN",
"currency": "EUR"
},
"billingSettings": {
"companyCarReimbursementMethod": "MANUAL",
"cpmsRevenueSharingRate": 0.15,
"cpmsRevenueSharingCurrency": "EUR",
"cpmsRevenueSharingEnabled": True,
"canEnableRevenueShare": True
},
"receiptSettings": { "customText": "<string>" },
"isTaxableDealer": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
},
billingDetails: {
address: 'Street Avenue, 123',
city: 'Copenhagen',
zipCode: '2300',
invoiceFormat: 'Email',
gln: '0799439112768',
invoiceEmail: 'john.smith@email.com',
vatNumber: '87687766',
address2: 'Apt. 4B'
},
financialSetup: {language: 'EN', currency: 'EUR'},
billingSettings: {
companyCarReimbursementMethod: 'MANUAL',
cpmsRevenueSharingRate: 0.15,
cpmsRevenueSharingCurrency: 'EUR',
cpmsRevenueSharingEnabled: true,
canEnableRevenueShare: true
},
receiptSettings: {customText: '<string>'},
isTaxableDealer: false
})
};
fetch('https://api.spirii.com/v2/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spirii.com/v2/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
],
'billingDetails' => [
'address' => 'Street Avenue, 123',
'city' => 'Copenhagen',
'zipCode' => '2300',
'invoiceFormat' => 'Email',
'gln' => '0799439112768',
'invoiceEmail' => 'john.smith@email.com',
'vatNumber' => '87687766',
'address2' => 'Apt. 4B'
],
'financialSetup' => [
'language' => 'EN',
'currency' => 'EUR'
],
'billingSettings' => [
'companyCarReimbursementMethod' => 'MANUAL',
'cpmsRevenueSharingRate' => 0.15,
'cpmsRevenueSharingCurrency' => 'EUR',
'cpmsRevenueSharingEnabled' => true,
'canEnableRevenueShare' => true
],
'receiptSettings' => [
'customText' => '<string>'
],
'isTaxableDealer' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spirii.com/v2/customers"
payload := strings.NewReader("{\n \"name\": \"John Smith\",\n \"country\": \"DK\",\n \"contactDetails\": {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@email.com\",\n \"phone\": \"+11 22 33 44\"\n },\n \"ownerId\": 234,\n \"externalId\": \"CU-12345\",\n \"payoutInformation\": {\n \"iban\": \"DK5000400440116243\",\n \"swiftCode\": \"ROYCCAT2XXX\",\n \"bankAccountHolderName\": \"John Smith\",\n \"bankRegistrationNumber\": \"1234\",\n \"bankAccount\": \"1234567890\"\n },\n \"billingDetails\": {\n \"address\": \"Street Avenue, 123\",\n \"city\": \"Copenhagen\",\n \"zipCode\": \"2300\",\n \"invoiceFormat\": \"Email\",\n \"gln\": \"0799439112768\",\n \"invoiceEmail\": \"john.smith@email.com\",\n \"vatNumber\": \"87687766\",\n \"address2\": \"Apt. 4B\"\n },\n \"financialSetup\": {\n \"language\": \"EN\",\n \"currency\": \"EUR\"\n },\n \"billingSettings\": {\n \"companyCarReimbursementMethod\": \"MANUAL\",\n \"cpmsRevenueSharingRate\": 0.15,\n \"cpmsRevenueSharingCurrency\": \"EUR\",\n \"cpmsRevenueSharingEnabled\": true,\n \"canEnableRevenueShare\": true\n },\n \"receiptSettings\": {\n \"customText\": \"<string>\"\n },\n \"isTaxableDealer\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.spirii.com/v2/customers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Smith\",\n \"country\": \"DK\",\n \"contactDetails\": {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@email.com\",\n \"phone\": \"+11 22 33 44\"\n },\n \"ownerId\": 234,\n \"externalId\": \"CU-12345\",\n \"payoutInformation\": {\n \"iban\": \"DK5000400440116243\",\n \"swiftCode\": \"ROYCCAT2XXX\",\n \"bankAccountHolderName\": \"John Smith\",\n \"bankRegistrationNumber\": \"1234\",\n \"bankAccount\": \"1234567890\"\n },\n \"billingDetails\": {\n \"address\": \"Street Avenue, 123\",\n \"city\": \"Copenhagen\",\n \"zipCode\": \"2300\",\n \"invoiceFormat\": \"Email\",\n \"gln\": \"0799439112768\",\n \"invoiceEmail\": \"john.smith@email.com\",\n \"vatNumber\": \"87687766\",\n \"address2\": \"Apt. 4B\"\n },\n \"financialSetup\": {\n \"language\": \"EN\",\n \"currency\": \"EUR\"\n },\n \"billingSettings\": {\n \"companyCarReimbursementMethod\": \"MANUAL\",\n \"cpmsRevenueSharingRate\": 0.15,\n \"cpmsRevenueSharingCurrency\": \"EUR\",\n \"cpmsRevenueSharingEnabled\": true,\n \"canEnableRevenueShare\": true\n },\n \"receiptSettings\": {\n \"customText\": \"<string>\"\n },\n \"isTaxableDealer\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/v2/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Smith\",\n \"country\": \"DK\",\n \"contactDetails\": {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@email.com\",\n \"phone\": \"+11 22 33 44\"\n },\n \"ownerId\": 234,\n \"externalId\": \"CU-12345\",\n \"payoutInformation\": {\n \"iban\": \"DK5000400440116243\",\n \"swiftCode\": \"ROYCCAT2XXX\",\n \"bankAccountHolderName\": \"John Smith\",\n \"bankRegistrationNumber\": \"1234\",\n \"bankAccount\": \"1234567890\"\n },\n \"billingDetails\": {\n \"address\": \"Street Avenue, 123\",\n \"city\": \"Copenhagen\",\n \"zipCode\": \"2300\",\n \"invoiceFormat\": \"Email\",\n \"gln\": \"0799439112768\",\n \"invoiceEmail\": \"john.smith@email.com\",\n \"vatNumber\": \"87687766\",\n \"address2\": \"Apt. 4B\"\n },\n \"financialSetup\": {\n \"language\": \"EN\",\n \"currency\": \"EUR\"\n },\n \"billingSettings\": {\n \"companyCarReimbursementMethod\": \"MANUAL\",\n \"cpmsRevenueSharingRate\": 0.15,\n \"cpmsRevenueSharingCurrency\": \"EUR\",\n \"cpmsRevenueSharingEnabled\": true,\n \"canEnableRevenueShare\": true\n },\n \"receiptSettings\": {\n \"customText\": \"<string>\"\n },\n \"isTaxableDealer\": false\n}"
response = http.request(request)
puts response.read_body{
"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",
"address2": "Apt. 4B",
"city": "Copenhagen",
"zipCode": "2300"
},
"id": 123,
"type": "Private",
"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",
"paymentTerms": "2 Days"
},
"billingSettings": {
"companyCarReimbursementMethod": "MANUAL",
"companyCarKYCStatus": "InProgress",
"chargeKeyDocumentAggregation": "customer",
"chargeKeyLineAggregation": "key_and_location",
"cpmsRevenueSharingUnit": "currency",
"cpmsRevenueSharingRate": 0.15,
"cpmsRevenueSharingCurrency": "EUR",
"cpmsRevenueSharingEnabled": true,
"canEnableRevenueShare": true
},
"receiptSettings": {
"customText": "<string>"
},
"isTaxableDealer": false,
"owner": {
"id": 234,
"name": "Company Inc."
}
}Create a new customer
Creates a new customer record in the system.
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"
},
"billingDetails": {
"address": "Street Avenue, 123",
"city": "Copenhagen",
"zipCode": "2300",
"invoiceFormat": "Email",
"gln": "0799439112768",
"invoiceEmail": "john.smith@email.com",
"vatNumber": "87687766",
"address2": "Apt. 4B"
},
"financialSetup": {
"language": "EN",
"currency": "EUR"
},
"billingSettings": {
"companyCarReimbursementMethod": "MANUAL",
"cpmsRevenueSharingRate": 0.15,
"cpmsRevenueSharingCurrency": "EUR",
"cpmsRevenueSharingEnabled": true,
"canEnableRevenueShare": true
},
"receiptSettings": {
"customText": "<string>"
},
"isTaxableDealer": false
}
'import requests
url = "https://api.spirii.com/v2/customers"
payload = {
"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"
},
"billingDetails": {
"address": "Street Avenue, 123",
"city": "Copenhagen",
"zipCode": "2300",
"invoiceFormat": "Email",
"gln": "0799439112768",
"invoiceEmail": "john.smith@email.com",
"vatNumber": "87687766",
"address2": "Apt. 4B"
},
"financialSetup": {
"language": "EN",
"currency": "EUR"
},
"billingSettings": {
"companyCarReimbursementMethod": "MANUAL",
"cpmsRevenueSharingRate": 0.15,
"cpmsRevenueSharingCurrency": "EUR",
"cpmsRevenueSharingEnabled": True,
"canEnableRevenueShare": True
},
"receiptSettings": { "customText": "<string>" },
"isTaxableDealer": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
},
billingDetails: {
address: 'Street Avenue, 123',
city: 'Copenhagen',
zipCode: '2300',
invoiceFormat: 'Email',
gln: '0799439112768',
invoiceEmail: 'john.smith@email.com',
vatNumber: '87687766',
address2: 'Apt. 4B'
},
financialSetup: {language: 'EN', currency: 'EUR'},
billingSettings: {
companyCarReimbursementMethod: 'MANUAL',
cpmsRevenueSharingRate: 0.15,
cpmsRevenueSharingCurrency: 'EUR',
cpmsRevenueSharingEnabled: true,
canEnableRevenueShare: true
},
receiptSettings: {customText: '<string>'},
isTaxableDealer: false
})
};
fetch('https://api.spirii.com/v2/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spirii.com/v2/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
],
'billingDetails' => [
'address' => 'Street Avenue, 123',
'city' => 'Copenhagen',
'zipCode' => '2300',
'invoiceFormat' => 'Email',
'gln' => '0799439112768',
'invoiceEmail' => 'john.smith@email.com',
'vatNumber' => '87687766',
'address2' => 'Apt. 4B'
],
'financialSetup' => [
'language' => 'EN',
'currency' => 'EUR'
],
'billingSettings' => [
'companyCarReimbursementMethod' => 'MANUAL',
'cpmsRevenueSharingRate' => 0.15,
'cpmsRevenueSharingCurrency' => 'EUR',
'cpmsRevenueSharingEnabled' => true,
'canEnableRevenueShare' => true
],
'receiptSettings' => [
'customText' => '<string>'
],
'isTaxableDealer' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spirii.com/v2/customers"
payload := strings.NewReader("{\n \"name\": \"John Smith\",\n \"country\": \"DK\",\n \"contactDetails\": {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@email.com\",\n \"phone\": \"+11 22 33 44\"\n },\n \"ownerId\": 234,\n \"externalId\": \"CU-12345\",\n \"payoutInformation\": {\n \"iban\": \"DK5000400440116243\",\n \"swiftCode\": \"ROYCCAT2XXX\",\n \"bankAccountHolderName\": \"John Smith\",\n \"bankRegistrationNumber\": \"1234\",\n \"bankAccount\": \"1234567890\"\n },\n \"billingDetails\": {\n \"address\": \"Street Avenue, 123\",\n \"city\": \"Copenhagen\",\n \"zipCode\": \"2300\",\n \"invoiceFormat\": \"Email\",\n \"gln\": \"0799439112768\",\n \"invoiceEmail\": \"john.smith@email.com\",\n \"vatNumber\": \"87687766\",\n \"address2\": \"Apt. 4B\"\n },\n \"financialSetup\": {\n \"language\": \"EN\",\n \"currency\": \"EUR\"\n },\n \"billingSettings\": {\n \"companyCarReimbursementMethod\": \"MANUAL\",\n \"cpmsRevenueSharingRate\": 0.15,\n \"cpmsRevenueSharingCurrency\": \"EUR\",\n \"cpmsRevenueSharingEnabled\": true,\n \"canEnableRevenueShare\": true\n },\n \"receiptSettings\": {\n \"customText\": \"<string>\"\n },\n \"isTaxableDealer\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.spirii.com/v2/customers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Smith\",\n \"country\": \"DK\",\n \"contactDetails\": {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@email.com\",\n \"phone\": \"+11 22 33 44\"\n },\n \"ownerId\": 234,\n \"externalId\": \"CU-12345\",\n \"payoutInformation\": {\n \"iban\": \"DK5000400440116243\",\n \"swiftCode\": \"ROYCCAT2XXX\",\n \"bankAccountHolderName\": \"John Smith\",\n \"bankRegistrationNumber\": \"1234\",\n \"bankAccount\": \"1234567890\"\n },\n \"billingDetails\": {\n \"address\": \"Street Avenue, 123\",\n \"city\": \"Copenhagen\",\n \"zipCode\": \"2300\",\n \"invoiceFormat\": \"Email\",\n \"gln\": \"0799439112768\",\n \"invoiceEmail\": \"john.smith@email.com\",\n \"vatNumber\": \"87687766\",\n \"address2\": \"Apt. 4B\"\n },\n \"financialSetup\": {\n \"language\": \"EN\",\n \"currency\": \"EUR\"\n },\n \"billingSettings\": {\n \"companyCarReimbursementMethod\": \"MANUAL\",\n \"cpmsRevenueSharingRate\": 0.15,\n \"cpmsRevenueSharingCurrency\": \"EUR\",\n \"cpmsRevenueSharingEnabled\": true,\n \"canEnableRevenueShare\": true\n },\n \"receiptSettings\": {\n \"customText\": \"<string>\"\n },\n \"isTaxableDealer\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/v2/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Smith\",\n \"country\": \"DK\",\n \"contactDetails\": {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@email.com\",\n \"phone\": \"+11 22 33 44\"\n },\n \"ownerId\": 234,\n \"externalId\": \"CU-12345\",\n \"payoutInformation\": {\n \"iban\": \"DK5000400440116243\",\n \"swiftCode\": \"ROYCCAT2XXX\",\n \"bankAccountHolderName\": \"John Smith\",\n \"bankRegistrationNumber\": \"1234\",\n \"bankAccount\": \"1234567890\"\n },\n \"billingDetails\": {\n \"address\": \"Street Avenue, 123\",\n \"city\": \"Copenhagen\",\n \"zipCode\": \"2300\",\n \"invoiceFormat\": \"Email\",\n \"gln\": \"0799439112768\",\n \"invoiceEmail\": \"john.smith@email.com\",\n \"vatNumber\": \"87687766\",\n \"address2\": \"Apt. 4B\"\n },\n \"financialSetup\": {\n \"language\": \"EN\",\n \"currency\": \"EUR\"\n },\n \"billingSettings\": {\n \"companyCarReimbursementMethod\": \"MANUAL\",\n \"cpmsRevenueSharingRate\": 0.15,\n \"cpmsRevenueSharingCurrency\": \"EUR\",\n \"cpmsRevenueSharingEnabled\": true,\n \"canEnableRevenueShare\": true\n },\n \"receiptSettings\": {\n \"customText\": \"<string>\"\n },\n \"isTaxableDealer\": false\n}"
response = http.request(request)
puts response.read_body{
"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",
"address2": "Apt. 4B",
"city": "Copenhagen",
"zipCode": "2300"
},
"id": 123,
"type": "Private",
"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",
"paymentTerms": "2 Days"
},
"billingSettings": {
"companyCarReimbursementMethod": "MANUAL",
"companyCarKYCStatus": "InProgress",
"chargeKeyDocumentAggregation": "customer",
"chargeKeyLineAggregation": "key_and_location",
"cpmsRevenueSharingUnit": "currency",
"cpmsRevenueSharingRate": 0.15,
"cpmsRevenueSharingCurrency": "EUR",
"cpmsRevenueSharingEnabled": true,
"canEnableRevenueShare": true
},
"receiptSettings": {
"customText": "<string>"
},
"isTaxableDealer": false,
"owner": {
"id": 234,
"name": "Company Inc."
}
}Body
application/json
The customer to be created.
Response
Was this page helpful?