Skip to content

Command 103 — Ship ordersrework

Shipping an order from the purchasing centre to the clinic is POST /order/{orderGID}/num/{orderGPartNum}/send. The call ships what the centre has in stock and moves whatever cannot be shipped yet to a new part of the order. V1’s manual mode — ship exactly the units given per line, or fail — does not exist in V2.

V2 checks an app permission on every call — V1 checked none — and a call whose permission is missing answers 400 with errorCode 15, the same status as an invalid payload (see 4.4). Grant these to the API user before porting the command; the names are the ones of the permission tree in flowww.

CallPermission
POST /order/{orderGID}/num/{orderGPartNum}/sendStock Control - Orders → Send products to clinic
PATCH /order/{orderGID}/num/{orderGPartNum}Stock Control - Orders → Save
DELETE /order/{orderGID}/num/{orderGPartNum}/receiveStock Control - Orders → Orders - Cancel receipt of orders
GET /order/1/num/0Stock Control - Orders → See
GET /orderStock Control - Orders → List
API V1 — one call
curl --location 'https://euapi.flowww.net/v1/fwa_external_get.asp?cmd=103&doctor=USER_LOGIN&pass=USER_PASS&country=ES&key=SYSTEM_KEY&ClinicID=1' \
--data-urlencode 'OrderGID=1' \
--data-urlencode 'OrderGPartNum=0' \
--data-urlencode 'OrderDetails[]=1,10' \
--data-urlencode 'OrderDetails[]=2,0' \
--data-urlencode 'OrderAutomatic=1'
API V2 — 1. Check the order
curl --location 'https://api.flowww.net/v2/order/1/num/0?clinicID=1' \
--header 'Authorization: Bearer <api_key>'

Ship only order parts that are accepted (PROCESSED) and not yet shipped.

2. Ship it
curl --location --request POST 'https://api.flowww.net/v2/order/1/num/0/send?clinicID=1' \
--header 'Authorization: Bearer <api_key>'
3. Confirm
curl --location 'https://api.flowww.net/v2/order?clinicID=1&orderState=2' \
--header 'Authorization: Bearer <api_key>'

The shipped part now shows SENT_TO_CLINIC, and a new part appears for anything that was out of stock.

API V1API V2Notes
OrderGID, OrderGPartNumpath segments—
OrderAutomatic=1POST …/sendAlways this mode: ship what is in stock, move the rest to a new part.
OrderAutomatic=0 + OrderDetails[]=orderID,units—Gap: you cannot choose the units to ship per line. Do not change the line units with PATCH …/detail/{orderID} for this: it changes the ordered quantity for good.
the shipment itselfPOST …/sendCareful: GET on the same path is a different operation — it sends the order to the purchasing centre, which is what the clinic does when it places the order.
TopicAPI V1API V2
PreconditionsOnly accepted orders could be shipped (108004), never more units than ordered (108012).Not checked. V2 does not check that the part was accepted, nor that it was not shipped already. Always check the order first (step 1) and never repeat the call: shipping twice takes the stock twice.
Out of stock108004, nothing shipped (manual mode).What is in stock is shipped; the rest goes to a new part. 400 no-stock only when nothing at all can be shipped.
Purchasing centre—If the order’s centre is not set up as a purchasing centre, the call does nothing and still answers 200: step 3 shows it.
ProvidersLines supplied by an external provider went to their own part, and the provider was emailed.Same.
  • Reception at the clinic: PATCH /order/{orderGID}/num/{orderGPartNum} with the units received per line. It adds the units to the clinic’s stock and closes the part; any units not received move to a new part. Never call it before the order has been shipped. A closed part answers 400 559.
  • Undo a reception: DELETE /order/{orderGID}/num/{orderGPartNum}/receive takes the units back out of the clinic’s stock and reopens the order. The API user needs the cancel reception permission (400 548 otherwise).