Vincent is here! Just say the word, and Vincent will build the campaigns for you! Get early access.
curl --request POST \
--url https://{cluster}.voucherify.io/v1/customers \
--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"
}Creates a customer object.
š Upsert Mode
If you pass an
idor asource_idthat already exists in the customer database, Voucherify will return a related customer object with updated fields.
curl --request POST \
--url https://{cluster}.voucherify.io/v1/customers \
--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"
}Documentation Index
Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
Use this file to discover all available pages before exploring further.
Create a customer with specified parameters.
Request body schema for POST v1/customers.
The ID of an existing customer.
A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.
Customer's first and last name.
An arbitrary string that you can attach to a customer object.
Customer's email address.
Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
Deprecated. Customer's birthdate; format YYYY-MM-DD.
Customer's birthdate; format YYYY-MM-DD.
Customer's address.
Show child attributes
A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.
Returns a customer object.
Response body for POST v1/customers.
Show child attributes
Show child attributes
Summary of customer's referrals, in this case, the customer being the referee, i.e. information about the source of referrals and number of times the customer was referred by other customers.
Show child attributes
The type of the object represented by JSON.
customer The ID of an existing customer that will be linked to redemption in this request.
A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.
Object used to store system metadata information.
Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format.
"2022-08-30T06:32:07.380Z"
Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.
"2022-08-31T06:32:07.380Z"
Contains information about the customer's cockpit.
ā ļø Warning: Customer cockpits were removed. The customer cockpit URLs redirect to customer preference center.
Show child attributes
Customer's first and last name.
An arbitrary string that you can attach to a customer object.
Customer's email address.
Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
Deprecated. Customer's birthdate; format YYYY-MM-DD.
Customer's birthdate; format YYYY-MM-DD.
Customer's address.
Show child attributes
A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.
Was this page helpful?