riverty logo

Docs

Create a Consumer

PUT v1/clients/{{ClientID}}/customers/{{CustomerNumber}}

  • ClientID = Your Riverty client_id
  • CustomerNumber = Assign your internal reference to this consumer.

Request Example

    
        {
 "type": "Person",
 "email": "{{Email}}",
 "person": {
  "ssn": "{{SSN}}",
  "lastName": "{{LastName}}",
  "firstName": "{{FirstName}}"
 },
 "address": {
  "postalCode": "{{PostalCode}}",
  "addressLine": "{{AddressLine}}",
  "countryCode": "{{CountryCode}}",
  "postalPlace": "{{PostalPlace}}"
 },
 "phoneNumber": "{{PhoneNumber}}"
}
    

Response Example

    
        {
 "type": "Person",
 "email": "Astrid.Svensson@example.com",
 "_links": [
  {
   "rel": "_self",
   "href": "https://api-test.horizonafs.io/customer/v1/clients/104504/customers/TestCustomer58217",
   "method": "GET"
  },
  {
   "rel": "check_customer",
   "href": "https://api-test.horizonafs.io/customer/v1/clients/104504/customers/TestCustomer58217",
   "method": "HEAD"
  },
  {
   "rel": "update_customer",
   "href": "https://api-test.horizonafs.io/customer/v1/clients/104504/customers/TestCustomer58217",
   "method": "PUT"
  },
  {
   "rel": "search_customer_by_field",
   "href": "https://api-test.horizonafs.io/customer/v1/clients/104504/customers/search?page={Page}&perPage={PerPage}&sort={byFieldName}&order={ASC/DESC}",
   "method": "GET"
  }
 ],
 "person": {
  "lastName": "Svensson",
  "firstName": "Astrid"
 },
 "address": {
  "postalCode": "33415",
  "addressLine": "Gütersloher Straße 123",
  "countryCode": "DE",
  "postalPlace": "Verl"
 },
 "phoneNumber": "+102345678910",
 "paymentMeans": {
  "paymentId": "002802099942671"
 },
 "customerNumber": "TestCustomer58217"
}