Business KPIs data - salesdata

Delete Matching

Changed on

Delete every salesdata that matches a where clause, in one request. The body is the where clause itself, written with the public field names, like the where of Get All.

  • A field takes a plain value, or an object with one of these operators: inq, nin, gt, gte, lt, lte, neq, between, like, nlike, ilike, nilike.

  • The store fields (store_id, store_client_id, store_title, store_address) take a plain value, or one of inq, nin, neq. Use only one store field per level.

  • To match a list of values, use inq: {"store_id": {"inq": ["id1", "id2"]}}. A bare array such as {"store_id": ["id1", "id2"]} is rejected.

  • and and or take an array of non-empty where clauses, and cannot be mixed with fields at the same level.

Warning: a request that matches 40,000 salesdata or more is rejected and deletes nothing; split it into smaller deletes, for example by store or by date. An empty where clause is rejected too.

delete/public/api/salesdata

Request

  • Base URL
    https://<base_url>
  • Auth
    HTTP bearer

Headers

Acceptstring

e.g. application/json

Request body

categorystring

Example request

{
  "category": "Food",
  "store_id": {
    "inq": [
      "54ab03c6546847ee0d30086d",
      "54ab03c6546847ee0d30086c"
    ]
  },
  "reporting_date": {
    "lt": "2026-01-01T00:00:00.000Z"
  }
}

Response

OK

countnumber

Example response

{
  "count": 2
}

Changes