> ## Documentation Index
> Fetch the complete documentation index at: https://docs.craveup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read a location menu using an expiring merchant-issued preview capability



## OpenAPI

````yaml /generated/storefront.openapi.json get /locations/{locationId}/preview
openapi: 3.0.3
info:
  title: Crave Storefront API
  version: 2.0.0
  description: >-
    Direct public Storefront API. Anonymous catalog reads require no API key.
    Protected resources use purpose-limited cart, checkout, receipt, or customer
    credentials.
  contact:
    name: Crave Support
    email: hello@craveup.com
servers:
  - url: https://api.craveup.com/api/v1/storefront
    description: Production Storefront API
  - url: https://sandbox-api.craveup.com/api/v1/storefront
    description: Sandbox Storefront API
security: []
tags:
  - name: Customer Auth
  - name: Catering
  - name: Loyalty
  - name: Merchants
  - name: Locations
  - name: Ordering Sessions
  - name: Menus
  - name: Products
  - name: Carts
  - name: Analytics
  - name: Checkout
  - name: Cart Items
  - name: Discounts
  - name: Customers
  - name: Orders
paths:
  /locations/{locationId}/preview:
    get:
      tags:
        - Locations
      summary: >-
        Read a location menu using an expiring merchant-issued preview
        capability
      operationId: storefrontGetPreview
      parameters:
        - name: locationId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      responses:
        '200':
          description: >-
            Private, no-store read-only catalog. Invalid, revoked or expired
            grants return 404. No ordering authority is granted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  menus:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          maxLength: 128
                        source:
                          type: object
                          properties:
                            menuId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            locationId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            channel:
                              type: string
                              enum:
                                - online
                                - catering
                            kind:
                              type: string
                              enum:
                                - released
                            menuReleaseId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          required:
                            - menuId
                            - locationId
                            - channel
                            - kind
                            - menuReleaseId
                          additionalProperties: false
                        name:
                          type: string
                        isActive:
                          type: boolean
                        time:
                          type: string
                        imageUrl:
                          type: string
                        categories:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                                maxLength: 128
                              name:
                                type: string
                              parentCategoryId:
                                type: string
                                minLength: 1
                                maxLength: 128
                              products:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                      maxLength: 128
                                    name:
                                      type: string
                                    price:
                                      type: string
                                      pattern: ^-?\d+(?:\.\d+)?$
                                    displayPrice:
                                      type: string
                                    currency:
                                      type: string
                                      enum:
                                        - usd
                                        - gbp
                                        - aed
                                        - aud
                                    modifierIds:
                                      type: array
                                      items:
                                        type: string
                                        minLength: 1
                                        maxLength: 128
                                    description:
                                      type: string
                                    availability:
                                      type: string
                                    images:
                                      type: array
                                      items:
                                        type: string
                                    sellability:
                                      type: object
                                      properties:
                                        sellable:
                                          type: boolean
                                        reasonCodes:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - sellable
                                        - reasonCodes
                                      additionalProperties: false
                                    source:
                                      type: object
                                      properties:
                                        menuId:
                                          type: string
                                          format: uuid
                                          pattern: >-
                                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                        locationId:
                                          type: string
                                          format: uuid
                                          pattern: >-
                                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                        channel:
                                          type: string
                                          enum:
                                            - online
                                            - catering
                                        kind:
                                          type: string
                                          enum:
                                            - released
                                        menuReleaseId:
                                          type: string
                                          format: uuid
                                          pattern: >-
                                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                      required:
                                        - menuId
                                        - locationId
                                        - channel
                                        - kind
                                        - menuReleaseId
                                      additionalProperties: false
                                    quantityUnit:
                                      type: string
                                      enum:
                                        - serving
                                        - person
                                        - item
                                        - dozen
                                        - tray
                                        - pack
                                        - lb
                                        - oz
                                        - kg
                                        - g
                                        - gallon
                                        - quart
                                        - liter
                                        - ml
                                        - fl_oz
                                  required:
                                    - id
                                    - name
                                    - price
                                    - displayPrice
                                    - currency
                                    - modifierIds
                                    - description
                                    - source
                                    - quantityUnit
                                  additionalProperties: {}
                            required:
                              - id
                              - name
                              - products
                            additionalProperties: {}
                      required:
                        - id
                        - source
                        - name
                        - isActive
                        - time
                        - categories
                      additionalProperties: {}
                  popularProducts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          maxLength: 128
                        name:
                          type: string
                        price:
                          type: string
                          pattern: ^-?\d+(?:\.\d+)?$
                        displayPrice:
                          type: string
                        currency:
                          type: string
                          enum:
                            - usd
                            - gbp
                            - aed
                            - aud
                        modifierIds:
                          type: array
                          items:
                            type: string
                            minLength: 1
                            maxLength: 128
                        description:
                          type: string
                        availability:
                          type: string
                        images:
                          type: array
                          items:
                            type: string
                        sellability:
                          type: object
                          properties:
                            sellable:
                              type: boolean
                            reasonCodes:
                              type: array
                              items:
                                type: string
                          required:
                            - sellable
                            - reasonCodes
                          additionalProperties: false
                        source:
                          type: object
                          properties:
                            menuId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            locationId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            channel:
                              type: string
                              enum:
                                - online
                                - catering
                            kind:
                              type: string
                              enum:
                                - released
                            menuReleaseId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          required:
                            - menuId
                            - locationId
                            - channel
                            - kind
                            - menuReleaseId
                          additionalProperties: false
                        quantityUnit:
                          type: string
                          enum:
                            - serving
                            - person
                            - item
                            - dozen
                            - tray
                            - pack
                            - lb
                            - oz
                            - kg
                            - g
                            - gallon
                            - quart
                            - liter
                            - ml
                            - fl_oz
                      required:
                        - id
                        - name
                        - price
                        - displayPrice
                        - currency
                        - modifierIds
                        - description
                        - source
                        - quantityUnit
                      additionalProperties: {}
                  expiresAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  location:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 128
                      restaurantSlug:
                        type: string
                      restaurantDisplayName:
                        type: string
                      restaurantBio:
                        type: string
                      coverPhoto:
                        type: string
                      restaurantLogo:
                        type: string
                      addressData:
                        type: object
                        properties:
                          street:
                            type: string
                          streetOptional:
                            type: string
                          city:
                            type: string
                          state:
                            type: string
                          zipCode:
                            type: string
                          country:
                            type: string
                          lat:
                            nullable: true
                            type: number
                            minimum: -90
                            maximum: 90
                          lng:
                            nullable: true
                            type: number
                            minimum: -180
                            maximum: 180
                        additionalProperties: {}
                      addressString:
                        type: string
                      loyaltyProgramAvailable:
                        type: boolean
                    required:
                      - id
                      - restaurantSlug
                      - restaurantDisplayName
                      - restaurantBio
                      - coverPhoto
                      - restaurantLogo
                      - addressData
                      - addressString
                      - loyaltyProgramAvailable
                    additionalProperties: {}
                required:
                  - menus
                  - popularProducts
                  - expiresAt
                  - location
                additionalProperties: false
        '400':
          description: The request is invalid.
          headers:
            X-Request-Id:
              description: Opaque request identifier for support and telemetry correlation.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceErrorEnvelope'
        '401':
          description: Authentication or capability authorization is required.
          headers:
            X-Request-Id:
              description: Opaque request identifier for support and telemetry correlation.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceErrorEnvelope'
        '403':
          description: The authenticated principal does not own this resource.
          headers:
            X-Request-Id:
              description: Opaque request identifier for support and telemetry correlation.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceErrorEnvelope'
        '404':
          description: The requested resource was not found.
          headers:
            X-Request-Id:
              description: Opaque request identifier for support and telemetry correlation.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceErrorEnvelope'
        '429':
          description: The request was rate limited.
          headers:
            X-Request-Id:
              description: Opaque request identifier for support and telemetry correlation.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceErrorEnvelope'
        '500':
          description: An unexpected error occurred.
          headers:
            X-Request-Id:
              description: Opaque request identifier for support and telemetry correlation.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceErrorEnvelope'
        '503':
          description: A required dependency is temporarily unavailable.
          headers:
            X-Request-Id:
              description: Opaque request identifier for support and telemetry correlation.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommerceErrorEnvelope'
      security:
        - StorefrontPreviewCapability: []
components:
  schemas:
    CommerceErrorEnvelope:
      type: object
      properties:
        code:
          anyOf:
            - type: string
              enum:
                - VALIDATION_ERROR
                - UNAUTHORIZED
                - CUSTOMER_AUTH_CODE_REJECTED
                - FORBIDDEN
                - NOT_FOUND
                - RATE_LIMITED
                - CART_CONFLICT
                - REQUOTE_REQUIRED
                - RESOURCE_CONFLICT
                - CART_IMMUTABLE
                - IDEMPOTENCY_KEY_REQUIRED
                - IDEMPOTENCY_KEY_REUSED
                - IDEMPOTENCY_IN_PROGRESS
                - DEPENDENCY_UNAVAILABLE
                - INTERNAL_ERROR
            - type: string
              minLength: 1
        message:
          type: string
          minLength: 1
        requestId:
          type: string
          minLength: 8
        details:
          type: object
          additionalProperties: {}
      required:
        - code
        - message
        - requestId
      additionalProperties: false
  securitySchemes:
    StorefrontPreviewCapability:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Preview <token>: a 30-minute, location-scoped capability minted by an
        organization admin. Never place it in query parameters; it cannot
        authorize cart or checkout writes.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.