comecerodocs

Update an order item

POST
/orders/{order_id}/items/{item_id}

Changes fulfilled or meta on one line of an order. Use it to mark a digital or service item delivered when you fulfil it yourself. When the last open item is marked fulfilled, the order becomes fulfilled, any pending (authorized) payment is captured (money moves) and the order:fulfilled event fires. For physical goods, create a shipment instead: it marks items fulfilled for you.

Needs a secret or trusted token. Limited tokens get 403.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

order_id*string

The order id.

item_id*string

The item id within the order.

Query Parameters

expand?string

Comma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.

Request Body

application/json
  1. body

The fields you may change on an order item. Every other field is read-only and is ignored.

fulfilled?boolean

Set to true to mark the item fulfilled. When this makes every item on the order fulfilled, the order is marked fulfilled, any pending (authorized) payment is captured and the order:fulfilled event fires. Set to false to mark the item, and so the order, not fulfilled.

meta?||

Your own data for this item, a string or an object. At most 2048 characters once serialized.

Response Body

The updated order item.

application/json
  1. response

One line on an order. Copied from the cart or invoice item when the order was created. Fields marked "not for limited tokens" are left out when a limited token reads the order.

object*"order_item"

The object type. Always order_item.

Value in"order_item"
url*string

The full URL of this item.

Formaturi
item_id*string

The id of the item within the order.

cross_sell_id?|

The cross-sell offer this item was added from, if any.

up_sell_id?|

The up-sell offer this item was added from, if any.

bundle_id?|

The product_id of the bundle this item came from. Set on the bundle's own line and on each line inside it.

bundle_group_id?|

The id shared by every line produced by one bundle.

date_created*string

When the item was created.

Formatdate-time
date_modified*string

When the item was last changed.

Formatdate-time
product_id?|

The product this item is for.

order_id*string

The order this item belongs to.

name*string

The product name at the time of sale.

type*string

The product type.

Value in"digital""physical""service""bundle"
quantity*number

The quantity ordered. Can be a decimal.

currency*string

The currency of the item, always the order currency (ISO 4217).

price*number

The unit price after discounts, in the order currency.

price_original*number

The unit price before discounts, in the order currency.

reference_price?|

The price in the reference currency that the order price was worked out from. Not for limited tokens.

reference_currency?|

The currency of reference_price. Not for limited tokens.

subtotal*number

price times quantity, without tax, in the order currency.

subtotal_original*number

price_original times quantity, without tax, in the order currency.

discount*number

The discount per unit, in the order currency.

discount_percent*number

The discount as a fraction of price_original, for example 0.1 for 10%.

tax*number

The tax on this item after discounts, in the order currency.

tax_original*number

The tax on this item before discounts, in the order currency.

total*number

subtotal plus tax, in the order currency.

total_original*number

subtotal_original plus tax_original, in the order currency.

tax_rate*number

The tax rate as a decimal, for example 0.2 for 20%.

tax_code?|

The tax code of the product. Not for limited tokens.

settlement_currency?string

The currency the money settles to your account in. Not for limited tokens.

settlement_price?number

price in the settlement currency. Not for limited tokens.

settlement_price_original?number

price_original in the settlement currency. Not for limited tokens.

settlement_subtotal?number

subtotal in the settlement currency. Not for limited tokens.

settlement_subtotal_original?number

subtotal_original in the settlement currency. Not for limited tokens.

settlement_discount?number

discount in the settlement currency. Not for limited tokens.

settlement_tax?number

tax in the settlement currency. Not for limited tokens.

settlement_tax_original?number

tax_original in the settlement currency. Not for limited tokens.

settlement_total?number

total in the settlement currency. Not for limited tokens.

settlement_total_original?number

total_original in the settlement currency. Not for limited tokens.

fulfilled*boolean

True when every unit of this item has shipped or was marked fulfilled.

product?||

A link to the product, or the product when you send expand=product. Null when the item has no product.

subscription?||

A link to the subscription this item started or renewed, or the subscription when expanded. Null when the item is not a subscription.

subscription_terms?||

For subscription items, a link to the subscription terms, or the terms when you send expand=subscription_terms. Null otherwise.

shipments?|array<>

A link to the shipments that contain this item, or the shipments when you send expand=items.shipments on a single order or item.

license?||

A link to the license key given for this item, or the license when expanded. Null when the item has no license.

license_pending?boolean

Present and true only when the item should get a license key but has not got one yet.

download?||

A link to the download for this item, or the download when expanded. Null when the item has no download.

meta*||

Your own data for this item, copied from the cart or invoice item. A string or an object.

formatted?

The amounts and dates as display text. Only present when you send formatted=true.

Example Request
curl -X POST 'https://api.comecero.com/api/v1/orders/string/items/string' \  -H 'Content-Type: application/json' \  -d '{  "fulfilled": true}'
Example Response
{  "object": "order_item",  "url": "https://api.comecero.com/api/v1/orders/7393-GMRFY-954/items/1",  "item_id": "1",  "cross_sell_id": null,  "up_sell_id": null,  "bundle_id": null,  "bundle_group_id": null,  "date_created": "2026-11-02T16:46:16Z",  "date_modified": "2026-11-02T16:46:16Z",  "product_id": "pdf-pro.test",  "order_id": "7393-GMRFY-954",  "name": "PDF Viewer Pro",  "type": "digital",  "quantity": 1,  "currency": "USD",  "price": 49.95,  "price_original": 49.95,  "reference_price": 49.95,  "reference_currency": "USD",  "subtotal": 49.95,  "subtotal_original": 49.95,  "discount": 0,  "discount_percent": 0,  "tax": 0,  "tax_original": 0,  "total": 49.95,  "total_original": 49.95,  "tax_rate": 0,  "tax_code": null,  "settlement_currency": "USD",  "settlement_price": 49.95,  "settlement_price_original": 49.95,  "settlement_subtotal": 49.95,  "settlement_subtotal_original": 49.95,  "settlement_discount": 0,  "settlement_tax": 0,  "settlement_tax_original": 0,  "settlement_total": 49.95,  "settlement_total_original": 49.95,  "fulfilled": true,  "product": "https://api.comecero.com/api/v1/products/pdf-pro.test",  "subscription": null,  "subscription_terms": null,  "shipments": "https://api.comecero.com/api/v1/orders/7393-GMRFY-954/items/1/shipments",  "license": null,  "download": "https://api.comecero.com/api/v1/downloads/0093717990011DlR4kQp2a",  "meta": null}