Orders

Introduction

Using these API functions, you can interact with the Mplus order workflow.
Whenever you create an order externally, you have to supply an external order identifier ( extOrderId). You can use this identifier to find the order again.
External order identifiers are unique and therefore cannot be reused.

Contents

getOrders Retrieving orders

When you want to synchronize orders from Mplus to another application, it is smart to make use of Sync Markers.

createOrder Creating a new order

When creating an order, you are always required to attach a relation.
See the relations tutorial to learn how to manage relations through the API.

Getting an existing order

There are two ways of retrieving an existing order. The first method is by searching for the external order identifier. The second method is by accessing the order with its internal order identifier.

findOrder Method one: Searching for external order identifier

getOrder Method two: Getting order by its internal order identifier

updateOrder Updating an existing order

Updating an existing order is very similar to creating a new order, except this time you also add the internal order identifier.
That means you must first get the internal order identifier, for example by storing it when you first created the order, or by looking for it using the findOrder() function.

cancelOrder Cancelling an order

payOrder Paying an order

You can use the prepay parameter to signal if the order has been shipped already (false) or has not (true). If prepay is set to true, you will only make a deposit payment to the order, if prepay is set to false, you will also create a packing slip (signifying delivery) and invoice.

deliverOrder Delivering an order

Successfully delivering an order creates a packing slip for that order, which can later be invoiced. You can use this to signal that an order has been shipped, but not yet paid.

getDeliveryMethods Get a list of available delivery methods

getOrderCategories Get a list of available order categories