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

# Submit Order Referral

> Record how the customer heard about the store, answered from the order confirmation page. Requires the `confirmationToken` from the checkout response, which is only minted where there is something to offer. Accepted only while the order has no answer, so asking twice is harmless. The answer must be one of the store's configured options unless it allows a free-text other.



## OpenAPI

````yaml /api-reference/openapi.json post /account/order-referral
openapi: 3.0.0
info:
  title: Marzipan API
  version: 1.0.0
servers:
  - url: https://api.marzipan.co/v1
security:
  - tenantAuth: []
tags:
  - name: Account
    description: >-
      Account management endpoints including registration, login, and user
      details
  - name: Carts
    description: Shopping cart management endpoints
  - name: Products
    description: Product catalogue and search endpoints
  - name: Subscriptions
    description: Subscription management and renewal endpoints
  - name: CMS
    description: Content management system endpoints
  - name: Messaging
    description: Message and communication endpoints
  - name: Settings
    description: >-
      Storefront settings and market detection used to configure the web
      components and checkout.
  - name: Analytics
    description: Storefront visit and attribution tracking.
  - name: Rewards
    description: >-
      Loyalty and rewards programme endpoints for the authenticated customer,
      covering points balance, tier status, perks, exclusive products and
      transaction history.
  - name: Forms
    description: Render and submit dynamic storefront forms defined in the CMS.
  - name: Events
    description: >-
      Check event availability, browse occurrences and recurring dates, generate
      ticket QR codes, and manage event waitlists (join, leave, check status,
      and claim promoted spots).
paths:
  /account/order-referral:
    post:
      tags:
        - Account
      summary: Submit Order Referral
      description: >-
        Record how the customer heard about the store, answered from the order
        confirmation page. Requires the `confirmationToken` from the checkout
        response, which is only minted where there is something to offer.
        Accepted only while the order has no answer, so asking twice is
        harmless. The answer must be one of the store's configured options
        unless it allows a free-text other.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
                - referred_by
              properties:
                token:
                  type: string
                  description: The `confirmationToken` from the checkout response.
                referred_by:
                  type: string
                  maxLength: 255
                  description: The chosen option's label.
                referred_by_detail:
                  type: string
                  maxLength: 255
                  nullable: true
                  description: >-
                    The answer to that option's follow-up question, where it has
                    one.
      responses:
        '200':
          description: The answer was recorded, or was already present.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Thanks, that really helps.
        '422':
          description: >-
            The token has expired, or the answer is not one of the store's
            options.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
components:
  securitySchemes:
    tenantAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your API token.
      bearerFormat: JWT

````