Skip to main content
POST
https://api.dintero.com/v1
/
accounts
/
{aid}
/
discounts
/
search
/
rules
Search for discount rules
curl --request POST \
  --url https://api.dintero.com/v1/accounts/{aid}/discounts/search/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": [
    {
      "customer_id": [
        "<string>"
      ],
      "$.requirement.item.items[*]": [
        {
          "id": "b714118",
          "group_id": "B1"
        }
      ]
    }
  ],
  "group_by": [
    "customer_id#$.requirement.item.items[*].id"
  ]
}
'
{
  "starting_after": "<string>",
  "data": [
    {
      "group_by": "$.requirement.item.items[*].id",
      "group_value": "b714118",
      "customer_id": "<string>",
      "id": "B1",
      "group_id": "b714118",
      "rule": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "Spar 10%",
        "receipt_text": "Mai Salg",
        "reward": {
          "type": "discount_percent",
          "value": 10
        }
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.dintero.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication (token authentication) should be used for accessing the API.

Use Get Token to get an access token for client credentials. Pass the token in the request header:

Authorization: Bearer {access_token}

where the access_token is JSON Web Tokens (JWT).

Path Parameters

aid
string<^[PT]{1}\d{8}$>
required

An id that uniquely identifies the account.

Required string length: 9

Query Parameters

limit
integer
default:10

A limit on the number of objects to be returned

Required range: 1 <= x <= 1000
starting_after
string

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, end the result contains paging_token=pt1, your subsequent call can include starting_after=pt1 in order to fetch the next page of the list.

Body

application/json
query
object[]
required

Filter to use when searching for matching rules

Maximum array length: 1
group_by
enum<string>[]
required
Available options:
customer_id#$.requirement.item.items[*].id,
customer_id#$.requirement.item.items[*].group_id
includes
enum<string>[]

Select the properties from matching discount rules to include in the result data

Available options:
$.campaign_id,
$.created_at,
$.created_by,
$.description,
$.id,
$.limitation,
$.links,
$.metadata,
$.name,
$.private,
$.receipt_text,
$.requirement,
$.reward,
$.type,
$.updated_at,
$.updated_by,
$.visible_from

Response

Search result

starting_after
string

cursor to next page

data
object[]