openapi: 3.2.0 info: title: Amex Gbt Custom Data Fields (CDF) API version: '1.0' description: 'Operations tagged Custom Data Fields (CDF) across 2 of this provider''s published API definitions: amex-gbt-company-cdf-api-openapi.json, amex-gbt-service-openconnect-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: https://apis.egencia.com/openconnect/api description: Generated server url tags: - description: CDF APIs to retrieve Definitions and Manage Values. name: Custom Data Fields (CDF) paths: /v1/companies/{companyId}/cdfs: get: description: "

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
companyIdIntegerId of the company for which CDFs needs to be fetched
nameStringName of the CDF if only a particular CDF needs to be fetched
\n
\n

Examples:

\n\n

Retrieving CDFs for company_id : 42219

\n
\n   \n   GET https://apis-eu-west-1.lab.egencia.cloud/openconnect/api/v1/companies/42219/cdfs\n       -> 200 OK\n       {\n           \"cdfs\": [\n               {\n                   \"id\": 27,\n                   \"name\": \"Main cost centre\",\n                   \"code\": \"COST_CENTER_1\",\n                   \"status\": \"ACTIVE\",\n                   \"field_type\": \"LIST\"\n               },\n               {\n                   \"id\": 30,\n                   \"name\": \"Secondary cost centre\",\n                   \"code\": \"COST_CENTER_2\",\n                   \"status\": \"ACTIVE\",\n                   \"field_type\": \"LIST\"\n               },\n               {\n                   \"id\": 1884,\n                   \"name\": \"Employee ID\",\n                   \"code\": \"COST_CENTER_3\",\n                   \"status\": \"ACTIVE\",\n                   \"field_type\": \"FREE_FIELD\"\n               },\n               {\n                   \"id\": 31,\n                   \"name\": \"Free field 1\",\n                   \"code\": \"BDC\",\n                   \"status\": \"ACTIVE\",\n                   \"field_type\": \"FREE_FIELD\"\n               }\n           ]\n       }\n   
" operationId: getCdfDefinitions parameters: - in: path name: companyId required: true schema: type: integer format: int64 - in: query name: name required: false schema: type: string responses: '200': content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/CdfDefinitions' description: OK. '400': description: 'Bad Request : Invalid input or request' '401': description: 'Unauthorized : authentication token empty, invalid or expired.' '403': description: 'Forbidden : User not Validated for operation.' '404': description: 'Not Found : You are trying to access an invalid or non existent resource.' '422': description: 'Invalid input : invalid or missing required input.' '500': description: 'Internal Server Error : unable to process request' security: - OAuth2: [] summary: Fetch all CDF definitions for a company or corresponding to a CDF name tags: - Custom Data Fields (CDF) servers: - url: https://apis.egencia.com/openconnect/api description: Generated server url /v1/companies/{companyId}/cdfs/{definitionId}/values: get: description: "

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
companyIdIntegerId of the company
definitionIdIntegerId of the CDF definition for which values needs to be fetched
valueStringCDF value to search based on display value/label
countIntegerCount of CDF values to be fetched
startIntegerStart to support pagination
\n
\n

Examples:

\n\n

Successful response while retrieving CDF values for company_id : 42219 and definition_id : 27

\n
\n   \n   GET https://apis-eu-west-1.lab.egencia.cloud/openconnect/api/v1/companies/42219/cdfs/27/values?count=2&start=0\n       -> 200 OK\n       {\n           \"values\": [\n               {\n                   \"id\": 84429607,\n                   \"value\": \"test A&B\",\n                   \"description\" : \"test A&B\"\n               },\n               {\n                   \"id\": 84740706,\n                   \"value\": \"test AB\",\n                   \"description\" : \"test AB\"\n               }\n           ],\n           \"_links\": {\n               \"next\": {\n                   \"href\": \"https://apis-eu-west-1.lab.egencia.cloud/openconnect-service/v1/companies/42219/cdfs/27/values?count=2&start=2\"\n               }\n           }\n       }\n   

