A QR Summary can only be created or updated.
Create a QR Summary for a certain collection box.
POST /v1/qr-summaries
The request should contain the following attributes in a JSON object:
Name | Type | Description | Required |
---|---|---|---|
action_id | number | Unique identifier of the collection box | Yes |
qr_id | string | The unique ID of the QR-iDeal code. | Yes |
Example request body:
{
"action_id": 123,
"qr_id": "203645aa-f701-4803-b509-x1fdc30dcde4"
}
Curl example:
curl -H "X-Api-Key: 12345" -H "Content-Type: application/json" -d '{ "action_id": 123, "qr_id": "203645aa-f701-4803-b509-x1fdc30dcde4" }' https://api.digicollect.nl/v1/qr-summaries
The result will be returned as JSON with a qr_summary
key. This will be an object containing QR Summary attributes.
Example response body:
{
"qr_summary": {
"id": 1,
"action_id": 123,
"created_at": "2022-09-26T14:50:14Z",
"updated_at": "2022-09-26T14:50:14Z",
"qr_id": "203645aa-f701-4803-b509-x1fdc30dcde4",
"total_amount": "30.0",
"total_donations": 5,
"active": true
}
}
Update a single QR Summary for the current site.
PATCH /v1/qr-summaries/1
The request is allowed to contain one or more of the following attributes in a JSON object:
Name | Type | Description | Required |
---|---|---|---|
qr_id | string | The unique ID of the QR-iDeal code. | Yes |
Example request body:
{
"qr_id": "203645aa-f701-4803-b509-x1fdc30dcde4"
}
Curl example:
curl -X PATCH -H "X-Api-Key: 12345" -H "Content-Type: application/json" -d '{ "qr_id": "203645aa-f701-4803-b509-x1fdc30dcde4" }' https://api.digicollect.nl/v1/qr-summaries/1
Example response body:
{
"qr_summary": {
"id": 1,
"action_id": 123,
"created_at": "2022-09-26T14:50:14Z",
"updated_at": "2022-09-26T14:50:14Z",
"qr_id": "203645aa-f701-4803-b509-x1fdc30dcde4",
"total_amount": "30.0",
"total_donations": 5,
"active": true
}
}