Skip to main content
POST
/
consumers
Create a new Consumer
curl --request POST \
  --url https://commerce.driv.ly/api/consumers \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "con_2k4jd93vsd82",
  "ssn": "123-45-6789",
  "email": "john.doe@example.com",
  "lastName": "Doe",
  "birthDate": "1984-09-20",
  "firstName": "John",
  "phoneNumber": "555-0199"
}'
{
  "data": {
    "id": "con_2k4jd93vsd82",
    "ssn": "123-45-6789",
    "email": "john.doe@example.com",
    "lastName": "Doe",
    "birthDate": "1984-09-20",
    "firstName": "John",
    "phoneNumber": "555-0199"
  },
  "success": true
}

Query Parameters

depth
integer

The number of levels of related objects to include in the response

Body

application/json
birthDate
string<date>
required

Consumer has Birth Date

phoneNumber
string
required

Consumer has Phone Number

lastName
string
required

Consumer has Last Name

firstName
string
required

Consumer has First Name

id
string

Customer is uniquely identified by id

addresses
(string | Address · object)[]

Customer is located at Addresses

phoneNumbers
string[]

Customer has Phone Number

email
string<idn-email>

Consumer has Email

ssn
string

Consumer has SSN

Response

Consumer Created

data
object
Examples:
{
"id": "con_2k4jd93vsd82",
"ssn": "123-45-6789",
"email": "john.doe@example.com",
"lastName": "Doe",
"birthDate": "1984-09-20",
"firstName": "John",
"phoneNumber": "555-0199"
}
success
boolean
I