Successful response to search CDF value : test for company_id : 42219 and definition_id : 27

\n
\n   \n   GET https://apis-eu-west-1.lab.egencia.cloud/openconnect/api/v1/companies/42219/cdfs/27/values?value=test\n       -> 200 OK\n       {\n           \"values\": [\n               {\n                   \"id\": 83932305,\n                   \"value\": \"Testcc1\",\n                   \"child_count\":0\n               },\n               {\n                   \"id\": 84429607,\n                   \"value\": \"testValue1\",\n                   \"child_count\":0\n               },\n               {\n                   \"id\": 84429608,\n                   \"value\": \"testingCdf\",\n                   \"child_count\":0\n               }\n           ]\n       }\n   

Error response while retrieving CDF values for company_id : 42219 and definition_id : 1884

\n
\n   \n   GET https://apis-eu-west-1.lab.egencia.cloud/openconnect/api/v1/companies/42219/cdfs/1884/values?count=2&start=0\n       -> 422 Unprocessable Entity\n       {\n           \"error\": {\n               \"code\": \"EGE-ER-OS-4006\",\n               \"message\": \"CDF given in request has field type as free field.\"\n           }\n       }\n   
" operationId: getCdfValues parameters: - in: path name: companyId required: true schema: type: integer format: int64 - in: path name: definitionId required: true schema: type: integer format: int64 - in: query name: value required: false schema: type: string - in: query name: count required: false schema: type: integer format: int32 - in: query name: start required: false schema: type: integer format: int32 responses: '200': content: application/hal+json: schema: $ref: '#/components/schemas/CdfValuesResponse' application/json;charset=utf-8: schema: $ref: '#/components/schemas/CdfValuesResponse' description: OK. '400': description: 'Bad Request : Invalid input or request' '401': description: 'Unauthorized : authentication token empty, invalid or expired.' '403': description: 'Forbidden : User not Validated for operation.' '404': description: 'Not Found : You are trying to access an invalid or non existent resource.' '422': description: 'Invalid input : invalid or missing required input.' '500': description: 'Internal Server Error : unable to process request' security: - OAuth2: [] summary: Fetch all CDF values for a company and a CDF definition or corresponding to a CDF value tags: - Custom Data Fields (CDF) post: description: "

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
companyIdIntegerId of the company
definitionIdIntegerId of the CDF definition
valueStringValue of the CDF
descriptionStringDescription of the CDF Value
\n
\n

Examples:

\n\n

Creating CDF value : testws for company_id : 42219 and definition_id : 27

