PUT
/
events
/
redeem
/
preview
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"
    }
  }
}'
{
  "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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
customer_id
string
required

The customer unique identifier in your system

brand_id
string | null
required

The brand id of the order

order
object
required

The order to apply the rewards

Response

200
application/json
Ok
data
object