---
title: "Upsert an order line item"
method: PUT
path: "/unstable/order-line-item"
tags: ["Order Line Item"]
---

# Upsert an order line item

`PUT /unstable/order-line-item`

## Request

- Base URL: `https://api.authentified.co`
- URL: `https://api.authentified.co/unstable/order-line-item`
- Auth: API key in header `X-Authentified-API-Key`

Upsert an order line item

## Request body

- object
  - `id` string, required: The Unique Identifier of the order in your system
  - `orderId` string, required: The Unique Identifier of the order this line item belongs to
  - `productId` string, required: The Unique Identifier of the product this line item refers to
  - `variantId` string, required: The Unique Identifier of the product variant this line item refers to
  - `price` number, required: The price of the line item
  - `quantity` number, required: The quantity of the product in this line item
  - `subTotal` number, required: The subtotal for this line item
  - `createdAt` string, date-time: The date and time when the order line item was created in your system
  - `updatedAt` string, date-time: The date and time when the order line item was updated in your system

## Response `200`

Order updated successfully

- object: Order updated successfully
  - `id` string, required: The Unique Identifier of the order in your system
  - `orderId` string, required: The Unique Identifier of the order this line item belongs to
  - `productId` string, required: The Unique Identifier of the product this line item refers to
  - `variantId` string, required: The Unique Identifier of the product variant this line item refers to
  - `price` number, required: The price of the line item
  - `quantity` number, required: The quantity of the product in this line item
  - `subTotal` number, required: The subtotal for this line item
  - `createdAt` string, date-time: The date and time when the order line item was created in your system
  - `updatedAt` string, date-time: The date and time when the order line item was updated in your system

## Other responses

- `201`: Order created successfully
- `400`: Bad Request - Invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - API key does not have access to this resource

---

[API](https://skmtc.dev/authentified/apis/authentified-rest-api.md) - [All operations](https://skmtc.dev/authentified/apis/authentified-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/authentified/apis/authentified-rest-api/revisions/1c72a50690bf?raw)
