Download OpenAPI specification:Download
This API provides directs integration points with Comestri OMS to connect to websites, warehouse systems and sales ledgers.
For a website connectivity to Salesforce Commerce Cloud or to Adobe Commerce Cloud, a cartridge or extension is available, surfacing this same functionality in the platform's native environment.
Integrations for Product data are routed through the Comestri hub. The product schema passed between the Comestri PIM and Comestri OMS are included in this document for reference.
This document is published at https://comestrioms.redoc.ly, which will be updated from time to time with clarifications, additional examples or further detail. If any material changes are required during final development and testing of the API, a new document will be provided, including an analysis of any changes against this draft.
List the stores in which the item(s) are available to collect, within the same country of the customer's location. List of stores returned is order starts from closest, at most 25 stores will be returned by default which suffice for most situation.
For inputting list of line items in the query, there are two ways of constructing the URL query, for example, assume the list of line times are prod01 x2 and prod02 x3, then the request URL could be:
.../store-availability?country_code=au&postcode=2025&channel=tmall&web_sku_ids=prod01&quantities=2&web_sku_ids=prod02&quantities=3
or.../store-availability?country_code=au&postcode=2025&channel=tmall&web_sku_ids=prod01,prod02&quantities=3,2
Along with country_code
, one of the following is required to denote the approximate destination:
postcode
postal_area
latitude
with longitude
country_code required | string <ISO 3166-1 alpha-2 codes> <= 2 characters The country code of the destination. Example: country_code=AU |
postcode | string <= 4 characters The postal code of the destination. This parameter should be used along with Example: postcode=4000 |
postal_area | string <= 4 characters The postal area of the destination. This parameter should be used along with Example: postal_area=Central |
latitude | number The latitude coordinate of the approximate destination of the order. Example: latitude=-33.865143 |
longitude | number The longitude coordinate of the approximate destination of the order. Example: longitude=151.2099 |
transfer_policy | string (TransferPolicy)
|
channel | string Sales channel for order, such as a marketplace. If this field is provided, the fulfilment rule assigned to the sales channel will be chosen to determine the available stores. |
web_sku_ids required | string List of The primary identifier of the items in the order. Example: web_sku_ids=prod01 |
quantities required | number List of the quantities for the items in the order corresponding to the list provided in Example: quantities=3 |
max_stores | integer The maximum number of stores to be listed. Default 25 if not specified. |
au_postcode | string <= 4 characters Deprecated The approximate destination of the order denoted by a Australia Postal Code. Example: au_postcode=4000 |
nz_postcode | string <= 4 characters Deprecated The approximate destination of the order denoted by a New Zealand Postal Code. Example: nz_postcode=1010 |
{- "collection_options": [
- {
- "location": 4110,
- "location_name": "Epping Store",
- "location_details": {
- "latitude": "-33.865143",
- "longitude": "151.209900",
- "address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "phone": "0683617932",
- "opening_hours": [
- {
- "day": 1,
- "open_time": "09:00",
- "close_time": "17:00"
}
]
}, - "availability": "in-stock",
- "distance": 8,
- "delivery_cost": 5,
- "delivery_promise": "2016-04-27T08:00:00Z",
- "items_requiring_transfer": [
- {
- "web_sku_id": "121212",
- "quantity": 1
}
], - "unavailable_items": [
- {
- "web_sku_id": "121212",
- "quantity": 1
}
]
}
]
}
Determine the delivery options that may be offered to the customer for a particular set of items, and the fulfilment cost of each.
For inputting list of line items in the query, there are two ways of constructing the URL query, for example, assume the list of line times are prod01 x2 and prod02 x3, then the request URL could be:
.../delivery-options?country_code=au&postcode=2025&collection_store=332&channel=tmall &web_sku_ids=prod01&quantities=2&web_sku_ids=prod02&quantities=3
or.../delivery-options?country_code=au&postcode=2025&collection_store=332&channel=tmall &web_sku_ids=prod01,prod02&quantities=3,2
Along with country_code
, one of the following is required to denote the approximate destination:
postcode
postal_area
latitude
with longitude
country_code required | string <ISO 3166-1 alpha-2 codes> <= 2 characters The country code of the destination. Example: country_code=AU |
postcode | string <= 4 characters The postal code of the destination. This parameter should be used along with Example: postcode=4000 |
postal_area | string <= 4 characters The postal area of the destination. This parameter should be used along with Example: postal_area=Central |
latitude | number The latitude coordinate of the approximate destination of the order. Example: latitude=-33.865143 |
longitude | number The longitude coordinate of the approximate destination of the order. Example: longitude=151.2099 |
collection_store | string The location number (ERP ID) of a specific store to be considered for click-and-collect pricing; as configured in both the OMS and the Sales Channel (or as configured in the Comestri PIM and published to both) |
transfer_policy | string (TransferPolicy)
|
channel | string Sales channel for order, such as a marketplace. If this field is provided, the fulfilment rule assigned to the sales channel will be chosen to determine the available delivery options. |
web_sku_ids required | string List of The primary identifier of the items in the order. Example: web_sku_ids=prod01 |
quantities required | number List of the quantities for the items in the order corresponding to the list provided in Example: quantities=3 |
au_postcode | string <= 4 characters Deprecated The approximate destination of the order denoted by a Australia Postal Code. Example: au_postcode=4000 |
nz_postcode | string <= 4 characters Deprecated The approximate destination of the order denoted by a New Zealand Postal Code. Example: nz_postcode=1010 |
{- "shipping_options": [
- {
- "delivery_service": "express-shipping",
- "delivery_promise": "2016-04-27T08:00:00Z",
- "unavailable_items": [
- {
- "web_sku_id": "121212",
- "quantity": 1
}
], - "estimated_cost": 3.85,
- "expected_fulfilment_location": 992
}
], - "currency_of_costs": "AUD"
}
Before the customer proceeds to pay for an order, the website must use this API to verify that the selected items and delivery options can actually be fulfilled, to protect against oversell. If changes are made during the checkout process, the website may call the API again with updates.
If the delivery_service
is "standard-shipping"
, "express-shipping"
or "hand-delivery"
, one of the following is required to denote the approximate destination along with country_code
:
postcode
postal_area
latitude
and longitude
channel required | string The sales channel. |
id required | string Shopping basket, quote, or provisional order number. Example: 123123 |
required | object Courier Service options requested by the customer, which will be used by the OMS to select an appropriate courier and service. |
collection_location | string This is required if |
country_code required | string <ISO 3166-1 alpha-2 codes> <= 2 characters The country code of the destination. |
postcode | string <= 4 characters The postal code of the destination. This parameter should be used along with |
postal_area | string <= 4 characters Deprecated The postal area of the destination. This parameter should be used along with |
latitude | number The latitude of the approximate destination of the order. |
longitude | number The longitude of the approximate destination of the order. |
object The sales channel may place controls on the way that the order is fulfilled. | |
transfer_policy | string (TransferPolicy)
|
object Requests from the customer for specific packaging, or to include a gift message with the order. | |
required | Array of objects (SkuQty) The items in the basket. |
object Deprecated Customers may accumulate or redeem loyalty points associated with an order. | |
fulfilment_type | string Deprecated Whether the order will be shipped to a customer address, or prepared for customer collection. (If the customer wishes to ship some items, but collect other items, then two separate orders must be sent to the OMS.) |
au_postcode | string <= 4 characters Deprecated The approximate destination of the order denoted by a Australia Postal Code. |
nz_postcode | string <= 4 characters Deprecated The approximate destination of the order denoted by a New Zealand Postal Code. |
uk_postcode | string <= 8 characters Deprecated The approximate destination of the order denoted by a UK Postal Code. |
us_zipcode | string <= 5 characters Deprecated The approximate destination of the order denoted by a USA Zipcode. |
hk_district | string <= 2 characters Deprecated The approximate destination of the order denoted by a Hong Kong District (English). |
{- "shipping_options": {
- "delivery_service": "standard-shipping",
- "delivery_instruction": "leave with neighbour",
- "authority_to_leave": true,
- "signature_required": true
}, - "collection_location": "123231",
- "country_code": "AU",
- "postcode": "4000",
- "postal_area": null,
- "latitude": -33.865143,
- "longitude": 151.2099,
- "fulfilment_controls": {
- "dictated_fulfilment_location": "301249"
}, - "transfer_policy": "no-transfer",
- "packaging_options": {
- "packaging_type": "Red Gift Packaging",
- "gift_message": "Happy Birthday Dave!"
}, - "skus": [
- {
- "web_sku_id": "121212",
- "quantity": 1
}
], - "loyalty": {
- "loyalty_member_id": 1800259283,
- "loyalty_points_redeemed": 0,
- "loyalty_value_redeemed": 0,
- "customer_segment": "VIP"
}, - "fulfilment_type": null,
- "au_postcode": null,
- "nz_postcode": null,
- "uk_postcode": null,
- "us_zipcode": null,
- "hk_district": null
}
{- "unavailable_items": [
- {
- "web_sku_id": "121212",
- "quantity": 1
}
]
}
This API can be used for:
replaced_order
cannot be updated.fulfilment_controls
.hold_for_payment_review
from true to false.channel required | string <= 20 characters Sales channel for order, such as a marketplace. |
orderNumber required | string <= 64 characters Unique order number generated by eCommerce Platform. Example: 3402340 |
replaced_order | string <= 255 characters This indicates which shopping cart order this call will replace. This is required when a shopping cart order needs to be replaced with an actual order. |
required | object Customer Selection of the shipping options presented to them. |
object This is required if | |
collection_location | string <= 10 characters This is required if |
latitude | number [ -90 .. 90 ] This can be used together with |
longitude | number [ -180 .. 180 ] This can be used together with |
object The client may place controls on the way that the order is fulfilled based on their operational needs. | |
transfer_policy | string (TransferPolicy)
|
object Packaging options requested by the customer, which will be used by the OMS for pack instructions and printing gift messages. | |
currency | string <ISO-4217 3-digit alpha> This indicates the transaction currency of this order. If this is not provided, the client's default currency will be applied. |
required | Array of objects (SkuQtyInWeb) All line items involved in the order. SKUs can be adjusted from the order by calling this API again to reduce the SKU quantity or to remove a SKU, but no new SKUs can be added to the order. |
order_price required | number decimal places <= 2 < 1000000000 This is the total price of the order, including all line prices, line discounts, line taxes, order discounts, order taxes, shipping fee, shipping fee discount, shipping fee tax, and rounding adjustment. |
Array of objects (Discounts) Order-level discounts. This does not include | |
Array of objects (Taxes) Order-level taxes. This does not include | |
rounding_adjustment | number decimal places <= 2 < 1000000000 The amount charged to the customer for rounding purpose. A positive value means that this value was applied for rounding up, while a negative value means it was applied for rounding down. |
shipping_base_price_exc_tax | number decimal places <= 2 < 1000000000 This is the shipping fee charged on the order, excluding discount and tax. |
Array of objects (Discounts) Details of discounts for the shipping fee. | |
Array of objects (Taxes) Details of shipping taxes for the shipping fee. | |
Array of objects (TxTenderOnOrderIngestion) List of payments used to settle the order. | |
object Billing information of the customer. | |
object Customer's contact information. | |
object Customers may accumulate or redeem loyalty points associated with an order. | |
order_creation_time | string <time (ISO-8601 yyyy-MM-ddTHH:mm:ssZ)> Creation time of the order in UTC from the client. If this is not provided, the time of the initial call for this order number will be used. |
additional_info | string Additional info related to the order that can be later retrieved along with the order. |
{- "replaced_order": "1204846",
- "shipping_options": {
- "delivery_service": "standard-shipping",
- "delivery_instruction": "Leave with neighbour",
- "authority_to_leave": true,
- "signature_required": true
}, - "shipping_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "collection_location": "",
- "latitude": null,
- "longitude": null,
- "fulfilment_controls": {
- "hold_for_payment_review": false,
- "dictated_fulfilment_location": "301249"
}, - "transfer_policy": "no-transfer",
- "packaging_options": {
- "packaging_type": "Gift",
- "gift_message": "Happy birthday",
- "pack_instructions": "Insert Holiday Sale Flyer."
}, - "currency": "AUD",
- "skus": [
- {
- "web_sku_id": "121212",
- "line_quantity": 1,
- "line_base_price_exc_tax": 214.5,
- "line_discounts": [
- {
- "discount_amt": 10,
- "discount_title": "Summer Sale Promo 2021",
- "promo_code": "SUMMERSALE2021",
- "campaign_code": "CHRISTMAS2021",
- "reference_code": "4773474-3949-939",
- "coupon_code": "SUMMER2021-18002345"
}
], - "line_taxes": [
- {
- "tax_amt": 17.68,
- "tax_code": "gst"
}
], - "line_sequence_number": 345,
- "additional_info": "Staff ID: K00224"
}
], - "order_price": 257.54,
- "order_discounts": [
- {
- "discount_amt": 10,
- "discount_title": "Summer Sale Promo 2021",
- "promo_code": "SUMMERSALE2021",
- "campaign_code": "CHRISTMAS2021",
- "reference_code": "4773474-3949-939",
- "coupon_code": "SUMMER2021-18002345"
}
], - "order_taxes": [
- {
- "tax_amt": 17.68,
- "tax_code": "gst"
}
], - "rounding_adjustment": 0,
- "shipping_base_price_exc_tax": 20,
- "shipping_discounts": [
- {
- "discount_amt": 10,
- "discount_title": "Summer Sale Promo 2021",
- "promo_code": "SUMMERSALE2021",
- "campaign_code": "CHRISTMAS2021",
- "reference_code": "4773474-3949-939",
- "coupon_code": "SUMMER2021-18002345"
}
], - "shipping_taxes": [
- {
- "tax_amt": 17.68,
- "tax_code": "gst"
}
], - "tenders": [
- {
- "tender_type": "VISA",
- "payment_ref": "4773474-3949-939",
- "tender_amt": 257.54,
- "erp_tender_id": 121212,
- "redacted_card_number": "XXXX-XXXX-XXXX-1234",
- "reference_number": "4773474-3949-939"
}
], - "billing_info": {
- "billing_title": "Ms",
- "billing_family_name": "Bennet",
- "billing_given_name": "Jane",
- "billing_phone": "85293405340",
- "billing_email": "customer@email.com",
- "billing_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}
}, - "customer_info": {
- "title": "Ms",
- "family_name": "Bennet",
- "given_name": "Jane",
- "phone": "85293405340",
- "email": "customer@email.com"
}, - "loyalty": {
- "loyalty_member_id": 1800259283,
- "loyalty_points_redeemed": 0,
- "loyalty_value_redeemed": 0,
- "customer_segment": "VIP"
}, - "order_creation_time": "2018-12-28T15:45:32Z",
- "additional_info": "Staff ID: K00035"
}
{- "error_messages": [
- "skus.line_quantity of skus.web_sku_id 121212 must be an integer greater than 0.",
- "The field tenders.tender_amt is mandatory."
]
}
If the fulfilment rules in Comestri OMS decide the order (or part of it) should be shipped from DC, then Comestri OMS will create a Shipment request, to be passed to the WMS. The caller should poll the OMS /monitor API to determine when shipments are ready, then use this API to get shipment details. This payload can also be delivered by a webhook.
shipmentId required | string OMS shipment ID. |
{- "order_id": "18003563",
- "shipment_id": "18003563:S939",
- "shipment_number": "S939",
- "skus": [
- {
- "wms_sku_id": "121212",
- "quantity": 1,
- "line_sequence_number": 1,
- "additional_info": {
- "customField": "value"
}, - "product_additional_info": {
- "public_release_date": null
}
}
], - "fulfilment_type": "shipping",
- "name": "James Tennersby",
- "phone": "85293405340",
- "email": "customer@email.com",
- "address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "billing_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "location": "2022",
- "packaging_type": "Gift",
- "packaging_options": {
- "gift_message": "Happy birthday",
- "pack_instructions": "Insert Holiday Sale Flyer."
}, - "additional_info": {
- "customField": "value"
}, - "shipping_options": {
- "delivery_service": "standard-shipping",
- "delivery_instruction": "leave with neighbour",
- "authority_to_leave": true,
- "signature_required": true
}
}
When a Third Party Store has picked and packed a shipment partially or fully, the store should then use Shipment Confirm API to acknowledge Comestri OMS with information related to shipping. For a partially picked shipment, the details of the pick-failings are specified.
There are two ways to use the Shipment Confirm API:
pick_fail_info
.picked_skus
and further_confirm_pending
.picked_skus
and further_confirm_pending
will be processed, while pick_fail_info
will be ignored.
shipmentId required | string OMS shipment ID. |
Array of objects (SkuQtyInWMS) Items that are picked and shipped in this dispatch. This must not be empty if | |
object Information about the pick fail action. These details are used in Pick Fail report. | |
further_confirm_pending | boolean This flag indicates that there are more items pending for further processing. If this flag is true, |
courier_name | string The OMS name of the courier.
If this field is not specified, the highest priority courier that has the specified |
courier_service | string The name of the selected shipping service offered by the courier ( |
courier_tracking_ref | string <= 500 characters The tracking reference provided by the courier for the shipped parcels. |
Array of objects (Parcel) Details of parcel(s) into which the shipment has been packed. The parcel information is used in Order report. | |
carriage_cost | number The shipping fee paid by the third party store to the courier. |
Array of objects (RelatedDoc) Names and URLs to PDF of any related paperwork to be archived for reference. | |
staff_name | string <= 200 characters Name of the store staff who performed the pick action. |
pack_time | string <time (ISO-8601 yyyy-MM-ddTHH:mm:ssZ)> Time in UTC at which packing was completed. This value is used in the Order Report. |
{- "pick_fail_info": {
- "pick_failed_skus": [
- {
- "wms_sku_id": "121212",
- "quantity": 1,
- "pick_fail_reason": "Damaged"
}
]
}, - "courier_name": "AUSPOST",
- "courier_service": "eParcel Express",
- "courier_tracking_ref": "43487234GE8",
- "parcels": [
- {
- "dimensions": "30x20x17",
- "total_weight": 0.2
}
], - "carriage_cost": 20.8,
- "staff_name": "Robb",
- "pack_time": "2019-04-10T21:30:00Z"
}
{- "fields_with_syntax_errors": [
- "courier_tracking_ref"
]
}
When a Third Party Store is unable to process a shipment, the store should then use Shipment Reject API to acknowledge OMS. For example, this API can be used when all the items in a shipment are unavailable.
shipmentId required | string OMS shipment ID. |
It is assumed that all the SKU(s) in the shipment are pick failed when this API is used.
object Information about the pick fail action. These details are used in Pick Fail report. |
{- "pick_fail_info": {
- "staff_name": "Robb"
}
}
{- "shipment_id": "123-213-321:S939"
}
Once allocation of items has been completed by WMS, it should confirm when it has finished adjusting available inventory, so OMS knows the items have been accounted in the next SOH delta.
shipmentId required | string OMS shipment ID. |
{- "shipment_id": "123-213-321:S939"
}
Associate the ID of the WMS picking paperwork with OMS shipment, so that, WMS can share the barcodes that have been used for that shipment and to allow WMS picking paperwork to be scanned by OMS.
shipmentId required | string OMS shipment ID. |
pick_id | string WMS defined pick ID. |
{- "pick_id": "PI45340"
}
[- {
- "shipment_id": "123-213-321:S939"
}
]
This API allows clients to accept returns booked through OMS in WMS.
order_number | string Order number. Either |
rma_number | string <= 100 characters Return material authorization number. Either |
time | string <time (ISO-8601 yyyy-MM-ddTHH:mm:ssZ)> Time in UTC when the return is accepted. |
Array of objects (ReturnSkuQtyInWMS) Items returned. | |
comment | string Staff's comment upon accept return. |
staff_name | string <= 200 characters Name of the staff who accepted the return. |
{- "order_number": "3402340",
- "rma_number": "R340",
- "time": "2016-04-27T08:00:00Z",
- "items_returned": [
- {
- "wms_sku_id": "121212",
- "quantity": 2,
- "return_reason": "others",
- "serial_numbers": [
- "A1000035737",
- "A1000024829"
]
}
], - "comment": "The items were damaged by courier.",
- "staff_name": "Robb"
}
{- "error_messages": [
- "Either order_number or rma_number is required."
]
}
This API is only applicable to clients who have opted for generating Refund Tlog on accept return. It is not applicable for those who have opted for generating Refund Tlog on refund approval.
Details of all shipments and returns are available on the Comestri OMS Transaction Log API. Transactions are recorded at the point of revenue recognition; for shipments when stock has been set aside ready for the customer, and for returns when the return is accepted. Comestri OMS Transaction logs are typically translated by a middleware integration component, and send to the ERP or RMS system in the same format as used by the Point-of-Sale system.
There are two ways to use the /tlog API:
start_time
and report_period
shipment_id
.Please note that:
start_time | string <time (ISO-8601 yyyy-MM-ddTHH:mm:ssZ)> Time in UTC from which to list transactions. Example: start_time=2016-04-27T08:00:00Z |
report_period | integer Length of period to report, in minutes. Default value is 1,440 minutes; which is 24 hours. |
shipment_id | string OMS shipment ID. |
{- "start_time": "2016-04-27T08:00:00Z",
- "report_period": 60,
- "tx_count": 1,
- "txs": [
- {
- "transaction_id": "70a2bd89-9673-4183-bc3a-3e99c6687a24",
- "invoice_number": "13478602348736609",
- "time": "2016-04-27T08:00:00Z",
- "fulfilment_type": "shipping",
- "delivery_service": "standard-shipping",
- "delivery_promise": "2016-04-27T00:00:00Z",
- "currency": "AUD",
- "type": "sale",
- "total_value": 16.5,
- "tenders": [
- {
- "tender_type": "VISA",
- "payment_ref": "4773474-3949-939",
- "tender_amt": 17,
- "rounding_amount": 0.5,
- "erp_tender_id": 121212,
- "redacted_card_number": "XXXX-XXXX-XXXX-1234",
- "reference_number": "4773474-3949-939"
}
], - "shipping_fee": 4,
- "shipping_mrp": 5,
- "shipping_promo": -1,
- "shipping_gst_inc": 0.45,
- "shipment_id": "order101:S123",
- "location": "2022",
- "sale_location": "2022",
- "additional_info": {
- "customField": "value"
}, - "tx_lines": [
- {
- "erp_material": "904958604568",
- "kit_contents": [
- {
- "erp_material": "00012345",
- "quantity": 24
}, - {
- "erp_material": "08345345",
- "quantity": 1
}
], - "quantity": 2,
- "line_mrp": 200,
- "line_markdown": -29.5,
- "line_promo": -144,
- "line_est_duty_inc": 0,
- "line_gst_inc": 0.9,
- "line_sequence_number": 345,
- "upc": "34895349",
- "additional_info": {
- "customField": "value"
}
}
], - "order_number": "order101",
- "channel": "TMall",
- "transaction_already_in_pos": true,
- "pos_transaction_id": "PI45340",
- "dispatched_from_shipment_id": "order101:S123",
- "source": "online-store",
- "membership_id": "1904358",
- "shipping_quote": 12,
- "courier_name": "AUSPOST",
- "courier_service": "eParcel Express",
- "courier_tracking_ref": "43487234GE8",
- "is_final_shipment": true,
- "shipping_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "state": "NSW",
- "postcode": "2035"
}, - "collection_location": "123231",
- "customer_info": {
- "title": "Ms",
- "family_name": "Bennet",
- "given_name": "Jane",
- "phone": "85293405340",
- "email": "customer@email.com"
}, - "order_creation_time": "2016-04-20T12:02:00Z"
}
]
}
Details of all shipments and returns are available on the Comestri OMS Transaction Log API. Transactions are recorded at the point of revenue recognition; for shipments when stock has been set aside ready for the customer, and for returns when the return is accepted. Comestri OMS Transaction logs are typically translated by a middleware integration component, and send to the ERP or RMS system in the same format as used by the Point-of-Sale system.
There are two ways to use the /tlog API:
start_time
and report_period
shipment_id
.Please note that:
start_time | string <time (ISO-8601 yyyy-MM-ddTHH:mm:ssZ)> Time in UTC from which to list transactions. Example: start_time=2016-04-27T08:00:00Z |
report_period | integer Length of period to report, in minutes. Default value is 1,440 minutes; which is 24 hours. |
shipment_id | string OMS shipment ID. |
{- "start_time": "2016-04-27T08:00:00Z",
- "report_period": 60,
- "tx_count": 1,
- "txs": [
- {
- "transaction_id": "70a2bd89-9673-4183-bc3a-3e99c6687a24",
- "invoice_number": "13478602348736609",
- "time": "2016-04-27T08:00:00Z",
- "fulfilment_type": "shipping",
- "delivery_service": "standard-shipping",
- "delivery_promise": "2016-04-27T00:00:00Z",
- "currency": "AUD",
- "type": "sale",
- "total_value": 16.5,
- "tenders": [
- {
- "tender_type": "VISA",
- "payment_ref": "4773474-3949-939",
- "tender_amt": 17,
- "rounding_amount": 0.5,
- "erp_tender_id": 121212,
- "redacted_card_number": "XXXX-XXXX-XXXX-1234",
- "reference_number": "4773474-3949-939"
}
], - "shipping_fee": 4,
- "shipping_mrp": 5,
- "shipping_promo": -1,
- "shipping_gst_inc": 0.45,
- "shipment_id": "order101:S123",
- "location": "2022",
- "sale_location": "2022",
- "additional_info": {
- "customField": "value"
}, - "tx_lines": [
- {
- "erp_material": "904958604568",
- "kit_contents": [
- {
- "erp_material": "00012345",
- "quantity": 24
}, - {
- "erp_material": "08345345",
- "quantity": 1
}
], - "quantity": 2,
- "line_mrp": 200,
- "line_markdown": -29.5,
- "line_promo": -144,
- "line_est_duty_inc": 0,
- "line_gst_inc": 0.9,
- "line_sequence_number": 345,
- "upc": "34895349",
- "additional_info": {
- "customField": "value"
}, - "product_additional_info": {
- "public_release_date": null
}
}
], - "order_number": "order101",
- "channel": "TMall",
- "transaction_already_in_pos": true,
- "pos_transaction_id": "PI45340",
- "dispatched_from_shipment_id": "order101:S123",
- "source": "online-store",
- "membership_id": "1904358",
- "shipping_quote": 12,
- "courier_name": "AUSPOST",
- "courier_service": "eParcel Express",
- "courier_tracking_ref": "43487234GE8",
- "is_final_shipment": true,
- "shipping_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "state": "NSW",
- "postcode": "2035"
}, - "collection_location": "123231",
- "customer_info": {
- "title": "Ms",
- "family_name": "Bennet",
- "given_name": "Jane",
- "phone": "85293405340",
- "email": "customer@email.com"
}, - "loyalty": {
- "loyalty_member_id": 1800259283,
- "loyalty_points": 10
}, - "order_creation_time": "2016-04-20T12:02:00Z"
}
]
}
Confirm a shipment is picked with what skus are being picked and pick-failed.
shipmentId required | string OMS shipment ID. |
picked_confirm_time required | string <time (ISO-8601 yyyy-MM-ddTHH:mm:ssZ)> Time in UTC at which picking was completed. It will be shown in order history in OMS apps and Order Report. |
required | Array of objects (SkuQtyInERP) The items picked. Note that items in |
object Necessary information about the pick fail action. These details are used in Pick Fail Report. |
{- "picked_confirm_time": "2019-04-10T21:30:00Z",
- "skus": [
- {
- "erp_material": "121212",
- "quantity": 1
}
], - "pick_fail_info": {
- "staff_name": "Robb",
- "pick_failed_skus": [
- {
- "erp_material": "121212",
- "quantity": 1,
- "pick_fail_reason": "Damaged"
}
]
}
}
{- "fields_with_syntax_errors": [
- "picked_confirm_time"
]
}
Confirm a collection is collected by customer or hand delivered to customer.
shipmentId required | string OMS shipment ID. |
collection_time required | string <time (ISO-8601 yyyy-MM-ddTHH:mm:ssZ)> Time in UTC when the collection is collected by customer or hand delivered to customer. It will be shown in order history in OMS apps and Order Report. |
required | Array of objects (SkuQtyInERP) The items collected. Items of the order that are not included in this array is consider non-collected which will in turn auto-trigger a return. |
comment | string Staff’s comment upon customer collection or hand delivery to customer. |
{- "collection_time": "2019-04-10T21:30:00Z",
- "skus": [
- {
- "erp_material": "121212",
- "quantity": 1
}
], - "comment": "string"
}
{- "fields_with_syntax_errors": [
- "collection_time"
]
}
When an order is sent to OMS, OMS will allocate shipments to locations. When a location is a POS location, request may be received by a Retail System as a POS order. When split is allowed, an order will be divided into multiple shipments and sent to multiple POS locations as POS orders to the Retail System, to fulfil entire order. This API returns the payload that contains all the necessary information needed by a Retail System. Note that, such payload may also be received by a webhook mechanism.
The provisional_tx
returned in response may not be the eventual TLOG of the order.
shipmentId required | string Identifier of the order to the retail system, which is actually the OMS shipment ID. |
{- "order_id": "123-213-321",
- "shipment_id": "123-213-321:S939",
- "shipment_number": "S939",
- "skus": [
- {
- "erp_material": "121212",
- "quantity": 1,
- "line_sequence_number": 1,
- "additional_info": {
- "customField": "value"
}
}
], - "fulfilment_type": "shipping",
- "given_name": "James",
- "family_name": "Tennersby",
- "phone": "85293405340",
- "email": "customer@email.com",
- "address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "billing_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "location": "1001",
- "packaging_type": "Gift",
- "packaging_options": {
- "gift_message": "Happy birthday",
- "pack_instructions": "Insert Holiday Sale Flyer."
}, - "provisional_tx": {
- "transaction_id": "70a2bd89-9673-4183-bc3a-3e99c6687a24",
- "invoice_number": "13478602348736609",
- "time": "2016-04-27T08:00:00Z",
- "fulfilment_type": "shipping",
- "delivery_service": "standard-shipping",
- "delivery_promise": "2016-04-27T00:00:00Z",
- "currency": "AUD",
- "type": "sale",
- "total_value": 194.5,
- "tenders": [
- {
- "tender_type": "VISA",
- "payment_ref": "4773474-3949-939",
- "tender_amt": 195,
- "rounding_amount": 0.5,
- "erp_tender_id": 121212,
- "redacted_card_number": "XXXX-XXXX-XXXX-1234",
- "reference_number": "4773474-3949-939"
}
], - "billing_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "shipping_fee": 4.5,
- "shipping_mrp": 11,
- "shipping_promo": -6.5,
- "shipping_gst_inc": 1,
- "shipment_id": "123-302-323:S2291",
- "location": "2022",
- "sale_location": "2022",
- "additional_info": {
- "customField": "value"
}, - "tx_lines": [
- {
- "erp_material": "904958604568",
- "kit_contents": [
- {
- "erp_material": "00012345",
- "quantity": 24
}, - {
- "erp_material": "08345345",
- "quantity": 1
}
], - "quantity": 2,
- "line_mrp": 128.5,
- "line_markdown": -12.5,
- "line_promo": -15.2,
- "line_est_duty_inc": 5,
- "line_gst_inc": 12.3,
- "line_promo_reasons": "",
- "line_sequence_number": 345,
- "upc": "34895349",
- "additional_info": {
- "customField": "value"
}, - "product_additional_info": {
- "public_release_date": null
}
}
], - "order_number": "3402340",
- "channel": "TMall",
- "transaction_already_in_pos": true,
- "pos_transaction_id": "PI45340",
- "dispatched_from_shipment_id": "order101:S123",
- "source": "online-store",
- "membership_id": "1904358",
- "shipping_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "collection_location": "123231",
- "customer_info": {
- "title": "Ms",
- "family_name": "Bennet",
- "given_name": "Jane",
- "phone": "85293405340",
- "email": "customer@email.com"
}, - "loyalty": {
- "loyalty_member_id": 1800259283,
- "loyalty_points": 0
}, - "order_creation_time": "2018-12-28T15:45:32Z"
}, - "additional_info": {
- "customField": "value"
}, - "shipping_options": {
- "delivery_service": "standard-shipping",
- "delivery_instruction": "leave with neighbour",
- "authority_to_leave": true,
- "signature_required": true
}
}
Associate the POS Transaction ID with the OMS shipment.
shipmentId required | string OMS Shipment ID. |
pos_transaction_id | string <= 100 characters POS defined Transaction ID. |
{- "pos_transaction_id": "PI45340"
}
[- {
- "shipment_id": "123-302-323:S2291"
}
]
Whenever there is a change on the available-to-sell quantities of SKUs, the update will be accumlated to sent as batches in events.
The maximum number of records per event is 200 with maximum delay of 10 seconds.
If the event is sent by a webhook mechanism, retry mechanisms will depend on client's configurations for timeout errors.
Duplicate entries will be automatically filtered out and only the latest entry of the same web_sku_id
will be sent.
event_name required | string The name of this event is "inventory-updated". |
total_number_of_entries | integer Total number of entries returned. |
required | Array of objects |
{- "event_name": "inventory-updated",
- "total_number_of_entries": 1,
- "entries": [
- {
- "update_time": "2020-12-28T15:45:32Z",
- "inventory_pool": "4110",
- "web_sku_id": "5335345",
- "inventory": {
- "available_to_sell": 38,
- "availability_type": "back-order",
- "availability_date": "2021-02-28T00:00:00Z"
}
}
]
}
null
This event is triggered once goods of a shipment are allocated to a location.
If the event is sent by a webhook mechanism, retry mechanisms will depend on client's configurations for timeout errors.
event_name required | string The name of this event is "shipment-request". |
required | object (ShipmentDetail) |
{- "event_name": "shipment-request",
- "shipment": {
- "order_id": "123-213-321",
- "shipment_id": "123-213-321:S939",
- "shipment_number": "S939",
- "skus": [
- {
- "wms_sku_id": "121212",
- "erp_material": "121212",
- "kit_contents": [
- {
- "wms_sku_id": "121212",
- "erp_material": "00012345",
- "quantity": 24,
- "additional_info": {
- "customField": "value"
}
}, - {
- "wms_sku_id": "131313",
- "erp_material": "08345345",
- "quantity": 1,
- "additional_info": {
- "customField": "value"
}
}
], - "quantity": 1,
- "line_sequence_number": 1,
- "additional_info": {
- "customField": "value"
}, - "product_additional_info": {
- "public_release_date": null
}
}
], - "customer_info": {
- "title": "Ms",
- "family_name": "Bennet",
- "given_name": "Jane",
- "phone": "85293405340",
- "email": "customer@email.com"
}, - "shipping_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "location": "1001",
- "packaging_options": {
- "packaging_type": "Gift",
- "gift_message": "Happy birthday",
- "pack_instructions": "Insert Holiday Sale Flyer."
}, - "shipping_options": {
- "delivery_service": "standard-shipping",
- "courier_name": "UPS",
- "courier_service": "USPS Small-Packet",
- "delivery_instruction": "leave with neighbour",
- "authority_to_leave": true,
- "signature_required": true
}, - "additional_info": {
- "customField": "value"
}, - "provisional_tx": {
- "transaction_id": "70a2bd89-9673-4183-bc3a-3e99c6687a24",
- "invoice_number": "13478602348736609",
- "time": "2016-04-27T08:00:00Z",
- "delivery_service": "standard-shipping",
- "delivery_promise": "2016-04-27T00:00:00Z",
- "currency": "AUD",
- "type": "sale",
- "tx_amt": 194.5,
- "rounding_adjustment": 0,
- "tenders": [
- {
- "tender_type": "VISA",
- "payment_ref": "4773474-3949-939",
- "tender_amt": 195,
- "erp_tender_id": 121212,
- "redacted_card_number": "XXXX-XXXX-XXXX-1234",
- "reference_number": "4773474-3949-939"
}
], - "billing_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "shipping_price": 4.5,
- "shipping_base_price_inc_tax": 11,
- "shipping_discounts": [
- {
- "discount_amt": 10,
- "discount_title": "Summer Sale Promo 2021",
- "promo_code": "SUMMERSALE2021",
- "campaign_code": "CHRISTMAS2021",
- "reference_code": "4773474-3949-939",
- "coupon_code": "SUMMER2021-18002345"
}
], - "shipping_taxes": [
- {
- "tax_amt": 17.68,
- "tax_code": "gst"
}
], - "shipment_id": "123-302-323:S2291",
- "location": "2022",
- "sale_location": "2022",
- "additional_info": {
- "customField": "value"
}, - "tx_lines": [
- {
- "erp_material": "904958604568",
- "kit_contents": [
- {
- "wms_sku_id": "121212",
- "erp_material": "00012345",
- "quantity": 24,
- "additional_info": {
- "customField": "value"
}
}, - {
- "wms_sku_id": "131313",
- "erp_material": "08345345",
- "quantity": 1,
- "additional_info": {
- "customField": "value"
}
}
], - "quantity": 2,
- "line_base_price_inc_tax": 128.5,
- "line_markdown": -12.5,
- "line_discounts": [
- {
- "discount_amt": 10,
- "discount_title": "Summer Sale Promo 2021",
- "promo_code": "SUMMERSALE2021",
- "campaign_code": "CHRISTMAS2021",
- "reference_code": "4773474-3949-939",
- "coupon_code": "SUMMER2021-18002345"
}
], - "line_est_duty": 5,
- "line_taxes": [
- {
- "tax_amt": 17.68,
- "tax_code": "gst"
}
], - "line_sequence_number": 345,
- "barcode": "34895349",
- "wms_sku_id": "121212",
- "additional_info": {
- "customField": "value"
}, - "product_additional_info": {
- "public_release_date": null
}
}
], - "order_number": "3402340",
- "channel": "TMall",
- "transaction_already_in_pos": true,
- "pos_transaction_id": "PI45340",
- "dispatched_from_shipment_id": "order101:S123",
- "membership_id": "1904358",
- "courier_name": "UPS",
- "courier_service": "USPS Small-Packet",
- "shipping_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "collection_location": "123231",
- "customer_info": {
- "title": "Ms",
- "family_name": "Bennet",
- "given_name": "Jane",
- "phone": "85293405340",
- "email": "customer@email.com"
}, - "loyalty": {
- "loyalty_member_id": 1800259283,
- "loyalty_points": 0
}, - "order_creation_time": "2018-12-28T15:45:32Z"
}
}
}
null
This event is triggered when goods have been set aside and verified, and an invoice is generated for the customer.
This is the time that OMS recognises the sale and posts the final sale transaction to the finance system.
The event may be used in a number of integration scenarios, such as to post details of a sale to an ERP system, or to update the web platform to confirm that the goods are about to be dispatched.
If the event is sent by a webhook mechanism, retry mechanisms will depend on client's configurations for timeout errors.
event_name required | string The name of this event is "sale-confirmed". |
required | object (SalesTxV6) |
{- "event_name": "sale-confirmed",
- "tx": {
- "transaction_id": "70a2bd89-9673-4183-bc3a-3e99c6687a24",
- "invoice_number": "13478602348736609",
- "time": "2016-04-27T08:00:00Z",
- "delivery_service": "standard-shipping",
- "delivery_promise": "2016-04-27T00:00:00Z",
- "currency": "AUD",
- "type": "sale",
- "tx_amt": 194.5,
- "rounding_adjustment": 0,
- "tenders": [
- {
- "tender_type": "VISA",
- "payment_ref": "4773474-3949-939",
- "tender_amt": 195,
- "erp_tender_id": 121212,
- "redacted_card_number": "XXXX-XXXX-XXXX-1234",
- "reference_number": "4773474-3949-939"
}
], - "billing_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "shipping_price": 4.5,
- "shipping_base_price_inc_tax": 11,
- "shipping_discounts": [
- {
- "discount_amt": 10,
- "discount_title": "Summer Sale Promo 2021",
- "promo_code": "SUMMERSALE2021",
- "campaign_code": "CHRISTMAS2021",
- "reference_code": "4773474-3949-939",
- "coupon_code": "SUMMER2021-18002345"
}
], - "shipping_taxes": [
- {
- "tax_amt": 17.68,
- "tax_code": "gst"
}
], - "shipment_id": "123-302-323:S2291",
- "location": "2022",
- "sale_location": "2022",
- "additional_info": {
- "additional_info_key_placeholder_1": "value1",
- "additional_info_key_placeholder_2": "value2"
}, - "tx_lines": [
- {
- "erp_material": "904958604568",
- "kit_contents": [
- {
- "wms_sku_id": "121212",
- "erp_material": "00012345",
- "quantity": 24,
- "additional_info": {
- "customField": "value"
}
}, - {
- "wms_sku_id": "131313",
- "erp_material": "08345345",
- "quantity": 1,
- "additional_info": {
- "customField": "value"
}
}
], - "quantity": 2,
- "line_base_price_inc_tax": 128.5,
- "line_markdown": -12.5,
- "line_discounts": [
- {
- "discount_amt": 10,
- "discount_title": "Summer Sale Promo 2021",
- "promo_code": "SUMMERSALE2021",
- "campaign_code": "CHRISTMAS2021",
- "reference_code": "4773474-3949-939",
- "coupon_code": "SUMMER2021-18002345"
}
], - "line_est_duty": 5,
- "line_taxes": [
- {
- "tax_amt": 17.68,
- "tax_code": "gst"
}
], - "line_sequence_number": 345,
- "barcodes": "34895349",
- "additional_info": {
- "customField": "value"
}, - "product_additional_info": {
- "public_release_date": null
}
}
], - "order_number": "3402340",
- "channel": "TMall",
- "transaction_already_in_pos": true,
- "pos_transaction_id": "PI45340",
- "dispatched_from_shipment_id": "order101:S123",
- "membership_id": "1904358",
- "courier_shipping_quote": 12,
- "courier_name": "AUSPOST",
- "courier_service": "eParcel Express",
- "courier_tracking_ref": "43487234GE8",
- "is_final_shipment": true,
- "shipping_address": {
- "country_code": "AU",
- "lines": [
- "The Barn",
- "12, Reindeer Road",
- "NW"
], - "city": "Sydney",
- "county": "Cumberland",
- "state": "NSW",
- "postcode": "2035"
}, - "collection_location": "123231",
- "customer_info": {
- "title": "Ms",
- "family_name": "Bennet",
- "given_name": "Jane",
- "phone": "85293405340",
- "email": "customer@email.com"
}, - "loyalty": {
- "loyalty_member_id": 1800259283,
- "loyalty_points": 0
}, - "order_creation_time": "2018-12-28T15:45:32Z"
}
}
null