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

  • Venue ID

Query Parameters

  • Filter by assignment state — 1 active, 2 disabled. Omit for all.

Headers

  • Type of content accepted by the API (application/json in most cases)

  • Application key for specific client app

  • Version of the API to be used

  • Unique request identifier

Responses

  • application/json
  • The brand is not on the NMG product structure.

  • Unknown venue.

Request Example for get/venues/{venue_id}/donations
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": []
        }
      }
    ]
  }
}