# Public Orders Acknowledge

Report the ERP import outcome for one order.
The partner POSTs `status` (`SUCCESS` / `FAILED`), optionally an
`external_id` (its own order/record id) and `metadata`, and a
`message` (required on `FAILED` as the reason, optional on `SUCCESS`
as a free-text note). Idempotent and latest-wins: a later acknowledgement
overwrites the earlier one. When supplied, `external_id` is also written
back to the order's `erp_offer_id`. Returns the recorded acknowledgement
(status, sticky-aware external_id, message, metadata, acknowledged_at) —
the same shape as the `acknowledgement` field on `PublicOrderOut`, not
the whole order. Recording-only: it does not alter the order's workflow
status or re-trigger any export.

Endpoint: POST /orders/{order_id}/acknowledgements
Version: 1.79.2

## Path parameters:

  - `order_id` (string, required)

## Header parameters:

  - `authorization` (string | null)
    Bearer <mrc_live_…> API key

## Request fields (application/json):

  - `status` (string, required)
    Outcome a partner reports after importing an order into their ERP.
Its own type (parallel to `PublicTenderAckStatus` / the deprecated
`PublicOfferAckStatus`) so the orders surface stays self-contained.
Translated from the internal `RequestAckStatus` via
`orders.service._ORDER_ACK_STATUS_MAP` — a test asserts the map covers
every internal value, so a new internal state is a loud failure rather than
a silent passthrough. A *separate axis* from `PublicOrderStatus`: that is
Mercura-side workflow, this is the partner's import result.
    Enum: "SUCCESS", "FAILED"

  - `external_id` (string | null)
    Partner-side ERP id of the created order / record. Typically set on SUCCESS.

  - `message` (string | null)
    Free-text note about the outcome. Required when `status` is `FAILED` (the failure reason); optional on `SUCCESS`.

  - `metadata` (object | null)
    Optional extra references / raw payload echoed back for traceability (e.g. other ERP ids).

## Response 200:

  - `200` (unknown)
    Successful Response

## Response 200 fields (application/json):

  - `status` (string, required)
    Outcome a partner reports after importing an order into their ERP.
Its own type (parallel to `PublicTenderAckStatus` / the deprecated
`PublicOfferAckStatus`) so the orders surface stays self-contained.
Translated from the internal `RequestAckStatus` via
`orders.service._ORDER_ACK_STATUS_MAP` — a test asserts the map covers
every internal value, so a new internal state is a loud failure rather than
a silent passthrough. A *separate axis* from `PublicOrderStatus`: that is
Mercura-side workflow, this is the partner's import result.
    Enum: "SUCCESS", "FAILED"

  - `external_id` (string | null)
    Partner-side ERP id of the created order / record, when provided.

  - `message` (string | null)
    Free-text note about the outcome. On `FAILED` this is the failure reason (required); on `SUCCESS` an optional note (e.g. queue id, warehouse, operator comment).

  - `metadata` (object | null)
    Optional extra references / raw payload the partner echoed back for traceability.

  - `acknowledged_at` (string, required)
    When the partner reported this outcome (server receipt time).

## Response 400:

  - `400` (unknown)
    Validation failed (e.g. FAILED without message)

## Response 404:

  - `404` (unknown)
    Order not found

## Response 422:

  - `422` (unknown)
    Validation Error

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array, required)

  - `detail.msg` (string, required)

  - `detail.type` (string, required)

  - `detail.input` (any)

  - `detail.ctx` (object)

