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

# Submit an order via a shareable link

> Create a new order for the selected service offers. The order will be associated with the reseller who created the link. This endpoint does not require authentication.



## OpenAPI

````yaml /openapi/openapi-public.json post /public/links/{slug}/orders
openapi: 3.0.0
info:
  title: OfferGrid API
  description: >-
    **Public API** - Unauthenticated endpoints with no API key required.


    These power two public, no-login surfaces:

    - **Shareable links** (`/public/links/*`) - a reseller-branded landing page
    for a specific set of offers, used to collect an order from an end customer.

    - **Consumer shop** (`/public/shop/*`) - the offergrid.io/shop storefront,
    where consumers browse real offers by ZIP code and either check out directly
    or are redirected to a provider's own site.


    All endpoints here are rate-limited and validate/re-check coverage
    server-side; none require the `x-api-key` header used by the Provider and
    Reseller APIs.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.offergrid.io
    description: Production
security: []
tags:
  - name: public
    description: >-
      Public: Unauthenticated endpoints for shareable links and the /shop
      storefront
paths:
  /public/links/{slug}/orders:
    post:
      tags:
        - public
      summary: Submit an order via a shareable link
      description: >-
        Create a new order for the selected service offers. The order will be
        associated with the reseller who created the link. This endpoint does
        not require authentication.
      operationId: PublicLinksController_createOrder
      parameters:
        - name: slug
          required: true
          in: path
          description: The unique link identifier (from the URL)
          schema:
            example: abc123
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePublicOrderDto'
      responses:
        '201':
          description: Order successfully created
        '400':
          description: Invalid order data or link is inactive
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '404':
          description: Link not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected server error. Safe to retry idempotent requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreatePublicOrderDto:
      type: object
      properties:
        customerInfo:
          description: Customer contact information
          allOf:
            - $ref: '#/components/schemas/CustomerInfoDto'
        items:
          description: List of offers to order (one per category)
          type: array
          items:
            $ref: '#/components/schemas/SelectedOfferDto'
        moveInDate:
          type: string
          description: Move-in date (ISO 8601)
          example: '2025-02-01'
        notes:
          type: string
          description: Additional notes from the customer
          example: Please contact me in the morning
        idempotencyKey:
          type: string
          description: >-
            Client-generated key for this checkout attempt. A repeat submission
            with the same key (e.g. a network retry or double-click on Submit)
            returns the original order instead of creating a duplicate.
          example: a1b2c3d4-checkout-attempt
      required:
        - customerInfo
        - items
      title: Create Public Order Request
    ValidationErrorResponse:
      type: object
      title: Validation Error
      description: >-
        Returned when request-body validation fails. `message` is an array with
        one entry per failed constraint.
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          type: array
          items:
            type: string
          description: One human-readable message per failed constraint.
          example:
            - name should not be empty
            - >-
              category must be one of the following values: internet,
              electricity
        error:
          type: string
          example: Bad Request
    ErrorResponse:
      type: object
      title: Error
      description: Standard error envelope returned by every 4xx and 5xx response.
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          description: HTTP status code, repeated in the body.
          example: 404
        message:
          type: string
          description: Human-readable explanation of what went wrong.
          example: Offer not found
        error:
          type: string
          description: Short, stable name for the status code.
          example: Not Found
    CustomerInfoDto:
      type: object
      properties:
        firstName:
          type: string
          example: John
        lastName:
          type: string
          example: Doe
        fullName:
          type: string
          example: John Doe
          description: >-
            Legacy single-field name — prefer firstName + lastName. Required
            only when both are absent; split on the last space when used.
        email:
          type: string
          example: john@example.com
        phone:
          type: string
          example: +1-555-123-4567
      required:
        - email
        - phone
      title: Customer Information
    SelectedOfferDto:
      type: object
      properties:
        offerId:
          type: string
          description: Offer ID to order
          example: uuid-of-offer
      required:
        - offerId
      title: Selected Offer

````