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

# Send Inventory Advice

> Sends on-hand inventory for one brand at one facility. It goes to every retailer connected to the brand through this facility's organization. The response has one result per connection.



## OpenAPI

````yaml /openapi.json post /api/v1/inventory/brand/{brand_id}/facility/{facility_id}
openapi: 3.0.0
info:
  title: Authentication API
  description: API for user authentication and token generation
  version: 1.0.0
servers:
  - url: https://api.retailreadyai.com
    description: Production server
  - url: https://stg.retailreadyai.com
    description: Staging server
security: []
paths:
  /api/v1/inventory/brand/{brand_id}/facility/{facility_id}:
    post:
      tags:
        - Inventory
      summary: Send Inventory Advice
      description: >-
        Sends on-hand inventory for one brand at one facility. It goes to every
        retailer connected to the brand through this facility's organization.
        The response has one result per connection.
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the brand
        - name: facility_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the facility
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  description: >-
                    A complete snapshot of on-hand inventory for this brand at
                    this facility. Include every SKU you stock,  any SKU you
                    omit will not appear on the document sent to the retailer.
                    Required field, between 1 and 1000 entries per request, and
                    SKUs must be unique within the request.
                  minItems: 1
                  maxItems: 1000
                  items:
                    type: object
                    properties:
                      sku:
                        type: string
                        description: Stock Keeping Unit
                        example: PILLOW-01
                      available_quantity:
                        type: integer
                        minimum: 0
                        description: >-
                          Available on-hand quantity for this SKU, 0 or greater.
                          Send a whole number. A whole number as a string
                          ("120") or with a .0 (120.0) is accepted and
                          converted. A decimal number is rounded down (5.5 is
                          sent as 5); a decimal inside a string ("5.5") is
                          rejected.
                        example: 120
                      status:
                        type: string
                        enum:
                          - DISCONTINUED
                          - TEMPORARILY_UNAVAILABLE
                        nullable: true
                        description: >-
                          Not sent in 846 documents. Why the SKU is out of
                          stock. Only allowed when `available_quantity` is 0.
                          Required at 0 if the brand has a Direct API connection
                          in this facility's organization. Case-insensitive.
                        example: DISCONTINUED
                      estimated_back_in_stock_date:
                        type: string
                        format: date
                        nullable: true
                        description: >-
                          Not sent in 846 documents. When the SKU is expected
                          back, as YYYY-MM-DD. Only allowed when
                          `available_quantity` is 0. Required when `status` is
                          `TEMPORARILY_UNAVAILABLE`. Cannot be in the past.
                        example: '2026-12-31'
                    required:
                      - sku
                      - available_quantity
              required:
                - items
            example:
              items:
                - sku: PILLOW-01
                  available_quantity: 120
                - sku: PILLOW-02
                  available_quantity: 0
                  status: DISCONTINUED
      responses:
        '200':
          description: >-
            Inventory advice sent successfully to every connection for this
            brand and facility.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Inventory advice sent successfully
                  data:
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/InventoryAdviceResult'
                      summary:
                        $ref: '#/components/schemas/InventoryAdviceSummary'
              example:
                message: Inventory advice sent successfully
                data:
                  results:
                    - organization_id: 8a47e0d6-4f12-4a9e-9c6a-2d3f9e0b8a01
                      retailer_id: 7eab3720-1944-4b01-aea6-972492f017e5
                      retailer_name: Target
                      brand_name: Acme Outdoor
                      organization_name: Acme Holdings
                      success: true
                      error: null
                      failed_skus: null
                  summary:
                    total: 1
                    succeeded: 1
                    failed: 0
        '207':
          description: >-
            Inventory advice partially completed: at least one connection
            succeeded and at least one failed. Inspect each entry in `results`
            to determine the outcome per connection.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      Inventory advice partially completed: 1 succeeded, 1
                      failed
                  data:
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/InventoryAdviceResult'
                      summary:
                        $ref: '#/components/schemas/InventoryAdviceSummary'
              example:
                message: 'Inventory advice partially completed: 1 succeeded, 1 failed'
                data:
                  results:
                    - organization_id: 8a47e0d6-4f12-4a9e-9c6a-2d3f9e0b8a01
                      retailer_id: 7eab3720-1944-4b01-aea6-972492f017e5
                      retailer_name: Target
                      brand_name: Acme Outdoor
                      organization_name: Acme Holdings
                      success: true
                      error: null
                      failed_skus: null
                    - organization_id: 8a47e0d6-4f12-4a9e-9c6a-2d3f9e0b8a01
                      retailer_id: 1c0bd477-5013-4db8-bc00-9c3a6c65a4da
                      retailer_name: CVS
                      brand_name: Acme Outdoor
                      organization_name: Acme Holdings
                      success: false
                      error: '502: Upstream EDI partner unavailable'
                      failed_skus: null
                  summary:
                    total: 2
                    succeeded: 1
                    failed: 1
        '400':
          description: >-
            The request was rejected and nothing was sent. `error.details` lists
            field problems (missing `items`, empty list, more than 1000 items,
            duplicate SKUs, a negative `available_quantity` or one that is not a
            number or a whole-number string (e.g. "abc" or "5.5"), an unknown
            `status`, or a date not in YYYY-MM-DD form). `error.errors` lists
            row problems, one entry per field: for example a `status` on a row
            with stock, a quantity of 0 with no `status` for a brand connected
            to a direct API retailer, a missing date for
            `TEMPORARILY_UNAVAILABLE`, or a date in the past.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: INVALID_REQUEST
                      details:
                        type: array
                        description: Field problems, one entry per invalid field.
                        items:
                          type: object
                          properties:
                            loc:
                              type: array
                              items: {}
                              description: >-
                                Path to the invalid field, e.g. ["items", 0,
                                "available_quantity"]
                            msg:
                              type: string
                            type:
                              type: string
                      errors:
                        type: array
                        description: Row problems, one entry per row and field.
                        items:
                          type: object
                          properties:
                            row_index:
                              type: integer
                              description: Zero-based position of the row in `items`
                            field:
                              type: string
                            message:
                              type: string
              examples:
                field:
                  summary: Invalid field
                  value:
                    message: Validation failed
                    error:
                      code: INVALID_REQUEST
                      details:
                        - loc:
                            - items
                            - 0
                            - available_quantity
                          msg: value is not a valid integer
                          type: type_error.integer
                rows:
                  summary: Row validation failed
                  value:
                    message: Inventory advice validation failed
                    error:
                      code: INVALID_REQUEST
                      errors:
                        - row_index: 0
                          field: status
                          message: >-
                            Status must be empty when quantity is greater than
                            0.
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
              example:
                message: Authentication failed
                error:
                  code: UNAUTHORIZED
        '403':
          description: >-
            Authenticated user does not have admin access for this
            brand/facility.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
              example:
                message: Unauthorized
                error:
                  code: UNAUTHORIZED
        '404':
          description: >-
            Either the facility does not exist, or no inventory advice
            configuration (846 or direct API) exists for this brand and
            facility.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
              example:
                message: >-
                  No inventory advice configurations found for this brand and
                  facility
                error:
                  code: NOT_FOUND
        '500':
          description: Unhandled server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: INTERNAL_SERVER_ERROR
              example:
                message: Internal server error
                error:
                  code: INTERNAL_SERVER_ERROR
      security:
        - bearerAuth: []
