Remove a line item from an order
Returns the updated order (200), not 204, so the caller sees the new totals immediately.
DELETE
/orders/{order_id}/items/{id}Authorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
order_idstringrequiredidintegerrequiredOrder item (line item) ID
Responses
200Updated order
_linksHalLinksidintegershop_idintegercodestringOrder code, used as the path identifier (e.g. `/v2/orders/{code}`)
external_idstring | nullOptional client-supplied reference, unique per seller. Set it at
create time (or via update) to look the order back up later with
`GET /v2/orders?external_id={value}` — unlike `id`/`code`, a
colliding `external_id` is rejected with a 422 instead of being
silently reassigned, so it's safe to use for dedup checks before
retrying a create.
statusstringAllowed:
draftcheckoutin_reviewpendingcancelledclosedcompletedfulfillment_statusstringAllowed:
nonequeuedpreparingreadyshippeddeliveredreturnedcheckout_urlstringPresent only when the order is in `checkout` or `pending` status
archivedbooleancurrency_codestringprices_include_taxbooleanitems_net_totalintegerLine items subtotal in cents, before discounts
items_discount_totalintegeritems_totalintegerLine items subtotal in cents, after discounts
net_totalintegerOrder total in cents before tax
discount_totalintegercart_totalintegersurcharge_totalintegershipping_totalintegershipping_discountintegershipping_minus_discountintegertax_ratenumberPresent only when `prices_include_tax` is false
tax_totalintegerPresent only when `prices_include_tax` is false
totalintegerGrand total in cents, including shipping, discounts and tax
total_paidintegertotal_refundedintegermax_refundable_amountintegerpartial_payment_offeredbooleanWhether this order is eligible for buyer-chosen partial payment: either the shop has it enabled for everyone, or this specific order was offered it via the API (`partial_payment_offered: true` on create/update). Either way, the order must not require review and any configured cart requirements must be met. Normally also requires a token-based payment method to exist, so the balance can be auto-charged later - unless the shop allows manual (non-token) payment methods for this, in which case the balance is instead collected via a reminder email. Only present when fetching a single order, not in list results.
paying_partiallybooleanWhether the buyer opted into a partial payment for this order.
partial_payment_percentageintegerPercentage of the total charged upfront. Only present when `paying_partially` is true.
partial_payment_amountnumberAmount charged upfront, in cents. Only present when fetching a single order, and only when partial payment is offered or active.
partial_payment_due_onstring<date>Date the remaining balance is due. Only present when `paying_partially` is true.
shipping_descriptionstringtracking_codestringcourier_namestringpayment_infoobjectPresent only when the order has an associated payment method.
Show propertiesHide properties
idintegernamestringtypestringPayment method type/gateway identifier (e.g. `webpay_rest`, `mercado_pago`).
dataobjectGateway-specific transaction data, shape varies by `type`.
requested_document_typestringTax document type requested by the buyer at checkout (e.g. `invoice`, `receipt`), if any. Derived from custom order data, not a plain column.
tagsstring[]tag_idsinteger[]allowed_statusesstring[]allowed_fulfillment_statusesstring[]created_onstring<date-time>updated_onstring<date-time>checkout_onstring<date-time> | nullpending_onstring<date-time> | nullclosed_onstring<date-time> | nullshipped_onstring<date-time> | null_embeddedobject`contact` is present when the order has a customer attached. `company` is present when a company/tax entity is attached (e.g. via `company_name` on create/update). `address`/`billing_address` are present when set. `line_items` is always present. `payments`/`refunds`/`documents` are present only when non-empty.
Show propertiesHide properties
contactobjectShow propertiesHide properties
idintegernamestringemailstringphone_numberstringcompanyobjectShow propertiesHide properties
idintegernamestringid_numberstringFormatted tax/ID number (RUT, DNI, etc.)
activity_codestringaddressAddressShow propertiesHide properties
streetstringstreet_2stringlocality_namestringregion_namestringcountry_namestringpostal_codestringaddressAddressShow propertiesHide properties
streetstringstreet_2stringlocality_namestringregion_namestringcountry_namestringpostal_codestringbilling_addressAddressShow propertiesHide properties
streetstringstreet_2stringlocality_namestringregion_namestringcountry_namestringpostal_codestringline_itemsobject[]Show propertiesHide properties
Array of
objectidintegerproduct_idintegerproduct_namestringvariant_idintegervariant_namestringvariant_skustringunitsintegerunit_priceintegerUnit price in cents
net_totalintegerLine total in cents before discounts
totalintegerLine total in cents after discounts/surcharges
paymentsOrderTransaction[]Show propertiesHide properties
Array of
OrderTransactionidintegerorder_idintegeramountintegerAmount in cents (negative for refunds)
absolute_amountintegerAbsolute value of `amount` in cents
successfulbooleancard_token_idintegerpayment_method_typestringtransaction_idstringGateway transaction ID
authorization_codestringdescriptionstringcreated_atstring<date-time>refundsOrderTransaction[]Show propertiesHide properties
Array of
OrderTransactionidintegerorder_idintegeramountintegerAmount in cents (negative for refunds)
absolute_amountintegerAbsolute value of `amount` in cents
successfulbooleancard_token_idintegerpayment_method_typestringtransaction_idstringGateway transaction ID
authorization_codestringdescriptionstringcreated_atstring<date-time>documentsOrderDocument[]Show propertiesHide properties
Array of
OrderDocumentidintegerdocument_typestringAllowed:
invoicereceiptdocument_numberstringfile_urlstringRequest
curl -X DELETE "https://api.onbolder.com/v2/orders/string/items/0" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.onbolder.com/v2/orders/string/items/0", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.delete(
"https://api.onbolder.com/v2/orders/string/items/0",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": 0,
"shop_id": 0,
"code": "string",
"external_id": "string",
"status": "draft",
"fulfillment_status": "none",
"checkout_url": "string",
"archived": true,
"currency_code": "string",
"prices_include_tax": true,
"items_net_total": 0,
"items_discount_total": 0,
"items_total": 0,
"net_total": 0,
"discount_total": 0,
"cart_total": 0,
"surcharge_total": 0,
"shipping_total": 0,
"shipping_discount": 0,
"shipping_minus_discount": 0,
"tax_rate": 0,
"tax_total": 0,
"total": 0,
"total_paid": 0,
"total_refunded": 0,
"max_refundable_amount": 0,
"partial_payment_offered": true,
"paying_partially": true,
"partial_payment_percentage": 0,
"partial_payment_amount": 0,
"partial_payment_due_on": "2019-08-24",
"shipping_description": "string",
"tracking_code": "string",
"courier_name": "string",
"payment_info": {
"id": 0,
"name": "string",
"type": "string",
"data": {}
},
"requested_document_type": "string",
"tags": [
"string"
],
"tag_ids": [
0
],
"allowed_statuses": [
"string"
],
"allowed_fulfillment_statuses": [
"string"
],
"created_on": "2019-08-24T14:15:22Z",
"updated_on": "2019-08-24T14:15:22Z",
"checkout_on": "2019-08-24T14:15:22Z",
"pending_on": "2019-08-24T14:15:22Z",
"closed_on": "2019-08-24T14:15:22Z",
"shipped_on": "2019-08-24T14:15:22Z",
"_embedded": {
"contact": {
"id": 0,
"name": "string",
"email": "string",
"phone_number": "string"
},
"company": {
"id": 0,
"name": "string",
"id_number": "string",
"activity_code": "string",
"address": {
"street": "string",
"street_2": "string",
"locality_name": "string",
"region_name": "string",
"country_name": "string",
"postal_code": "string"
}
},
"address": {
"street": "string",
"street_2": "string",
"locality_name": "string",
"region_name": "string",
"country_name": "string",
"postal_code": "string"
},
"billing_address": {
"street": "string",
"street_2": "string",
"locality_name": "string",
"region_name": "string",
"country_name": "string",
"postal_code": "string"
},
"line_items": [
{
"id": 0,
"product_id": 0,
"product_name": "string",
"variant_id": 0,
"variant_name": "string",
"variant_sku": "string",
"units": 0,
"unit_price": 0,
"net_total": 0,
"total": 0
}
],
"payments": [
{
"id": 0,
"order_id": 0,
"amount": 0,
"absolute_amount": 0,
"successful": true,
"card_token_id": 0,
"payment_method_type": "string",
"transaction_id": "string",
"authorization_code": "string",
"description": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"refunds": [
{
"id": 0,
"order_id": 0,
"amount": 0,
"absolute_amount": 0,
"successful": true,
"card_token_id": 0,
"payment_method_type": "string",
"transaction_id": "string",
"authorization_code": "string",
"description": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"documents": [
{
"id": 0,
"document_type": "invoice",
"document_number": "string",
"file_url": "string"
}
]
}
}