> ## 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.

# Preview an accepted configuration within a released menu



## OpenAPI

````yaml /generated/storefront.openapi.json post /locations/{locationId}/products/{productId}/configuration-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}/products/{productId}/configuration-preview:
    post:
      tags:
        - Products
      summary: Preview an accepted configuration within a released menu
      operationId: storefrontPreviewProductConfiguration
      parameters:
        - name: locationId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
        - name: productId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicConfigurationPreviewRequest'
      responses:
        '200':
          description: Server food facts and structured dietary warnings.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfiguredFoodEvaluation'
        '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'
        '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: []
components:
  schemas:
    PublicConfigurationPreviewRequest:
      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)$
        channel:
          type: string
          enum:
            - online
            - catering
        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)$
        quantityUnit:
          type: string
          enum:
            - serving
            - person
            - item
            - dozen
            - tray
            - pack
            - lb
            - oz
            - kg
            - g
            - gallon
            - quart
            - liter
            - ml
            - fl_oz
        quantity:
          type: integer
          minimum: 1
          maximum: 99
        selections:
          default: []
          maxItems: 50
          type: array
          items:
            $ref: '#/components/schemas/SelectedModifierGroup'
        preferences:
          $ref: '#/components/schemas/UpdateCartDietaryPreferencesRequest'
      required:
        - menuId
        - channel
        - menuReleaseId
        - quantityUnit
        - quantity
        - preferences
      additionalProperties: false
    ConfiguredFoodEvaluation:
      type: object
      properties:
        source:
          oneOf:
            - 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
            - 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:
                    - draft
                draftRevision:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 9007199254740991
              required:
                - menuId
                - locationId
                - channel
                - kind
                - draftRevision
              additionalProperties: false
        contributions:
          maxItems: 10000
          type: array
          items:
            type: object
            properties:
              entityId:
                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)$
              selectionPath:
                maxItems: 80
                type: array
                items:
                  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)$
              fraction:
                type: object
                properties:
                  numerator:
                    type: number
                    minimum: 0
                  denominator:
                    type: number
                    minimum: 0
                    exclusiveMinimum: true
                required:
                  - numerator
                  - denominator
                additionalProperties: false
              provenance:
                nullable: true
                oneOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - entered
                    required:
                      - kind
                    additionalProperties: false
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - provider
                      provider:
                        type: string
                        enum:
                          - square
                          - clover
                          - toast
                      revision:
                        type: string
                        minLength: 1
                        maxLength: 128
                    required:
                      - kind
                      - provider
                      - revision
                    additionalProperties: false
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - recipe
                      servingsYield:
                        type: number
                        minimum: 0
                        exclusiveMinimum: true
                      components:
                        minItems: 1
                        maxItems: 100
                        type: array
                        items:
                          type: object
                          properties:
                            entityId:
                              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)$
                            fraction:
                              type: object
                              properties:
                                numerator:
                                  type: number
                                  minimum: 0
                                denominator:
                                  type: number
                                  minimum: 0
                                  exclusiveMinimum: true
                              required:
                                - numerator
                                - denominator
                              additionalProperties: false
                          required:
                            - entityId
                            - fraction
                          additionalProperties: false
                    required:
                      - kind
                      - servingsYield
                      - components
                    additionalProperties: false
              nutrients:
                type: object
                properties:
                  caloriesKcal:
                    nullable: true
                    type: number
                    minimum: 0
                  proteinGrams:
                    nullable: true
                    type: number
                    minimum: 0
                  carbohydrateGrams:
                    nullable: true
                    type: number
                    minimum: 0
                  fatGrams:
                    nullable: true
                    type: number
                    minimum: 0
                  fiberGrams:
                    nullable: true
                    type: number
                    minimum: 0
                  sugarGrams:
                    nullable: true
                    type: number
                    minimum: 0
                  saturatedFatGrams:
                    nullable: true
                    type: number
                    minimum: 0
                  sodiumMilligrams:
                    nullable: true
                    type: number
                    minimum: 0
                required:
                  - caloriesKcal
                  - proteinGrams
                  - carbohydrateGrams
                  - fatGrams
                  - fiberGrams
                  - sugarGrams
                  - saturatedFatGrams
                  - sodiumMilligrams
                additionalProperties: false
            required:
              - entityId
              - selectionPath
              - fraction
              - provenance
              - nutrients
            additionalProperties: false
        serving:
          type: object
          properties:
            label:
              type: string
              minLength: 1
              maxLength: 255
            grams:
              nullable: true
              type: number
              minimum: 0
              exclusiveMinimum: true
          required:
            - label
            - grams
          additionalProperties: false
        quantity:
          type: object
          properties:
            unit:
              type: string
              enum:
                - serving
                - person
                - item
                - dozen
                - tray
                - pack
                - lb
                - oz
                - kg
                - g
                - gallon
                - quart
                - liter
                - ml
                - fl_oz
            count:
              type: number
              minimum: 0
              exclusiveMinimum: true
              maximum: 10000
          required:
            - unit
            - count
          additionalProperties: false
        trayYield:
          nullable: true
          type: object
          properties:
            servingsPerTray:
              type: number
              minimum: 0
              exclusiveMinimum: true
          required:
            - servingsPerTray
          additionalProperties: false
        perServing:
          type: object
          properties:
            caloriesKcal:
              nullable: true
              type: number
              minimum: 0
            proteinGrams:
              nullable: true
              type: number
              minimum: 0
            carbohydrateGrams:
              nullable: true
              type: number
              minimum: 0
            fatGrams:
              nullable: true
              type: number
              minimum: 0
            fiberGrams:
              nullable: true
              type: number
              minimum: 0
            sugarGrams:
              nullable: true
              type: number
              minimum: 0
            saturatedFatGrams:
              nullable: true
              type: number
              minimum: 0
            sodiumMilligrams:
              nullable: true
              type: number
              minimum: 0
          required:
            - caloriesKcal
            - proteinGrams
            - carbohydrateGrams
            - fatGrams
            - fiberGrams
            - sugarGrams
            - saturatedFatGrams
            - sodiumMilligrams
          additionalProperties: false
        perTray:
          nullable: true
          type: object
          properties:
            caloriesKcal:
              nullable: true
              type: number
              minimum: 0
            proteinGrams:
              nullable: true
              type: number
              minimum: 0
            carbohydrateGrams:
              nullable: true
              type: number
              minimum: 0
            fatGrams:
              nullable: true
              type: number
              minimum: 0
            fiberGrams:
              nullable: true
              type: number
              minimum: 0
            sugarGrams:
              nullable: true
              type: number
              minimum: 0
            saturatedFatGrams:
              nullable: true
              type: number
              minimum: 0
            sodiumMilligrams:
              nullable: true
              type: number
              minimum: 0
          required:
            - caloriesKcal
            - proteinGrams
            - carbohydrateGrams
            - fatGrams
            - fiberGrams
            - sugarGrams
            - saturatedFatGrams
            - sodiumMilligrams
          additionalProperties: false
        lineTotal:
          type: object
          properties:
            caloriesKcal:
              nullable: true
              type: number
              minimum: 0
            proteinGrams:
              nullable: true
              type: number
              minimum: 0
            carbohydrateGrams:
              nullable: true
              type: number
              minimum: 0
            fatGrams:
              nullable: true
              type: number
              minimum: 0
            fiberGrams:
              nullable: true
              type: number
              minimum: 0
            sugarGrams:
              nullable: true
              type: number
              minimum: 0
            saturatedFatGrams:
              nullable: true
              type: number
              minimum: 0
            sodiumMilligrams:
              nullable: true
              type: number
              minimum: 0
          required:
            - caloriesKcal
            - proteinGrams
            - carbohydrateGrams
            - fatGrams
            - fiberGrams
            - sugarGrams
            - saturatedFatGrams
            - sodiumMilligrams
          additionalProperties: false
        completeness:
          type: string
          enum:
            - complete
            - partial
            - unknown
        missing:
          maxItems: 10000
          type: array
          items:
            type: object
            properties:
              entityId:
                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)$
              nutrient:
                type: string
                enum:
                  - caloriesKcal
                  - proteinGrams
                  - carbohydrateGrams
                  - fatGrams
                  - fiberGrams
                  - sugarGrams
                  - saturatedFatGrams
                  - sodiumMilligrams
            required:
              - entityId
              - nutrient
            additionalProperties: false
        warnings:
          maxItems: 10000
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                  - DIETARY_CONFLICT
                  - ALLERGEN_PRESENT
                  - ALLERGEN_POSSIBLE
                  - DIETARY_INFORMATION_UNKNOWN
              entityId:
                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)$
              preferenceId:
                anyOf:
                  - type: string
                    enum:
                      - vegetarian
                      - vegan
                  - type: string
                    enum:
                      - milk
                      - egg
                      - fish
                      - crustacean_shellfish
                      - tree_nuts
                      - peanut
                      - wheat
                      - soy
                      - sesame
                      - celery
                      - mustard
                      - lupin
                      - molluscs
                      - sulphites
              selectionPath:
                maxItems: 80
                type: array
                items:
                  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:
              - code
              - entityId
              - preferenceId
              - selectionPath
            additionalProperties: false
      required:
        - source
        - contributions
        - serving
        - quantity
        - trayYield
        - perServing
        - perTray
        - lineTotal
        - completeness
        - missing
        - warnings
      additionalProperties: false
    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
    SelectedModifierGroup:
      type: object
      properties:
        groupId:
          type: string
          minLength: 1
          maxLength: 128
        selectedOptions:
          minItems: 0
          maxItems: 50
          type: array
          items:
            type: object
            properties:
              optionId:
                type: string
                minLength: 1
                maxLength: 128
              quantity:
                type: integer
                minimum: 1
                maximum: 99
              children:
                maxItems: 20
                type: array
                items:
                  $ref: '#/components/schemas/SelectedModifierGroup'
            required:
              - optionId
              - quantity
            additionalProperties: false
      required:
        - groupId
        - selectedOptions
      additionalProperties: false
    UpdateCartDietaryPreferencesRequest:
      type: object
      properties:
        preferences:
          maxItems: 2
          type: array
          items:
            type: string
            enum:
              - vegetarian
              - vegan
        avoidAllergenIds:
          maxItems: 14
          type: array
          items:
            type: string
            enum:
              - milk
              - egg
              - fish
              - crustacean_shellfish
              - tree_nuts
              - peanut
              - wheat
              - soy
              - sesame
              - celery
              - mustard
              - lupin
              - molluscs
              - sulphites
      required:
        - preferences
        - avoidAllergenIds
      additionalProperties: false

````

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