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",
 "person": {
  "ssn": "{{SSN}}",
  "firstName": "{{FirstName}}",
  "lastName": "{{LastName}}"
 },
 "phoneNumber": "{{PhoneNumber}}",
 "email": "{{Email}}",
 "address": {
  "addressLine": "{{AddressLine}}",
  "postalCode": "{{PostalCode}}",
  "postalPlace": "{{PostalPlace}}",
  "countryCode": "{{CountryCode}}"
 }
}
    

Response Example

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