Codes
The codes endpoint trades a Grubhub-funded FreeGrub code for an entitlement ID. You can then attach this code to a cart as a payment using the /carts/{cart_id}/payments endpoint.
These codes come from the Grubhub care team and provide either a set amount or percentage discount. We do not allow partners to create their own codes for use within the Grubhub system. Not all codes distributed by Grubhub and its brands will work with this endpoint.
Paths
Get an entitlement ID.
GET /codes/entitlement/{code_text}Description
Trades a FreeGrub code for an entitlement ID, which you can attach to a cart to cover some or all of its bill.
Path Parameters
code_text
Required
string
The FreeGrub code for which to return an entitlement ID.
Responses
Models
CodeEntitlementResponse
The response payload that contains an entitlement ID, as well as information about the FreeGrub code.
Properties
entitlement_id
Optional
string
The string that can be used to apply the FreeGrub amount to a specific cart.
entitlement_type
Optional
string
The type of entitlement returned. This will always be "PROMO_CODE".
code_type
Optional
string
Deprecated, use `entitlement_type` instead. The type of code used. This will always be "PROMO_CODE".
description
Optional
string
A text description of the code that was sent to this endpoint.
code_text
Optional
string
The `code_text` used to generate the entitlement ID.