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

# Update online offer

> Partially update an online offer. Omitted keys preserve existing values; ``metadata`` follows Stripe semantics (empty string deletes a key, ``null`` clears all). Returns ``404`` when the offer does not exist or the caller lacks ``MANAGE_OFFERS`` on the offer's owning organization.



## OpenAPI

````yaml /openapi/openapi-retailers.json put /retailers/api/v1/online-offers/{offer_id}
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/online-offers/{offer_id}:
    put:
      tags:
        - Online Offers
      summary: Update online offer
      description: >-
        Partially update an online offer. Omitted keys preserve existing values;
        ``metadata`` follows Stripe semantics (empty string deletes a key,
        ``null`` clears all). Returns ``404`` when the offer does not exist or
        the caller lacks ``MANAGE_OFFERS`` on the offer's owning organization.
      operationId: apps_retailers_api_online_offer_api_update_online_offer
      parameters:
        - in: path
          name: offer_id
          schema:
            description: UUID of the online offer to update.
            format: shortuuid
            maxLength: 22
            minLength: 22
            pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
            title: Offer Id
            type: string
          required: true
          description: UUID of the online offer to update.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnlineOfferUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineOfferOut'
        '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:
    OnlineOfferUpdate:
      description: >-
        Partial update payload for an online offer.


        Every field is optional. Omitted keys preserve existing values (PATCH
        semantics on a

        PUT endpoint, kept for backward compatibility). ``product_id`` and
        ``online_store_id``

        are not updatable — delete and recreate to move a row.
      examples:
        - price: '6.49'
          sku: AMZ-TM-12OZ-V2
          status: active
          stock_level: low_stock
          url: https://www.amazon.com/dp/B001235
      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
        sku:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          description: >-
            Storefront-specific SKU (or ASIN, item ID, etc.) for this product on
            this site. Empty string when the source doesn't expose one. Together
            with ``product_id`` and ``online_store_id`` this is the row's
            natural key — the trio must be unique.
          title: Sku
        url:
          anyOf:
            - maxLength: 1000
              type: string
            - type: 'null'
          description: >-
            Deep link to the product page on the storefront. Should resolve to a
            buyable page; ``url_status`` reflects the most recent reachability
            check. Empty string when the source did not expose a URL (rare for
            online offers — usually means a feed-only row without a public PDP
            yet).
          title: Url
        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
        status:
          anyOf:
            - $ref: '#/components/schemas/OfferStatusEnum'
            - type: 'null'
          description: >-
            Lifecycle state of this offer on the storefront. ``active`` is
            resolvable; ``out_of_stock``, ``seasonal``, and ``discontinued`` are
            filtered out of cheapest-active resolution. ``status`` is
            independent of ``stock_level`` — an offer can be ``active`` with
            ``stock_level=low_stock``.
        source:
          anyOf:
            - $ref: '#/components/schemas/OfferSourceEnum'
            - type: 'null'
          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;
            ``affiliate_feed`` for partner-feed ingest.
        fulfillment_type:
          anyOf:
            - $ref: '#/components/schemas/FulfillmentTypeEnum'
            - type: 'null'
          description: >-
            How the storefront delivers this offer to the buyer. ``standard`` is
            plain ground shipping; ``prime`` covers Amazon Prime / equivalent
            fast-shipping memberships; ``ship_to_store`` and ``store_pickup``
            involve a brick-and-mortar leg even though the offer is online. Only
            meaningful for offers where ``url`` is buyable.
        stock_level:
          anyOf:
            - $ref: '#/components/schemas/StockLevelEnum'
            - type: 'null'
          description: >-
            How much inventory is reported by the storefront. ``in_stock`` and
            ``low_stock`` are buyable now; ``pre_order`` and ``backordered`` are
            buyable but with a wait; ``out_of_stock`` is unbuyable; ``unknown``
            is the safe default when the source doesn't surface stock signals.
        delivery_countries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            ISO 3166-1 alpha-2 country codes this offer ships to (e.g.
            ``["US"]``, ``["US", "CA"]``). Empty list means *inherit from
            storefront* — the API does not infer a default. Codes must be
            uppercase 2-letter.
          title: Delivery Countries
        shipping_cost:
          anyOf:
            - minimum: 0
              type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              type: string
            - type: 'null'
          description: >-
            Bare decimal shipping cost in the parent store's currency. ``null``
            when free or unknown — distinguish via ``fulfillment_type``
            (``prime`` and similar imply free) or by the storefront's documented
            behaviour.
          title: Shipping Cost
        lead_time_days:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: >-
            Expected handling + shipping time in calendar days. ``null`` when
            unknown. Same-day and next-day fulfillment types ought to report
            ``0`` or ``1``; ``backordered`` offers may report higher values
            reflecting restock ETAs.
          title: Lead Time Days
        min_order_quantity:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          description: >-
            Minimum number of units that must be purchased in a single order.
            Defaults to ``1``. Higher values are common for wholesale/B2B feeds.
          title: Min Order Quantity
      title: OnlineOfferUpdate
      type: object
    OnlineOfferOut:
      description: >-
        An offer for a product on a specific online storefront.


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

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

        ``(product, online_store, sku)`` — that trio is the unique key.
      examples:
        - delivery_countries:
            - US
            - CA
          fulfillment_type: prime
          id: d5e6f7a8-9012-3456-abcd-ef7890123456
          is_verified: false
          lead_time_days: 2
          metadata:
            feed_id: amzn-2026-q2
          min_order_quantity: 1
          online_store_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
          organization_id: 9b2c3d4e-f5a6-7890-abcd-ef1234567890
          price:
            amount: '5.99'
            currency: USD
          product_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          shipping_cost: '0.00'
          sku: AMZ-TM-12OZ
          source: affiliate_feed
          status: active
          stock_level: in_stock
          url: https://www.amazon.com/dp/B001234
      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
        online_store_id:
          description: >-
            UUID of the ``OnlineStore`` (a single web storefront —
            ``amazon.com``, ``wholefoodsmarket.com``, etc., not the parent
            retailer entity) this offer lives on. The currency on the parent
            store is what ``price`` and ``shipping_cost`` are denominated in —
            there is no per-offer currency override.
          format: shortuuid
          maxLength: 22
          minLength: 22
          pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
          title: Online 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 a retailer that synced it via affiliate feed).
            ``null`` for offers ingested without an owning org (scrape, public
            feed).
          title: Organization Id
        sku:
          default: ''
          description: >-
            Storefront-specific SKU (or ASIN, item ID, etc.) for this product on
            this site. Empty string when the source doesn't expose one. Together
            with ``product_id`` and ``online_store_id`` this is the row's
            natural key — the trio must be unique.
          maxLength: 100
          title: Sku
          type: string
        url:
          default: ''
          description: >-
            Deep link to the product page on the storefront. Should resolve to a
            buyable page; ``url_status`` reflects the most recent reachability
            check. Empty string when the source did not expose a URL (rare for
            online offers — usually means a feed-only row without a public PDP
            yet).
          maxLength: 1000
          title: Url
          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.
        status:
          allOf:
            - $ref: '#/components/schemas/OfferStatusEnum'
          default: active
          description: >-
            Lifecycle state of this offer on the storefront. ``active`` is
            resolvable; ``out_of_stock``, ``seasonal``, and ``discontinued`` are
            filtered out of cheapest-active resolution. ``status`` is
            independent of ``stock_level`` — an offer can be ``active`` with
            ``stock_level=low_stock``.
        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.
          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;
            ``affiliate_feed`` for partner-feed ingest.
        fulfillment_type:
          allOf:
            - $ref: '#/components/schemas/FulfillmentTypeEnum'
          default: standard
          description: >-
            How the storefront delivers this offer to the buyer. ``standard`` is
            plain ground shipping; ``prime`` covers Amazon Prime / equivalent
            fast-shipping memberships; ``ship_to_store`` and ``store_pickup``
            involve a brick-and-mortar leg even though the offer is online. Only
            meaningful for offers where ``url`` is buyable.
        stock_level:
          allOf:
            - $ref: '#/components/schemas/StockLevelEnum'
          default: unknown
          description: >-
            How much inventory is reported by the storefront. ``in_stock`` and
            ``low_stock`` are buyable now; ``pre_order`` and ``backordered`` are
            buyable but with a wait; ``out_of_stock`` is unbuyable; ``unknown``
            is the safe default when the source doesn't surface stock signals.
        delivery_countries:
          description: >-
            ISO 3166-1 alpha-2 country codes this offer ships to (e.g.
            ``["US"]``, ``["US", "CA"]``). Empty list means *inherit from
            storefront* — the API does not infer a default. Codes must be
            uppercase 2-letter.
          items:
            type: string
          title: Delivery Countries
          type: array
        shipping_cost:
          anyOf:
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              type: string
            - type: 'null'
          description: >-
            Bare decimal shipping cost in the parent store's currency. ``null``
            when free or unknown — distinguish via ``fulfillment_type``
            (``prime`` and similar imply free) or by the storefront's documented
            behaviour.
          title: Shipping Cost
        lead_time_days:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: >-
            Expected handling + shipping time in calendar days. ``null`` when
            unknown. Same-day and next-day fulfillment types ought to report
            ``0`` or ``1``; ``backordered`` offers may report higher values
            reflecting restock ETAs.
          title: Lead Time Days
        min_order_quantity:
          default: 1
          description: >-
            Minimum number of units that must be purchased in a single order.
            Defaults to ``1``. Higher values are common for wholesale/B2B feeds.
          minimum: 1
          title: Min Order Quantity
          type: integer
      required:
        - id
        - product_id
        - online_store_id
      title: OnlineOfferOut
      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
    OfferStatusEnum:
      enum:
        - active
        - discontinued
        - seasonal
        - out_of_stock
      title: OfferStatusEnum
      type: string
    OfferSourceEnum:
      enum:
        - brand
        - affiliate_feed
        - scrape
        - pos_sync
        - manual
        - user_feedback
      title: OfferSourceEnum
      type: string
    FulfillmentTypeEnum:
      enum:
        - standard
        - same_day
        - next_day
        - prime
        - ship_to_store
        - store_pickup
        - digital_download
        - subscribe_and_save
      title: FulfillmentTypeEnum
      type: string
    StockLevelEnum:
      enum:
        - in_stock
        - low_stock
        - pre_order
        - backordered
        - out_of_stock
        - unknown
      title: StockLevelEnum
      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
  securitySchemes:
    APIKeyHeaderAuth:
      type: apiKey
      in: header
      name: X-API-Key
    OAuthTokenAuth:
      type: http
      scheme: bearer
    SessionAuth:
      type: apiKey
      in: cookie
      name: sessionid

````