openapi: 3.2.0 info: title: Endpoints Delivery Tests API servers: - url: https://api-third-party-gtm-pp.grubhub.com description: preprod - url: https://api-third-party-gtm.grubhub.com description: prod tags: - name: Delivery Tests paths: /delivery/daas/v1/test/{deliveryId}/refund: post: tags: - Delivery Tests summary: Progress a test refund description: Progresses the test refund to either an accepted or reject state. operationId: progressRefund parameters: - name: deliveryId in: path description: The UUID of the test delivery associated with the refund. required: true style: simple explode: false schema: type: string format: uuid example: 497f6eca-6276-4993-bfeb-53cbbbba6f08 - name: X-GH-PARTNER-KEY in: header description: The Grubhub-provided partner key. required: true style: simple explode: false schema: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 requestBody: content: application/json: schema: $ref: '#/components/schemas/ProgressRefundRequest' required: true responses: '500': description: Unexpected internal error content: application/json: schema: type: array items: $ref: '#/components/schemas/PublicApiError' example: errors: - code: REQUEST_FAILED message: Internal Server Error '403': description: Request Forbidden content: application/json: schema: type: array items: $ref: '#/components/schemas/PublicApiError' example: errors: - code: REQUEST_FORBIDDEN message: Request forbidden '200': description: Refund successfully progressed. content: application/json: example: {} '404': description: Delivery not found content: application/json: schema: type: array items: $ref: '#/components/schemas/PublicApiError' example: errors: - code: DELIVERY_NOT_FOUND message: Delivery not found with id=00000000-0000-0000-0000-000000000000 /delivery/daas/v1/test/{deliveryId}/deliveryState: post: tags: - Delivery Tests summary: Progress a test delivery description: Progresses the test delivery to the given delivery state. Returns the expected progression time to the delivery state operationId: progressDelivery parameters: - name: deliveryId in: path description: The UUID of the test delivery. required: true style: simple explode: false schema: type: string format: uuid example: 497f6eca-6276-4993-bfeb-53cbbbba6f08 - name: X-GH-PARTNER-KEY in: header description: The Grubhub-provided partner key. required: true style: simple explode: false schema: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 requestBody: content: application/json: schema: $ref: '#/components/schemas/ProgressDeliveryRequest' required: true responses: '200': description: Delivery successfully progressed to given delivery state content: application/json: schema: $ref: '#/components/schemas/ResponseWrapperProgressDeliveryResponse' example: response: expected_progression_time: '1970-01-01T00:00:00.000Z' '500': description: Unexpected internal error content: application/json: schema: type: array items: $ref: '#/components/schemas/PublicApiError' example: errors: - code: REQUEST_FAILED message: Internal Server Error '403': description: Request Forbidden content: application/json: schema: type: array items: $ref: '#/components/schemas/PublicApiError' example: errors: - code: REQUEST_FORBIDDEN message: Request forbidden '404': description: Delivery not found content: application/json: schema: type: array items: $ref: '#/components/schemas/PublicApiError' example: errors: - code: DELIVERY_NOT_FOUND message: Delivery not found with id=00000000-0000-0000-0000-000000000000 components: schemas: PublicApiError: required: - code - message type: object properties: code: type: string description: A code representing the type of error that occurred. message: type: string description: A detailed description of the error that occurred. description: An error returned by the delivery API. ProgressDeliveryResponse: required: - expected_progression_time type: object properties: expected_progression_time: type: string description: The expected timestamp at which the delivery will be progressed to the requested state. Formatted as an ISO-8601 timestamp. format: date-time example: '2024-05-28T00:00:00Z' description: The response information of a delivery progression request. ResponseWrapperProgressDeliveryResponse: type: object properties: response: $ref: '#/components/schemas/ProgressDeliveryResponse' errors: type: array description: A list of errors returned. items: $ref: '#/components/schemas/PublicApiError' ProgressDeliveryRequest: required: - delivery_state type: object properties: delivery_state: type: string description: The subset of delivery states that a partner can progress a delivery to. enum: - ASSIGNED - UNASSIGNED - COURIER_AT_PICKUP - PICKED_UP - IN_TRANSIT - COURIER_AT_DROPOFF - DELIVERED - CANCELED speed_mph: minimum: 0 type: integer description: The speed (in mph) at which the courier should move to the given delivery state. If no value is provided, the default speed of 30 mph will be used. format: int32 example: 30 default: 30 description: The request information for progressing a test delivery. ProgressRefundRequest: required: - decision type: object properties: decision: type: string description: The refund request decision. enum: - ACCEPTED - REJECTED reason: maxLength: 512 minLength: 0 type: string description: The reason code associated with the refund decision. example: DriverMissedDropoffEta default: DriverMissedDropoffEta description: maxLength: 512 minLength: 0 type: string description: Additional details about the refund decision. example: Driver was 30 minutes late to the dropoff location. refund_amounts: $ref: '#/components/schemas/RefundAmount' description: The request information for progressing a test refund. RefundAmount: required: - contents_value - delivery_fee - tip type: object properties: delivery_fee: minimum: 0 type: integer description: The amount of the refund requested to be taken from the delivery fee, formatted as cents. format: int32 example: 100 tip: minimum: 0 type: integer description: The amount of the refund requested to be taken from the tip, formatted as cents. format: int32 example: 333 contents_value: minimum: 0 type: integer description: The amount of the refund requested to be taken from the contents value, formatted as cents. format: int32 example: 542 return_fee: minimum: 0 type: integer description: The amount of the refund requested to be taken from the return fee, formatted as cents. format: int32 example: 200 description: The amount of the refund requested, broken down into various categories.