Behavior
Preview order
Preview the order as if the given rewards were redeemed
PUT
/
events
/
redeem
/
preview
Copy
curl --request PUT \
--url https://app.masivo.ai/api/storefront/v1/events/redeem/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customer_id": "<string>",
"brand_id": "<string>",
"order": {
"purchase_id": "<string>",
"channel_id": "<string>",
"store_id": "<string>",
"value": 20.95,
"discounted_value": 10.95,
"products": [
{
"sku": "<string>",
"amount": 123,
"value": 123,
"discounted_value": 123,
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
],
"shipping": {
"value": 3.25,
"discounted_value": 2.25,
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
},
"payment_method": "CREDIT",
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
}'
Copy
{
"data": {
"customer_id": "<string>",
"brand_id": "<string>",
"order": {
"purchase_id": "<string>",
"channel_id": "<string>",
"store_id": "<string>",
"value": 20.95,
"discounted_value": 10.95,
"products": [
{
"sku": "<string>",
"amount": 123,
"value": 123,
"discounted_value": 123,
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
],
"shipping": {
"value": 3.25,
"discounted_value": 2.25,
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
},
"payment_method": "CREDIT",
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Ok
The response is of type object
.
Copy
curl --request PUT \
--url https://app.masivo.ai/api/storefront/v1/events/redeem/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customer_id": "<string>",
"brand_id": "<string>",
"order": {
"purchase_id": "<string>",
"channel_id": "<string>",
"store_id": "<string>",
"value": 20.95,
"discounted_value": 10.95,
"products": [
{
"sku": "<string>",
"amount": 123,
"value": 123,
"discounted_value": 123,
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
],
"shipping": {
"value": 3.25,
"discounted_value": 2.25,
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
},
"payment_method": "CREDIT",
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
}'
Copy
{
"data": {
"customer_id": "<string>",
"brand_id": "<string>",
"order": {
"purchase_id": "<string>",
"channel_id": "<string>",
"store_id": "<string>",
"value": 20.95,
"discounted_value": 10.95,
"products": [
{
"sku": "<string>",
"amount": 123,
"value": 123,
"discounted_value": 123,
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
],
"shipping": {
"value": 3.25,
"discounted_value": 2.25,
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
},
"payment_method": "CREDIT",
"redeem": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1
}
],
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.