Channel API: orders (service lines) [beta]
About this article
This article describes what service lines are and how to retrieve them via the Channel API.
Table of contents
Introduction
Send ChannelEngine structured information from your channel that impacts the total price of a given order, 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 - in the top-level
OrderServiceLinesarray. These apply to the entire order, e.g.: a voucher that reduces the total basket value.Order line level - in each order line's own
OrderServiceLinesarray. These apply to a specific product in the order, e.g.: a promotional discount on one item.
Service lines are sent from your channel to ChannelEngine via the Channel API and must follow a specific format in your API request to ChannelEngine.
Available API endpoints
Send service lines in the request body of the v2/orders endpoint, via the Channel API:
Send merchant-fulfilled and mixed orders:
POST/v2/ordersSend channel-fulfilled orders:
POST/v2/orders/channel-fulfilled
Request body
Send the service lines within the extra data of the order and/or the order line, using the POST method.
"OrderServiceLines":
[
{
"Type": "DISCOUNT",
"OriginalAmountInclTax": 0
"OriginalAmountTax": 0,
"AmountInclTax": 0
"AmountTax": 0,
"TaxRate": 0,
"Description": "string"
}
]Field descriptions
| Field | Type | Description |
Type |
Enum |
The type of financial adjustment. Allowed values:
|
OriginalAmountInclTax |
Decimal | The amount before this adjustment was applied. Useful for showing the buyer what they saved. |
OriginalAmountTax |
Decimal | The tax portion of OriginalAmountInclTax. |
AmountInclTax |
Decimal | The amount of the adjustment, including tax. Use a negative value for discounts and a positive value for surcharges. |
AmountTax |
Decimal | The tax portion of AmountInclTax. |
TaxRate |
Decimal (percentage) | The applicable tax rate as a percentage, e.g.: 21 for 21% VAT. |
Description |
String | A readable description of the service line, such as 10% discount, Express shipping, or WEEE fee. Shown to the merchant in their order details. |
Service line types
The table below describes the allowed values in the Type field.
| Type | Purpose |
DISCOUNT |
A price reduction — voucher code, sale discount, or promotional offer. Send AmountInclTax as a negative value. |
SHIPPING_COST |
An alternative way to pass shipping costs as a service line rather than using the top-level ShippingCostsInclVat field. Use one or the other, not both. |
GIFT_WRAP |
A gift wrapping fee the buyer selected at checkout. |
SERVICE_FEE |
A marketplace or platform fee — for example, a commission or handling charge. |
ROUNDING_DIFFERENCE |
A small adjustment to correct for rounding differences between the sum of individual line amounts and the total order value. |
Product 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
Article is closed for comments.