comecerodocs

Get the invoice shipping item

GET
/invoices/{invoice_id}/shipping_item

Returns the shipping line of an invoice. Returns 404 when the invoice has no shipping. Takes a secret, trusted or limited token. A limited token must be bound to the invoice and cannot see a draft.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

invoice_id*string

The invoice id.

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.

show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Response Body

The shipping item.

application/json
  1. response

A line on an invoice. It is either a product from your catalog (it has a product_id) or a custom item you describe on the invoice itself (no product_id). Money fields are in the invoice currency unless the field name starts with settlement_.

object?"invoice_item"

The object type. Always invoice_item.

Value in"invoice_item"
url?string

The full URL of this item.

Formaturi
item_id?string

The item id. For a product it is the product_id. For a custom item it is the id you supplied, or a number Comecero assigns (1, 2 and so on).

invoice_id?string

The invoice this item belongs to.

cross_sell_id?|

The cross-sell promotion that added this item, if any.

up_sell_id?|

The up-sell promotion that added this item, if any.

bundle_id?|

When this item comes from a bundle product, the bundle's product_id.

bundle_group_id?|

Shared by the bundle's own item and every item it expands into. Items in a bundle group cannot be changed one at a time: delete any one of them to remove the whole group, then add the bundle again.

date_created?string

When the item was added.

Formatdate-time
date_modified?string

When the item was last changed.

Formatdate-time
product_id?|

The product this item is for, or null for a custom item.

name?string

The item name. For a product it is the product name.

type?string

The item type. shipping only on the shipping line (Get the invoice shipping item).

Value in"digital""physical""service""bundle""shipping"
quantity?number

The quantity. Invoices allow decimal quantities with up to 8 decimal places.

currency?string

The invoice currency, a three-letter ISO 4217 code.

price?number

The unit price after discounts, in the invoice currency.

price_original?number

The unit price before discounts, in the invoice currency.

reference_price?|

The price you set for this item, in reference_currency. Comecero converts it to the invoice currency to get price. Null when the product's own price is used. Not returned to limited tokens.

reference_currency?|

The currency of reference_price. Not returned to limited tokens.

subtotal?number

price times quantity, in the invoice currency.

subtotal_original?number

price_original times quantity, in the invoice currency.

discount?number

The discount on one unit, in the invoice currency.

discount_percent?number

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

tax?number

The tax on this line after discounts, in the invoice currency.

tax_original?number

The tax on this line before discounts, in the invoice currency.

total?number

subtotal plus tax, in the invoice currency.

total_original?number

subtotal_original plus tax_original, in the invoice currency.

tax_rate?number

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

tax_code?|

The tax code used to work out tax. Not returned to limited tokens.

settlement_currency?string

The currency you are paid out in. This and the other settlement_ fields are not returned to limited tokens.

settlement_price?number

price in the settlement currency.

settlement_price_original?number

price_original in the settlement currency.

settlement_subtotal?number

subtotal in the settlement currency.

settlement_subtotal_original?number

subtotal_original in the settlement currency.

settlement_discount?number

discount in the settlement currency.

settlement_tax?number

tax in the settlement currency.

settlement_tax_original?number

tax_original in the settlement currency.

settlement_total?number

total in the settlement currency.

settlement_total_original?number

total_original in the settlement currency.

product?||

A link to the product, or the product itself when you expand product. Null for a custom item. Left out when the token may not read products.

subscription_plan?||

A link to the subscription plan, or the plan itself when you expand subscription_plan. Null when the item is not a subscription. Paying the invoice starts the subscription.

subscription_terms?||

For a subscription item, a link to its terms (price, billing interval, trial), or the terms themselves when you expand subscription_terms. Null otherwise.

meta?|

Your own data for this item, up to 2,048 characters as JSON.

formatted?

Only when you send formatted=true. The money, percent and date fields above as display text.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/invoices/string/shipping_item'
Example Response
{  "object": "invoice_item",  "url": "https://api.comecero.com/api/v1/invoices/4827-KTPMW-639/items/2",  "item_id": "2",  "invoice_id": "4827-KTPMW-639",  "product_id": null,  "name": "Standard Shipping",  "type": "shipping",  "quantity": 1,  "currency": "USD",  "price": 5,  "price_original": 5,  "subtotal": 5,  "discount": 0,  "tax": 0,  "total": 5,  "product": null,  "subscription_plan": null,  "subscription_terms": null,  "meta": null}