An overview of the typical use case handling for creating new customers and update customer data.
The creation/registration of a new customer is the first step in the subscription process. It is the prerequisite for creating and sending orders. This page serves to demonstrate how to manage the basic data for a customer in the subscriptions module including create, update and read functionality.
Please note that the following use cases require the customer information to exist:
When creating a new customer, the following process steps will take place:
To retrieve information about an existing customer, make a GET /subscriptions/{version}/customers/{customerNumber}
request, where {customerNumber}
is the identifier of the related customer
that you would like to get the details for.
For more information, please refer to the related endpoint description within the API Explorer.
GET /subscriptions/v1/customers/c1631704458 HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
HTTP/1.1 200 OK
Content-Type: application/json
{
"customerNumber": "c1631704458",
"salutation": "MR",
"firstName": "Ray",
"lastName": "Ankunding",
"address": {
"street": "Bergnaum Mountains",
"postalCode": "97687-7791",
"postalPlace": "Schadenville",
"countryCode": "DE",
"streetNumber": "1"
},
"taxIdentificationNumber": "12345678L",
"identificationNumber": "700XXX651",
"email": "Ray_Ankunding43@gmail.com",
"companyName": "",
"birthDate": "1984-11-11",
"language": "DE",
"customerCategory": "PERSON",
"phone": "871.790.7578 x4882",
"mobilePhone": "+37258774XXX"
}
If you want to create a new customer, make a POST /subscriptions/{version}/customers
request. Beside the general customer information such as the first name, last name or address, you will also have to provide the related payment registration the customer shall be linked to.
For more information, please refer to the related endpoint description within the API Explorer.
POST /subscriptions/v1/customers HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
Content-Type: application/json
{
"customer": {
"address": {
"careOf": "",
"countryCode": "DE",
"postalCode": "97687-7791",
"postalPlace": "Schadenville",
"street": "Bergnaum Mountains",
"streetNumber": "1",
"streetNumberAdditional": "a"
},
"birthDate": "1984-11-11",
"companyName": "",
"customerCategory": "PERSON",
"customerNumber": "c1631704458",
"email": "Ray_Ankunding43@gmail.com",
"firstName": "Ray",
"identificationNumber": "700XXX651",
"language": "de",
"lastName": "Ankunding",
"mobilePhone": "+37258774XXX",
"phone": "871.790.7578 x4882",
"salutation": "MR",
"taxIdentificationNumber": "12345678L"
},
"paymentRegistration": {
"id": "275122"
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"signUpId": 702091815,
"customerNumber": "700427690",
"externalCustomerReference": "c1631704458",
"contracts": []
}
In order to update the information of an existing customer, make a PUT /subscriptions/{version}/customers/{customerNumber}
request, where {customerNumber}
is the identifier of the related customer
that you would like to update. The information to be provided is identical to the information needed when creating a new customer.
For more information, please refer to the related endpoint description within the API Explorer.
PUT /subscriptions/v1/customers/c1631704458 HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
Content-Type: application/json
{
"customer": {
"address": {
"careOf": "",
"countryCode": "DE",
"postalCode": "97687-7791",
"postalPlace": "Schadenville",
"street": "Bergnaum Mountains",
"streetNumber": "1",
"streetNumberAdditional": "a"
},
"birthDate": "1984-11-11",
"companyName": "",
"customerCategory": "PERSON",
"customerNumber": "c1631704458",
"email": "Ray_Ankunding43@gmail.com",
"firstName": "Ray",
"identificationNumber": "700XXX651",
"language": "de",
"lastName": "Ankunding",
"mobilePhone": "+37258774XXX",
"phone": "871.790.7578 x4882",
"salutation": "MR",
"taxIdentificationNumber": "12345678L"
},
"paymentRegistration": {
"id": "275122"
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"signUpId": 702091815,
"customerNumber": "700427690",
"externalCustomerReference": "c1631704458",
"contracts": []
}