Skip to content
innovorder
⌘K

Commercial rules

Grants

Grants define the monetary benefit (absolute amount or rate) applied when a pricing rule is triggered. They can be configured with per-restaurant overrides and shift-level schedules.

Get Grant

GET/grants/{grantId}Get Grant by ID

Returns the grant identified by grantId with its full configuration.

Parameters

NameTypeRequiredDescription
grantIdintegerYesID of the grant.

Response

json
{
  "status": 200,
  "code": "grant_found",
  "message": "Grant found.",
  "data": {
    "grantId": 10,
    "brandId": 22,
    "code": "MEAL_SUBSIDY",
    "labelTicket": "Subvention repas",
    "amount": 700,
    "strategy": 1,
    "dailyLimit": 1,
    "type": "ABSOLUTE",
    "tag": null,
    "threshold": null,
    "ceiling": null,
    "restaurants": []
  }
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"grant_found"Machine-readable application code for the result.
messagestring"Grant found."Human-readable result message. Do not use this value for program logic.
dataobject{…}Endpoint-specific response payload.
data.grantIdinteger10Identifier of the associated grant.
data.brandIdinteger22Identifier of the brand.
data.codestring"MEAL_SUBSIDY"Machine-readable application code for the result.
data.labelTicketstring"Subvention repas"The label ticket value.
data.amountinteger700The amount value.
data.strategyinteger1The strategy value.
data.dailyLimitinteger1The daily limit value.
data.typestring"ABSOLUTE"The type value.
data.tagnullnullThe tag value.
data.thresholdnullnullThe threshold value.
data.ceilingnullnullThe ceiling value.
data.restaurantsarray[]List of restaurants entries.

Create Grant

Create a new grant (subsidy) for a brand. Grants can be configured with per-restaurant overrides and shift-level schedules.

POST/grantsCreate Grant

Creates a grant with optional restaurant-level overrides and shift schedules.

Request Body

json
{
  "brandId": 22,
  "code": "MEAL_SUBSIDY",
  "labelTicket": "Subvention repas",
  "amount": 700,
  "strategy": 1,
  "dailyLimit": 1,
  "type": "ABSOLUTE",
  "tag": null,
  "threshold": null,
  "ceiling": null,
  "restaurants": [
    {
      "enabled": true,
      "restaurantId": 195,
      "restaurant_grant": {
        "amount": 700,
        "strategy": 1,
        "dailyLimit": 1,
        "threshold": null,
        "ceiling": null
      },
      "shiftGrants": [
        {
          "shiftId": "shift-uuid-1",
          "amount": 700,
          "ceiling": null,
          "threshold": null
        }
      ]
    }
  ]
}
Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
brandIdinteger22Identifier of the brand.
codestring"MEAL_SUBSIDY"Machine-readable application code for the result.
labelTicketstring"Subvention repas"The label ticket value.
amountinteger700The amount value.
strategyinteger1The strategy value.
dailyLimitinteger1The daily limit value.
typestring"ABSOLUTE"The type value.
tagnullnullThe tag value.
thresholdnullnullThe threshold value.
ceilingnullnullThe ceiling value.
restaurantsarray[…]List of restaurants entries.
restaurants[]object{…}Object containing restaurants fields.
restaurants[].enabledbooleantrueThe enabled value.
restaurants[].restaurantIdinteger195Identifier of the restaurant.
restaurants[].restaurant_grantobject{…}Object containing restaurant grant fields.
restaurants[].restaurant_grant.amountinteger700The amount value.
restaurants[].restaurant_grant.strategyinteger1The strategy value.
restaurants[].restaurant_grant.dailyLimitinteger1The daily limit value.
restaurants[].restaurant_grant.thresholdnullnullThe threshold value.
restaurants[].restaurant_grant.ceilingnullnullThe ceiling value.
restaurants[].shiftGrantsarray[…]List of shift grants entries.
restaurants[].shiftGrants[]object{…}Object containing shift grants fields.
restaurants[].shiftGrants[].shiftIdstring"shift-uuid-1"Identifier of the associated shift.
restaurants[].shiftGrants[].amountinteger700The amount value.
restaurants[].shiftGrants[].ceilingnullnullThe ceiling value.
restaurants[].shiftGrants[].thresholdnullnullThe threshold value.

Response

json
{
  "status": 200,
  "code": "grant_created",
  "message": "Grant created.",
  "data": {
    "grantId": 10,
    "brandId": 22,
    "code": "MEAL_SUBSIDY",
    "labelTicket": "Subvention repas",
    "amount": 700,
    "strategy": 1,
    "dailyLimit": 1,
    "type": "ABSOLUTE"
  }
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"grant_created"Machine-readable application code for the result.
messagestring"Grant created."Human-readable result message. Do not use this value for program logic.
dataobject{…}Endpoint-specific response payload.
data.grantIdinteger10Identifier of the associated grant.
data.brandIdinteger22Identifier of the brand.
data.codestring"MEAL_SUBSIDY"Machine-readable application code for the result.
data.labelTicketstring"Subvention repas"The label ticket value.
data.amountinteger700The amount value.
data.strategyinteger1The strategy value.
data.dailyLimitinteger1The daily limit value.
data.typestring"ABSOLUTE"The type value.

Field Reference

FieldTypeRequiredDescription
brandIdIntegerYesThe brand this grant belongs to.
codeStringYesUnique code identifying this grant.
labelTicketStringYesLabel printed on the receipt/ticket.
amountIntegerYesSubsidy amount in cents (e.g. 700 = 7.00 EUR) or rate in basis points depending on type.
strategyIntegerYesApplication strategy identifier that determines how the grant is computed.
dailyLimitIntegerYesMaximum number of times a customer can use this grant per day.
typeEnumNoABSOLUTE for a fixed amount, RATE for a percentage-based subsidy.
tagString | nullNoOptional tag for categorization.
thresholdInteger | nullNoMinimum cart amount (in cents) required to trigger the grant.
ceilingInteger | nullNoMaximum discount amount (in cents) that can be applied.
restaurantsArray<Object>NoPer-restaurant overrides. Each entry contains restaurantId, enabled, restaurant_grant (amount, strategy, dailyLimit, threshold, ceiling), and optional shiftGrants array.

Update Grant

Update an existing grant. The full configuration including restaurant-level overrides must be provided.

PUT/grants/{grantId}Update Grant

Replaces the grant configuration identified by grantId.

Parameters

NameTypeRequiredDescription
grantIdintegerYesID of the grant to update.

Request Body

json
{
  "code": "MEAL_SUBSIDY_V2",
  "labelTicket": "Subvention repas v2",
  "amount": 800,
  "strategy": 1,
  "dailyLimit": 2,
  "type": "ABSOLUTE",
  "tag": null,
  "threshold": 500,
  "ceiling": 1000,
  "restaurants": [
    {
      "restaurantId": 195,
      "restaurant_grant": {
        "amount": 800,
        "strategy": 1,
        "dailyLimit": 2,
        "threshold": 500,
        "ceiling": 1000
      },
      "shiftGrants": []
    }
  ],
  "shouldUpdateShifts": true
}
Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
codestring"MEAL_SUBSIDY_V2"Machine-readable application code for the result.
labelTicketstring"Subvention repas v2"The label ticket value.
amountinteger800The amount value.
strategyinteger1The strategy value.
dailyLimitinteger2The daily limit value.
typestring"ABSOLUTE"The type value.
tagnullnullThe tag value.
thresholdinteger500The threshold value.
ceilinginteger1000The ceiling value.
restaurantsarray[…]List of restaurants entries.
restaurants[]object{…}Object containing restaurants fields.
restaurants[].restaurantIdinteger195Identifier of the restaurant.
restaurants[].restaurant_grantobject{…}Object containing restaurant grant fields.
restaurants[].restaurant_grant.amountinteger800The amount value.
restaurants[].restaurant_grant.strategyinteger1The strategy value.
restaurants[].restaurant_grant.dailyLimitinteger2The daily limit value.
restaurants[].restaurant_grant.thresholdinteger500The threshold value.
restaurants[].restaurant_grant.ceilinginteger1000The ceiling value.
restaurants[].shiftGrantsarray[]List of shift grants entries.
shouldUpdateShiftsbooleantrueThe should update shifts value.

Response

json
{
  "status": 200,
  "code": "grant_updated",
  "message": "Grant updated.",
  "data": {
    "grantId": 10,
    "code": "MEAL_SUBSIDY_V2",
    "labelTicket": "Subvention repas v2",
    "amount": 800
  }
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"grant_updated"Machine-readable application code for the result.
messagestring"Grant updated."Human-readable result message. Do not use this value for program logic.
dataobject{…}Endpoint-specific response payload.
data.grantIdinteger10Identifier of the associated grant.
data.codestring"MEAL_SUBSIDY_V2"Machine-readable application code for the result.
data.labelTicketstring"Subvention repas v2"The label ticket value.
data.amountinteger800The amount value.

Delete Grant

Permanently delete a grant. This will also remove it from any associated pricing rules.

DELETE/grants/{grantId}Delete Grant

Deletes the grant identified by grantId.

Parameters

NameTypeRequiredDescription
grantIdintegerYesID of the grant to delete.

Response

json
{
  "status": 200,
  "code": "grant_deleted",
  "message": "Grant deleted."
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"grant_deleted"Machine-readable application code for the result.
messagestring"Grant deleted."Human-readable result message. Do not use this value for program logic.

Brand Grants

Retrieve grants (subsidies/allowances) configured at the brand level. Grants define daily spending allowances that can be applied to customer accounts, typically in collective catering contexts.

GET/brands/{brandId}/grantsGet Grants by Brand

Retrieve all grants associated with a brand.

Parameters

NameTypeRequiredDescription
brandIdintegerYesThe unique identifier of the brand.

Response

json
{
  "status": 200,
  "code": "grants_found",
  "message": "The grants have been found.",
  "data": [
    {
      "grantId": 301,
      "name": "Employee Lunch Grant",
      "code": "EMP_LUNCH",
      "amount": 700,
      "brandId": 100
    }
  ]
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"grants_found"Machine-readable application code for the result.
messagestring"The grants have been found."Human-readable result message. Do not use this value for program logic.
dataarray[…]Endpoint-specific response payload.
data[]object{…}Endpoint-specific response payload.
data[].grantIdinteger301Identifier of the associated grant.
data[].namestring"Employee Lunch Grant"The name value.
data[].codestring"EMP_LUNCH"Machine-readable application code for the result.
data[].amountinteger700The amount value.
data[].brandIdinteger100Identifier of the brand.

GET/brands/{brandId}/grants/listGet Grants List

Retrieve a simplified list of grants for a brand, optimized for dropdown or selection lists.

Parameters

NameTypeRequiredDescription
brandIdintegerYesThe unique identifier of the brand.

Response

json
{
  "status": 200,
  "code": "grants_found",
  "message": "The grants have been found.",
  "data": [
    {
      "grantId": 301,
      "name": "Employee Lunch Grant",
      "code": "EMP_LUNCH"
    },
    {
      "grantId": 302,
      "name": "Student Grant",
      "code": "STU_GRANT"
    }
  ]
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"grants_found"Machine-readable application code for the result.
messagestring"The grants have been found."Human-readable result message. Do not use this value for program logic.
dataarray[…]Endpoint-specific response payload.
data[]object{…}Endpoint-specific response payload.
data[].grantIdinteger301Identifier of the associated grant.
data[].namestring"Employee Lunch Grant"The name value.
data[].codestring"EMP_LUNCH"Machine-readable application code for the result.