{"openapi":"3.1.0","info":{"title":"Egencia Cancellation/Deletion API","version":"v1.0"},"servers":[{"url":"https://apis.egencia.com/openconnect/api","description":"Generated server url"}],"paths":{"/v1/bookings/{bookingId}/cancel":{"post":{"description":"

Creates a cancel request for a specific booking Id

\n

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
bookingIdStringTrip id corresponding to each booked product
\n
\n

Response Parameters in case of successful response

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
booking_idStringTrip id corresponding to the booking which is to be cancelled
statusStringCANCELLED
itemsListList of items to be cancelled
idStringTrip item id which is to be cancelled
statusStringStatus of the particular item. The status will always be “CANCELLED” in case of success response.
\n
\n

Below response with 200 OK HttpStatus

\n
\n    \n    {\n        \"booking_id\": \"123\",\n        \"status\": \"CANCELLED\",\n        \"items\": [\n            {\n                \"id\": \"1\",\n                \"status\": \"CANCELLED\"\n            },\n            {\n                \"id\": \"2\",\n                \"status\": \"CANCELLED\"\n            }\n        ]\n    }\n    \n
\n

Response Parameters in case of failure response

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
booking_idStringTrip id corresponding to the booking which is to be cancelled
statusStringFAILURE
error_codeStringError code in case of failure
error_messageStringError message in case of failure
itemsListList of items to be cancelled
idStringTrip item id which is to be cancelled
statusStringStatus of the particular item. The status can be “CANCELLED” or “FAILURE”.
\n
\n

Below response with 500 Internal Server Error HttpStatus

\n
\n
\n    \n    {\n        \"booking_id\": \"123\",\n        \"status\": \"FAILURE\",\n        \"error_code\": \"EGE-ER-OS-5011\",\n        \"error_message\": \"There was an error in cancelling the [1234, 9876] items. Please try again.\",\n        \"items\": [\n            {\n                \"id\": \"1\",\n                \"status\": \"CANCELLED\"\n            },\n            {\n                \"id\": \"1234\",\n                \"status\": \"FAILURE\"\n            },\n            {\n                \"id\": \"9876\",\n                \"status\": \"FAILURE\"\n            }\n        ]\n    }\n    \n
\n
\n","operationId":"cancelBooking","parameters":[{"in":"path","name":"bookingId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/CancelResponse"}}},"description":"Ok."},"400":{"description":"Bad Request : Invalid input or request"},"401":{"description":"Unauthorized : authentication token empty, invalid or expired."},"403":{"description":"Forbidden : User is not authorized for the operation."},"404":{"description":"Not Found : You are trying to access an invalid or non existent resource."},"422":{"description":"Invalid input : invalid or missing required input."},"500":{"description":"Internal Server Error : unable to process request"}},"security":[{"OAuth2":[]}],"summary":"Cancel trip for a particular booking ID","tags":["bookings v1"]}},"/v1/bookings/{bookingId}/delete":{"post":{"description":"

Creates a delete request for a specific booking Id

\n

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
bookingIdStringTrip id corresponding to each booked product
\n
\n

Response Parameters in case of successful response

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
booking_idStringTrip id corresponding to the booking which is to be deleted
statusStringSUCCESS
itemsListList of items to be deleted
idStringTrip item id which is to be deleted
statusStringStatus of the particular item. The status will be booking status of the trip item.
\n
\n

Below response with 200 OK HttpStatus

\n
\n    \n    {\n        \"booking_id\": \"123\",\n        \"status\": \"SUCCESS\",\n        \"items\": [\n            {\n                \"id\": \"1\",\n                \"status\": \"DELETED\"\n            },\n            {\n                \"id\": \"2\",\n                \"status\": \"DELETED\"\n            }\n        ]\n    }\n    \n
\n

Response Parameters in case of failure response

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
booking_idStringTrip id corresponding to the booking which is to be deleted
statusStringFAILURE
error_codeStringError code in case of deletion
error_messageStringError message in case of deletion
itemsListList of items to be deleted
idStringTrip item id which is to be deleted
statusStringStatus of the particular item. The status will be the booking status of the trip item
\n
\n

Below response with 500 Internal Server Error HttpStatus

\n
\n
\n    \n    {\n        \"booking_id\": \"123\",\n        \"status\": \"FAILURE\",\n        \"error_code\": \"EGE-ER-OS-5012\",\n        \"error_message\": \"There was an error in deleting the [1234, 9876] items. Please try again.\",\n        \"items\": [\n            {\n                \"id\": \"1\",\n                \"status\": \"CANCELLED\"\n            },\n            {\n                \"id\": \"1234\",\n                \"status\": \"FAILURE\"\n            },\n            {\n                \"id\": \"9876\",\n                \"status\": \"FAILURE\"\n            }\n        ]\n    }\n    \n
\n
\n","operationId":"deleteBooking","parameters":[{"in":"path","name":"bookingId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}},"description":"Ok."},"400":{"description":"Bad Request : Invalid input or request"},"401":{"description":"Unauthorized : authentication token empty, invalid or expired."},"403":{"description":"Forbidden : User is not authorized for the operation."},"404":{"description":"Not Found : You are trying to access an invalid or non existent resource."},"422":{"description":"Invalid input : invalid or missing required input."},"500":{"description":"Internal Server Error : unable to process request"}},"security":[{"OAuth2":[]}],"summary":"Delete trip items for a particular booking ID","tags":["bookings v1"]}}},"components":{"schemas":{"CancelItem":{"type":"object","description":"Cancellation response after cancel action on booking item","properties":{"id":{"type":"string","description":"Booking item ID for which cancellation action is requested"},"status":{"type":"string","description":"Cancellation status for the item after cancellation is performed"}},"title":"CancelItem"},"CancelResponse":{"type":"object","description":"Cancel response after cancel action","properties":{"bookingId":{"type":"string","description":"Booking ID for which cancel action is requested"},"errorCode":{"type":"string","description":"Error code for the item when cancellation gets failed"},"errorMessage":{"type":"string","description":"Failure message for the item when cancellation gets failed"},"items":{"type":"array","description":"Breakdown of statuses for individual items associated with the booking","items":{"$ref":"#/components/schemas/CancelItem"}},"status":{"type":"string","description":"Cancellation status after cancellation action is performed"}},"title":"CancelResponse"},"DeleteResponse":{"type":"object","description":"Delete response after delete action","properties":{"bookingId":{"type":"string","description":"Booking ID for which delete action is requested"},"errorCode":{"type":"string","description":"Error code for the item when deletion gets failed"},"errorMessage":{"type":"string","description":"Failure message for the item when deletion gets failed"},"items":{"type":"array","description":"Breakdown of statuses for individual items associated with the booking","items":{"$ref":"#/components/schemas/DeletedItem"}},"status":{"type":"string","description":"Status after deletion action is performed"}},"title":"DeleteResponse"},"DeletedItem":{"type":"object","description":"Deletion response after delete action on draft booking item","properties":{"id":{"type":"string","description":"Booking item ID for which action is requested"},"status":{"type":"string","description":"Status of the item after action is performed"}},"title":"DeleteItem"}},"securitySchemes":{"OAuth2":{"flows":{"clientCredentials":{"tokenUrl":"https://apis.egencia.com/auth/v1/token"}},"type":"oauth2"}}}}