post-api2-mobile-drivethru_code

Generate a Drive-Thru Short Code

Generates a short code from the mobile app, which the loyalty user can share verbally at the drive-thru window, enabling faster and more convenient account look-up at the POS.

Note: To generate the code, the drive-thru loyalty identification must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration setting.

Headers
  • id-token
    Type: string

    A token that contains identity information about the authenticated user. It is used to verify the user’s identity and is required only when authentication is performed using Advanced Authentication. This token alone does not grant access to Punchh APIs. To access the APIs, you must include the id_token in the id-token header and the access_token in the Authorization header. See Access Punchh APIs Using Access and ID tokens

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • Authorization
    Type: string
    required

    Used to authorize the request with access_token. It should be supplied as Bearer ACCESS_TOKEN_GOES_HERE. Note: When authentication is performed using Advanced Authentication, you must include the id_token in the id-token header and the access_token in the Authorization header. See Access Punchh APIs Using Access and ID tokens

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • User-Agent
    Type: string
    required

    Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

  • punchh-app-device-id
    Type: string
    required

    The app device ID helps Punchh identify each device so that certain rewards can be awarded individually to each device instead of per user. For example, the sign-up reward is given to each device ID to prevent fraudulent sign-ups so that a user cannot do repeated sign-ups from a single device to get rewards. It should not change even if the user resets a device. See the sample code to generate the punchh-app-device-id header.

  • Accept-Language
    Type: string

    Preferred language

  • x-pch-digest
    Type: string
    required

    The signature for the API call

Body
application/json
  • allow_payment
    Type: boolean

    Whether the short code can be used for payment

  • client
    Type: string
    required

    OAuth client ID provided by the business

  • location_id
    Type: integer

    Location for which the short code is requested. This parameter is required only when the location-level short code strategy is selected in the Punchh platform for the business. Contact your Punchh representative to update this Punchh platform configuration setting.

Responses
  • 200
    Type: object
    • expiring_at
      Type: string

      Date and time when the short code expires

    • short_code
      Type: string

      Short code generated for the loyalty guest

  • 400
    Type: object
    • errors
      Type: object
  • 422
    Type: object
    • errors
      Type: string
post/api2/mobile/drivethru_code
{
  "short_code": "string",
  "expiring_at": "string"
}