Skip to content

Instantly share code, notes, and snippets.

@mikeacjones
Last active May 4, 2021 15:15
Show Gist options
  • Save mikeacjones/8812e7bac2f16509bedc1a619ead2335 to your computer and use it in GitHub Desktop.
Save mikeacjones/8812e7bac2f16509bedc1a619ead2335 to your computer and use it in GitHub Desktop.
#%RAML 1.0
title: Punchh sAPI
description: System API that provides JWT based access to Punchh.
types:
Coupon:
type: object
properties:
code:
type: string
description: Coupon code returned by Punchh
Claim:
type: object
properties:
claim:
type: string
description: Base64 encoded data necessary for generating the JWT when calling Punchh API
/coupon:
get:
description: This endpoint and CRUD operation redirects the user to the Punchh landing page.
queryParameters:
claim:
type: string
description: Base64 encoded data necessary for generating the JWT when calling Punchh API
responses:
303:
description: Response returned to browser indicating it should redirect to the Punchh landing page in order to display the coupon.
headers:
Location:
description: URL that the browser will be redirecting to; includes generated JWT
400:
description: Returned when claim is invalid
body:
application/json:
example: { message: "Invalid claim provided" }
post:
description: This endpoint can be used to return a JSON payload. If Dine creates their own landing page for displaying the code, it will use a POST CRUD operation to get the code.
body:
application/json:
type: Claim
responses:
200:
body:
application/json:
type: Coupon
400:
description: Returned when claim is invalid
body:
application/json:
example: { message: "Invalid claim provided" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment