Empowering Restaurants through Integration

Follow

Groupon-Specific Endpoints

This article covers Grubhub endpoints designed specifically for the Groupon integration. Currently, that includes only one endpoint, for order tracking.

Paths

Get an order tracking URL

POST /third_parties/groupon_orderstatus/access
Description

Returns a signed URL that loads an order tracking page for a specific diner and order. Like other order taking calls, it requires an authorization header for a currently signed-in user, as well as the ID of a cart that has been successfully checked out. In response, it will create a URL similar to this format:

  https://grubhub.com/orderstatus
    ?order_id={order_id}
    &diner_id={diner_id}
    &auth_token={auth_token}

Body
metadata
labelRequired
The ID of the cart whose order you want to track.
Responses

Add a Coupon to a Cart

POST /carts/{cart_id}/coupons
Description

Attach a restaurant coupon to a cart and apply the associated discount.

Path Parameters
cart_id
labelRequired
UUID
The ID of the cart to apply a coupon to.
Body
coupon_id
labelRequired
String
The ID of the coupon to apply to the cart.
restaurant_id
labelRequired
String
The ID of the restaurant that issued the coupon.
Responses

Get Coupon Info

GET /carts/{cart_id}/coupons/{coupon_id}
Description

Get information about a specific coupon attached to a cart.

Path Parameters
cart_id
labelRequired
UUID
The ID of the cart to apply a coupon to.
coupon_id
labelRequired
Unknown
The ID of the coupon you want to get information about.
Responses
200
OK

Remove a Coupon from a Cart

DELETE /carts/{cart_id}/coupons/{coupon_id}
Description

Remove a coupon previously attached to a cart.

Path Parameters
cart_id
labelRequired
UUID
The ID of the cart to remove a coupon from.
coupon_id
labelRequired
Unknown
The ID of the coupon you want to remove.
Responses
204
UNKNOWN
No Content

Models

Coupon

Information about a restaurant coupon.

Properties
id
label_outlineOptional
UUID
The identifier of the coupon as it exists attached to a specific cart.
couponId
label_outlineOptional
String
The identifier of the coupon from the restaurant, which can be used to add it to carts.
description
label_outlineOptional
String
A diner-facing text string that indicates the requirements and benefits of this coupon.
amount
label_outlineOptional
Integer
The flat amount discounted from a cart once this coupon is applied.
percentage
label_outlineOptional
BigDecimal
The percentage amount discounted from a cart once this coupon is applied.
restaurantId
label_outlineOptional
String
The ID of the restauarant that issued this coupon and to which the discount applies.
minimumAmount
label_outlineOptional
Integer
The minimum cart value required before this coupon applies to a diner's order.
requestId
label_outlineOptional
String
The ID of the request to add this coupon to this cart.

IntegrationStatus

Information about the order tracking URL, including the tracking URL itself.

Properties
type
label_outlineOptional
String
The type of data shown. For order tracking requests, this field will return "URL".
data
label_outlineOptional
String
The URL of the order tracking page for the given cart ID.

Integrations

Information about an order tracking URL requested based on a checked out cart.

Properties
status
label_outlineOptional
Information about the order tracking URL, including the usable URL itself.

OrderMetadata

Information required to retrieve an order tracking URL.

Properties
order_id
label_outlineOptional
String
The ID of the checked out cart for which you want to retrieve an order tracking URL.

ResourceCreateResponse

A new cart-related resource.

Properties
id
labelRequired
String
The ID of the newly created resource (cart, cart line, etc.).
uri
label_outlineOptional
URI
The URI that you can use as a RESTful endpoint to affect this cart.
already_exists
label_outlineOptional
boolean
Indicates whether this resource already has been created.