cURL
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/coupons/redeem \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"code": "<string>",
"brand_id": "<string>",
"platform": "<string>",
"store_id": "<string>",
"channel_id": "<string>"
}
'{
"data": {
"customer": {
"id": "<string>",
"name": "John Smith",
"email": "jsmith@example.com",
"registration_date": "2023-11-07T05:31:56Z",
"is_anonymous": false,
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"phone_verified": false,
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": {},
"consent": {
"consent_string": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA",
"version": "2.0",
"consent_timestamp": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"purposes": {
"behavioral_campaigns": true,
"coupon_campaigns": true,
"punchcard_campaigns": true,
"email_marketing": true,
"push_notifications": true,
"link_tracking": true
},
"vendors": {
"vendor_123": true,
"vendor_456": false
}
},
"metrics": {},
"metadata": {}
},
"wallet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
],
"totals": [
{
"total": 127.6,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiration_date": "2023-11-07T05:31:56Z",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"platforms": [
"<string>"
],
"name": "<string>",
"description": "<string>",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
}
}
]
},
"accumulations": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
],
"redemptions": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
]
}
}Coupons
Redeem coupon
Redeem a coupon code
POST
/
coupons
/
redeem
cURL
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/coupons/redeem \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"code": "<string>",
"brand_id": "<string>",
"platform": "<string>",
"store_id": "<string>",
"channel_id": "<string>"
}
'{
"data": {
"customer": {
"id": "<string>",
"name": "John Smith",
"email": "jsmith@example.com",
"registration_date": "2023-11-07T05:31:56Z",
"is_anonymous": false,
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"phone_verified": false,
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": {},
"consent": {
"consent_string": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA",
"version": "2.0",
"consent_timestamp": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"purposes": {
"behavioral_campaigns": true,
"coupon_campaigns": true,
"punchcard_campaigns": true,
"email_marketing": true,
"push_notifications": true,
"link_tracking": true
},
"vendors": {
"vendor_123": true,
"vendor_456": false
}
},
"metrics": {},
"metadata": {}
},
"wallet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
],
"totals": [
{
"total": 127.6,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiration_date": "2023-11-07T05:31:56Z",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"platforms": [
"<string>"
],
"name": "<string>",
"description": "<string>",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
}
}
]
},
"accumulations": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
],
"redemptions": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The customer unique identifier in your system
The coupon code to redeem
The id of the brand offering the rewards
Platform name where the coupon was redeemed
The id of the store where the coupon was redeemed
The id of the channel where the coupon was redeemed
Response
Coupon redeemed
The updated customer and wallet
Show child attributes
Show child attributes
⌘I