Sub-resources of purchases

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


Get purchase items tied to a purchase

Get information about all purchase items created in relation to a specific purchase
[badge-blue GET] /purchases/{purchase_id}/purchase-items

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

Path parameters

Parameter name Type Description Mandatory (Yes/No)
purchase_id string The unique id of the purchase Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
purchase_items PurchaseItem[] List of purchase items tied to a purchase
total_items integer Count of all found purchase items

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/purchases/8bc3bbb6f147465b3025cea06c/purchase-items?count=2
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 13:22:43 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "purchase_items": [
      {
        "purchase_item_id": "8bb1f333fd441f4028595bb725",
        "product_id": "86bced3abb08c871ab0d79a784",
        "external_id": null,
        "purchase_item_type_id": "86e05affc7a7abefcd513ab400",
        "price": 6.59,
        "amount": null,
        "vat_rate": null,
        "additional_properties": [
          {
            "property_record_id": "note:2726",
            "property_id": "note",
            "property_name": "Note",
            "property_value": null,
            "last_change": null
          },
          {
            "property_record_id": "transaction_discounts:2726",
            "property_id": "transaction_discounts",
            "property_name": "Discounts"",
            "property_value": [],
            "last_change": null
          },
          {
            "property_record_id": "item_price:2726",
            "property_id": "item_price",
            "property_name": "Item price",
            "property_value": null,
            "last_change": null
          }
        ]
      },
      {
        "purchase_item_id": "8bbe34330c4c1fef99aa7ee110",
        "product_id": "86bced3abb08c871ab0d79a784",
        "external_id": null,
        "purchase_item_type_id": "86e05affc7a7abefcd513ab400",
        "price": 6.59,
        "amount": null,
        "vat_rate": null,
        "additional_properties": [
          {
            "property_record_id": "note:2727",
            "property_id": "note",
            "property_name": "Note",
            "property_value": null,
            "last_change": null
          },
          {
            "property_record_id": "transaction_discounts:2727",
            "property_id": "transaction_discounts",
            "property_name": "Discounts",
            "property_value": [],
            "last_change": null
          },
          {
            "property_record_id": "item_price:2727",
            "property_id": "item_price",
            "property_name": "Item price",
            "property_value": null,
            "last_change": null
          }
        ]
      }
    ],
    "total_items": 9
  }
}


Get vouchers tied to a purchase

Get information about all vouchers created in relation to a specific purchase
[badge-blue GET] /purchases/{purchase_id}/vouchers

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

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
vouchers Voucher[] List of all recent vouchers
total_items integer Count of all recent vouchers

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/purchases/89c91bbc4ddd440da11b8f6756/vouchers?count=2
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlYTZkYWE2ZDNkODYzODlmM2Q1N2VhNmQ2ZDIyMzk5YTQxY2EwNmE3Mzk4NGE2ZmZkMzdiOTdjYjk4M2M0Mg==

Example response

