ResourcesReward Rules
Create a reward rule
Create reward configuration without directly issuing customer grants.
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
curl -X POST "https://sell.app/api/v2/reward-rules" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "is_active": true, "trigger_type": "PURCHASE_COUNT", "trigger_threshold": 1, "outputs": [ { "type": "WALLET_CREDIT" } ] }'{
"data": {
"id": 0,
"name": "string",
"description": "string",
"is_active": true,
"trigger_type": "PURCHASE_COUNT",
"trigger_threshold": 1,
"fire_once_per_customer": true,
"outputs": [
{
"id": 0,
"type": "WALLET_CREDIT",
"sort_order": 0,
"payload": {},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_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."
]
}
}