Skip to main content
POST
/
customers
/
add-update
Create or update a customer
curl --request POST \
  --url http://localhost:3156/customers/add-update \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-merchant-id: <api-key>' \
  --data '
{
  "externalId": "CUST-123",
  "firstName": "John",
  "lastName": "Doe",
  "email": "[email protected]",
  "phoneNumber": "+1234567890",
  "active": true,
  "notificationOptions": {
    "notifyEmail": false,
    "notifyPhone": false
  }
}
'
{
  "externalId": "CUST-123",
  "firstName": "John",
  "lastName": "Doe",
  "email": "[email protected]",
  "phoneNumber": "+1234567890",
  "active": true,
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-20T10:00:00Z"
}

Authorizations

x-api-key
string
header
required

API key for authentication (required)

x-merchant-id
string
header
required

Merchant ID for identifying the merchant (required)

Body

application/json
externalId
string
required

External customer ID from merchant system

Example:

"CUST-123"

firstName
string
required

Customer's first name

Example:

"John"

lastName
string

Customer's last name

Example:

"Doe"

email
string<email>

Customer's email address

phoneNumber
string

Customer's phone number

Example:

"+1234567890"

active
boolean

Whether the customer is active

Example:

true

notificationOptions
object

Customer notification preferences

Response

Customer created or updated successfully

externalId
string

External customer ID from merchant system

Example:

"CUST-123"

firstName
string

Customer's first name

Example:

"John"

lastName
string

Customer's last name

Example:

"Doe"

email
string<email>

Customer's email address

phoneNumber
string

Customer's phone number

Example:

"+1234567890"

active
boolean

Whether the customer is active

Example:

true

notificationOptions
object

Customer notification preferences

createdAt
string<date-time>

Customer creation timestamp

Example:

"2024-03-20T10:00:00Z"

updatedAt
string<date-time>

Customer last update timestamp

Example:

"2024-03-20T10:00:00Z"