openapi: 3.2.0 info: title: SPI Validation API version: v1.0 description: Validation interface that will request authorization of booking based on the data provided at checkout time.This is only an example. The path and the host are specific for each implementor. However, the model is fixed and versioned. servers: - url: https://apis.egencia.com/openconnect-validation-service description: Generated server url tags: - description: Validation interface that will request authorization of booking based on the data provided at checkout time.This is only an example. The path and the host are specific for each implementor. However, the model is fixed and versioned. name: validation paths: /v1/validateFields: post: operationId: validateFields requestBody: content: application/json: schema: $ref: '#/components/schemas/CDFValidationRequest' required: true responses: '200': content: application/json: examples: Validation failed with errors: description: Validation failed with errors value: valid: false errors: - user_id: 454545 error_fields: - name: Project Code expected_value: '' error_description: The Project Code is unknown, please try another value. - name: Travel Request Id expected_value: '' error_description: Travel Request or Mission Number Not Found.Please verify your entry or create a new Travel Request or Mission Number and request its approval before booking on Egencia. Validation success with no errors: description: Validation success with no errors value: valid: true errors: [] schema: $ref: '#/components/schemas/CDFValidationResponse' description: 'Ok : Booking request will be granted. Booking will happen.' '400': description: 'Bad Request : Booking will not happen. The User will be blocked in Checkout page.' '401': description: 'Unauthorized : Authentication Failure. Booking will not happen. The User will be blocked in Checkout page with a message telling the User to contact his system administrator as there was an error with his internal software.' '403': description: 'Forbidden : Booking will not happen. The User will be blocked in Checkout page with a message telling the User to contact his system administrator as there was an error with his internal software.' '500': description: 'Internal Server Error : Booking will not happen. The User will be blocked in Checkout page with a message telling the User to contact his system administrator as there was an error with the internal software.' security: - Basic Auth Credentials scheme: [] summary: Validate the booking fields tags: - validation components: schemas: ErrorField: description: Validation error field properties: error_description: type: string description: 'The error description provided by the Consumer in the language specified in the request. This messages will be displayed to the user so that he can understand and correct the information in the form.' expected_value: type: string description: The expected value for the field. Currently not supported in this version. name: type: string description: The name of field which is not valid. title: Validation error field CDFValidationRequest: description: Validation request properties: booker: $ref: '#/components/schemas/BookerForThirdParty' company_id: type: integer format: int32 description: Egencia internal company identifier. example: 654534 language: type: string description: 'The ISO 639-1 Code two letters language code. This value is passed in the request. This is the language that the user uses on Egencia website. Error messages shall match this language.' example: EN partner_customer_code: type: string description: The partner_customer_code is the unique identifier of a client in the application of the partner. For partners who request it, partner_customer_code must be set everytime a customer subscribes to those partners. example: JE3B request_timestamp: type: string description: UTC Time stamp of the request ISO-8601. The format is the following:"yyyy-MM-ddTHH:mm:SSZ" example: '2021-06-29T07:36:48Z' travelers: type: array description: The list of Travelers that included in that booking request and could be validated. items: $ref: '#/components/schemas/Traveler' trip_info: type: array description: Placeholder that can accommodate trip Information. items: type: object description: Placeholder that can accommodate trip Information. title: Validation Request ValidationField: description: Validation field properties: name: type: string description: The name of field which needs to be validated for. example: Project Code value: type: string description: The Value of the corresponding field. example: F_AUTO title: Validation field Error: description: Validation error properties: error_fields: type: array description: The list of field which are not valid. items: $ref: '#/components/schemas/ErrorField' user_id: type: integer format: int32 description: TUID (Egencia Travelers Unique Identifier) of the traveler. title: Validation error Traveler: description: Traveler details properties: email: type: string description: Email address of the traveler. example: test@egencia.com user_id: type: integer format: int64 description: TUID (Egencia Travelers Unique Identifier) of the traveler. example: 454545 validation_fields: type: array description: The list of the fields and their corresponding values which needs to be validated. items: $ref: '#/components/schemas/ValidationField' title: Traveler BookerForThirdParty: description: Booker details properties: email: type: string description: The email address of the person who is doing the booking. example: test@egencia.com is_agent: type: boolean description: Flag indicating if an Egencia Travel Consultant/Agent is doing the booking. example: false is_arranger: type: boolean description: Flag indicating if the booker has the arranger role (An arranger can arrange booking for other persons). example: false user_id: type: integer format: int64 description: TUID (Egencia Travelers Unique Identifier) of the user who is doing the booking. example: 12345 title: Booker CDFValidationResponse: description: Validation response properties: errors: type: array description: The List of errors for the traveler. items: $ref: '#/components/schemas/Error' valid: type: boolean description: The value describes whether validation was successful or failure. title: Validation Response