{"introduction":"This document provides a detailed overview of the Approval Customisation SPI and how it can be used to customize the approval process as per clients requirements. The document contains both functional and technical details, which are intended to help developers understand the functionality of the SPI and how it can be implemented in their applications.","audience":{"label":"Audience","description":"This document is aimed for Egencia customers, partners and software developers who would like to consume the Approval Customisation SPI."},"overview":{"label":"Overview","description":"Approval Customisation SPI gives Egencia customers greater control over their approval process and allows them to customize certain steps along the approval process. This provides more flexibility to each customer as per their unique and specific approval use case. This document will help you to find links to different SPI endpoints and a general overview of the SPI status codes you can expect from Approval Customisation SPI endpoints."},"versioning":{"versions":[{"id":"1.0","change_description":"First stable version."}]},"error_codes":[{"code":"EGE-ER-OS-4001","description":"You do not have sufficient permissions to perform approve/deny action. Contact your admin."},{"code":"EGE-ER-OS-4002","description":"Resource not found, you are trying to access an invalid or non existent resource."},{"code":"EGE-ER-OS-5001","description":"Unable to process your request right now. Please try again later."},{"code":"EGE-ER-OS-5004","description":"There was an error in approving/denying the following items [list of item ids]. Please try again."},{"code":"EGE-ER-OS-5005","description":"Approval is not required for this trip."}],"api_details":{"label":"Approval Customisation SPI details","subheadings":[{"label":"Functional description","description":"When a user clicks on the Book Now button on the Egencia checkout page, the approval process is triggered. During this approval process, the Approval Customisation SPI comes into play and enables organisations to modify the approval workflow as per their needs. \nCustomer can approve or specify approver for an entire booking through the SPI response. \nCurrently in version 1, this feature allows organisations to specify if approval is required for both level 1 and level 2, as well as specify the approvers for both levels. We make an API call to the external system with the booking data to fetch this information from client system which is then plugged into the approval process. This enhances the client's approval experience."},{"label":"What","description":"Clients will be able to provide if approval is required for both level 1 and 2 as well as the approvers for both these levels based on booking data."},{"label":"When","description":"At checkout time, when the user clicks on the book button, Egencia platform will call the clients web service to send the booking data. This booking data is a SPI contract mentioned below. Depending on the clients response, we will plug in the if approval is required input and approvers into our approval process."},{"label":"Mobile / Smartphone","description":"The Approval Customisation Interface is compatible with mobile and it will have the same behaviour. Although there might be an impact on response time and processing time due to network/infra related issues."},{"label":"Communication Security","description":"For Data Security, all the Egencia communication will happen over the SSL/TLS channel. This ensures that all data that travels between the Egencia server and your program are encrypted. This protects your credentials and the transmitted data."}]},"enumerations":{"Approval Customisation Fields":[{"name":"line_of_business","description":"Line for bussniess of the booking data for which to fetch custom approval details"},{"name":"company.id","description":"The company id of the booking made"},{"name":"company.point_of_sale","description":"The company's point of sale of the booking made"},{"name":"travelers.email","description":"The traveler's email id"},{"name":"travelers.is_guest_traveler","description":"If the traveler. is a guest traveler or not"},{"name":"travelers.price.amount","description":"Price of the booking"},{"name":"travelers.price.currency","description":"Currency of the booking"},{"name":"missionNumber","description":"Mission Number / Project Code"},{"name":"CC1","description":"Cost Center 1"},{"name":"CC2","description":"Cost Center 2"},{"name":"CC3","description":"Cost Center 3"},{"name":"CC4","description":"Cost Center 4"},{"name":"CC5","description":"Cost Center 5"},{"name":"freeField0","description":"Free Field 0"},{"name":"freeField1","description":"Free Field 1"}]},"http_verbs":[{"label":"Security Headers","description":"One of the below mentioned headers is passed with the request based on the Authentication scheme opted.","values":[{"name":"x-api-key","description":"Api Key"},{"name":"Authorization","description":"Basic Auth"}]},{"label":"Definitions","description":"","values":[{"name":"SPI","description":"Service Provider Interface"},{"name":"Third Party/External Service","description":"A Company is called with this SPI and wants to use the custom approval process"},{"name":"Consumer","description":"Anybody who consumes the SPI."},{"name":"Major version","description":"Please refer to Versions section in this document."},{"name":"CDF","description":"Means Custom Data Fields. These are the fields that are configurable for the Customer. They represent the analytical data or reporting data. This information will be in billing data, receipt and invoices. It helps generally for budget allocation and reconciliation."},{"name":"Trip","description":"A Trip is a functional container which regroups a list of products and services. For example, a Trip Rio can contain a flight from a destination A to Rio and a hotel."}]}],"documentation_link":"https://apis.egencia.com/approval/docs/api-docs"}