ResourcesWallet

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.

GET
/v2/cashback-rules

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

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."
    ]
  }
}
POST
/v2/cashback-rules

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/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."
    ]
  }
}
PUT
/v2/cashback-rules/{cashbackRule}

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

Path Parameters

cashbackRule*integer

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."
    ]
  }
}
PATCH
/v2/cashback-rules/{cashbackRule}

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

Path Parameters

cashbackRule*integer

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."
    ]
  }
}
DELETE
/v2/cashback-rules/{cashbackRule}

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

Path Parameters

cashbackRule*integer

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."
    ]
  }
}
POST
/v2/cashback-rules/{cashbackRule}/restore

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

Path Parameters

cashbackRule*integer

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."
    ]
  }
}