Update customer
PATCH https://api.ecurring.com/customers/{id}
Update a customer. In accordance with the JSON API specification any missing attribute will be interpreted as if they were included with their current value. It's therefore not neccessary to include every attribute of the customer during a partial update.
Every attribute that can be set during the creation of a customer can be updated using a PATCH request to the customer's resource endpoint.
Parameters
Replace {id}
in the URL with the identifier of the customer.
Request attributes
gender
string |
The gender of the customer. Used to determine the salutation in communication with the customer.
Possible values: m / f
|
first_name
string |
The first name of the customer |
middle_name
string |
The middle name of the customer |
last_name
string |
The last name of the customer |
company_name
string |
The name of the company of the customer |
vat_number
string |
The vat number of the company of the customer |
iban
string |
Optional - DEPRECATED: The IBAN of the customer.
It is only possible to update the IBAN of a customer that uses directdebit as payment_method .
The bank_holder must also be present when changing the IBAN.
|
bank_holder
string |
Optional - DEPRECATED: The full name of the bank account holder (this can be different from the name of the customer). Required when iban is present.
|
postalcode
string |
The postalcode of the address of the customer |
house_number
string |
The house number of the address of the customer |
house_number_add
string |
The house number addition of the address of the customer |
street
string |
The street of the address of the customer |
city
string |
The city of the address of the customer |
country_iso2
string |
The 2 letter ISO code of the country of residence of the customer |
language
string |
The preferred communication language of the customer. Any notifications sent to the customer will be in this language.
Possible values: nl , en , nl-be , de , fr .
Defaults to nl .
|
telephone
string |
The telephone number of the customer |
Examples
Updating the address of a customer
Request
PATCH /customers/1 HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
{
"data": {
"type": "customer",
"id": "1",
"attributes": {
"street": "Payment lane",
"house_number": "1",
"city": "Amsterdam",
"postalcode": "1000AA"
}
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"links": {
"self": "https://api.ecurring.com/customers/1"
},
"data": {
"type": "customer",
"id": "1",
"links": {
"self": "https://api.ecurring.com/customers/1"
},
"attributes": {
"gender": "f",
"first_name": "Customer",
"middle_name": null,
"last_name": "Test",
"company_name": null,
"vat_number": null,
"bank_holder": null,
"iban": null,
"payment_method": "directdebit",
"bank_verification_method": null,
"card_holder": "C Test",
"card_number": "1854",
"postalcode": "1000AA",
"house_number": "1",
"house_number_add": null,
"street": "Payment lane",
"city": "Amsterdam",
"country_iso2": "NL",
"language": "nl",
"email": "customer.test@ecurring.com",
"telephone": "+31202616739",
"archived": false,
"created_at": "2018-02-01T11:21:09+01:00",
"updated_at": "2018-02-05T13:00:00+01:00"
},
"relationships": {
"subscriptions": {
"links": {
"related": "https://api.ecurring.com/customers/1/subscriptions"
},
"data": []
}
}
}
}