ResourcesReward Grants
Issue an eligible reward grant
Evaluate one customer and issue a reward exactly once.
The customer and reward rule must belong to the selected store. A 201 response means the grant was created; a 200 response means the same customer already had that rule's grant. Ineligible customers receive a validation error.
Authorization
bearerAuth storeAuth AuthorizationBearer <token>
Provide your SellApp API key as a bearer token.
In: header
X-STORE<token>
Select the SellApp store for this API request.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://sell.app/api/v2/reward-grants" \ -H "Content-Type: application/json" \ -d '{ "reward_rule_id": 0, "customer_id": 0 }'{
"data": {
"id": 0,
"reward_rule_id": 0,
"customer_id": 0,
"customer": {
"id": 0,
"email": "user@example.com"
},
"granted_at": "2019-08-24T14:15:22Z",
"trigger_type": "PURCHASE_COUNT",
"trigger_value": 0,
"trigger_threshold": 0,
"outputs": [
{
"id": 0,
"type": "WALLET_CREDIT",
"payload": {},
"coupon_id": 0,
"wallet_ledger_entry_id": 0,
"created_at": "2019-08-24T14:15:22Z"
}
],
"created_at": "2019-08-24T14:15:22Z"
}
}{
"data": {
"id": 0,
"reward_rule_id": 0,
"customer_id": 0,
"customer": {
"id": 0,
"email": "user@example.com"
},
"granted_at": "2019-08-24T14:15:22Z",
"trigger_type": "PURCHASE_COUNT",
"trigger_value": 0,
"trigger_threshold": 0,
"outputs": [
{
"id": 0,
"type": "WALLET_CREDIT",
"payload": {},
"coupon_id": 0,
"wallet_ledger_entry_id": 0,
"created_at": "2019-08-24T14:15:22Z"
}
],
"created_at": "2019-08-24T14:15:22Z"
}
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "The given data was invalid.",
"errors": {
"data": [
"The data field is required."
]
}
}