HTTP/1.1 200 OK
Date: Fri, 11 Dec 2020 16:06:49 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "vouchers": [
      {
        "voucher_id": "87bcdc616ba384f0c636cfd61b",
        "customer_id": "8eae20da24332e84611849f5cd",
        "store_id": "86e05affc7a7abefcd513ab400",
        "code": "",
        "value": 3.29,
        "applied_date": "2013-01-03 10:35:01",
        "valid_from": null,
        "valid_to": null,
        "reward_group": "8dcc9526d88bb4732fa2301aa4",
        "reward": {
          "reward_id": "8dcc9526d88bb4732fa2301aa4",
          "code": null,
          "name": "Soup",
          "note": null,
          "subtitle": null,
          "points_cost": 300,
          "valid_time_from": null,
          "valid_time_to": null,
          "reward_group": 0,
          "store_list": [
            {
              "store_id": "86e05affc7a7abefcd513ab400",
              "store_code": "",
              "name": "name changed",
              "store_address": {
                "address1": "Hlavní",
                "address2": "18",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "19875",
                "city": "Borohrádek",
                "country_code": "cz"
              },
              "contact_email": null,
              "manager_name": null,
              "phone_number": null,
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "2375303497",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2020-12-09 14:43:30",
              "state": 1
            },
            {
              "store_id": "8bed991c68a470e7aaeffbf048",
              "store_code": "",
              "name": "Great restaurant",
              "store_address": {
                "address1": "Milady Horákové",
                "address2": "",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "17000",
                "city": "Praha",
                "country_code": "cz"
              },
              "contact_email": "",
              "manager_name": "",
              "phone_number": "",
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "3818258045",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2012-08-27 10:26:06.037726",
              "state": 1
            },
            {
              "store_id": "81eaeea13b8984a169c490a325",
              "store_code": "",
              "name": "Perfect restaurant",
              "store_address": {
                "address1": "",
                "address2": "",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "",
                "city": "",
                "country_code": "cz"
              },
              "contact_email": "",
              "manager_name": "",
              "phone_number": "",
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "3155137764",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2016-08-30 13:49:07",
              "state": 0
            },
            {
              "store_id": "8fd73167342d06899c4c015320",
              "store_code": "",
              "name": "Nice restaurant",
              "store_address": {
                "address1": "",
                "address2": "",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "",
                "city": "",
                "country_code": "cz"
              },
              "contact_email": "",
              "manager_name": "",
              "phone_number": "",
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "2909310574",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2016-08-30 15:32:33",
              "state": 1
            }
          ],
          "additional_properties": [
            {
              "property_record_id": "count_items_bonus:8dcc9526d88bb4732fa2301aa4",
              "property_id": "count_items_bonus",
              "property_name": "Bonus items",
              "property_value": "",
              "last_change": null
            },
            {
              "property_record_id": "bonus_message_for_cashier:8dcc9526d88bb4732fa2301aa4",
              "property_id": "bonus_message_for_cashier",
              "property_name": "Cashier message",
              "property_value": null,
              "last_change": null
            }
          ],
          "priority": null,
          "image_urls": [],
          "has_product_condition": false,
          "has_group_condition": true,
          "has_brand_condition": false,
          "is_automated": false,
          "last_change": "2013-06-10 11:06:07.952255",
          "state": 1
        },
        "last_change": "2013-01-03 10:35:57",
        "state": 1
      },
      {
        "voucher_id": "8fb92d6175d4e092405e3e6606",
        "customer_id": "8eae20da24332e84611849f5cd",
        "store_id": null,
        "code": "",
        "value": 8.49,
        "applied_date": "2019-08-22 10:54:35.922451",
        "valid_from": null,
        "valid_to": null,
        "reward_group": "83cf45279766234c8da5295258",
        "reward": {
          "reward_id": "83cf45279766234c8da5295258",
          "code": null,
          "name": "Tasty food restaurant",
          "note": null,
          "subtitle": null,
          "points_cost": 700,
          "valid_time_from": null,
          "valid_time_to": null,
          "reward_group": 0,
          "store_list": [
            {
              "store_id": "86e05affc7a7abefcd513ab400",
              "store_code": "",
              "name": "Yummy",
              "store_address": {
                "address1": "Hlavní",
                "address2": "18",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "19875",
                "city": "Borohrádek",
                "country_code": "cz"
              },
              "contact_email": null,
              "manager_name": null,
              "phone_number": null,
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "2375303497",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2020-12-09 14:43:30",
              "state": 1
            },
            {
              "store_id": "8bed991c68a470e7aaeffbf048",
              "store_code": "",
              "name": "The Great restaurant",
              "store_address": {
                "address1": "Milady Horákové",
                "address2": "",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "17000",
                "city": "Praha",
                "country_code": "cz"
              },
              "contact_email": "",
              "manager_name": "",
              "phone_number": "",
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "3818258045",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2012-08-27 10:26:06.037726",
              "state": 1
            },
            {
              "store_id": "81eaeea13b8984a169c490a325",
              "store_code": "",
              "name": "New restaurant",
              "store_address": {
                "address1": "",
                "address2": "",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "",
                "city": "",
                "country_code": "cz"
              },
              "contact_email": "",
              "manager_name": "",
              "phone_number": "",
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "3155137764",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2016-08-30 13:49:07",
              "state": 0
            },
            {
              "store_id": "8fd73167342d06899c4c015320",
              "store_code": "",
              "name": "The old restaurant",
              "store_address": {
                "address1": "",
                "address2": "",
                "address3": null,
                "address4": null,
                "address5": null,
                "address6": null,
                "address7": null,
                "zip": "",
                "city": "",
                "country_code": "cz"
              },
              "contact_email": "",
              "manager_name": "",
              "phone_number": "",
              "partner_id": "86e05affc7a7abefcd513ab400",
              "system_id": "2909310574",
              "gps_coordinates": {
                "gps_longitude": 0,
                "gps_latitude": 0
              },
              "url_address": "",
              "opening": [
                {
                  "day_id": "MON",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "TUE",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "WED",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "THU",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "FRI",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SAT",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                },
                {
                  "day_id": "SUN",
                  "time_intervals": [
                    {
                      "from": null,
                      "to": null
                    },
                    {
                      "from": null,
                      "to": null
                    }
                  ]
                }
              ],
              "image_urls": [],
              "visibility_for_customer": 1,
              "description": "",
              "short_description": "",
              "registration_id": null,
              "last_change": "2016-08-30 15:32:33",
              "state": 1
            }
          ],
          "additional_properties": [],
          "priority": null,
          "image_urls": [],
          "has_product_condition": true,
          "has_group_condition": true,
          "has_brand_condition": false,
          "is_automated": false,
          "last_change": "2013-06-21 20:20:24.611854",
          "state": 1
        },
        "last_change": "2019-08-23 10:00:25",
        "state": 1
      }
    ],
    "total_items": 2
  }
}


Get point records tied to a purchase

Get information about all point records created in relation to a specific purchase
[badge-blue GET] /purchases/{purchase_id}/points

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

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
points Point[] List of the point records
total_items integer Count of all found point records

Example Request

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

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 13:28:11 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "points": [
      {
        "point_id": "87c946b98572beb341293d176c",
        "customer_id": "8bc8ea4c1466859cbba26e522f",
        "assigned_points": 376,
        "available_points": 0,
        "point_type_id": "86e05affc7a7abefcd513ab400",
        "partner_id": "86e05affc7a7abefcd513ab400",
        "valid_to": null,
        "state": 1
      }
    ],
    "total_items": 1
  }
}