question

rohitpandey avatar image
rohitpandey asked ·

Can't I assign an order to a customer using API unless that order has status equal to PAID?

Hi,

I created an order and assigned line_items to that order using API. Now, when I try to create a customer with seperate API Call passing order ID to it as well but it isn't working that way. Customer gets created but order is not assigned to that customer as I cannot see it on customer detail page.

So, I thought if it has something to do with order's status being OPEN and it should be PAID before it can be assigned to any customer. What you say?

Thanks!

OrdersCustomers
1 comment
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 would like to know the answer to this question as well. When can I use the web api to get a list of orders in order to get a list of lineitems that have happened in the past X minutes.

0 Likes 0 · ·

1 Answer

Duane Moore avatar image
Duane Moore answered ·

You should be able to set the customer associated with an order by POSTing a call to https://www.clover.com/api_docs#!/ord... with a payload similar to the following:

{ "customers": { "elements": [{ "id": "{customerId}", }] }, "id": "{orderId}" }

Note that you'll only be able to associate one customer with the order at this time.

1 comment 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.

Thanks Duane. It worked. Does it mean that I need to create a customer first and then assign that customer to an order using "CustomerID" & "OrderID" instead of creating and assigning a customer at the time of order creation using order creation API?

0 Likes 0 · ·

Welcome to the
Clover Developer Community