openapi: 3.0.0 info: description: Api Documentation version: "1.0" title: Api Documentation termsOfService: urn:tos contact: {} license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0 tags: - name: Entity (V2) description: V2 Entity Controller - name: Entity (V1) description: V1 Entity Controller - name: Entity Type description: Entity Type Controller paths: /v1/entities: get: tags: - Entity (V1) summary: Get list of Entities description: This web service allows an external application to get a list of active entities. This endpoint does not provide filtering by entity code, type code, or status. If filtering is necessary, use GET v2/entities. operationId: getUsingGET parameters: - name: chain-id in: header description: Used for tracking the flow of the request required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River required: true schema: type: string - name: x-api-key in: header description: "API key for Authentication " required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Entity" "400": description: Customer Code is invalid. "503": description: Service unavailable. deprecated: false post: tags: - Entity (V1) summary: Create/Update Entities description: This web service allows an external application to create or update a list of entities. operationId: upsertEntitiesUsingPOST parameters: - name: chain-id in: header description: Used for tracking the flow of the request required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River required: true schema: type: string - name: x-api-key in: header description: "API key for Authentication " required: true schema: type: string requestBody: $ref: "#/components/requestBodies/EntityArray" responses: "200": description: All entities were processed successfully content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiResponse" "207": description: Some of the entities couldn't be processed successfully. content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiResponse" "400": description: Customer Code is invalid. "422": description: Failed while processing all entities. "503": description: Service unavailable. deprecated: false delete: tags: - Entity (V1) summary: Delete Entities description: This web service allows an external application to delete a list of entities. operationId: deleteEntitiesUsingDELETE parameters: - name: chain-id in: header description: Used for tracking the flow of the request required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River required: true schema: type: string - name: x-api-key in: header description: "API key for Authentication " required: true schema: type: string requestBody: $ref: "#/components/requestBodies/EntityArray" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiResponse" "204": description: All Entities Are Deleted content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiResponse" "207": description: Any Combination of 204, 404, 410 content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Entity Not Found "410": description: Entity Already Deleted "503": description: Service unavailable deprecated: false /v1/entity-types: get: tags: - Entity Type summary: Gets list of Entity Types description: This web service allows an external application to fetch a list of Entity Types. Only returns 100 max results of active entity types. operationId: getEntityTypesUsingGET parameters: - name: chain-id in: header description: Used for tracking the flow of the request required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River required: true schema: type: string - name: x-api-key in: header description: "API key for Authentication " required: true schema: type: string responses: "200": description: Entity Types were returned successfully content: application/json: schema: type: array items: $ref: "#/components/schemas/EntityType" "400": description: Customer Code is invalid. "503": description: Service unavailable. deprecated: false post: tags: - Entity Type summary: Create an Entity Type description: >- This web service allows an external application to create an Entity Type. Does not support the 'languages'. Use POST /v1/entity-types/{entityTypeCode}/languages instead. This endpoint does not act as an upsert. It will fail for existing entities, unless the entity already is inactive. If the entity is inactive, it'll reactivate the entity. operationId: createEntityTypeUsingPOST parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River. required: true schema: type: string - name: x-api-key in: header description: API key for Authentication. required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/EntityTypeModel" description: EntityType input JSON payload. required: true responses: "200": description: Entity Type successfully created. content: application/json: schema: $ref: "#/components/schemas/EntityTypeModel" "400": description: Request is invalid. Please check the request specification and try again. "410": description: Entity Type Code already available in system. "422": description: The request was well-formed but was unable to be followed due to semantic errors. "500": description: Server error. "503": description: Service unavailable. deprecated: false "/v1/entity-types/{code}": get: tags: - Entity Type summary: Get Entity Type by Code description: This web service allows an external application to fetch an Entity Type by its Code. Only returns active entities. operationId: getEntityTypeByCodeUsingGET parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: code in: path description: Entity Type code required: true schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River required: true schema: type: string - name: x-api-key in: header description: "API key for Authentication " required: true schema: type: string responses: "200": description: Entity Type was returned successfully content: application/json: schema: $ref: "#/components/schemas/EntityType" "400": description: Customer Code is invalid. "404": description: Code is invalid "503": description: Service unavailable. deprecated: false put: tags: - Entity Type summary: Put Entity Type by Code description: >- This web service allows an external application to replace an Entity Type by its Code. Does not support the 'languages'. Use PUT /v1/entity-types/{entityTypeCode}/languages/{languageCode} instead. operationId: replaceEntityTypeByCodeUsingPUT parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: code in: path description: Entity Type code required: true schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River. required: true schema: type: string - name: x-api-key in: header description: API key for Authentication. required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/EntityTypeModel" description: Entity Type body required: true responses: "200": description: Entity Type was returned successfully content: application/json: schema: $ref: "#/components/schemas/EntityTypeModel" "400": description: Request is invalid. Please check the request specification and try again. "422": description: The request was well-formed but was unable to be followed due to semantic errors. "503": description: Service unavailable. deprecated: false "/v1/entity-types/{entityTypeCode}": delete: tags: - Entity Type summary: Delete an entity-type description: This web service allows an external application to delete an Entity Type by entity-code operationId: deleteEntityTypeByCodeUsingDELETE parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River. required: true schema: type: string - name: entityTypeCode in: path description: EntityType code. required: true schema: type: string - name: x-api-key in: header description: API key for Authentication. required: true schema: type: string responses: "200": description: Entity Type successfully deleted "400": description: Customer Code is invalid. "404": description: Entity Type Code is unavailable. "410": description: Entity Type Code already deleted in system. "500": description: Server error. "503": description: Service unavailable. deprecated: false "/v1/entity-types/{entityTypeCode}/languages": get: tags: - Entity Type summary: Gets list of language translations for the EntityType description: This web service allows an external application to get a list of localized names for the set of languages under the EntityType. operationId: getLanguagesUsingGET parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River. required: true schema: type: string - name: entityTypeCode in: path description: Entity Type code required: true schema: type: string - name: x-api-key in: header description: API key for Authentication. required: true schema: type: string responses: "200": description: List of languages returned successfully content: application/json: schema: type: array items: $ref: "#/components/schemas/EntityTypeLanguage" "404": description: The EntityType code does not exist "503": description: Service unavailable. deprecated: false post: tags: - Entity Type summary: Add a language to an EntityType description: >- This web service allows an external application to add a localized name to an EntityType. This endpoint is not an upsert. Languages that aleady exist cannot be modified except through PUT /entity-types/{entityTypeCode}/languages/{languageCode} operationId: addLanguageUsingPOST parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River. required: true schema: type: string - name: entityTypeCode in: path description: Entity Type code required: true schema: type: string - name: x-api-key in: header description: API key for Authentication. required: true schema: type: string requestBody: $ref: "#/components/requestBodies/EntityTypeLanguage" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/EntityTypeLanguage" "201": description: Language created successfuly content: application/json: schema: $ref: "#/components/schemas/EntityTypeLanguage" "404": description: The EntityType code does not exist "422": description: Missing/Invalid values in language "503": description: Service unavailable. deprecated: false "/v1/entity-types/{entityTypeCode}/languages/{languageCode}": put: tags: - Entity Type summary: Modify a language to EntityType description: This web service allows an external application to alter existing localized name to an EntityType operationId: updateLanguageUsingPUT parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River. required: true schema: type: string - name: entityTypeCode in: path description: Entity Type code required: true schema: type: string - name: languageCode in: path description: Entity Type langauge code required: true schema: type: string - name: x-api-key in: header description: API key for Authentication. required: true schema: type: string requestBody: $ref: "#/components/requestBodies/EntityTypeLanguage" responses: "200": description: Language modified successfuly content: application/json: schema: $ref: "#/components/schemas/EntityTypeLanguage" "404": description: The EntityType code/Locale does not exist "422": description: Missing/Invalid values in language "503": description: Service unavailable. deprecated: false delete: tags: - Entity Type summary: Delete a language fromEntityType description: This web service allows an external application to delete a localized name from an EntityType operationId: deleteLanguageUsingDELETE parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River. required: true schema: type: string - name: entityTypeCode in: path description: Entity Type code required: true schema: type: string - name: languageCode in: path description: Language code required: true schema: type: string - name: x-api-key in: header description: API key for Authentication. required: true schema: type: string responses: "200": description: Language deleted successfuly content: application/json: schema: type: object "404": description: The EntityType code or language code does not exist "503": description: Service unavailable. deprecated: false /v2/entities: get: tags: - Entity (V2) summary: Get List of Entities description: This web service allows an external application to get a list of active entities. This endpoint allows for filtering by entityCode, entityTypeCode or status. operationId: getUsingGET_1 parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: customer-code in: header description: Unique customer identifier provided by Chrome River. required: true schema: type: string - name: entityCode in: query description: Entity code. required: false allowEmptyValue: false schema: type: string - name: entityTypeCode in: query description: Entity type code. required: false allowEmptyValue: false schema: type: string - name: isActive in: query description: Active flag. Defaults to (true). required: false allowEmptyValue: false schema: type: boolean default: true - name: page in: query description: Page number. Defaults to (0). required: false allowEmptyValue: false example: 0 schema: type: integer format: int32 default: 0 - name: pageSize in: query description: Page size. Defaults to (0). required: false allowEmptyValue: false example: 0 schema: type: integer format: int32 default: 0 - name: x-api-key in: header description: API key for Authentication. required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/GetEntitiesApiResponse" "400": description: Customer Code is invalid. "503": description: Service unavailable. deprecated: false /v2/entities/search: get: tags: - Entity (V2) summary: Search for Entities description: This web service allows an external application to search for entities. This endpoint allows search by search term and entityTypeId. operationId: searchUsingGET parameters: - name: chain-id in: header description: Used for tracking the flow of the request. required: false schema: type: string - name: customer-code in: header description: Unique customer code provided by Chrome River required: true schema: type: string - name: entityTypeId in: query description: Entity type Id required: false allowEmptyValue: false schema: type: integer format: int32 - name: languageId in: query description: The language id used to localize the entity type required: false allowEmptyValue: false schema: type: integer format: int32 default: 1 - name: page in: query description: Page number. Defaults to (0). required: false allowEmptyValue: false example: 0 schema: type: integer format: int32 default: 0 - name: pageSize in: query description: Page size. Defaults to (0). required: false allowEmptyValue: false example: 0 schema: type: integer format: int32 default: 100 - name: searchTerm in: query description: search term required: false allowEmptyValue: false schema: type: string - name: x-api-key in: header description: API key for Authentication required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/GetEntitiesApiResponse" "400": description: Customer code is invalid "401": description: Unauthorized Customer code. "403": description: Customer code is forbidden to get expense types "503": description: Service unavailable deprecated: false servers: - url: https://service.chromeriver.com components: requestBodies: EntityTypeLanguage: content: application/json: schema: $ref: "#/components/schemas/EntityTypeLanguage" description: entityTypeLanguage required: true EntityArray: content: application/json: schema: type: array items: $ref: "#/components/schemas/Entity" description: List of entities schemas: ApiResponse: type: object properties: entityCode: type: string entityTypeCode: type: string errorMessage: type: string operationType: type: string enum: - INSERT - UPDATE - DELETE result: type: string enum: - SUCCESS - FAIL title: ApiResponse Entity: type: object required: - entityCode - entityTypeCode properties: entityCode: type: string entityTypeCode: type: string extraData1: type: string description: extraData for entity. To remove value, set to empty string. extraData2: type: string description: extraData for entity. To remove value, set to empty string. extraData3: type: string description: extraData for entity. To remove value, set to empty string. extraData4: type: string description: extraData for entity. To remove value, set to empty string. extraData5: type: string description: extraData for entity. To remove value, set to empty string. sortOrder: type: string description: SortOrder to be used by EntityType.SortType status: type: string description: ACT or DEL. If not provided, no updates are done to existing entity, otherwise defaults to ACT for new entities enum: - ACT - DEL entityId: type: integer format: int32 description: entity Id localizedEntityName: type: string description: entity name for the languageId entityNames: type: array description: List of names in different Locales. List should always include an engligh locale (en) as default items: $ref: "#/components/schemas/EntityLanguage" title: Entity EntityLanguage: type: object properties: locale: type: string name: type: string title: EntityLanguage EntityType: type: object required: - code - description - name properties: languages: type: array items: $ref: "#/components/schemas/EntityTypeLanguage" code: type: string example: DEPT name: type: string example: Department description: type: string example: List of departments loadOnLogin: type: boolean description: Flag to cache Entity Type during login process. sortType: type: string description: Sort type for list of Entities for Entity Type enum: - NAME - CODE - SORT_ORDER title: EntityType EntityTypeLanguage: type: object required: - languageCode - name properties: description: type: string description: The description of the EntityType in specified language languageCode: type: string example: en, en_UK, fr, fr_CA description: The locale either ISO 639_1 or a combination of ISO 639_1 and ISO 3166 name: type: string description: The name of the EntityType in specified language title: EntityTypeLanguage EntityTypeModel: type: object required: - code - description - name properties: code: type: string example: DEPT name: type: string example: Department description: type: string example: List of departments loadOnLogin: type: boolean description: Flag to cache Entity Type during login process. sortType: type: string description: Sort type for list of Entities for Entity Type enum: - NAME - CODE - SORT_ORDER title: EntityTypeModel GetEntitiesApiResponse: type: object properties: entities: type: array items: $ref: "#/components/schemas/Entity" total: type: integer format: int32 title: GetEntitiesApiResponse