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

# Update order line statuses

## Definition

Request a status update for an `order-line` : the request will be sent to the marketplace and processed before the status of the `order-line` is actually update to reflect that request.

> [!WARNING]
>
> **Important:** Status updates are ***asynchronous processes*** that require a validation from an external Marketplace system. Therefore, a successful response from these endpoints does NOT mean that the action itself was accepted by the Marketplace.
>
> To verify the state of status update on a given order-line, you should use the `/merchant/orders/lines/status` endoint.

> [!NOTE]
>
> **Note:** Every Marketplace has its own logic, workflow, and constraints in terms of order management. *Example:* not every marketplace allows the merchant to confirm order lines, other do not allow partial cancelation.\
> In practice, you should design your integration to the Neteven Order API in a way that permits Marketplace specific workflows.

## Endpoints

### Confirm order lines

| `PATCH` | `/merchant/orders/``{order-id}``/lines/``{order-line-id}``/confirm` |
| - | - |
| **Description** | Request to *confirm* an order line, which means confirming to the Marketplace/customer that you will fulfill this specific order line. |
| **Required scope** | `order_manager` |
| **Path parameters** | **-** `order-id`: Neteven identifier for the order object **-** `order-line-id`: Neteven identifier for the order line object |
| **Returns** | a status message from the API for that specific request. |

> [!NOTE]
>
> Via the Neteven user interface, you can configure automatic confirmation/cancelation: this means that Neteven will confirm or cancel order lines as they are created based on their stock value.

***

### Cancel order lines

| `PATCH` | `/merchant/orders/``{order-id}``/lines/``{order-line-id}``/cancel` |
| - | - |
| **Description** | Request to *cancel* an order line, which means indicating to the Marketplace/customer that you will NOT fulfill this specific order line. |
| **Required scope** | `order_manager` |
| **Path parameters** | **-** `order-id`: Neteven identifier for the order object **-** `order-line-id`: Neteven identifier for the order line object |
| **Returns** | a status message from the API for that specific request. |

***

### Ship order lines

| `PATCH` | `/merchant/orders/``{order-id}``/lines/``{order-line-id}``/ship` |
| - | - |
| **Description** | Confirm to the Marketplace/client that the order line was shipped, including tracking information if required. |
| **Required scope** | `order_manager` |
| **Path parameters** | **-** `order-id`: Neteven identifier for the order object **-** `order-line-id`: Neteven identifier for the order line object |
| **Returns** | a status message from the API for that specific request. |

***

### Refund order lines

| `PATCH` | `/merchant/orders/``{order-id}``/lines/``{order-line-id}``/refund` |
| - | - |
| **Description** | Ask the Marketplace to refund the client for that the order line, usually indicating the amount to refund. This endpoint is after issues during the delivery process or after a customer return. |
| **Required scope** | `order_manager` |
| **Path parameters** | **-** `order-id`: Neteven identifier for the order object **-** `order-line-id`: Neteven identifier for the order line object |
| **Returns** | a status message from the API for that specific request. |

***

## Endpoint specific errors

#### Action already submitted

**Response HTTP Header code :** `409`

**Cause:** You are trying to update an order line for which an update request is already pending (awaiting handshake from the Marketplace to Neteven).

**Actionable:** Do not resubmit the request. If you want to ensure that the status update sent went through to the Marketplace (which all have various handling times), call the `GET /order/lines/status` endpoint to verify the state of the current request.

**Example:**

> \{\
> "message": "A pending \{TASK-NAME: OneOf\[confirm, cancel, ship, refund]} task already exists on this order\_line\_id: \{order\_line\_id}",\
> "code": 409,\
> "title": "Conflict"\
> }

***

## API reference

*more information on parameters, responses and content in the* [API Reference](https://doc-neteven.mylectra.com/merchant-api/api-reference.md)


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