GET Venue Donations
Lists the donation campaigns running at a store — what you show a customer when offering them the chance to round up or give a fixed amount at checkout.
To actually add a donation, send it on the cart in cart.donations with PUT /cart/{cart_id}: { "donation_id": 5, "mode": 1 } rounds the total up, mode: 2 gives a preset amount and requires amount in minor currency units. At most one donation per cart.
donate_more_config carries the preset amounts a brand has configured, for rendering the "give more" choices.
Path Parameters
- Type: stringvenue
_id requiredVenue ID
Query Parameters
- Type: 1 or 2enumstate
Filter by assignment state —
1active,2disabled. Omit for all.
Headers
- Type: stringAcceptrequired
Type of content accepted by the API (application/json in most cases)
- Type: stringApplicationrequired
Application key for specific client app
- Type: stringA
P I - V E R S I O N requiredVersion of the API to be used
- Type: stringX
- Request - I D requiredUnique request identifier
Responses
- application/json
- 403
The brand is not on the NMG product structure.
- 404
Unknown venue.
curl 'https://api-public-demo.menu.app/api/venues/{venue_id}/donations?state=1' \
--header 'Accept: application/json' \
--header 'Application: application-key' \
--header 'API-VERSION: ' \
--header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937'
{
"status": "OK",
"code": 200,
"data": {
"donations": [
{
"id": 12,
"venue_id": 34,
"donation_id": 5,
"state": 1,
"donation": {
"id": 5,
"brand_id": 2,
"name": "Round Up for Kids",
"title": "Round up to help kids?",
"description": null,
"image": null,
"donate_more_config": {
"is_enabled": true,
"presets": [
100,
200,
500
],
"default": 100,
"type": 1
},
"rules": []
}
}
]
}
}