Channel API: orders (service lines) [beta]
About this article
This article describes what service lines are and how to create 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.
Service lines are purely informational for the merchant – they do not trigger any automated actions on ChannelEngine. Their purpose is to give the merchant an accurate picture of the financial breakdown of the order for accounting and reconciliation.
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 in the order and/or the order line object, using the POST method.
"OrderServiceLines":
[
{
"Type": "DISCOUNT",
"OriginalAmountInclTax": 0,
"Description": "string"
}
]Field descriptions
| Field | Type | Description |
Type |
Enum |
The type of financial adjustment. Allowed values:
|
OriginalAmountInclTax |
Decimal | The amount of the adjustment, including tax, in the order currency. Use a negative value for discounts and a positive value for surcharges. ChannelEngine calculates the tax and converts the amount to your tenant's currency. |
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 OriginalAmountInclTax 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.