Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
Ok
The response is of type object
.
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": {},
"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": {},
"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": {},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
}'
{
"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": "<any>",
"amount": "<any>"
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "<any>",
"amount": "<any>",
"reward": "<any>",
"error": "<any>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
],
"shipping": {
"value": 3.25,
"discounted_value": 2.25,
"redeem": [
{
"id": "<any>",
"amount": "<any>"
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "<any>",
"amount": "<any>",
"reward": "<any>",
"error": "<any>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
},
"payment_method": "CREDIT",
"redeem": [
{
"id": "<any>",
"amount": "<any>"
}
],
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "<any>",
"amount": "<any>",
"reward": "<any>",
"error": "<any>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
}
}
Preview the order as if the given rewards were redeemed
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": {},
"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": {},
"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": {},
"error": "<string>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
}'
{
"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": "<any>",
"amount": "<any>"
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "<any>",
"amount": "<any>",
"reward": "<any>",
"error": "<any>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
],
"shipping": {
"value": 3.25,
"discounted_value": 2.25,
"redeem": [
{
"id": "<any>",
"amount": "<any>"
}
],
"tags": {},
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "<any>",
"amount": "<any>",
"reward": "<any>",
"error": "<any>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
},
"payment_method": "CREDIT",
"redeem": [
{
"id": "<any>",
"amount": "<any>"
}
],
"metadata": {},
"redemptions_result": {
"redeemed": [
{
"id": "<any>",
"amount": "<any>",
"reward": "<any>",
"error": "<any>"
}
],
"amount": 123,
"discount_value": 123,
"discount_percent": 0.5,
"value": 123,
"action": "UPDATE"
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Ok
The response is of type object
.