# v2-acceptOrderLines - Accept or refuse order lines

Description

Use this API to accept or refuse order lines that are in the AWAITING_ACCEPTANCE status, from Mirakl Connect. The API also synchronizes the order line status on the sales channel.


Call Frequency

Recommended usage: On each new order
Maximum usage: On each new order

Endpoint: PUT /v2/orders/{order_id}/accept
Security: Bearer

## Path parameters:

  - `order_id` (string, required)
    Order identifier in Mirakl Connect
    Example: "0024_COMMERCIAL_ID-A"

## Request fields (application/json):

  - `order_lines` (array, required)
    Information about ordered products

  - `order_lines.accepted` (boolean, required)
    Indicates if an order line is accepted (true) or refused (false).

  - `order_lines.id` (string, required)
    Unique order line identifier used by Mirakl Connect. This identifier can be used as a primary key, but it must not be shared with final users.

## Response 202 fields (application/json):

  - `action_id` (string, required)
    The unique identifier for the asynchronous action. It should be used with the [v2-getActionStatus API](#operation/v2-getActionStatus) to retrieve current action status and potential errors.

  - `tracking_id` (string)
    Deprecated: This field was previously used to obtain the action ID. It has been replaced by action_id and contains the same value. It is retained for backward compatibility.

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

## Response 404 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)


