{"openapi":"3.0.1","info":{"title":"Testing"},"servers":[{"url":"https://api-third-party-gtm-pp.grubhub.com","description":"preprod"},{"url":"https://api-third-party-gtm.grubhub.com","description":"prod"}],"tags":[{"name":"Models","description":"# PosTestOrderRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/PosTestOrderRequest\"/>\n\n# JitTestOrder \n <SchemaDefinition schemaRef=\"#/components/schemas/JitTestOrder\"/>\n\n# DeliveryTestRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/DeliveryTestRequest\"/>\n\n"}],"paths":{"/pos/v1/merchant/{merchant_long_id}/test/transmission":{"post":{"tags":["Endpoints"],"summary":"Create transmission test","description":"A transmission test order is a simple order that flows through the entire Grubhub order processing system. This is typically the last step in a go-live process for a new merchant.These orders will contain a the lowest-priced menu item not requiring modifiers found on the menu for the given merchant. All line items in this order will be sent with zero cost, so that no actual charges will accrue. Test orders only exist within the POS ecosystem; they will not show up in the Grubhub for Restaurants app or on any accounting sheet.","operationId":"postTestOrderRequest","parameters":[{"name":"merchant_long_id","in":"path","description":"The The Grubhub or third-party provided external ID for the merchant.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"description":"Specifies whether the transmission test should be for delivery and/or catering. Note - catering not currently supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosTestOrderRequest"},"example":{"is_delivery":false,"is_catering":true,"is_validation":true}}},"required":true},"responses":{"200":{"description":"Successfully created the transmission test order. Returns the UUID of the resulting order.","content":{"application/json":{"schema":{"type":"string","format":"uuid"},"example":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}}}}},"/pos/v1/merchant/{merchant_long_id}/test/jitevent":{"post":{"tags":["Endpoints"],"summary":"Create order with JIT flag triggered","description":"Generates a test order event in order to make sure that your functionality that triggers JIT event functions properly. The order will contain information from the referenced order but will not affect that order or create real-life delivery events. To configure a JIT event webhook for your POS integration, contact your Grubhub account representative.","operationId":"simulateJitOrderEvent","parameters":[{"name":"merchant_long_id","in":"path","description":"The The Grubhub or third-party provided external ID for the merchant.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"description":"JIT Test Order Information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JitTestOrder"},"example":{"order_id":"93101167-9065-4b9c-b98b-5d789a3ed9fe","order_merchant_id":"3fd56ebd-323b-4791-8e69-e96cc7445d16","order_number":"9876543210","order_status":"CONFIRMED"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string","format":"uuid"}}}}}}},"/pos/v1/merchant/{merchant_long_id}/test/delivery":{"post":{"tags":["Endpoints"],"summary":"Create test delivery","description":"Generates a test delivery event in order to make sure that your delivery status webhook functions properly. The delivery will contain information from the referenced order but will not affect that order or create real-life delivery events.To configure a delivery webhook for your POS integration, contact your Grubhub account representative.","operationId":"postTestDeliveryRequest","parameters":[{"name":"merchant_long_id","in":"path","description":"Long Grubhub Id for the merchant","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"description":"The Order Id and delivery status to create test delivery event is generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryTestRequest"},"example":{"order_id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","status":"DELIVERED"}}},"required":true},"responses":{"409":{"description":"Unable to send delivery - merchant does not have webhooks enabled"},"200":{"description":"Successfully created test delivery"}}}}},"components":{"schemas":{"PosTestOrderRequest":{"type":"object","properties":{"is_delivery":{"type":"boolean","description":"Whether the test order should be for delivery (as opposed to pickup). Default is false. Note that regardless of this property, for Grubhub Managed Delivery restaurants, there will be no Delivery object created."},"is_catering":{"type":"boolean","description":"Whether the test order should be for catering. Default is false."},"is_validation":{"type":"boolean","description":"isValidation."}},"description":"Request body for creating a transmission test."},"JitTestOrder":{"type":"object","properties":{"order_id":{"type":"string","description":"The UUID of the order for which you want to create a test JIT order event. This can be a a real or fake order ID. If it's a real order, then it will pull use that order data to transmit the JIT event. Otherwise dummy data will be used.","format":"uuid"},"order_merchant_id":{"type":"string","description":"Order merchant id.","format":"uuid"},"order_number":{"type":"string","description":"Order number."},"order_status":{"type":"string","description":"The status of an order as it passes through the Grubhub fulfillment flow.<br /><br />ANTICIPATED: denotes a future order, which may be cancelled by diner.<br />RESTAURANT_CONFIRMABLE: pending confirmation of receipt by the restaurant. These are effectively new ASAP orders. ANTICIPATED orders will automatically become RESTAURANT_CONFIRMABLE at the promise time, less the restaurant's configured pickup or delivery prep time.<br />DINER_CONFIRMABLE: a status held for future use.<br />CONFIRMED: denotes that the order was received by restaurant, even if the restaurant is unable to fulfill it.<br />REJECTED: an error status. For example, if an order is unable to be inserted to the POS, due to menu item mismatch, restaurant offline, etc., the status should be updated to REJECTED. This is not to be used when the order was successfully transmitted, but the restaurant is unable to fulfill it for operational reasons. In that scenario, a Change Request should be submitted to cancel the order.<br />CANCELLED: a cancellation request by the diner or restaurant has been processed by Grubhub Customer Care.<br />PICKUP_READY: indicates that the food is prepared and ready for pickup by the diner or a Grubhub delivery courier.<br />OUT_FOR_DELIVERY: the food is on the way to the diner.<br />FULFILLED: denotes that the food has been delivered to or picked up by the diner.<br />UNKNOWN: provided for error handling of strings unmappable to known enumeration values.","enum":["REJECTED","READY_FOR_PICKUP","ANTICIPATED","RESTAURANT_CONFIRMABLE","CONFIRMED","CANCELLED","DELIVERY_CONFIRMABLE","DINER_CONFIRMABLE","UNKNOWN","PICKUP_READY","OUT_FOR_DELIVERY","FULFILLED","POS_VALIDATING","POS_VALIDATED","POS_VALIDATION_REJECTED"]}},"description":"Jit test Order"},"DeliveryTestRequest":{"type":"object","properties":{"order_id":{"type":"string","description":"The UUID of the order for which you want to create a test delivery event. This must be a real order, as the test will pull diner and order information from that order.","format":"uuid"},"status":{"type":"string","description":"Delivery Status"}},"description":"Request body for creating delivery test."}}}}