\n
\n   \n   POST https://apis-eu-west-1.lab.egencia.cloud/openconnect/api/v1/companies/42219/cdfs/27/values\n       {\n           \"value\":\"testws\",\n           \"description\":\"testws\"\n       }\n   
\n Successful Response: \n -> 201 Created\n {\n \"id\": 84736648\n }\n
" operationId: createCdfValue parameters: - in: path name: companyId required: true schema: type: integer format: int64 - in: path name: definitionId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/CdfValue' required: true responses: '201': content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/CdfValuesResponse' description: Created. '400': description: 'Bad Request : Invalid input or request' '401': description: 'Unauthorized : authentication token empty, invalid or expired.' '403': description: 'Forbidden : User not Validated for operation.' '404': description: 'Not Found : You are trying to access an invalid or non existent resource.' '422': description: 'Invalid input : invalid or missing required input.' '500': description: 'Internal Server Error : unable to process request' security: - OAuth2: [] summary: Create a new CDF value for a CDF of field type List tags: - Custom Data Fields (CDF) servers: - url: https://apis.egencia.com/openconnect/api description: Generated server url /v1/companies/{companyId}/cdfs/{definitionId}/values/{valueId}: delete: description: "

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
companyIdIntegerId of the company
definitionIdIntegerId of the CDF definition
valueIdIntegerId of the CDF value for which values needs to be updated
\n
\n

Examples:

\n\n

Delete CDF value with id : 676598 for company_id : 42219 and definition_id : 27

\n
\n   \n   DELETE https://apis-eu-west-1.lab.egencia.cloud/openconnect/api/v1/companies/42219/cdfs/27/values/676598\n   
\n Successful Response: \n -> 204 No Content\n
" operationId: deleteCdfValue parameters: - in: path name: companyId required: true schema: type: integer format: int64 - in: path name: definitionId required: true schema: type: integer format: int64 - in: path name: valueId required: true schema: type: integer format: int64 responses: '204': description: No Content. '401': description: 'Unauthorized : authentication token empty, invalid or expired.' '403': description: 'Forbidden : User not Validated for operation.' '404': description: 'Not Found : You are trying to access an invalid or non existent resource.' '500': description: 'Internal Server Error : unable to process request' security: - OAuth2: [] summary: Delete a CDF value for a CDF of field type List tags: - Custom Data Fields (CDF) get: description: "

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
companyIdIntegerId of the company
definitionIdIntegerId of the CDF definition for which values needs to be fetched
valueStringCDF value to search based on display value/label
countIntegerCount of CDF values to be fetched
startIntegerStart to support pagination
include_linksBooleanFetch CDF Links Flag
\n
\n

Examples:

\n

Successful response while retrieving linked CDF values for company_id : 53092, definition_id : 27, value=84428977

\n
\n               \n               GET https://apis-eu-west-1.lab.egencia.cloud/openconnect/api/v1/companies/53092/cdfs/27/values/84428977?start=0&count=100&include_links=false\n                   -> 200 OK\n                   {\n                       {\n                         \"id\": 84428977,\n                         \"value\": \"Value 1\",\n                         \"child_count\": 4\n                   }\n               \n            
\n
\n

Successful response to retrieve linked CDF value : test for company_id : 53092, definition_id : 27, value : 84428977

\n
\n               \n               GET https://apis-eu-west-1.lab.egencia.cloud/openconnect/api//v1/companies/53092/cdfs/27/values/84428977?start=0&count=100&include_links=true\n                   -> 200 OK\n                   {\n                    {\n                      \"id\": 84428977,\n                      \"value\": \"Value 1\",\n                      \"child_count\": 4,\n                      \"links\": {\n                       \"child\": [\n                         {\n                           \"value\": \"Link with CC1 - 1\",\n                           \"id\": \"6171129\"\n                         },\n                         {\n                           \"value\": \"Link with CC1 - 2\",\n                           \"id\": \"6171130\"\n                         },\n                         {\n                           \"value\": \"Link with CC1 - 3\",\n                           \"id\": \"6171131\"\n                         },\n                         {\n                           \"value\": \"Link with CC1 - 4\",\n                           \"id\": \"7685276\"\n                         }\n                       ]\n                       }\n                      }\n               \n            
\n
\n" operationId: getCdfLinkedValue parameters: - in: path name: companyId required: true schema: type: integer format: int64 - in: path name: definitionId required: true schema: type: integer format: int64 - in: path name: valueId required: true schema: type: string - in: query name: start required: false schema: type: integer format: int32 default: 0 - in: query name: count required: false schema: type: integer format: int32 default: 100 - in: query name: include_links required: false schema: type: boolean default: false responses: '200': content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/CdfValueLinks' description: OK. '400': description: 'Bad Request : Invalid input or request' '401': description: 'Unauthorized : authentication token empty, invalid or expired.' '403': description: 'Forbidden : User not Validated for operation.' '404': description: 'Not Found : You are trying to access an invalid or non existent resource.' '422': description: 'Invalid input : invalid or missing required input.' '500': description: 'Internal Server Error : unable to process request' security: - OAuth2: [] summary: Fetch all linked CDF values tags: - Custom Data Fields (CDF) put: description: "

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
companyIdIntegerId of the company
definitionIdIntegerId of the CDF definition
valueIdIntegerId of the CDF value for which values needs to be updated
valueStringValue of the CDF
descriptionStringDescription of the CDF Value
\n
\n

Examples:

\n\n

Updating CDF value for company_id : 42219, definition_id : 27 and value_id : 676598

\n
\n   \n   PUT https://apis-eu-west-1.lab.egencia.cloud/openconnect/api/v1/companies/42219/cdfs/27/values/676598\n       {\n           \"value\":\"testWSNew\",\n           \"description\":\"testWSNew\"\n       }\n   
\n Successful Response: \n -> 204 No Content\n
" operationId: updateCdfValue parameters: - in: path name: companyId required: true schema: type: integer format: int64 - in: path name: definitionId required: true schema: type: integer format: int64 - in: path name: valueId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/CdfValue' required: true responses: '204': description: No Content. '400': description: 'Bad Request : Invalid input or request' '401': description: 'Unauthorized : authentication token empty, invalid or expired.' '403': description: 'Forbidden : User not Validated for operation.' '404': description: 'Not Found : You are trying to access an invalid or non existent resource.' '422': description: 'Invalid input : invalid or missing required input.' '500': description: 'Internal Server Error : unable to process request' security: - OAuth2: [] summary: Update a CDF value for a CDF of field type List tags: - Custom Data Fields (CDF) servers: - url: https://apis.egencia.com/openconnect/api description: Generated server url /v1/companies/{companyId}/cdfs/{definitionId}/values/{valueId}/link: patch: description: "

Request Parameters

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Attribute\n \n Type\n \n Description\n
metadata
companyIdIntegerId of the company
definitionIdIntegerId of the CDF definition
valueIdIntegerId of the CDF value for which values needs to be updated
opStringOperation to be perfomed on Cdf Link
linkStringCdf link on which operation is to be perfomed
valueListValue of the CDF which should be numeric
\n
\n" operationId: patchCdfValue parameters: - in: path name: companyId required: true schema: type: integer format: int64 - in: path name: definitionId required: true schema: type: integer format: int64 - in: path name: valueId required: true schema: type: integer format: int64 requestBody: content: application/json-patch+json: examples: 'Request to link child value to parent CDF for company_id : 53092, definition_id : 27 and value_id : 84428977': description: 'Request to link child value to parent CDF for company_id : 53092, definition_id : 27 and value_id : 84428977' summary: Add child value to parent CDF value: - op: add path: /child value: - 6171131 'Request to link parent value to child CDF for company_id : 53092, definition_id : 30 and value_id : 7685276': description: 'Request to link parent value to child CDF for company_id : 53092, definition_id : 30 and value_id : 7685276' summary: Add parent value to child CDF value: - op: add path: /parent value: - 85273140 'Request to unlink child value from parent CDF for company_id : 53092, definition_id : 27 and value_id : 84428977': description: 'Request to unlink child value from parent CDF for company_id : 53092, definition_id : 27 and value_id : 84428977' summary: Remove child value from parent CDF value: - op: remove path: /child/7685276 'Request to unlink parent value from child CDF for company_id : 53092, definition_id : 30 and value_id : 7685276': description: 'Request to unlink parent value from child CDF for company_id : 53092, definition_id : 30 and value_id : 7685276' summary: Remove parent value from child CDF value: - op: remove path: /parent/85273140 schema: type: array items: $ref: '#/components/schemas/JsonPatchRequest' description: CDF PATCH request schema required: true responses: '204': description: No Content. '400': description: 'Bad Request : Invalid input or request' '401': description: 'Unauthorized : authentication token empty, invalid or expired.' '403': description: 'Forbidden : User not Validated for operation.' '404': description: 'Not Found : You are trying to access an invalid or non existent resource.' '415': description: 'Unsupported Media Type : Incorrect media type provided' '422': content: application/json;charset=utf-8: example: error: code: EGE-ER-OS-4022 message: Invalid CDF Value IDs [7685276] passed for linking description: 'Unprocessable Entity : Invalid or missing required input.' '500': description: 'Internal Server Error : unable to process request' security: - OAuth2: [] summary: Update CDF Value by adding or removing child/parent links. This endpoint is available for CC1/CC2 linking for offices in EU/APAC. tags: - Custom Data Fields (CDF) servers: - url: https://apis.egencia.com/openconnect/api description: Generated server url components: schemas: CdfDefinition: type: object description: CDF Definition properties: code: type: string description: CDF definition code fieldType: type: string description: CDF type enum: - FREE_FIELD, LIST id: type: integer format: int64 description: CDF definition id maxLength: type: integer format: int32 description: CDF max length name: type: string description: CDF definition name rules: type: array description: CDF definition rule items: $ref: '#/components/schemas/CdfDefinitionRule' status: type: string description: CDF definition status enum: - ACTIVE - PENDING - DELETED - INACTIVE title: CDFDefinition CdfValuesResponse: type: object description: CDF values response based on different user filters properties: _links: $ref: '#/components/schemas/Links' values: type: array description: CDF Values items: $ref: '#/components/schemas/CdfValue' title: CDFValuesResponse Links: type: object additionalProperties: $ref: '#/components/schemas/Link' CdfLinkValue: type: object description: Link values properties: id: type: string description: Linked CDF id value: type: string description: Linked CDF value title: LinkValues CdfDefinitions: type: object description: CDF Definitions properties: cdfs: type: array description: List of CDF Definitions for the company items: $ref: '#/components/schemas/CdfDefinition' title: CDFDefinitions JsonPatchRequest: type: object properties: op: type: string path: type: string value: {} CdfDefinitionRule: type: object properties: editable: type: boolean description: Indicates if the CDF is editable for specific user type and placement. mandatory: type: boolean description: Indicates if the CDF is mandatory for specific user type and placement. placement: type: string description: CDF placement enum: - CHECKOUT - USER_PROFILE - GUEST_TEMPLATE - GUEST_REGISTRATION_FORM - EXPENSE userType: type: string description: Specifies the type of user associated with the rule. If this field is not set, rule applies for travelers. required: - placement title: CdfDefinitionRule Link: type: object properties: deprecation: type: string href: type: string hreflang: type: string name: type: string profile: type: string templated: type: boolean title: type: string type: type: string CdfValue: type: object description: CDF value response based on different user filters properties: childCount: type: integer format: int32 description: Count of child links description: type: string description: CDF value description. This field is mandatory for creating/updating NA Department Code CDF values id: type: integer format: int64 description: CDF value ID parentCount: type: integer format: int32 description: Count of parent links value: type: string description: CDF value name. By default, maximum supported characters is 30 for LIST type and 50 for FREE_FIELD. minLength: 1 required: - value title: CDFValueResponse CdfValueLinks: type: object description: Linked CDF value response based on different user filters properties: childCount: type: integer format: int32 description: Count of child links description: type: string description: CDF value description. This field is mandatory for creating/updating NA Department Code CDF values id: type: integer format: int64 description: CDF value ID links: $ref: '#/components/schemas/CdfLinks' description: Linked Cdf values parentCount: type: integer format: int32 description: Count of parent links value: type: string description: CDF value name. By default, maximum supported characters is 30 for LIST type and 50 for FREE_FIELD. minLength: 1 required: - value title: CdfValueLinks CdfLinks: type: object description: Linked CDF value properties: child: type: array description: Child linked value items: $ref: '#/components/schemas/CdfLinkValue' parent: type: array description: Parent linked value items: $ref: '#/components/schemas/CdfLinkValue' title: Links securitySchemes: OAuth2: flows: clientCredentials: tokenUrl: https://apis.egencia.com/auth/v1/token type: oauth2 x-refined-from: - amex-gbt-company-cdf-api-openapi.json - amex-gbt-service-openconnect-openapi.json