Cashback rules
List, create, update, archive, and restore cashback rules.
An empty product_ids array creates a store-wide fallback. Selected products cannot overlap another current cashback rule. Use PATCH to change only supplied fields; PUT requires the complete rule payload.
Authorization
bearerAuth storeAuth Provide your SellApp API key as a bearer token.
In: header
Select the SellApp store for this API request.
In: header
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://sell.app/api/v2/cashback-rules"{
"data": [
{
"id": 0,
"percent_basis": 1,
"maximum_cashback_cents": 1,
"is_active": true,
"product_ids": [
0
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_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."
]
}
}Authorization
bearerAuth storeAuth Provide your SellApp API key as a bearer token.
In: header
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/cashback-rules" \ -H "Content-Type: application/json" \ -d '{ "percent_basis": 1, "maximum_cashback_cents": 1, "is_active": true, "product_ids": [ 0 ] }'{
"data": {
"id": 0,
"percent_basis": 1,
"maximum_cashback_cents": 1,
"is_active": true,
"product_ids": [
0
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_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."
]
}
}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 cashbackRule 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/cashback-rules/0" \ -H "Content-Type: application/json" \ -d '{ "percent_basis": 1, "maximum_cashback_cents": 1, "is_active": true, "product_ids": [ 0 ] }'{
"data": {
"id": 0,
"percent_basis": 1,
"maximum_cashback_cents": 1,
"is_active": true,
"product_ids": [
0
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_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 cashbackRule 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/cashback-rules/0" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"id": 0,
"percent_basis": 1,
"maximum_cashback_cents": 1,
"is_active": true,
"product_ids": [
0
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_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 cashbackRule path parameter.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://sell.app/api/v2/cashback-rules/0"{
"data": {
"id": 0,
"percent_basis": 1,
"maximum_cashback_cents": 1,
"is_active": true,
"product_ids": [
0
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_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 cashbackRule path parameter.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://sell.app/api/v2/cashback-rules/0/restore"{
"data": {
"id": 0,
"percent_basis": 1,
"maximum_cashback_cents": 1,
"is_active": true,
"product_ids": [
0
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_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."
]
}
}