# Receive purchase check endpoint

{% hint style="info" %}
Implementation is **OPTIONAL**
{% endhint %}

**resource**:  /control/check

**method**:  *POST*

**Request** :  [PurchaseControlCheckRequest](/general/request-and-responses/purchasecontrolcheckrequest.md)

**Response**: [PurchaseControlCheckResponse](/general/request-and-responses/purchasecontrolcheckresponse.md)

{% tabs %}
{% tab title="Request Example" %}

```
{
	"invoiceId": "5bd5c446ad950100018a79c0",
	"personId": "0bcae298-867c-41af-9980-be0d8e828d3e",
	"institutionId": "0bcae304-867c-41af-9980-be0d8e828d4s",
	"langCode": "ET",
	"products": [
		{
			"id": "1ABC",
			"barcode": "ABC-abc-1234",
			"type": "SINGLE",
			"translatableName": {
				"originalText": "Helen Oats 500g",
				"translations": [
					{
						"ET": "Helen kiirkaeraheleb 500g"
					}
				]
			},
			"translatableDescription": {
				"originalText": "Oats made in Estonia",
				"translations": [
					{
						"ET": "Eestis toodetud kiirkaerahelbed"
					}
				]
			},
			"quantity": {
				"unit": "KILOGRAM",
				"value": "1.03"
			},
			"price": {
				"addition": {
					"type": "DSC",
					"sum": 1,
					"rate": 10
				},
				"vat": {
					"sumWithVAT": 12,
					"sumWithoutVAT": 10,
					"VATSum": 2,
					"VATRate": 20
				},
				"total": 12
			},
			"weightItem": false,
			"information": {
				"imageUrl": "https://my.outs"
			},
			"inspections": [
				{
					"type": "MIN_AGE",
					"age": 18
				},
				{
					"type": "MAX_TIME",
					"time": "22:00:00",
					"timezone": "Europe/Tallinn"
				}
			],
			"campaigns": [
				{
					"name": "Big Discount Campaign",
					"code": "B00000000501",
					"operation": "total >= 50 ? total * 0.98 : total"
				}
			],
			"subProducts": null,
			"categories": [
				{
					"id": "1B",
					"translatableName": {
						"originalText": "Cereals",
						"translations": [
							{
								"ET": "Teraviljad"
							}
						]
					},
					"numberOfProducts": 500,
					"parentId": "1A"
				}
			]
		}
	],
	"shipment": {
		"method": "PARCEL",
		"parcelId": "1ABSC",
		"name": "Ravala street parcel",
		"status": "WAITING_FOR_CONFIRMATION",
		"price": 5,
		"currency": "EUR",
		"expectedDeliveryUTCTime": "2019-04-20T19:30:00.000Z",
		"createdUTCTime": "2019-04-22T19:30:00.000Z",
		"contactEmail": "test@test.ee",
		"contactPhone": "56314762",
		"address": {
			"level1": "EE",
			"level2": "Harjumaa",
			"level3": "Tallinn",
			"level4": "kesklinn",
			"level5": "Tartu mnt.",
			"level6": "53",
			"level7": null,
			"level8": null,
			"postalCode": "10115"
		}
	},
	"loyaltyCards": [
		{
			"id": "1aBc",
			"cardNumber": "1234567",
			"useBonusOnPayment": false
		}
	]
}
```

{% endtab %}

{% tab title="Response Example" %}

```
{
	"decision": "AGE"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.smarts.ee/integration/custom-integration/merchant-side-purchase-control/receive-purchase-check-request.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
