# v2-reportOrderActions - Log order action results and errors

Description

Use this API to report to Connect the results of actions performed on orders in your system, such as synchronizing  back orders. This enables enhanced error tracking while providing a centralized view of all  order actions and errors within the Connect interface.

We recommend integrating this API when developing a connector, such as for a CMS, to ensure comprehensive tracking  of order actions and errors. This integration is optional if you process orders directly via the Connect API without using a connector.



Call Frequency

Recommended usage: Every 5 minutes
Maximum usage: Once per minute

Endpoint: POST /v2/orders/actions
Security: Bearer

## Request fields (application/json):

  - `actions` (array, required)
    List of actions to report

  - `actions.entity_id` (string, required)
    Unique entity identifier used by Mirakl Connect.

  - `actions.entity_type` (string, required)
    Enum: "ORDER"

  - `actions.errors` (array)
    List of errors encountered during action execution. Should not be null if the status is FAILED.

  - `actions.errors.code` (string, required)
    Enum: "INVALID_INPUT", "DATA_NOT_FOUND", "UNEXPECTED", "UNAVAILABLE", "TOO_MANY_REQUEST", "ACTION_NOT_SUPPORTED", "ORDER_IN_WRONG_STATE", "INVALID_PRODUCT_ID", "OUT_OF_STOCK", "RETURN_IN_WRONG_STATE", "OTHER"

  - `actions.errors.message` (string, required)
    Human-readable error message

  - `actions.executed_at` (string, required)
    Date and time of the action in ISO 8601 format (UTC/Zulu time).

  - `actions.status` (string, required)
    Enum: "FAILED", "SUCCESS"

  - `actions.type` (string, required)
    Enum: "SYNCHRONIZE_ORDER", "SYNCHRONIZE_ORDER_UPDATE"

## Response 200 fields (application/json):

  - `actions` (array, required)
    List of created actions ids

  - `actions.action_id` (string, required)
    The unique identifier for the action.

## Response 400 fields (application/json):

  - `code` (string, required)
    Error code (immutable)

  - `errors` (array)

  - `errors.extensions` (object)
    Free map where you find additional context data to better describe the error

  - `errors.field` (string)
    JsonPath to the field where the error occurred

  - `errors.message` (string, required)
    Literal string error item description (Please do not base your error handling on this field since it is subject to change)

  - `extensions` (object)
    Free map where you find additional context data to better describe the error

  - `message` (string, required)
    Literal string error description (Please do not base your error handling on this field since it is subject to change)


