Order Management
Learn more about the ORDERS API (Orders and Deliveries sections) that helps in creating and maintaining orders provided by ME for clients who are buyers.
Orders created by Buyers will be sent from ME to the Supplier's ERP through the endpoint:
POST
Create an order.
The supplier receives a notification that an order has been generated and can consult it through the endpoints of the Supplier Orders API.
The supplier will then perform the analysis and either accept or refuse the order (or items of the order) in their ERP system, which will be sent back to ME. Subsequently, the buyer is notified about the acceptance or refusal of the order. For more information, see the article on Order Acceptance and Refusal.
Both buyers and suppliers can be notified via Webhooks about:
- Orders created;
- Orders received;
- Orders delivered;
- Orders updated;
- Orders canceled.
Full or Partial Receipt
The supplier delivers the items of the order, and the buyer receives and sends a confirmation to ME indicating the quantity of items received and whether the receipt was partial or total. This update is done for each item of the order.
Using the PUT
endpoint Update an order based on the order Id, the buyer updates the isClosed
field within the items list (array of items
objects) as follows:
- Total receipt of the item = "True";
- Partial receipt of the item = "False".
The quantity
and deliveryDate
fields within deliveries
should also be updated.
Order Modification
The buyer can make modifications, such as changes in payment conditions, item quantities, delivery dates, etc., through the endpoint:
Modifying an order by the buyer after supplier acceptance generates a new order with a new OrderId
, and the supplier will be notified via webhook.
Order Cancellation
Order or item cancellation is available to the buyer responsible for the order.
To cancel an order or order items, access the PUT
endpoint Update an order based on the order Id and specify:
- To cancel the order:
isCanceled
field = "True"; - To cancel order items:
isCanceled
field within theItems
array = "True".
This will mark the order or order item as canceled for the supplier, and no further actions can be taken in the process.
❗️ Attention
Regardless of the order status, the item of the order cannot be canceled or refused if there is already a delivery or partial/total receipt.
Learn more about Order Modification and Cancellation by the Buyer.
Order Delivery
After creating a purchase order, you can create a delivery for this order through the following endpoint:
POST
Create an order delivery.
Points to note:
- Partial Delivery: The delivery of the order can be partial by indicating “False” in the
closed
field. - Chargeback or Return: If the delivery is related to a chargeback or return, the
chargeback
field should be marked as “True,” and thequantity
corresponding to the delivered items should have a negative value.