riverty logo

Docs

Creates Or Updates A Customer

Gets the information of a Consumer with given number.

Path

PUT /v1/clients/{clientId}/customers/{customerNumber}

Request Parameters

clientId
required
integer
The ID of the client.
customerNumber
required
string
The ID of the customer.

Request Body

application/json

type
required
string
Enum:

Person

Company

The type of the customer.\ - Person : 1 - Company : 2
object
Legal information of the person.
object
The organization info of the company.
phoneNumber
string
The phone number of the customer.
email
string
The email address of the customer.
required
object
The address of the customer.
existingCustomer
boolean
Indicates whether the customer is an existing entity for the client. Only applicable for _Person_ customer type.
individualRiskScore
string
The customer's individual risk score provided by the client. Only applicable for _Person_ customer type.

Responses

Successful RequestUnsuccessful Request, Customer Information Missing

Request Example

    
        {
 "type": "Person",
 "person": {
  "ssn": "02016126007",
  "firstName": "Tom",
  "lastName": "Customer"
 },
 "phoneNumber": "+4712345678",
 "email": "tom.customer@mail.com",
 "address": {
  "addressLine": "Customer Street 1",
  "postalCode": "0002",
  "postalPlace": "CSTM",
  "countryCode": "NO"
 }
}
    

Response Example

    
        {
 "_links": [
  {
   "href": "https://api.horizonafs.io/customer/v1/client/1234/customers/customer-person-1",
   "rel": "_self",
   "method": "GET"
  },
  {
   "href": "https://api.horizonafs.io/customer/v1/client/1234/customers/customer-person-1",
   "rel": "check_customer",
   "method": "HEAD"
  },
  {
   "href": "https://api.horizonafs.io/customer/v1/client/1234/customers/customer-person-1",
   "rel": "update_customer",
   "method": "PUT"
  },
  {
   "href": "https://api.horizonafs.io/customer/v1/client/1234/customers/search?page={Page}&perPage={PerPage}&sort={byFieldName}&order={ASC/DESC}",
   "rel": "search_customer_by_field",
   "method": "POST"
  }
 ],
 "customerNumber": "customer-person-1",
 "type": "Person",
 "person": {
  "firstName": "Tom",
  "lastName": "Customer"
 },
 "phoneNumber": "+4712345678",
 "email": "tom.customer@mail.com",
 "paymentMeans": {
  "paymentId": "291069002072200000004"
 },
 "address": {
  "addressLine": "Person Street 1",
  "postalCode": "0002",
  "postalPlace": "PRSN",
  "countryCode": "NO"
 }
}