> ## 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 846 Inventory Advice

> Share your current on-hand inventory for a brand at a specific facility. We'll generate and transmit an 846 Inventory Advice document to each retailer you have set up to receive inventory updates. You'll get back a confirmation for each retailer the document was sent to.



## 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 846 Inventory Advice
      description: >-
        Share your current on-hand inventory for a brand at a specific facility.
        We'll generate and transmit an 846 Inventory Advice document to each
        retailer you have set up to receive inventory updates. You'll get back a
        confirmation for each retailer the document was sent to.
      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. Must be >= 0.
                        example: 120
                    required:
                      - sku
                      - available_quantity
              required:
                - items
            example:
              items:
                - sku: PILLOW-01
                  available_quantity: 120
                - sku: PILLOW-02
                  available_quantity: 0
      responses:
        '200':
          description: 846 inventory advice sent successfully for every matching EDI config
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: 846 inventory advice sent successfully
                  data:
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/InventoryAdviceResult'
                      summary:
                        $ref: '#/components/schemas/InventoryAdviceSummary'
              example:
                message: 846 inventory advice sent successfully
                data:
                  results:
                    - edi_config_id: 1f2c1c4b-3d40-4e2c-8a8a-39d1e0a4cc11
                      retailer_id: 7eab3720-1944-4b01-aea6-972492f017e5
                      retailer_name: Target
                      brand_name: Acme Outdoor
                      organization_name: Acme Holdings
                      success: true
                      edi_transaction_id: f2a73e8b-3c8b-4f1e-a4d2-1c2cda30c6e9
                      error: null
                      failed_skus: null
                  summary:
                    total: 1
                    succeeded: 1
                    failed: 0
        '207':
          description: >-
            846 inventory advice partially completed: at least one config
            succeeded and at least one failed. Inspect each entry in `results`
            to determine outcome per config.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      846 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: >-
                  846 inventory advice partially completed: 1 succeeded, 1
                  failed
                data:
                  results:
                    - edi_config_id: 1f2c1c4b-3d40-4e2c-8a8a-39d1e0a4cc11
                      retailer_id: 7eab3720-1944-4b01-aea6-972492f017e5
                      retailer_name: Target
                      brand_name: Acme Outdoor
                      organization_name: Acme Holdings
                      success: true
                      edi_transaction_id: f2a73e8b-3c8b-4f1e-a4d2-1c2cda30c6e9
                      error: null
                      failed_skus: null
                    - edi_config_id: 8d6f9c12-2bd1-4d2a-9b3a-7c2cc4f51e44
                      retailer_id: 1c0bd477-5013-4db8-bc00-9c3a6c65a4da
                      retailer_name: CVS
                      brand_name: Acme Outdoor
                      organization_name: Acme Holdings
                      success: false
                      edi_transaction_id: null
                      error: '502: Upstream EDI partner unavailable'
                      failed_skus: null
                  summary:
                    total: 2
                    succeeded: 1
                    failed: 1
        '400':
          description: >-
            Request body failed validation (missing `items`, empty list, more
            than 1000 items, duplicate SKUs, or negative `available_quantity`).
          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: string
                        example: 'items: Duplicate SKUs are not allowed'
              example:
                message: Invalid request body
                error:
                  code: INVALID_REQUEST
                  details: 'items: At least 1 item required'
        '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 EDI config with 846
            Inventory Advice enabled exists for this brand/organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
              example:
                message: >-
                  No EDI configs with 846 inventory advice enabled 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 generating and transmitting an 846 Inventory Advice document
        for a single EDI config.
      properties:
        edi_config_id:
          type: string
          format: uuid
          description: UUID of the EDI config this result belongs to
        retailer_id:
          type: string
          format: uuid
          description: UUID of the retailer associated with the EDI config
        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 846 was generated and transmitted successfully for this
            config
        edi_transaction_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            UUID of the persisted EdiTransaction record. Present only on
            success.
        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 846 (e.g. missing item-master
            data). 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 EDI configs processed (succeeded + failed)
        succeeded:
          type: integer
          description: Number of EDI configs for which the 846 was sent successfully
        failed:
          type: integer
          description: Number of EDI configs for which the 846 failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````