Skip to main content
POST
/
v1
/
customers
Create Customer
curl --request POST \
  --url https://{cluster}.voucherify.io/v1/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>' \
  --data '{
  "source_id": "source_123",
  "name": "Bob Smith",
  "description": "A frequent customer",
  "email": "bob.smith@email.com",
  "phone": "+1 933 222 3333",
  "address": {
    "city": "New York",
    "country": "United States",
    "line_1": "123 Main St.",
    "line_2": "APT 3 BLG 4",
    "postal_code": "10001",
    "state": "NY"
  },
  "metadata": {
    "lang": "en",
    "test": true
  },
  "birthdate": "2022-01-01"
}'
{
  "id": "cust_CSnYd37MXmrbS19XCrghjBsv",
  "source_id": "source_123",
  "name": "Bob Smith",
  "description": "A frequent customer",
  "email": "bob.smith@email.com",
  "phone": "+1 933 222 3333",
  "birthdate": "2022-01-01",
  "address": {
    "city": "New York",
    "state": "NY",
    "line_1": "123 Main St.",
    "line_2": "APT 3 BLG 4",
    "country": "United States",
    "postal_code": "10001"
  },
  "summary": {
    "redemptions": {
      "total_redeemed": 0,
      "total_failed": 0,
      "total_succeeded": 0,
      "total_rolled_back": 0,
      "total_rollback_failed": 0,
      "total_rollback_succeeded": 0,
      "gift": {
        "redeemed_amount": 0,
        "amount_to_go": 0
      },
      "loyalty_card": {
        "redeemed_points": 0,
        "points_to_go": 0
      }
    },
    "orders": {
      "total_amount": 0,
      "total_count": 0,
      "average_amount": 0,
      "last_order_amount": 0
    }
  },
  "loyalty": {
    "points": 0,
    "referred_customers": 0,
    "campaigns": {}
  },
  "referrals": {
    "total": 0,
    "campaigns": []
  },
  "metadata": {
    "lang": "en",
    "test": true
  },
  "system_metadata": {},
  "created_at": "2022-08-30T06:32:07.380Z",
  "object": "customer"
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

Body

application/json
id
string
source_id
string
name
string
description
string
email
string
phone
string
birthday
string<date>
birthdate
string<date>
address
object | null
metadata
object

Response

200 - application/json
summary
object
required
loyalty
object
required
referrals
object
required
object
enum<string>
default:customer
required
Available options:
customer
id
string
source_id
string
system_metadata
object
created_at
string<date-time>
Example:
updated_at
string<date-time>
Example:
assets
object
name
string
description
string
email
string
phone
string
birthday
string<date>
birthdate
string<date>
address
object | null
metadata
object