Update a reward rule
Update reward configuration with optional optimistic concurrency protection.
Pass expected_updated_at to reject stale writes. Updating a definition does not bypass grant uniqueness or customer eligibility.
Authorization
bearerAuth storeAuth Provide your SellApp API key as a bearer token.
In: header
Select the SellApp store for this API request.
In: header
Path Parameters
The rewardRule path parameter.
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 PATCH "https://sell.app/api/v2/reward-rules/0" \ -H "Content-Type: application/json" \ -d '{}'{
"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": "Rule not found."
}{
"message": "The given data was invalid.",
"errors": {
"data": [
"The data field is required."
]
}
}Authorization
bearerAuth storeAuth Provide your SellApp API key as a bearer token.
In: header
Select the SellApp store for this API request.
In: header
Path Parameters
The rewardRule path parameter.
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 PUT "https://sell.app/api/v2/reward-rules/0" \ -H "Content-Type: application/json" \ -d '{}'{
"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": "Rule not found."
}{
"message": "The given data was invalid.",
"errors": {
"data": [
"The data field is required."
]
}
}