Sub-resources of points

All available methods for the sub-resources of the resource points.


Get a collection of purchases

Get information about all purchases by points resource
[badge-blue GET] /points/{point_id}/purchases

Path parameters

Parameter name Type Description
point_id string The unique id for the point record

Query string

Parameter name Type Description Mandatory (Yes/No)
count integer The number of records to return.
Default value is 100.
No
offset integer The number of records from a collection to skip.
Default value is 0.
No
sort_field string One of the query string parameters for sorting.
Response is sorted by the specified field.
No
sort_direction string Direction of sorting the response list.
Possible values are: ASC / DESC
No
store_id string The unique id for the store where purchase was made No
customer_id string The unique id for the customer No
type_id string Purchase type No
payment_time_from string Date and time from of the purchase payment (YYYY-MM-DD HH:MM:SS) No
payment_time_to string Date and time to of the purchase payment (YYYY-MM-DD HH:MM:SS) No
purchase_items_extension boolean If true, resource returns extended response with purchase items. If false, the resource won't be extended. If the parameter is not set, the default value is false No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
purchases Purchase[] List of purchases
total_items integer Count of all found purchases

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/points/80c8c7649d5e136f8a30a482d9/purchases
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: BasZW50ZXJwcmlzZVcmZhY2U6YmVlZDA2ZjBmYhTEyUwOWIzNzk2ZjMODEEyZTIxNmVkMM5NDE5Zj2NzMwZmRj2wmYw==

Example response

HTTP/1.1 200 OK
Date: Tue, 29 Sep 2020 14:53:23 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "purchases": [],
    "total_items": 0
  }
}