question

jonathan8312 avatar image
jonathan8312 asked ·

Create order from REST API and Dinein

I need to create an Order using a RESTAPI that can be seen from Clover Dine In APP. When we tried to search for the Order Types on the Platform EndPoint system_order_types we get this: "id": "DINE-IN-TYPE", "labelKey": "com.clover.order.type.dine_in", and the order creation is like this: {"note": "This is a Test", "title": "Salon Salon 02", "ManualTransaction": false, "state": "open", "orderType": {"id": "DINE-IN -TYPE "," labelKey ":" com.clover.order.type.dine_in "}}
but the method responds" The referenced order type does not exist ". How can I create a visible order for Clover-Dine in.
OrdersREST APITaxes
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.

1 Answer

chanel avatar image
chanel answered ·
You are missing "employee" and are passing in the "systemOrderTypeId" as the orderType "ID". Instead your post will look like this:

{
    "note": "ordernote",
    "title": "ordertitle",
    "ManualTransaction": false,
    "employee": {
    	"id": "employeeid"
    },
    "state": "open",
    "orderType": {
        "id": "ordertypeid"
    }
}
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.

Welcome to the
Clover Developer Community