question

ydev avatar image
ydev asked ·

REST API Create Order Doesn't Set State To Null

Not sure when this started to changed.
The order API 'create' doesn't set state to null, causing the order available once it created.

Previously, when we create order and adding item, it won't available until we manually set the order state to 'open'. That is expected result, but not sure why suddenly the behavior changed.


Not sure where is the problem, the documentation doesn't mention about any change
https://docs.clover.com/clover-platform/docs/working-with-orders
OrdersREST API
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ydev avatar image
ydev answered ·
@Dan The create order payload is set to empty object.

Previously when we create an order, the online receipt won't available until we set the order state to open.
Now, once the order created the online receipt is available.
And once the order has one item in it, the order will be available in Clover order app.

The case above is no state set to the order.

Did you test and get a different result?

4 comments Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I don't know how the online receipts work.

Regarding the order state, if it is not showing up in the Orders app, then the state is probably still null. How are you adding the line item? If you are using the OrderConnector with an android app, then engine is updating the state to OPEN when you add the line item, which is why it is now showing up in the Orders app.

Please provide information on exactly how you are modifying the order, and the state of the order after each operation if you need further assistance.

0 Likes 0 · ·

Just like the title, we are using REST API to create order, adding item and other actions.
When we adding item, no state set until the order has been paid.

0 Likes 0 · ·

We are going to test again later and let you know the details

0 Likes 0 · ·

I did some testing, and at least on our dev server, orders do not appear in the list in web Orders app with a null state normally, but if you search by the uuid (e.g.

ATQSK831NPJXM), then they do appear, and then there is a button for the web receipt and if you follow that it also works. Let me know if this is consistent with what you find.

0 Likes 0 · ·
Dan avatar image
Dan answered ·
Based on looking at /v3/merchants/{merchantId}/orders for POST, as near as I can tell the behavior has not changed, and the state will be set to the state of the order that was sent. Is it possible that you started setting the state before you hit the endpoint?
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community