OPI Token Exchange Service API

Oracle Token Exchange Service Specification Compatible with OPERA Cloud release 1.0.1. 1 operation(s) documented; base path /tokenExchange/v1. Harvested verbatim from Oracle's public hospitality-api-docs repository (Swagger 2.0, release 1.0.1).

OpenAPI Specification

oracle-hospitality-property-v1-tokenexchange.json Raw ↑
{
  "swagger": "2.0",
  "info": {
    "contact": {
      "email": "hospitality_apis_ww_grp@oracle.com"
    },
    "description": "Oracle Token Exchange Service Specification<br /><br /> Compatible with OPERA Cloud release 1.0.1.<br /><br /><p> This document and all content within is available under the Universal Permissive License v 1.0 (https://oss.oracle.com/licenses/upl). Copyright (c) 2020, 2026 Oracle and/or its affiliates.</p>",
    "license": {
      "name": "UPL",
      "url": "https://opensource.org/licenses/upl"
    },
    "termsOfService": "https://www.oracle.com/legal/terms.html",
    "title": "OPI Token Exchange Service API",
    "version": "1.0.1"
  },
  "schemes": [
    "https"
  ],
  "basePath": "/tokenExchange/v1",
  "paths": {
    "/hotels/{hotelCode}/tokens": {
      "post": {
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "description": "OPERA Hotel Code",
            "in": "path",
            "name": "hotelCode",
            "required": true,
            "type": "string",
            "x-example": "Hotel123"
          },
          {
            "description": "TokenRequest object",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "description": "JSON object containing the card information",
              "properties": {
                "expiryDate": {
                  "description": "Expiration Date, YYMM format",
                  "example": "2312",
                  "pattern": "^[0-9]{2}(0[1-9]|1[0-2])$",
                  "type": "string"
                },
                "pan": {
                  "description": "Primary Account Number (PAN)",
                  "example": "1111222233334444",
                  "pattern": "^[0-9]{8,19}$",
                  "type": "string"
                }
              },
              "required": [
                "expiryDate",
                "pan"
              ],
              "type": "object"
            }
          },
          {
            "$ref": "#/parameters/authKey"
          },
          {
            "$ref": "#/parameters/x-app-key"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "schema": {
              "description": "TokenResponse object",
              "properties": {
                "cardType": {
                  "description": "OPERA Card Type",
                  "example": "VA",
                  "type": "string"
                },
                "expiryDate": {
                  "description": "Expiration Date, YYMM format",
                  "example": "2312",
                  "type": "string"
                },
                "pan": {
                  "description": "Masked Primary Account Number (PAN)",
                  "example": "XXXXXXXXXXXX4444",
                  "type": "string"
                },
                "token": {
                  "description": "Card Token",
                  "example": "483204890324827",
                  "type": "string"
                }
              },
              "required": [
                "cardType",
                "expiryDate",
                "pan",
                "token"
              ],
              "type": "object"
            }
          },
          "400": {
            "description": "The request received was invalid",
            "schema": {
              "description": "Problem Details for HTTP APIs",
              "example": {
                "correlationId": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
                "detail": "There are validation errors for the object in the request",
                "o:errorCode": "OPICS-BAD_REQUEST",
                "o:errorDetails": [
                  {
                    "o:errorCode": "OPICS-0300",
                    "o:errorPath": "expiryDate",
                    "title": "expiryDate must be in the form of YYMM",
                    "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"
                  }
                ],
                "status": 400,
                "title": "Bad Request",
                "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"
              },
              "properties": {
                "correlationId": {
                  "description": "Unique identifier value that is attached to the request that allows reference to a particular transaction",
                  "example": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
                  "type": "string"
                },
                "detail": {
                  "description": "Detailed error message",
                  "example": "There are validation errors for the object",
                  "type": "string"
                },
                "o:errorCode": {
                  "description": "Application specific error code",
                  "example": "OPICS-BAD_REQUEST",
                  "type": "string"
                },
                "o:errorDetails": {
                  "description": "Drill down to the details",
                  "items": {
                    "$ref": "#/definitions/ProblemDetail"
                  },
                  "type": "array"
                },
                "o:errorPath": {
                  "description": "JSON path to indicate where the error occurs",
                  "example": "cards[1]",
                  "type": "string"
                },
                "status": {
                  "description": "HTTP status code",
                  "example": 400,
                  "format": "int32",
                  "type": "integer"
                },
                "title": {
                  "description": "Summary error message",
                  "example": "Bad Request",
                  "type": "string"
                },
                "type": {
                  "description": "HTTP error code page",
                  "example": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
                  "type": "string"
                }
              },
              "required": [
                "title",
                "type"
              ],
              "type": "object"
            }
          },
          "401": {
            "description": "Client request lacks valid authentication credentials for the requested resource"
          },
          "403": {
            "description": "Client request lacks permissions for the requested resource"
          },
          "404": {
            "description": "The target resouce was not found"
          },
          "405": {
            "description": "Method not allowed for the target resource"
          },
          "406": {
            "description": "The Server cannot produce a response matching the values in the request's content headers"
          },
          "415": {
            "description": "The server refuses to accept the request because the payload is in an unsupported format"
          },
          "422": {
            "description": "The server received a decline response from the upstream server it accessed in attempting to complete the request",
            "schema": {
              "description": "Problem Details for HTTP APIs",
              "example": {
                "correlationId": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
                "detail": "Transaction declined by Payment Service Provider. Decline code: 05 - Do Not Honor",
                "o:errorCode": "OPICS-0204",
                "status": 422,
                "title": "Unprocessable Entity",
                "type": "https://webconcepts.info/specs/IETF/RFC/4918"
              },
              "properties": {
                "correlationId": {
                  "description": "Unique identifier value that is attached to the request that allows reference to a particular transaction",
                  "example": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
                  "type": "string"
                },
                "detail": {
                  "description": "Detailed error message",
                  "example": "There are validation errors for the object",
                  "type": "string"
                },
                "o:errorCode": {
                  "description": "Application specific error code",
                  "example": "OPICS-BAD_REQUEST",
                  "type": "string"
                },
                "o:errorDetails": {
                  "description": "Drill down to the details",
                  "items": {
                    "$ref": "#/definitions/ProblemDetail"
                  },
                  "type": "array"
                },
                "o:errorPath": {
                  "description": "JSON path to indicate where the error occurs",
                  "example": "cards[1]",
                  "type": "string"
                },
                "status": {
                  "description": "HTTP status code",
                  "example": 400,
                  "format": "int32",
                  "type": "integer"
                },
                "title": {
                  "description": "Summary error message",
                  "example": "Bad Request",
                  "type": "string"
                },
                "type": {
                  "description": "HTTP error code page",
                  "example": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
                  "type": "string"
                }
              },
              "required": [
                "title",
                "type"
              ],
              "type": "object"
            }
          },
          "500": {
            "description": "The server encountered an internal error or misconfiguration and was unable to complete the request",
            "schema": {
              "description": "Problem Details for HTTP APIs",
              "example": {
                "correlationId": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
                "detail": "The server encountered an internal error or misconfiguration and was unable to complete your request",
                "o:errorCode": "OPICS-INTERNAL_SERVER_ERROR",
                "status": 500,
                "title": "Internal Server Error",
                "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1"
              },
              "properties": {
                "correlationId": {
                  "description": "Unique identifier value that is attached to the request that allows reference to a particular transaction",
                  "example": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
                  "type": "string"
                },
                "detail": {
                  "description": "Detailed error message",
                  "example": "There are validation errors for the object",
                  "type": "string"
                },
                "o:errorCode": {
                  "description": "Application specific error code",
                  "example": "OPICS-BAD_REQUEST",
                  "type": "string"
                },
                "o:errorDetails": {
                  "description": "Drill down to the details",
                  "items": {
                    "$ref": "#/definitions/ProblemDetail"
                  },
                  "type": "array"
                },
                "o:errorPath": {
                  "description": "JSON path to indicate where the error occurs",
                  "example": "cards[1]",
                  "type": "string"
                },
                "status": {
                  "description": "HTTP status code",
                  "example": 400,
                  "format": "int32",
                  "type": "integer"
                },
                "title": {
                  "description": "Summary error message",
                  "example": "Bad Request",
                  "type": "string"
                },
                "type": {
                  "description": "HTTP error code page",
                  "example": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
                  "type": "string"
                }
              },
              "required": [
                "title",
                "type"
              ],
              "type": "object"
            }
          },
          "502": {
            "description": "The server received an invalid response from the upstream server it accessed in attempting to complete the request"
          },
          "503": {
            "description": "The server is not ready to handle the request"
          },
          "504": {
            "description": "The server did not receive a timely response from an upstream server it needed to access in order to complete the request",
            "schema": {
              "description": "Problem Details for HTTP APIs",
              "example": {
                "correlationId": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
                "detail": "The server did not receive a timely response from an upstream server it needed to access in order to complete your request",
                "o:errorCode": "OPICS-0100",
                "status": 504,
                "title": "Gateway Timeout",
                "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5"
              },
              "properties": {
                "correlationId": {
                  "description": "Unique identifier value that is attached to the request that allows reference to a particular transaction",
                  "example": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
                  "type": "string"
                },
                "detail": {
                  "description": "Detailed error message",
                  "example": "There are validation errors for the object",
                  "type": "string"
                },
                "o:errorCode": {
                  "description": "Application specific error code",
                  "example": "OPICS-BAD_REQUEST",
                  "type": "string"
                },
                "o:errorDetails": {
                  "description": "Drill down to the details",
                  "items": {
                    "$ref": "#/definitions/ProblemDetail"
                  },
                  "type": "array"
                },
                "o:errorPath": {
                  "description": "JSON path to indicate where the error occurs",
                  "example": "cards[1]",
                  "type": "string"
                },
                "status": {
                  "description": "HTTP status code",
                  "example": 400,
                  "format": "int32",
                  "type": "integer"
                },
                "title": {
                  "description": "Summary error message",
                  "example": "Bad Request",
                  "type": "string"
                },
                "type": {
                  "description": "HTTP error code page",
                  "example": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
                  "type": "string"
                }
              },
              "required": [
                "title",
                "type"
              ],
              "type": "object"
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ],
        "tags": [
          "Hotels"
        ],
        "description": "Converts Primary Account Number (PAN) into Token issued by Payment Service Providers",
        "operationId": "openPaymentTokenExchange",
        "summary": "Card Tokenization"
      }
    }
  },
  "definitions": {
    "CardInfo": {
      "description": "JSON object containing the card information",
      "properties": {
        "expiryDate": {
          "description": "Expiration Date, YYMM format",
          "example": "2312",
          "pattern": "^[0-9]{2}(0[1-9]|1[0-2])$",
          "type": "string"
        },
        "pan": {
          "description": "Primary Account Number (PAN)",
          "example": "1111222233334444",
          "pattern": "^[0-9]{8,19}$",
          "type": "string"
        },
        "recordNumber": {
          "description": "Record number, the value must be unique within the collection",
          "example": 1,
          "format": "int32",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "expiryDate",
        "pan",
        "recordNumber"
      ],
      "type": "object"
    },
    "ProblemDetail": {
      "description": "Problem Details for HTTP APIs",
      "properties": {
        "correlationId": {
          "description": "Unique identifier value that is attached to the request that allows reference to a particular transaction",
          "example": "MzdhODNkZmMtNzk5YS00OTYxLTg3YTMtM2ZkYTE4YjJlMzc0",
          "type": "string"
        },
        "detail": {
          "description": "Detailed error message",
          "example": "There are validation errors for the object",
          "type": "string"
        },
        "o:errorCode": {
          "description": "Application specific error code",
          "example": "OPICS-BAD_REQUEST",
          "type": "string"
        },
        "o:errorDetails": {
          "description": "Drill down to the details",
          "items": {
            "$ref": "#/definitions/ProblemDetail"
          },
          "type": "array"
        },
        "o:errorPath": {
          "description": "JSON path to indicate where the error occurs",
          "example": "cards[1]",
          "type": "string"
        },
        "status": {
          "description": "HTTP status code",
          "example": 400,
          "format": "int32",
          "type": "integer"
        },
        "title": {
          "description": "Summary error message",
          "example": "Bad Request",
          "type": "string"
        },
        "type": {
          "description": "HTTP error code page",
          "example": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
          "type": "string"
        }
      },
      "required": [
        "title",
        "type"
      ],
      "type": "object"
    },
    "TokenInfo": {
      "description": "TokenInfo object",
      "properties": {
        "cardType": {
          "description": "OPERA Card Type",
          "example": "VA",
          "type": "string"
        },
        "expiryDate": {
          "description": "Expiration Date, YYMM format",
          "example": "2312",
          "type": "string"
        },
        "pan": {
          "description": "Masked Primary Account Number (PAN)",
          "example": "XXXXXXXXXXXX4444",
          "type": "string"
        },
        "recordNumber": {
          "description": "Record number",
          "example": 1,
          "format": "int32",
          "type": "integer"
        },
        "token": {
          "description": "Card Token",
          "example": "483204890324827",
          "type": "string"
        }
      },
      "required": [
        "cardType",
        "expiryDate",
        "pan",
        "recordNumber",
        "token"
      ],
      "type": "object"
    }
  },
  "securityDefinitions": {
    "jwt": {
      "in": "header",
      "name": "Authorization",
      "type": "apiKey"
    }
  },
  "parameters": {
    "authKey": {
      "name": "authorization",
      "description": "Bearer token that needs to be passed which is generated post user authentication",
      "type": "string",
      "in": "header",
      "required": true
    },
    "x-app-key": {
      "name": "x-app-key",
      "description": "Client or Partner Application Key",
      "type": "string",
      "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$",
      "in": "header",
      "required": true
    }
  },
  "tags": [
    {
      "description": "Hotel Endpoints",
      "name": "Hotels"
    }
  ],
  "externalDocs": {
    "description": "Find out more about Oracle Hospitality",
    "url": "https://docs.oracle.com/en/industries/hospitality/integration_platforms.html"
  }
}