L2L makes it easy to add, update, and retrieve the status of Product Orders. This is helpful when integrating Product Orders with other systems, such as an ERP system. Product Orders can be created, defined, and scheduled in an ERP system, then pushed to L2L for execution and to provide visibility to the shop floor.
Here are some common touch points and which L2L APIs to use:
Create a New Order
Objective: Create new order in L2L from order details in ERP
Frequency: Twice per day, On demand
Process Outline:
- Query ERP for new orders that haven't been created into L2L
- Create new orders in L2L one by one
POST https://[customer].leading2lean.com/api/1.0/productorders/sync_ekanban_order/?auth=[api key]
- Required POST Parameters:
site=[site id]&productcode=[product code]&name=[name]&order_quantity=[order qantity]&card_size=[card size]
- This will create an order split up by
card_size
.card_size
is commonly used to split up an order by standard pack size (e.g. 100 parts per pallet).card_size
can equal theorder_quantity
if you do not wish to split the order into multiple parts.
- This will create an order split up by
- See the official API documentation for a full list of optional fields. It is recommended that you set the L2L Product Order
externalid
property with the ERP's Order ID.
- Required POST Parameters:
- Update ERP system with L2L product
id
sent in the return object. This can be used to update the order in the future.
Update an L2L Order with details from ERP
Objective: Update an existing order in L2L from order details in ERP
Frequency: On demand
Process Outline:
- Query ERP for orders that have been updated since they were added or updated in L2L
- Retrieve the product order from L2L using the L2L Product Order ID that was stored when the order was created
GET https://[customer].leading2lean.com/api/1.0/productorders/?auth=[api key]&site=[site id]&id=[product order id]
- This will return JSON object with all properties of the Product Order
- The L2L Product Order may be looked up using an
externalid
if stored when creating an order.
- Update all properties if the Product Order from order details from the ERP
- Update order in L2L
POST https://[customer].leading2lean.com/api/1.0/productorders/sync_order/[product order id]/?auth=[api key]
- Required POST Parameters:
site=[site id]&productcode=[product code]&name=[name]
- See the official API documentation for a full list of optional fields
- Required POST Parameters:
Update an ERP Order with details from L2L
Objective: Keep ERP order details in sync with L2L
Frequency: Once per day to look up order status, On demand
Process Outline:
- Query L2L for a list of product orders
GET https://[customer].leading2lean.com/api/1.0/productorders/?auth=[api key]&site=[site id]&status__gte=2
- See the official API documentation for a list of parameters that can be used to filter this API
- Update Order details in ERP using details from the L2L response