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 are available to consume via the Merchant API 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 | A unique identifier for the service line entry. Distinguishes it from other service lines. |
| Type | Enum |
Specifies the type of service. Allowed values:
|
| TypeId | Integer | A reference ID for the specific type of service (e.g.: a discount code, shipping method ID). |
| OriginalPriceInclVat | Decimal | The original price of the service line, including VAT, before any currency conversion adjustments. |
| OriginalPriceExclVat | Decimal | The original price of the service line, excluding VAT, before any currency conversion adjustments. |
| OriginalAmountTax | Decimal | The original tax amount associated with the service line, based on the original price and tax rate. |
| PriceInclVat | Decimal | The price of the service line, including VAT, after any currency conversion adjustments. |
| PriceExclVat | Decimal | The price of the service line, excluding VAT, after any currency conversion adjustments. |
| LineVat | Decimal | The tax amount for the service line, after any currency conversion adjustments. |
| VatRate | Decimal (percentage) | The VAT rate applied to the service line (e.g. 21 for 21% VAT). |
| Description | String | A readable description of the service line, such as "10% discount", "Express shipping", or "WEEE fee". |
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.