openapi: 3.0.3 info: title: Airline Analytics Authentication API version: v1.1 description: In order to measure and continuously improve HTS Ancillaries performance, specific events occurring during a customer session can be sent by the partner airlines using some dedicated endpoints. servers: - url: https://airlines-api.hopper.com/airline/v1.1 tags: - description: 'This API is authenticated with OAuth 2, Client Credentials grant.\ Clients should use their `client_id` and `client_secret` to obtain an `access_token`.\ The `access_token` should be included in every request, as a `Bearer` token on an `Authorization` header.\ Note that `access_token`s eventually expire, requiring a new token to be fetched. see [authentication](#tag/Authentication)' name: Authentication paths: /auth: post: description: Get an authentication token operationId: postAuth requestBody: content: application/json: schema: $ref: '#/components/schemas/auth_request' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/auth_response' description: The authentication response '400': content: application/json: schema: $ref: '#/components/schemas/bad_request' description: Syntactic errors were encountered while handling the request '401': description: The client could not be authenticated '403': description: The authenticated client does not have permission to call this endpoint '422': content: application/json: schema: $ref: '#/components/schemas/unprocessable_entity' description: Semantic errors were encountered while handling the request summary: Create an authentication token tags: - Authentication components: schemas: bad_request: example: errors: - code: code messages: key: messages message: message - code: code messages: key: messages message: message properties: errors: items: $ref: '#/components/schemas/error' type: array required: - errors title: bad_request type: object unprocessable_entity: example: errors: - code: code messages: key: messages message: message - code: code messages: key: messages message: message properties: errors: items: $ref: '#/components/schemas/error' type: array required: - errors title: unprocessable_entity type: object token_type: enum: - Bearer title: token_type type: string error: example: code: code messages: key: messages message: message properties: message: type: string code: type: string messages: additionalProperties: type: string title: map_string type: object required: - message title: error type: object auth_response: example: access_token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtjN2FjWmV4bHBvZk1QY3V6UF9HTyJ9.eyJpc3MiOiJodHRwczovL2hvcHBlci1hcGkuYXV0aDAuY29tLyIsInN1YiI6IlhVdWpRSlRCODFPdkVTODh1VDlPNHhIUzVNUkpZV2tCQGNsaWVudHMiLCJhdWQiOiJodHRwczovL3N0YWdpbmcuYXBpLmhvcHBlci5jb20iLCJpYXQiOjE2NTI5ODQ2ODEsImV4cCI6MTY1MzA3MTA4MSwiYXpwIjoiWFV1alFKVEI4MU92RVM4OHVUOU80eEhTNU1SSllXa0IiLCJzY29wZSI6ImFsbDpwcmljZWZyZWV6ZSBhbGw6Z2VuZXJhbCBhbGw6Y2ZhciIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.VlKuMHJkGpOA-L9oJn-UBEOD7VdzLXQSn2DiTrlROR521uHupkRnI-_tDjYD-sygmNmI0bIb0UEQ2ETOyalFZICge8-qWpxBccM_rfgPemZ6Rs9fZSY8XjZtaM9sQEJ4OqwXQiIU0tQDVMfegj-4wnKglHAKzJ7X7wb05nSCP_g2cXIXL9mapnLT8vf609CZIz2cRuWvww5E9qlJ6mUQxsYBv9xwJoyF3IK8TCWUFFvu2xSendMltvUlCHJHjWpddFDTdkl1ErHq_ta-3e1n2ZjU1HVVux9dwWoZQDYJFprtDYjPS-jVhEljGMASB74zf_xbcWCwoa_HJlxLlhBhoQ scope: all:general all:cfar token_type: Bearer expires_in: 86400 properties: access_token: description: The authentication token example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtjN2FjWmV4bHBvZk1QY3V6UF9HTyJ9.eyJpc3MiOiJodHRwczovL2hvcHBlci1hcGkuYXV0aDAuY29tLyIsInN1YiI6IlhVdWpRSlRCODFPdkVTODh1VDlPNHhIUzVNUkpZV2tCQGNsaWVudHMiLCJhdWQiOiJodHRwczovL3N0YWdpbmcuYXBpLmhvcHBlci5jb20iLCJpYXQiOjE2NTI5ODQ2ODEsImV4cCI6MTY1MzA3MTA4MSwiYXpwIjoiWFV1alFKVEI4MU92RVM4OHVUOU80eEhTNU1SSllXa0IiLCJzY29wZSI6ImFsbDpwcmljZWZyZWV6ZSBhbGw6Z2VuZXJhbCBhbGw6Y2ZhciIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.VlKuMHJkGpOA-L9oJn-UBEOD7VdzLXQSn2DiTrlROR521uHupkRnI-_tDjYD-sygmNmI0bIb0UEQ2ETOyalFZICge8-qWpxBccM_rfgPemZ6Rs9fZSY8XjZtaM9sQEJ4OqwXQiIU0tQDVMfegj-4wnKglHAKzJ7X7wb05nSCP_g2cXIXL9mapnLT8vf609CZIz2cRuWvww5E9qlJ6mUQxsYBv9xwJoyF3IK8TCWUFFvu2xSendMltvUlCHJHjWpddFDTdkl1ErHq_ta-3e1n2ZjU1HVVux9dwWoZQDYJFprtDYjPS-jVhEljGMASB74zf_xbcWCwoa_HJlxLlhBhoQ type: string scope: description: Token's scope example: all:general all:cfar type: string expires_in: description: Token's expiration (in seconds) example: 86400 format: int32 type: integer token_type: $ref: '#/components/schemas/token_type' required: - access_token - expires_in - scope - token_type title: auth_response type: object auth_request: properties: client_id: type: string client_secret: type: string required: - client_id - client_secret title: auth_request type: object securitySchemes: PartnerAuth: description: 'This API is authenticated with OAuth 2, Client Credentials grant.\ Clients should use their `client_id` and `client_secret` to obtain an `access_token`.\ The `access_token` should be included in every request, as a `Bearer` token on an `Authorization` header.\ Note that `access_token`s eventually expire, requiring a new token to be fetched. see [authentication](#tag/Authentication)' scheme: bearer type: http SessionAuth: description: '# Header Parameters | headerName | description | |-----------------|----------------------------------------------------------------------------------------------------| | `HC-Session-ID` | string
**Example**: `9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f`
The ID of the current session | ' in: header name: HC-Session-ID type: apiKey