Merchant API: orders (service lines) [beta]
About this article
This article describes what service lines are and how to retrieve them via the Merchant API.
Table of contents
Introduction
Orders frequently arrive on ChannelEngine with structured information that impacts the total price, including discounts, shipping, and service fees. These pieces of structured information are called service lines. Service lines are applied at either or both:
Order level
Order line level
Service lines represent non-product financial adjustments on an order — such as a discount, gift wrap charge, or rounding correction. They appear in two places in the response: at order level (ServiceLines on the order object) and at line level (ServiceLines inside each order line). Order-level service lines apply to the whole order; line-level service lines apply to that specific product line.
Service lines are available to consume via the Merchant API for merchants that participate in the closed beta program and do not appear on the order in the ChannelEngine web interface.
Available API endpoints
Service lines appear in the response body of the following API calls, via the Merchant API:
Retrieve merchant-fulfilled orders:
GET /v2/orders/newRetrieve marketplace-fulfilled and mixed orders:
GET /v2/orders
Response body
The service lines are returned with the GET order request, within the extra data of the order and/or the order line.
"ServiceLines": [{
"Id": 0
"Type": [DISCOUNT, SHIPPING_COST, GIFT_WRAP, SERVICE_FEE, ROUNDING_DIFFERENCE]
"TypeId": 0
"OrginalPriceInclVat": 0
"OrginalPriceExclVat": 0,
"OriginalLineVat": 0
"PriceInclVat": 0
"PriceExclVat": 0,
"LineVat": 0
"VatRate": 0
"Description": "string"
}]
Field descriptions
| Field | Type | Description |
Id |
integer | ChannelEngine's internal identifier for this service line. |
Type |
enum | The type of adjustment this service line represents: DISCOUNT — a price reduction applied by the channel or a promotion; SHIPPING_COST — a shipping surcharge or adjustment; GIFT_WRAP — a gift wrapping fee; SERVICE_FEE — a generic service fee charged by the channel; ROUNDING_DIFFERENCE — a small rounding correction to reconcile totals. |
AmountInclTax |
number | The adjustment amount including tax, in your shop's base currency. |
AmountTax |
number | The tax component of the adjustment, in your shop's base currency. |
TaxRate |
number | The tax rate applied to this service line, as a percentage. |
OriginalAmountInclTax |
number | The adjustment amount including tax, in the marketplace's original currency. |
OriginalAmountTax |
number | The tax component, in the marketplace's original currency. |
Description |
string | A free-text description of the service line, if provided by the channel. |
AmountInclTax value. When summing order totals for reconciliation, include these amounts — a DISCOUNT service line reduces the effective order value.
Service line types
The table below describes the allowed values in the Type field.
| Type | Purpose |
| DISCOUNT | A discount that is applied to the order or order line. |
| SHIPPING_COST | Shipping fees or adjustments, including discounts. |
| GIFT_WRAP | Costs associated with gift wrapping. |
| SERVICE_FEE | Additional service fees, such as installation or regulatory fees (e.g.: WEEE). |
| ROUNDING_DIFFERENCE | Adjustments for small discrepancies due to rounding when splitting amounts. |
Bundles
ChannelEngine does not copy service lines from the bundle order line to the part order lines. In this way, the order total remains correct; any discounts that are applied to the bundle remain on the entire bundle.
Comments
0 comments
Please sign in to leave a comment.