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

# Create in-store offer

> Create a new in-store offer for the given organization. The ``(product_id, physical_store_id, sku)`` triple must be unique — sending a duplicate returns ``422``. Returns ``404`` when the organization, product, or store does not exist; ``404`` is also used (rather than ``403``) when the caller lacks ``MANAGE_OFFERS`` to avoid leaking organization existence.



## OpenAPI

````yaml /openapi/openapi-retailers.json post /retailers/api/v1/organizations/{organization_id}/in-store-offers
openapi: 3.1.0
info:
  title: Retailers API
  version: 1.0.0
  description: >
    Manage retailers, in-store offers, and online offers.


    ## Authentication


    All endpoints require an API key passed via the `X-API-Key` HTTP header,
    unless otherwise noted.


    ```

    X-API-Key: csb_<body>_<checksum>

    ```


    Generate API keys in **Settings > API Keys** in your dashboard, or via the
    Account API.

    Session-based (cookie) authentication is also accepted for browser-based
    access.


    ## Rate Limits


    | Tier        | Requests / minute | Requests / day |

    |-------------|-------------------|----------------|

    | Default     | 300               | 10,000         |

    | Custom      | Contact us        | Contact us     |


    Rate-limit headers are included on every response so callers can
    self-throttle without

    hitting our 429s ("informed governor"):


    - `RateLimit-Policy` — every active window, e.g. `300;w=60, 10000;w=86400`

    - `RateLimit-Limit` — quota for the **most-restrictive** currently-active
    window

    - `RateLimit-Remaining` — requests left in that window

    - `RateLimit-Reset` — seconds until that window resets (relative; clock-skew
    safe)


    Legacy `X-RateLimit-*` aliases are also emitted for back-compat.
    `X-RateLimit-Reset`

    keeps the absolute Unix-timestamp shape to avoid breaking existing
    consumers.


    When rate-limited, you receive `429 Too Many Requests` with a
    `retry_after_seconds` field

    in the error envelope and a `Retry-After` header.


    ## Pagination


    List endpoints return paginated results in this envelope:


    ```json

    {
      "data": [...],
      "pagination": {
        "page": 1,
        "page_size": 25,
        "total_count": 342,
        "total_pages": 14,
        "has_next": true,
        "has_previous": false
      }
    }

    ```


    Use `?page=2&page_size=50` query parameters. Maximum page size is 100.


    ## Error Responses


    All errors conform to [RFC 9457 Problem
    Details](https://www.rfc-editor.org/rfc/rfc9457)

    with `Content-Type: application/problem+json`:


    ```json

    {
      "type": "https://closient.com/docs/errors/not_found",
      "title": "Not Found",
      "status": 404,
      "detail": "The requested resource was not found.",
      "error_code": "not_found",
      "retryable": false,
      "timestamp": "2026-03-31T12:00:00+00:00"
    }

    ```


    Common error codes: `unauthorized` (401), `forbidden` (403), `not_found`
    (404),

    `validation_error` (422), `rate_limited` (429), `internal_error` (500).
  termsOfService: https://www.closient.com/terms/
servers:
  - url: https://www.closient.com
security: []
tags:
  - name: Retailers
    description: Manage retailers (canonical and org-private).
  - name: In-store Offers
    description: Per-store physical offers (aisle, on-hand quantity, pickup).
  - name: Online Offers
    description: Per-storefront online offers (URL, delivery, fulfillment).
  - name: In-store Offer Promotions
    description: Time-windowed promotional pricing on in-store offers.
  - name: Online Offer Promotions
    description: Time-windowed promotional pricing on online offers.
externalDocs:
  description: Closient Documentation
  url: https://docs.closient.com
paths:
  /retailers/api/v1/organizations/{organization_id}/in-store-offers:
    post:
      tags:
        - In-store Offers
      summary: Create in-store offer
      description: >-
        Create a new in-store offer for the given organization. The
        ``(product_id, physical_store_id, sku)`` triple must be unique — sending
        a duplicate returns ``422``. Returns ``404`` when the organization,
        product, or store does not exist; ``404`` is also used (rather than
        ``403``) when the caller lacks ``MANAGE_OFFERS`` to avoid leaking
        organization existence.
      operationId: apps_retailers_api_in_store_offer_api_create_in_store_offer
      parameters:
        - in: path
          name: organization_id
          schema:
            description: UUID of the organization that will own the offer.
            format: shortuuid
            maxLength: 22
            minLength: 22
            pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
            title: Organization Id
            type: string
          required: true
          description: UUID of the organization that will own the offer.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InStoreOfferCreate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InStoreOfferOut'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
      security:
        - APIKeyHeaderAuth: []
        - OAuthTokenAuth: []
        - SessionAuth: []
components:
  schemas:
    InStoreOfferCreate:
      description: >-
        Payload for creating a new in-store offer.


        ``product_id`` and ``physical_store_id`` are required; everything else
        has a

        sensible default. The ``(product, store, sku)`` triple must be unique —
        sending

        a duplicate will return ``422``.
      examples:
        - aisle: A5
          metadata:
            feed_id: wfm-2026-q2
          physical_store_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
          price: '5.99'
          product_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          quantity_on_hand: 24
          sku: WFM-TM-12OZ
          source: manual
          store_pickup_available: true
      properties:
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          description: >-
            Developer-attached key/value data. Send {} or null to clear.
            Empty-string values delete that key. Omitted keys are preserved.
          title: Metadata
        product_id:
          description: >-
            UUID of the catalog ``Product`` this offer is for. The product must
            already exist; create it via the products API before adding offers.
            Immutable after creation — moving a row to a different product means
            deleting and recreating.
          format: shortuuid
          maxLength: 22
          minLength: 22
          pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
          title: Product Id
          type: string
        physical_store_id:
          description: >-
            UUID of the ``PhysicalStore`` (a single brick-and-mortar location,
            not the parent retailer chain) this offer lives at. The currency on
            the parent store is what ``price`` is denominated in — there is no
            per-offer currency override.
          format: shortuuid
          maxLength: 22
          minLength: 22
          pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
          title: Physical Store Id
          type: string
        sku:
          default: ''
          description: >-
            Retailer-specific SKU for this product at this store. Empty string
            when the source doesn't expose a SKU (scraped offers often don't).
            Together with ``product_id`` and ``physical_store_id`` this is the
            row's natural key — the trio must be unique.
          maxLength: 100
          title: Sku
          type: string
        price:
          anyOf:
            - minimum: 0
              type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              type: string
            - type: 'null'
          description: >-
            Bare decimal price in the parent store's currency. Omit or send
            ``null`` when the price is unknown; the row will be considered
            priceless and excluded from cheapest-active resolution. There is no
            per-offer currency — the store decides.
          title: Price
        source:
          allOf:
            - $ref: '#/components/schemas/OfferSourceEnum'
          default: manual
          description: >-
            Where this offer row came from. Affects ``source_priority`` defaults
            used when reconciling conflicting rows for the same ``(product,
            store, sku)``. ``manual`` is the safe default for ad-hoc API writes;
            use the more specific value when you know it.
        quantity_on_hand:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: >-
            Units physically on the shelf at last count. ``null`` when unknown —
            common for stores without a POS sync. Decremented as sales come in
            (POS sync) or set manually via update.
          title: Quantity On Hand
        aisle:
          default: ''
          description: >-
            Aisle/shelf locator for in-store wayfinding (e.g. ``A5``, ``Dairy
            12``). Free-form and store-specific; we do not validate the format.
          maxLength: 50
          title: Aisle
          type: string
        store_pickup_available:
          default: false
          description: >-
            ``true`` when the product can be reserved online and picked up at
            this store. Independent of ``status``: an offer can be ``active`` on
            the shelf without supporting reservation.
          title: Store Pickup Available
          type: boolean
      required:
        - product_id
        - physical_store_id
      title: InStoreOfferCreate
      type: object
    InStoreOfferOut:
      description: >-
        An offer for a product at a specific physical store.


        Mirrors :class:`apps.retailers.models.InStoreOffer` plus a structured
        ``price``

        that combines the row's bare decimal with the parent store's currency.
        One row

        per ``(product, physical_store, sku)`` — that trio is the unique key.
      examples:
        - aisle: A5
          id: c4d5e6f7-8901-2345-abcd-ef6789012345
          is_verified: false
          metadata:
            feed_id: wfm-2026-q2
          organization_id: 9b2c3d4e-f5a6-7890-abcd-ef1234567890
          physical_store_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
          price:
            amount: '5.99'
            currency: USD
          product_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          quantity_on_hand: 24
          sku: WFM-TM-12OZ
          source: manual
          status: active
          store_pickup_available: true
      properties:
        metadata:
          additionalProperties:
            type: string
          description: >-
            Developer-attached key/value data attached to this object. Up to 50
            keys; key max 40 chars, value max 500 chars.
          title: Metadata
          type: object
        id:
          description: >-
            URL-safe 22-character shortuuid encoding of the row's UUID primary
            key. Stable across the row's lifetime; suitable for sharing in URLs,
            log lines, and external SDK clients. Accepted on input as either the
            shortuuid form or the canonical UUID form
            (``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``).
          format: shortuuid
          maxLength: 22
          minLength: 22
          pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
          title: Id
          type: string
        product_id:
          description: >-
            UUID of the catalog ``Product`` this offer is for. The product must
            already exist; create it via the products API before adding offers.
            Immutable after creation — moving a row to a different product means
            deleting and recreating.
          format: shortuuid
          maxLength: 22
          minLength: 22
          pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
          title: Product Id
          type: string
        physical_store_id:
          description: >-
            UUID of the ``PhysicalStore`` (a single brick-and-mortar location,
            not the parent retailer chain) this offer lives at. The currency on
            the parent store is what ``price`` is denominated in — there is no
            per-offer currency override.
          format: shortuuid
          maxLength: 22
          minLength: 22
          pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
          title: Physical Store Id
          type: string
        organization_id:
          anyOf:
            - description: >-
                URL-safe 22-character shortuuid encoding of the row's UUID
                primary key. Stable across the row's lifetime; suitable for
                sharing in URLs, log lines, and external SDK clients. Accepted
                on input as either the shortuuid form or the canonical UUID form
                (``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``).
              format: shortuuid
              maxLength: 22
              minLength: 22
              pattern: >-
                ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
              type: string
            - type: 'null'
          description: >-
            UUID of the organization that owns this offer row (e.g. the brand
            that submitted it or the retailer that synced it via POS). ``null``
            for offers ingested without an owning org (scrape, public feed).
          title: Organization Id
        sku:
          default: ''
          description: >-
            Retailer-specific SKU for this product at this store. Empty string
            when the source doesn't expose a SKU (scraped offers often don't).
            Together with ``product_id`` and ``physical_store_id`` this is the
            row's natural key — the trio must be unique.
          maxLength: 100
          title: Sku
          type: string
        price:
          allOf:
            - $ref: '#/components/schemas/PriceOut'
          description: >-
            Structured price: ``amount`` is the bare decimal stored on the row,
            ``currency`` is lifted from the parent store's ``currency`` field at
            read time. ``amount`` is ``null`` when the price is unknown —
            display 'Call for price' rather than ``$0.00``.
        status:
          allOf:
            - $ref: '#/components/schemas/OfferStatusEnum'
          default: active
          description: >-
            Lifecycle state of this offer at this store. ``active`` is
            resolvable; ``out_of_stock``, ``seasonal``, and ``discontinued`` are
            filtered out of cheapest-active resolution. ``seasonal`` is a hint
            that the offer comes back; ``discontinued`` is permanent.
        is_verified:
          default: false
          description: >-
            ``true`` when a human or trusted feed has confirmed this offer is
            real. Defaults to ``false`` for scraped or auto-ingested rows. The
            platform may surface verified offers preferentially in search but
            verification does not affect price resolution.
          title: Is Verified
          type: boolean
        source:
          allOf:
            - $ref: '#/components/schemas/OfferSourceEnum'
          default: manual
          description: >-
            Where this offer row came from. Affects ``source_priority`` defaults
            used when reconciling conflicting rows for the same ``(product,
            store, sku)``. ``manual`` is the safe default for ad-hoc API writes;
            use the more specific value when you know it.
        quantity_on_hand:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: >-
            Units physically on the shelf at last count. ``null`` when unknown —
            common for stores without a POS sync. Decremented as sales come in
            (POS sync) or set manually via update.
          title: Quantity On Hand
        aisle:
          default: ''
          description: >-
            Aisle/shelf locator for in-store wayfinding (e.g. ``A5``, ``Dairy
            12``). Free-form and store-specific; we do not validate the format.
          maxLength: 50
          title: Aisle
          type: string
        store_pickup_available:
          default: false
          description: >-
            ``true`` when the product can be reserved online and picked up at
            this store. Independent of ``status``: an offer can be ``active`` on
            the shelf without supporting reservation.
          title: Store Pickup Available
          type: boolean
      required:
        - id
        - product_id
        - physical_store_id
      title: InStoreOfferOut
      type: object
    ErrorOut:
      description: |-
        RFC 9457 Problem Details response.

        All API errors are returned in this format with Content-Type:
        application/problem+json.
      examples:
        - detail: The requested resource was not found.
          error_code: not_found
          retryable: false
          status: 404
          timestamp: '2026-03-31T12:00:00+00:00'
          title: Not Found
          type: https://closient.com/docs/errors/not_found
        - detail: Validation error.
          details:
            - loc:
                - body
                - name
              msg: Field required
              type: missing
          error_code: validation_error
          retryable: false
          status: 422
          timestamp: '2026-03-31T12:00:00+00:00'
          title: Validation Error
          type: https://closient.com/docs/errors/validation_error
        - detail: Rate limit exceeded. Please try again later.
          error_code: rate_limited
          retry_after: 31
          retryable: true
          status: 429
          timestamp: '2026-03-31T12:00:00+00:00'
          title: Rate Limited
          type: https://closient.com/docs/errors/rate_limited
      properties:
        type:
          description: URI reference identifying the error type.
          title: Type
          type: string
        title:
          description: Short human-readable summary of the error.
          title: Title
          type: string
        status:
          description: HTTP status code.
          title: Status
          type: integer
        detail:
          description: Human-readable explanation of this specific occurrence.
          title: Detail
          type: string
        error_code:
          description: Machine-readable error code (e.g. not_found, unauthorized).
          title: Error Code
          type: string
        retryable:
          default: false
          description: Whether retrying the same request can succeed.
          title: Retryable
          type: boolean
        timestamp:
          description: ISO 8601 timestamp of when the error occurred.
          title: Timestamp
          type: string
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          description: Seconds to wait before retrying (when applicable).
          title: Retry After
        owner_action_required:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the error requires account owner intervention.
          title: Owner Action Required
        details:
          description: Additional context (validation errors, etc.).
          title: Details
      required:
        - type
        - title
        - status
        - detail
        - error_code
        - timestamp
      title: ErrorOut
      type: object
    OfferSourceEnum:
      enum:
        - brand
        - affiliate_feed
        - scrape
        - pos_sync
        - manual
        - user_feedback
      title: OfferSourceEnum
      type: string
    PriceOut:
      description: Structured price with amount and currency.
      examples:
        - amount: '5.99'
          currency: USD
      properties:
        amount:
          anyOf:
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              type: string
            - type: 'null'
          description: Numeric price amount.
          title: Amount
        currency:
          default: USD
          description: ISO 4217 currency code.
          title: Currency
          type: string
      title: PriceOut
      type: object
    OfferStatusEnum:
      enum:
        - active
        - discontinued
        - seasonal
        - out_of_stock
      title: OfferStatusEnum
      type: string
  securitySchemes:
    APIKeyHeaderAuth:
      type: apiKey
      in: header
      name: X-API-Key
    OAuthTokenAuth:
      type: http
      scheme: bearer
    SessionAuth:
      type: apiKey
      in: cookie
      name: sessionid

````