components:
  schemas:
    InventoryAdviceResult:
      type: object
      description: >-
        Outcome of sending inventory advice to a single connection: an 846 via
        EDI, or a direct inventory feed for our direct API retailers.
      properties:
        organization_id:
          type: string
          format: uuid
          description: UUID of the organization this outcome belongs to
        retailer_id:
          type: string
          format: uuid
          description: UUID of the retailer this result belongs to
        retailer_name:
          type: string
          nullable: true
          description: Display name of the retailer (best-effort lookup; may be null)
        brand_name:
          type: string
          nullable: true
          description: Display name of the brand (best-effort lookup; may be null)
        organization_name:
          type: string
          nullable: true
          description: Display name of the organization (best-effort lookup; may be null)
        success:
          type: boolean
          description: >-
            Whether the inventory advice was sent successfully for this
            connection
        error:
          type: string
          nullable: true
          description: >-
            Human-readable error string when `success` is false; null on
            success.
        failed_skus:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            SKUs that could not be included in the send (e.g. missing
            item-master data, or rows rejected for this connection). Null if not
            applicable.
    InventoryAdviceSummary:
      type: object
      description: Counts across the per-config results in this response.
      properties:
        total:
          type: integer
          description: Total number of connections processed (succeeded + failed)
        succeeded:
          type: integer
          description: Number of connections the inventory advice was sent to successfully
        failed:
          type: integer
          description: Number of connections for which the inventory advice failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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