Skip to navigation

Update Reward Program

Updates an existing reward program definition.

Example curl:

curl --request POST '{{base_url}}/sp/reward-programs/update' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"idempotency_key": "{{$timestamp}}-reward-program-update",
"program_id": {{program_id}},
"membership_name": "Silver Rewards Plus",
"maximum_points_per_order": 150
}'

Example success response shape:

{
"success": true,
"message": "Reward program updated successfully.",
"data": {
"program_id": 1,
"membership_name": "Silver Rewards Plus",
"maximum_points_per_order": 150
},
"meta": {}
}

Example error response shape:

{
"success": false,
"message": "The same idempotency_key cannot be reused with a different payload.",
"error": {
"code": "idempotency_key_reused_with_different_payload",
"details": {}
}
}

Common platform errors:

  • idempotency_key_required
  • sp_scope_not_granted
  • sp_token_scope_missing
  • legacy_field_not_allowed
  • query_parameters_not_allowed
  • invalid_content_type

Authentication

AuthorizationBearer

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

Headers

AuthorizationstringOptional

Response

200 OK Example
successbooleanOptional
messagestringOptional
dataobjectOptional
metaobjectOptional