curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/behavior/events/{eventId}/reverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "PURCHASE",
"data": {},
"fulfilled": true,
"reserve": 123,
"queue_message_id": "<string>",
"rewarding_campaigns": "<array>",
"status": "PENDING",
"result": {
"wallet": {},
"customer": {},
"gift_card": [
{
"code": "<string>",
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rewarded_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"expired_at": "2023-11-07T05:31:56Z",
"redeemed_at": "2023-11-07T05:31:56Z"
}
],
"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"
}
],
"transactions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"store_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"funded_by": "MARKETING",
"event_type": "PURCHASE",
"reward_type": "POINTS",
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"cost": 123,
"details": "<string>",
"type": "ACCUMULATION",
"receiver_id": "<string>",
"sender_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"issued_at": "2023-11-07T05:31:56Z",
"attributes": {
"line": {
"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"
},
"campaign_name": "<string>"
},
"metadata": {}
}
],
"customer_by_tier": [
{}
]
},
"issued_at": "2023-11-07T05:31:56Z",
"processing_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"expired_at": "2023-11-07T05:31:56Z",
"reversed_at": "2023-11-07T05:31:56Z"
}
}Reverse the given event. This will also undo the redemptions and accumulations made on the event.
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/behavior/events/{eventId}/reverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "PURCHASE",
"data": {},
"fulfilled": true,
"reserve": 123,
"queue_message_id": "<string>",
"rewarding_campaigns": "<array>",
"status": "PENDING",
"result": {
"wallet": {},
"customer": {},
"gift_card": [
{
"code": "<string>",
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rewarded_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"expired_at": "2023-11-07T05:31:56Z",
"redeemed_at": "2023-11-07T05:31:56Z"
}
],
"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"
}
],
"transactions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"store_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"funded_by": "MARKETING",
"event_type": "PURCHASE",
"reward_type": "POINTS",
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"cost": 123,
"details": "<string>",
"type": "ACCUMULATION",
"receiver_id": "<string>",
"sender_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"issued_at": "2023-11-07T05:31:56Z",
"attributes": {
"line": {
"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"
},
"campaign_name": "<string>"
},
"metadata": {}
}
],
"customer_by_tier": [
{}
]
},
"issued_at": "2023-11-07T05:31:56Z",
"processing_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"expired_at": "2023-11-07T05:31:56Z",
"reversed_at": "2023-11-07T05:31:56Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The event unique identifier
The reason to reverse the event
Event reversed successfully
Show child attributes
The event internal unique identifier
The customer id of the event
The type of the event
"PURCHASE"
The data used in the event
If the event was fulfilled.
The number of days to reserve the rewards
The message id in the queue
The campaigns that rewarded the event including the rules that matched
The status of the event
PENDING, PROCESSING, FAILED, RESOLVED, CANCELLED, EXPIRED, REVERSED The result of the event
Show child attributes
The wallet state after the event
The customer state after the event
Gift cards related to the event
Show child attributes
The gift card code to use in the store
The reward id of the gift card
The customer id that owns the gift card
The date when the gift card was issued to a customer
The gift card description
The expiration date of the gift card
The date when the gift card was redeemed
Total accumulations after the event
Show child attributes
The amount of the line
The reward id of the line
The campaign id of the line
The id of the brand that originated the line
The date when the line was issued
The expiration date of the line
The reservation expiration date of the line
Redemptions made during the event
Show child attributes
The amount of the line
The reward id of the line
The campaign id of the line
The id of the brand that originated the line
The date when the line was issued
The expiration date of the line
The reservation expiration date of the line
Total transactions after the event
Show child attributes
The transaction internal unique identifier
The brand id of the transaction
The id of the event the created the transaction
The id of the campaign that created the transaction
The id of the channel that created the transaction
The id of the store that created the transaction
Who funded the rewards used in this transaction
"MARKETING"
The type of the event that created the transaction
"PURCHASE"
The type of the reward used in the transaction
POINTS, DISCOUNT, GIFT_CARD, PRODUCT The reward id of the transaction
The amount of the transaction
The cost of the rewards used in the transaction
The explanation of why transaction was created
The type of the transaction
ACCUMULATION, REDEMPTION, EXPIRATION, MIGRATION, TRANSFER, REVERSAL The receiver id of the transaction
The sender id of the transaction
The date when the transaction was created
The date when the transaction was issued
The attributes of the transaction
Show child attributes
The line used to create the transaction
Show child attributes
The amount of the line
The reward id of the line
The campaign id of the line
The id of the brand that originated the line
The date when the line was issued
The expiration date of the line
The reservation expiration date of the line
The name of the campaign that created the transaction
The metadata of the transaction
Customer tier changes resulting from the event
The date when the event was issued
The date when the event was processed
The date when the event was resolved either succeed or failed
The date when the event was cancelled
The date when the event expired
The date when the event was reversed