Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include a Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
This API is authenticated by an api token.
Endpoints
POST api/v1/contact-details
requires authentication
Rate limit is implemented using Leaky Bucket algorithm
Bucket size: 60
Refill rate: 1 per second
Note: Developer assistance is required to change rate limit parameters for a shop.
Example request:
curl --request POST \
"https://staging.voyado.eastsideapps.io/api/v1/contact-details" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"shopify_customer_id\": 8168849,
\"voyado_contact_id\": \"4c4a3056-e3bf-3a3a-9bff-39d436ce65c4\",
\"email\": \"email@mail.com\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://staging.voyado.eastsideapps.io/api/v1/contact-details';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'shopify_customer_id' => 8168849,
'voyado_contact_id' => '4c4a3056-e3bf-3a3a-9bff-39d436ce65c4',
'email' => 'email@mail.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"contact": {
"shopifyCustomerId": 7003125834402,
"voyadoContactId": "c6704444-624a-4f02-aace-daa416451f3c",
"attributes": {
"firstName": "Test",
"lastName": "Test",
"street": "123 test street",
"zipCode": "WV2 3DE",
"city": "Wolverhampton",
"email": "test-email@mailcom",
"mobilePhone": "+7777745214",
"countryCode": "GB",
"rfm": null,
"careOf": null,
"country": "United Kingdom",
"age": null,
"birthDay": null,
"externalId": "7003125834402",
"socialSecurityNumber": null,
"gender": null,
"discoveryKey": null,
"memberNumber": "38666",
"language": "en",
"lang": null,
"annualBirthDay": null,
"isRegistrationCompleted": false,
"registrationDate": "2023-10-04T21:35:34+02:00",
"bonusPoints": 0,
"secrecyMarked": false,
"currentStore": {
"id": "2024bac4-a596-4fc4-83c2-3c5bddf6737c",
"name": "UK store",
"externalId": "ecom-uk"
}
},
"bonusPoints": 0,
"memberLevel": null,
"activeLoyaltyVouchers": [],
"activePromotions": [
{
"id": "a8d78653-3d33-4284-8a61-e373e51ca096",
"promotionId": "5a7e3b00-e6bd-4112-a4c3-b92be3101ff7",
"externalId": null,
"type": "Multichannel",
"name": "Test promotion",
"expiresOn": null,
"heading": "test 10%",
"description": "test 10%",
"redeemed": false,
"redeemedOn": null,
"imageUrl": null,
"link": null,
"redemptionChannels": [
{
"type": "POS",
"valueType": "PERCENT",
"value": 10,
"instruction": null
},
{
"type": "ECOM",
"valueType": "PERCENT",
"value": 10,
"instruction": null
}
]
}
],
"syncFailedActivePromotions": [
{
"id": "77571a79-60f2-32cb-a3a9-475588931a57",
"promotionId": "74ff2623-e66d-31c8-a686-a24c76f96319",
"externalId": null,
"type": "Multichannel",
"name": "Test-External-Offer",
"expiresOn": null,
"heading": null,
"description": null,
"redeemed": false,
"redeemedOn": null,
"imageUrl": null,
"link": null,
"redemptionChannels": [
{
"type": "ECOM",
"valueType": "EXTERNALOFFER",
"value": "testExternalOfferCode",
"instruction": null
}
],
"error": "DiscountCodeNotFoundInShopify",
"errorDescription": "Voyado contact ID: 9ddfdaed-5bed-358a-b8da-95f9f20fa219. Discount code 'testExternalOfferCode' is not found in Shopify."
}
],
"syncFailedActiveLoyaltyVouchers": []
}
}
Example response (400):
{
"message": "InvalidContactId"
}
Example response (400):
{
"message": "InvalidEmailAddress"
}
Example response (401):
{
"message": "Unauthorized"
}
Example response (403):
{
"message": "Unauthenticated"
}
Example response (404):
{
"message": "UrlNotFound"
}
Example response (404):
{
"message": "CustomerNotFoundInShopify"
}
Example response (404):
{
"message": "ContactNotFound"
}
Example response (409):
{
"message": "MultipleMatches"
}
Example response (422):
{
"message": "The shopify customer id field is required when none of voyado contact id / email are present. (and 2 more errors)",
"errors": {
"shopify_customer_id": [
"The shopify customer id field is required when none of voyado contact id / email are present."
],
"voyado_contact_id": [
"The voyado contact id field is required when none of shopify customer id / email are present."
],
"email": [
"The email field is required when none of shopify customer id / voyado contact id are present."
]
}
}
Example response (422):
{
"message": "Only one of shopify_customer_id, voyado_contact_id, email is allowed. (and 1 more error)",
"errors": {
"shopify_customer_id": [
"Only one of shopify_customer_id, voyado_contact_id, email is allowed."
],
"email": [
"Only one of email, shopify_customer_id, voyado_contact_id is allowed."
]
}
}
Example response (422):
{
"message": "The email must be a valid email address.",
"errors": {
"email": [
"The email must be a valid email address."
]
}
}
Example response (429):
{
"message": "TooManyRequests"
}
Example response (500):
{
"message": "UnexpectedError"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.