Traveloka 3.5 Booking - Cancel API

The 3.5 Booking - Cancel API from Traveloka — 1 operation(s) for 3.5 booking - cancel.

Documentation

Specifications

Other Resources

OpenAPI Specification

traveloka-3-5-booking-cancel-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Traveloka Atlas 3.5 Booking - Cancel API
  version: ''
  description: "Traveloka Specification API for Accommodation Provider\n\n**General Notes**\n* Please ensure that the endpoint is configured to connect using **HTTPS via port 443.**\n* For fields with type \"String\", if there's no value, do not return empty string (e.g. \"\"), instead do not return the field at all\n\nThis API uses custom Basic Authentication.\n\nHow to get a token:\n- Combine username and password using a colon: [username:password]\n- Encode that using Base64\n- Example:\n  ```\n  echo -n 'user:pass' | base64\n  -> dXNlcjpwYXNz\n  ```\n\nThen use:\n```\nAuthorization: Basic dXNlcjpwYXNz\n```\n"
servers:
- url: http://localhost:8080
  description: Generated server url
security: []
tags:
- name: 3.5 Booking - Cancel
paths:
  /cancel:
    post:
      tags:
      - 3.5 Booking - Cancel
      summary: Cancel a booking
      description: This operation is for Traveloka to request to cancel a booking.
      operationId: cancel
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelBookingRequest'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelBookingResponse'
              examples:
                Success cancel response:
                  summary: Success cancel response
                  description: Success cancel response
                  value:
                    status: OK
                    failedRoomBookingIds:
                    - string
                Http status status 200 with error example:
                  summary: This example is using CANCELLATION_FAILED error
                  description: Http status status 200 with error example
                  value:
                    requestId: requestId
                    status: FAILED
                    error:
                      errorId: CANCELLATION_FAILED
                      errorMessage: Cancellation failed
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelBookingErrorResponse'
              examples:
                Error 400 example:
                  summary: This example is using INVALID_REQUEST_FIELD error
                  description: Error 400 example
                  value:
                    requestId: requestId
                    status: FAILED
                    error:
                      errorId: INVALID_REQUEST_FIELD
                      errorMessage: Invalid request field
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelBookingErrorResponse'
              examples:
                Error 429 example:
                  summary: This example is using TOO_MANY_REQUESTS error
                  description: Error 429 example
                  value:
                    requestId: requestId
                    status: FAILED
                    error:
                      errorId: TOO_MANY_REQUESTS
                      errorMessage: Too many requests
        '500':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelBookingErrorResponse'
              examples:
                Error 500 example:
                  summary: This example is using UNKNOWN_SERVER_ERROR error
                  description: Error 500 example
                  value:
                    requestId: requestId
                    status: FAILED
                    error:
                      errorId: UNKNOWN_SERVER_ERROR
                      errorMessage: Unknown server error
      servers:
      - url: http://localhost:8080
        description: Generated server url
components:
  schemas:
    HotelBookingCancelRequest:
      required:
      - issuanceId
      - uniqueId
      type: object
      properties:
        issuanceId:
          type: string
          description: Issuance Id generated by provider (itinerary ID).
        uniqueId:
          type: string
          description: The Traveloka id that is associated with this booking.
        hotelRoomBookingIds:
          type: array
          items:
            type: string
    Error:
      type: object
      properties:
        errorId:
          type: string
        errorMessage:
          type: string
    CancelBookingRequest:
      required:
      - hotelBooking
      type: object
      properties:
        hotelBooking:
          allOf:
          - $ref: '#/components/schemas/HotelBookingCancelRequest'
          - description: Booking detail.
    CancelBookingErrorResponse:
      required:
      - error
      - status
      type: object
      properties:
        status:
          type: string
          description: "    Should be one of these:\n\n    FAILED -> return FAILED if there's an error during processing the request\n"
          example: FAILED
          enum:
          - FAILED
        error:
          allOf:
          - $ref: '#/components/schemas/Error'
          - description: For complete error enums, please check on FAQ > Error Object
    CancelBookingResponse:
      required:
      - status
      type: object
      properties:
        status:
          type: string
          description: "    Should be one of these:\n\n    OK -> return OK to if booking has been successfully canceled.\n\n    ALREADY_CANCELLED -> return ALREADY_CANCELLED to indicate the booking has already been canceled\n\n    FAILED -> return FAILED if there's an error during processing the request\n"
          enum:
          - OK
          - ALREADY_CANCELLED
          - PARTIALLY_FAILED
          - FAILED
        failedRoomBookingIds:
          type: array
          description: Room booking id that is failed to cancel.
          example:
          - EER170816104137189
          items:
            type: string
            description: Room booking id that is failed to cancel.
            example: '["EER170816104137189"]'
        error:
          allOf:
          - $ref: '#/components/schemas/Error'
          - description: For complete error enums, please check on FAQ > Error Object
  securitySchemes:
    basicAuth:
      type: http
      description: 'Custom Basic Auth format:

        - Format: username:password

        - Encode with Base64

        - Send in header: Authorization: Basic base64(username:password)

        '
      scheme: basic
x-tagGroups:
- name: Traveloka Atlas API (1.0)
  tags:
  - 1.1 Content - Hotel & Room
  - 2.1 Search - HotelList
  - 2.2 Search - RoomList
  - 2.3 Search - BulkRoomList
  - 3.1 Booking - Book
  - 3.2 Booking - IssueCheck
  - 3.3 Booking - Issue
  - 3.4 Booking - BookingSummary
  - 3.5 Booking - Cancel