Getting GUID of Restaurant
Hello,
We are trying to `POST` to `{{hostname}}/orders/v2/orders/` and getting a 404 error back when we don't expect it. Here is the error:
```
{ "status": 404, "code": 10003, "message": "com.toasttab.service.shared.db.hibernate.exceptions.PublishedEntityNotFoundException: Cannot find published MenuItem entity (cb07446d-5c89-4bf8-980c-f6185cc21fef) in current restaurant.", "messageKey": null, "fieldName": null, "link": "https://jersey.java.net/apidocs/2.8/jersey/javax/ws/rs/NotFoundException.html", "requestId": "638e4885-3089-492b-bad7-21e19df3e430", "developerMessage": null, "errors": [], "canRetry": null }
```
Here is the payload we are POSTing:
```
{ "diningOption": { "guid": "ac6ff187-9602-4c80-bd9f-5eee23dd16a7" }, "appliedPackagingInfo": { "appliedPackagingItems": [ { "itemConfigId": "51ea9081-0396-47c5-9a0f-bd131bf90751", "inclusion": "YES" }, { "itemConfigId": "041c6f8d-c8ac-4ba4-942a-e2fb95a10f21", "inclusion": "NO" } ] }, "checks": [ { "selections": [ { "item": { "guid": "cb07446d-5c89-4bf8-980c-f6185cc21fef" }, "itemGroup": { "guid": "e785041b-7dab-49fa-956c-89e3a68d88a7" }, "quantity": 1, "modifiers": [] } ], "customer": { "firstName": "Ben", "lastName": "Affleck", "phone": "1234567890", "email": "benaffleck@example.com" }, "appliedServiceCharges": [ ], "payments": [ { "guid": "a5d23ff6-f4bd-412b-9088-5e8b8feda9b2", "type": "CREDIT", "amount": 21.29, "tipAmount": 4.50 } ], "tabName": "App order #123", "appliedDiscounts": [ { "discountAmount": 2.00, "discount": { "guid": "7fa8598c-5a23-4e1e-96fe-4face5b2acff" } } ] } ], "deliveryInfo": { "address1": "1 Broadway St", "address2": "", "city": "Manhattan", "state": "NY", "zipCode": "02215", "notes": "Be careful of the dog" } }
```
Any help would be greatly appreciated!
Thank you,
Alex
-
Official comment
Hi Alex,
Thanks for reaching out! The message within the 404 indicates the root of the issue: Cannot find published MenuItem entity (cb07446d-5c89-4bf8-980c-f6185cc21fef) in current restaurant. I would suggest making sure the
order.checks.selections.itemandorder.checks.selections.itemGroupalign with menu items returned from the Menus API for this restaurant.Let me know if you have any other questions!
Taylor
Please sign in to leave a comment.
Comments
1 comment