riverty logo

Docs

Lookup And Create A Customer

Does a lookup on a customer based on a search value. Creates the customer if found.

Path

POST /v1/clients/{clientId}/lookup/customer

Request Parameters

clientId required
integer
The ID of the client.

Request Body

application/json

customerNumber
string
Optional. ID is used only to create new customer.
individualRiskScore
string
Optional. The customer's individual risk score provided by the client.
lookup
required
object

Responses

Successful Request, LookUpSuccessfull Request, Customer Created

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"
 }
}
    

Request Example

    
        [
 {
  "lookupField": "IdentificationNumber",
  "lookupValue": "string"
 }
]