Skip to main content
GET
https://api.dintero.com/v1
/
accounts
/
{aid}
/
discounts
/
rules
/
{did}
/
usages
Get discount ref usages
curl --request GET \
  --url https://api.dintero.com/v1/accounts/{aid}/discounts/rules/{did}/usages \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "<string>",
    "ref_id": "<string>",
    "discount_id": "<string>",
    "customer_id": "<string>",
    "create_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "created_by": "<string>",
    "usage_refs": [
      {
        "ref": "fe35e8ed-3fd3-4b04-acdd-6f1d7d7ca7c9",
        "ref_type": "receipt_add",
        "usage": 1,
        "stamp": 4,
        "amount": 12000,
        "created_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>"
      }
    ],
    "statistics": {
      "stamp": 123,
      "used": 28,
      "usage": 28,
      "amount": 280000,
      "debit_balance": 12350,
      "current_stamp": 123
    }
  }
]

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
did
string<uuid>
required

An UUID that uniquely identifies the discount

Query Parameters

limit
integer
default:10

A limit on the number of refs to be returned. Limit can range between 1 and 1000, the default is 10 items.

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.

Response

Discount usages

id
string
ref_id
string
discount_id
string
customer_id
string
create_at
string<date-time>
updated_at
string<date-time>
created_by
string
usage_refs
object[]
statistics
object