API Reference

➡️ Something didn't went as planned? No problem, you can cancel the order.

Sometimes things don't work out as planned an order needs to be canceled – the reasons for this can be manifold.

With

you can cancel orders depending on if you prefer to work with the unique order number or the unique pickup code.

ℹ️

Cancel – short facts:

• Cancel = all related and already input articles get unreserved (by the Robot).
• Cancel = the order won't be deleted, instead it stays stored in the system.
• Cancel = the unique orderNumber will stay with this order and can be accessed any time.
• Cancel = the customer can be notified by E-Mail via the API. Therefore, the correct cancel reason must be selected by you.

What you need

✅ Your API Key for authentication in the authentication header.
✅ Either the unique orderNumber or pickupCode depending on how you prefer to target the order in the Path Parameters.

Body Parameters

  • outputLocation – depending on the physical pharmacy layout and installed hardware, you will have multiple possibilities to dispense the articles.
    For example: 2 different locations in the front office and one location in the back office. Each of those 3 locations has a unique ID to target it. This will allow you to dispense the order exactly where you need it the most.

  • cancellationReason – here you need to select the reason for this particular cancellation.
    The API already includes some common reasons that we encountered in reality the most. This might change in the future so new reasons might be added.
    ⬇️ Available reasons

ReasonExplanation
CUSTOMER_NOT_RESPONDINGThis can be used if the Customer is not responding, not picking up the order and ist not reachable anymore.
DELIVERY_ISSUEThis can be used if something went wrong with the ordering or delivery. Examples could be wholesaler can not deliver on time, article got discontinued, is not available etc.
CUSTOMER_WISHThis can be used if the Customer asks for cancellation e.g. the customer does not need the product(s) anymore or already got it somewhere else faster.
STORAGE_ISSUEThis can be used if the pharmacy notices that the ordered article(s) do not fit into the commissioning robot. It happens that some articles are bigger In size that the robot is capable of.
OTHEREverything else, custom reason that needs to be specified in detailedCancellationReason
  • detailledCancellationReason – if cancellationReason is set to the value OTHER, you can specify the reason within this field.

  • sendCancellationEmail – if the boolean is set to true the API will send a E-Mail to the Customer informing about the cancellation. If set to false the Customer won´t receive a E-Mail via the API. This can be used if you like the implement your own way of informing the customer.

Hands on with the endpoint

The Body Parameters for both Cancel a pickup order by order number and Cancel a pickup order by pickup code are the same.

The only difference is in the Path Parameters – either you pass the orderNumber or the pickupCode.

2161

Cancelling an order with the unique order number.

2161

Cancelling an order with the unique pickup code.

Example Response

{
  "orderNumber": "123789",
  "requestCustomerToFillData": false,
  "relatedNotes": "",
  "dosageInformation": "",
  "state": "CANCELED",
  "creationDate": "2022-02-02T09:35:11.0601996+00:00",
  "lastUpdateDate": null,
  "pickedUpDate": null,
  "canceledDate": "2022-02-02T09:35:59.2495973+00:00",
  "firstInputDate": null,
  "isOverdue": false,
  "pickupCode": "customer_8E439647762A4F21A8D978C169568B61",
  "storageCode": "pickup_22A093AE26BE49B0BD191C5F2BFD01BB",
  "cancellationReason": "CUSTOMER_WISH"
}

The response contains the complete order status with details like creationDate or even the dosageInformation.

Two parts should be highlighted here: state and cancellationReason.

▶️ "state": "CANCELED" gives you the current order status. As we just cancelled the order, it is now in the state canceled.
▶️ "cancellationReason": "CUSTOMER_WISH" represents the cancellation reason you have just selected when cancelling the order. If you have selected an other reason, the reason might be different in your response.

Cancellation E-Mails

As mentioned above, it is possible that the API automatically sends out an E-Mail to inform the customer if the order has been canceled.
As there are different reasons to cancel the order, each reasons is paired with a matching E-Mail.

ℹ️All Cancellation E-Mails are available and documented here: E-Mails via API (and the Pickup Cloud)

This includes all text content as well as an example E-Mail to see how they will render on customer site.


Summary and Scheme

The Cancellation consists mostly of one operation that triggers two more.

  1. The order gets cancelled (either via the API or via the Pickup Cloud Web App)
  2. If articles were already stored in the robot they get dispensed (you can select where they get dispensed at your pharmacy)
  3. The customer can get informed via E-Mail if you like to. This will be done automatically via the API and we take take care of it – or you can inform the customer on your own way if you prefer it this way.