openapi: 3.0.3 info: title: Affinda Annotations Add x-hidden to endpoints Deprecated End Points API version: 3.0.0 description: Affinda Annotations API — subset of the Affinda v3 Document Processing API. servers: - url: https://{region}.affinda.com description: 'Select the correct server for your instance: api (AUS/Global), api.us1 (US), or api.eu1 (EU).' variables: region: default: api description: The instance region. Use 'api' for AUS/Global, 'api.us1' for US, or 'api.eu1' for EU. You can find your region in the Affinda web app URL. enum: - api - api.eu1 - api.us1 x-ms-parameter-location: client security: - ApiKeyAuth: [] tags: - name: Deprecated End Points description: 'Deprecated endpoints that are maintained for backward compatibility. These endpoints include Data Point, Collection, and Users functionality that has been superseded by newer APIs. ' paths: /v3/collections: get: tags: - Deprecated End Points summary: Get list of all collections operationId: getAllCollections description: Returns your collections. deprecated: true parameters: - in: query name: workspace required: true schema: $ref: '#/components/schemas/identifier' description: Filter by workspace. responses: '200': description: All matching collections. content: application/json: schema: type: array items: $ref: '#/components/schemas/Collection' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' post: tags: - Deprecated End Points summary: Create a collection operationId: createCollection description: Create a collection deprecated: true responses: '201': description: Successfully created a collection. content: application/json: schema: $ref: '#/components/schemas/Collection' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CollectionCreate' /v3/collections/{identifier}: get: tags: - Deprecated End Points summary: Get specific collection operationId: getCollection description: Return a specific collection. deprecated: true parameters: - in: path required: true name: identifier description: Collection's identifier schema: $ref: '#/components/schemas/properties-identifier' responses: '200': description: Successfully retrieved collection. content: application/json: schema: $ref: '#/components/schemas/Collection' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' patch: tags: - Deprecated End Points summary: Update a collection operationId: updateCollection description: Update data of a collection. deprecated: true parameters: - in: path required: true name: identifier description: Collection's identifier schema: $ref: '#/components/schemas/properties-identifier' requestBody: description: Collection data to update required: true content: application/json: schema: $ref: '#/components/schemas/CollectionUpdate' responses: '200': description: Successfully updated collection data. content: application/json: schema: $ref: '#/components/schemas/Collection' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' delete: tags: - Deprecated End Points summary: Delete a collection operationId: deleteCollection description: Deletes the specified collection from the database. deprecated: true parameters: - in: path required: true name: identifier description: Collection's identifier schema: $ref: '#/components/schemas/properties-identifier' responses: '204': $ref: '#/components/responses/204NoContent' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/collections/{identifier}/create_data_field: post: tags: - Deprecated End Points summary: Create data field for a collection along with a new data point. operationId: createDataFieldForCollection description: Create data field for a collection along with a new data point. deprecated: true parameters: - in: path required: true name: identifier description: Collection's identifier schema: $ref: '#/components/schemas/properties-identifier' requestBody: description: The data field and data point to be created. required: true content: application/json: schema: $ref: '#/components/schemas/DataFieldCreate' responses: '200': description: Successfully created data field and data point. content: application/json: schema: $ref: '#/components/schemas/DataField' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/collections/{identifier}/fields/{datapoint_identifier}: get: tags: - Deprecated End Points summary: Get data field for a collection assosciated with a data point. operationId: getDataFieldForCollection description: Get a data field for a collection assosciated with a data point deprecated: true parameters: - in: path required: true name: identifier description: Collection's identifier schema: $ref: '#/components/schemas/properties-identifier' - in: path required: true name: datapoint_identifier description: Datapoint's identifier schema: $ref: '#/components/schemas/DataPoint_properties-identifier' responses: '200': description: Successfully retrieved data field. content: application/json: schema: $ref: '#/components/schemas/CollectionField' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' patch: tags: - Deprecated End Points summary: Update data field for a collection assosciated with a data point. operationId: updateDataFieldForCollection description: Update data field for a collection assosciated with a data point deprecated: true parameters: - in: path required: true name: identifier description: Collection's identifier schema: $ref: '#/components/schemas/properties-identifier' - in: path required: true name: datapoint_identifier description: Datapoint's identifier schema: $ref: '#/components/schemas/DataPoint_properties-identifier' requestBody: description: Data field properties to update required: true content: application/json: schema: $ref: '#/components/schemas/CollectionField' responses: '200': description: Successfully updated data field. content: application/json: schema: $ref: '#/components/schemas/CollectionField' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/collections/{identifier}/usage: get: tags: - Deprecated End Points summary: Get usage by collection operationId: getUsageByCollection description: 'Return monthly credits consumption of a collection. Deprecated: use `GET /v3/usage?organization={id}&document_type={id}` instead. The new endpoint returns a unified daily series and uses the modern "document type" terminology.' deprecated: true parameters: - in: path required: true name: identifier description: Collection's identifier schema: $ref: '#/components/schemas/properties-identifier' - in: query required: false name: start description: 'Start date of the period to retrieve. Format: YYYY-MM' schema: type: string example: 2023-07 - in: query required: false name: end description: 'End date of the period to retrieve. Format: YYYY-MM' schema: type: string example: 2023-10 responses: '200': description: Monthly credits consumption of a collection. content: application/json: schema: $ref: '#/components/schemas/UsageByCollectionResponse' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/data_points: get: tags: - Deprecated End Points summary: Get list of all data points operationId: getAllDataPoints description: Returns your custom data points as well as Affinda's off-the-shelf data points. deprecated: true parameters: - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/limitParam' - in: query name: organization schema: $ref: '#/components/schemas/Organization_properties-identifier' description: Filter by organization. - in: query name: include_public schema: type: boolean description: Allows you to include public data points in the response when you're filtering by organization. - in: query name: extractor schema: $ref: '#/components/schemas/Extractor_properties-identifier' description: Filter by extractor. - in: query name: slug schema: type: string description: Filter by slug. - in: query name: description schema: type: string description: Filter by description. - in: query name: annotation_content_type schema: type: string description: Filter by annotation content type, e.g. text, integer, float, date, etc. - in: query name: identifier schema: type: array items: $ref: '#/components/schemas/DataPoint_properties-identifier' description: Filter by specific identifiers. responses: '200': description: All matching data points. content: application/json: schema: type: array items: $ref: '#/components/schemas/DataPoint' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' post: tags: - Deprecated End Points summary: Create a data point operationId: createDataPoint description: Create a custom data point. deprecated: true responses: '201': description: Successfully created a data point. content: application/json: schema: $ref: '#/components/schemas/DataPoint' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' requestBody: content: application/json: schema: $ref: '#/components/schemas/DataPointCreate' /v3/data_points/{identifier}: get: tags: - Deprecated End Points summary: Get specific data point operationId: getDataPoint description: Return a specific data point. deprecated: true parameters: - in: path required: true name: identifier description: Data point's identifier schema: $ref: '#/components/schemas/DataPoint_properties-identifier' responses: '200': description: Successfully retrieved data point. content: application/json: schema: $ref: '#/components/schemas/DataPoint' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' patch: tags: - Deprecated End Points summary: Update a data point operationId: updateDataPoint description: Update data of a data point. deprecated: true parameters: - in: path required: true name: identifier description: DataPoint's identifier schema: $ref: '#/components/schemas/DataPoint_properties-identifier' requestBody: description: Data point to update required: true content: application/json: schema: $ref: '#/components/schemas/DataPointUpdate' responses: '200': description: Successfully updated data point. content: application/json: schema: $ref: '#/components/schemas/DataPoint' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' delete: tags: - Deprecated End Points summary: Delete a data point operationId: deleteDataPoint description: Deletes the specified data point from the database. deprecated: true parameters: - in: path required: true name: identifier description: DataPoint's identifier schema: $ref: '#/components/schemas/DataPoint_properties-identifier' responses: '204': $ref: '#/components/responses/204NoContent' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/data_point_choices: get: tags: - Deprecated End Points summary: Get list of data point choices description: Returns available choices for a specific enum data point. operationId: getDataPointChoices deprecated: true parameters: - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/limitParam' - in: query name: data_point schema: $ref: '#/components/schemas/DataPoint_properties-identifier' description: The data point to get choices for. required: true - in: query name: collection schema: $ref: '#/components/schemas/properties-identifier' description: The collection to get choices for. required: true - in: query name: search schema: type: string description: Filter choices by searching for a substring. responses: '200': description: All matching data point choices. content: application/json: schema: type: object required: - results - count allOf: - $ref: '#/components/schemas/PaginatedResponse' - type: object properties: results: type: array items: $ref: '#/components/schemas/DataPointChoice' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' post: tags: - Deprecated End Points summary: Create a data point choice operationId: createDataPointChoice description: Create a custom data point choice. deprecated: true responses: '201': description: Successfully created a data point choice. content: application/json: schema: $ref: '#/components/schemas/DataPointChoice' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' requestBody: content: application/json: schema: $ref: '#/components/schemas/DataPointChoiceCreate' /v3/data_point_choices/{id}: get: tags: - Deprecated End Points summary: Get specific data point choice operationId: getDataPointChoice description: Return a specific data point choice. deprecated: true parameters: - in: path required: true name: id description: Data point choice's ID schema: $ref: '#/components/schemas/DataPointChoice_properties-id' responses: '200': description: Successfully retrieved data point choice. content: application/json: schema: $ref: '#/components/schemas/DataPointChoice' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' patch: tags: - Deprecated End Points summary: Update a data point choice operationId: updateDataPointChoice description: Update data of a data point choice. deprecated: true parameters: - in: path required: true name: id description: Data point choice's ID schema: $ref: '#/components/schemas/DataPointChoice_properties-id' requestBody: description: Data point choice to update required: true content: application/json: schema: $ref: '#/components/schemas/DataPointChoiceUpdate' responses: '200': description: Successfully updated data point choice. content: application/json: schema: $ref: '#/components/schemas/DataPointChoice' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' delete: tags: - Deprecated End Points summary: Delete a data point choice operationId: deleteDataPointChoice description: Deletes the specified data point choice from the database. deprecated: true parameters: - in: path required: true name: id description: Data point choice's ID schema: $ref: '#/components/schemas/DataPointChoice_properties-id' responses: '204': $ref: '#/components/responses/204NoContent' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/data_point_choices/replace: post: tags: - Deprecated End Points summary: Replace choices of a data point description: Replace choices of a data point. Existing choices and incoming choices are matched base on their `value`. New `value` will be created, existing `value` will be updated, and `value` not in incoming choices will be deleted. operationId: replaceDataPointChoices deprecated: true requestBody: content: application/json: schema: $ref: '#/components/schemas/DataPointChoiceReplaceRequest' responses: '200': description: Successfully replaced choices of a data point. content: application/json: schema: $ref: '#/components/schemas/DataPointChoiceReplaceResponse' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/api_users: get: x-hidden: true tags: - Deprecated End Points summary: Get list of all API users operationId: getAllApiUsers description: Returns your API users. parameters: - in: query name: organization required: false schema: $ref: '#/components/schemas/Organization_properties-identifier' description: Filter by organization. responses: '200': description: All matching API users. content: application/json: schema: type: object required: - results - count allOf: - $ref: '#/components/schemas/PaginatedResponse' - type: object properties: results: type: array items: $ref: '#/components/schemas/ApiUserWithoutKey' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' post: x-hidden: true tags: - Deprecated End Points summary: Create an API user operationId: createApiUser description: Create an API user requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ApiUserCreate' responses: '201': description: 'Successfully created an API user. The API key is shown once in this response and will not be shown again in subsequent retrieval requests." ' content: application/json: schema: $ref: '#/components/schemas/ApiUserWithKey' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/api_users/{id}: get: x-hidden: true tags: - Deprecated End Points summary: Get specific API user operationId: getApiUser description: Return a specific API user. parameters: - in: path required: true name: id description: API user's ID schema: $ref: '#/components/schemas/properties-id' responses: '200': description: Successfully retrieved API user. content: application/json: schema: $ref: '#/components/schemas/ApiUserWithoutKey' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' patch: x-hidden: true tags: - Deprecated End Points summary: Update an API user operationId: updateApiUser description: Update data of an API user. parameters: - in: path required: true name: id description: API user's ID schema: $ref: '#/components/schemas/properties-id' requestBody: description: API user to update required: true content: application/json: schema: $ref: '#/components/schemas/ApiUserUpdate' responses: '200': description: Successfully updated API user. content: application/json: schema: $ref: '#/components/schemas/ApiUserWithoutKey' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' delete: x-hidden: true tags: - Deprecated End Points summary: Delete an API user operationId: deleteApiUser description: Deletes the specified API user from the database. parameters: - in: path required: true name: id description: API user's ID schema: $ref: '#/components/schemas/properties-id' responses: '204': $ref: '#/components/responses/204NoContent' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/api_users/{id}/regenerate_api_key: post: x-hidden: true tags: - Deprecated End Points summary: Regenerate API key for an API user operationId: regenerateApiKeyForApiUser description: Regenerate API key for an API user. parameters: - in: path required: true name: id description: API user's ID schema: $ref: '#/components/schemas/properties-id' responses: '200': description: Successfully generated new API key. content: application/json: schema: $ref: '#/components/schemas/ApiUserWithKey' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/mappings: post: tags: - Deprecated End Points summary: Create a mapping operationId: createMapping description: Create a custom mapping. deprecated: true responses: '201': description: Successfully created a mapping. content: application/json: schema: $ref: '#/components/schemas/Mapping' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MappingCreate' get: tags: - Deprecated End Points summary: List mappings operationId: listMappings deprecated: true parameters: - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/limitParam' - in: query required: true name: mapping_data_source description: Data source's identifier schema: $ref: '#/components/schemas/Mapping_properties-identifier' description: Returns the list of all custom data mappings. responses: '200': description: Will return matching mappings x-summary: Will return matching mappings content: application/json: schema: type: object required: - results - count allOf: - $ref: '#/components/schemas/PaginatedResponse' - type: object properties: results: type: array items: $ref: '#/components/schemas/Mapping' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' /v3/mappings/{identifier}: get: tags: - Deprecated End Points summary: Get specific mapping operationId: getMapping description: Return a specific mapping. deprecated: true parameters: - in: path required: true name: identifier description: Mapping's identifier schema: $ref: '#/components/schemas/Mapping_properties-identifier' responses: '200': description: Successfully retrieved mapping. content: application/json: schema: $ref: '#/components/schemas/Mapping' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' delete: tags: - Deprecated End Points summary: Delete specific mapping operationId: deleteMapping description: Delete the specified mapping from the database. deprecated: true parameters: - in: path required: true name: identifier description: Mapping's identifier schema: $ref: '#/components/schemas/Mapping_properties-identifier' responses: '204': $ref: '#/components/responses/204NoContent' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' patch: tags: - Deprecated End Points summary: Update specific mapping operationId: updateMapping description: Updates a specific mapping. deprecated: true parameters: - in: path required: true name: identifier description: Mapping's identifier schema: $ref: '#/components/schemas/Mapping_properties-identifier' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MappingUpdate' responses: '200': description: Successfully retrieved mapping. content: application/json: schema: $ref: '#/components/schemas/Mapping' '400': $ref: '#/components/responses/400Error' '401': $ref: '#/components/responses/401Error' default: $ref: '#/components/responses/DefaultError' components: schemas: properties-enableAutoValidationThreshold: type: boolean nullable: true description: If true, the autoValidationThreshold enable auto validation from the threshold from this field if specified, else from the collection allowOpenai: type: boolean default: false description: Whether to allow OpenAI API to be used to assist in creating a model for this collection. disableConfirmationIfValidationRulesFail: type: boolean default: false description: If True, users cannot validate documents with missing mandatory fields, or failing validation rules. fields: type: array nullable: true items: $ref: '#/components/schemas/FieldGroup' deprecated: true description: type: string nullable: true mandatory: type: boolean availableDataSources: type: array items: $ref: '#/components/schemas/MappingDataSource' Mapping_properties-identifier: type: string description: Uniquely identify a mapping. example: mEFayXdO readOnly: true Collection: type: object required: - identifier properties: identifier: type: string description: Uniquely identify a collection. example: mEFayXdO name: type: string workspace: type: object properties: identifier: $ref: '#/components/schemas/identifier' organization: $ref: '#/components/schemas/Organization' name: $ref: '#/components/schemas/name' extractor: $ref: '#/components/schemas/Extractor' nullable: true autoValidationThreshold: type: number enableAutoValidationThreshold: type: boolean default: false autoValidateIfValidationRulesPass: type: boolean default: false fields: type: array nullable: true items: $ref: '#/components/schemas/FieldGroup' deprecated: true fieldsLayout: $ref: '#/components/schemas/FieldsLayout' fieldsConfigured: type: boolean dateFormatPreference: type: string enum: - DMY - MDY - YMD nullable: true dateFormatFromDocument: type: boolean nullable: true description: Predict the date format from any dates in the document that is not ambiguous. extractorConfig: $ref: '#/components/schemas/ExtractorConfig' unvalidatedDocsCount: type: integer nullable: true minimum: 0 description: Number of unvalidated documents in the collection. confirmedDocsCount: type: integer nullable: true minimum: 0 description: Number of validated documents in the collection. ingestEmail: type: string description: When you send email to this address, any document attached in the body will be uploaded to this collection. tailoredExtractorRequested: type: boolean description: Whether a tailored extractor has been requested for this collection. allowOpenai: type: boolean default: false description: Whether to allow OpenAI API to be used to assist in creating a model for this collection. trainsExtractor: type: boolean description: Whether this collection feeds documents into the extractor's training queue. This setting can only be toggled for custom extractors. disableConfirmationIfValidationRulesFail: type: boolean default: false description: If True, users cannot validate documents with missing mandatory fields, or failing validation rules. autoRefreshValidationResults: type: boolean default: true description: If True, validation results are refreshed whenever annotations are changed. scoreCutoff: type: number example: 10 description: Higher values will result in more strict matching. nullable: true properties-id: type: integer description: Uniquely identify a user. example: 1 minimum: 1 DataPointChoice: type: object required: - id - label - value properties: id: type: integer description: Data point choice's ID example: 1 minimum: 1 label: type: string example: USD value: type: string example: USD synonyms: type: array nullable: true items: type: string description: type: string nullable: true createdDt: type: string format: date-time PaginatedResponse: type: object required: - count properties: count: type: integer example: 10 description: Number of items in results. minimum: 0 next: type: string nullable: true description: URL to request next page of results. previous: type: string nullable: true description: URL to request previous page of results. Organization_properties-identifier: type: string description: Uniquely identify an organization. example: mEFayXdO identifier: type: string description: Uniquely identify a workspace. example: mEFayXdO synonyms: type: array nullable: true items: type: string email: type: string example: carljohnson@grove.street dateFormatFromDocument: type: boolean nullable: true description: Predict the date format from any dates in the document that is not ambiguous. displayRawText: type: boolean description: If true, then the validation tool will show the user the raw text found on the page, not the value that has been parsed to a specific type. name: type: string dataSource: type: string description: Data source mapping identifier nullable: true CollectionField: type: object properties: label: $ref: '#/components/schemas/label' fieldType: $ref: '#/components/schemas/AnnotationContentType' mandatory: $ref: '#/components/schemas/mandatory' showDropdown: $ref: '#/components/schemas/showDropdown' displayEnumValue: $ref: '#/components/schemas/displayEnumValue' autoValidationThreshold: $ref: '#/components/schemas/properties-autoValidationThreshold' enableAutoValidationThreshold: $ref: '#/components/schemas/properties-enableAutoValidationThreshold' dataSource: $ref: '#/components/schemas/dataSource' mapping: $ref: '#/components/schemas/mapping' displayRawText: $ref: '#/components/schemas/mapping' Extractor_properties-identifier: type: string description: Uniquely identify an extractor. example: resume properties-label: type: string example: USD DataPointChoiceReplaceResponse: type: object required: - dataPoint - collection - organization - choices additionalProperties: false properties: dataPoint: $ref: '#/components/schemas/DataPoint_properties-identifier' collection: nullable: true type: string description: Uniquely identify a collection. example: mEFayXdO organization: nullable: true type: string description: Uniquely identify an organization. example: mEFayXdO choices: type: array items: type: object required: - id - value - label - synonyms - description additionalProperties: false properties: id: $ref: '#/components/schemas/DataPointChoice_properties-id' value: $ref: '#/components/schemas/value' label: $ref: '#/components/schemas/properties-label' synonyms: $ref: '#/components/schemas/synonyms' description: $ref: '#/components/schemas/description' DataPoint_properties-name: type: string description: Name of the data point. multiple: type: boolean enabledChildFields: type: array items: $ref: '#/components/schemas/Field' ThemeConfig: type: object properties: palette: type: object properties: mode: type: string enum: - light - dark background: oneOf: - type: string - type: object properties: default: type: string paper: type: string text: type: object properties: primary: type: string secondary: type: string disabled: type: string divider: type: string primary: $ref: '#/components/schemas/PaletteColorOptions' secondary: $ref: '#/components/schemas/PaletteColorOptions' success: $ref: '#/components/schemas/PaletteColorOptions' annotation: $ref: '#/components/schemas/PaletteColorOptions' error: $ref: '#/components/schemas/PaletteColorOptions' info: $ref: '#/components/schemas/PaletteColorOptions' warning: $ref: '#/components/schemas/PaletteColorOptions' typography: type: object properties: fontFamily: type: string fontSize: oneOf: - type: string - type: number fontWeightRegular: type: string fontWeightMedium: type: string fontWeightBold: type: string borderRadius: type: number fontUrl: type: string RequestError: type: object additionalProperties: false required: - type - errors properties: type: type: string example: validation_error errors: type: array items: type: object required: - attr - code - detail properties: attr: type: string nullable: true example: non_field_errors code: type: string example: unique detail: type: string example: This index name has already been used FieldGroup: type: object properties: label: type: string fields: type: array items: $ref: '#/components/schemas/FieldDeprecated' required: - label - fields additionalProperties: false DataFieldCreateField: type: object description: The field to be created. required: - label properties: label: $ref: '#/components/schemas/label' fieldType: $ref: '#/components/schemas/AnnotationContentType' mandatory: $ref: '#/components/schemas/mandatory' showDropdown: $ref: '#/components/schemas/showDropdown' displayEnumValue: $ref: '#/components/schemas/displayEnumValue' autoValidationThreshold: $ref: '#/components/schemas/properties-autoValidationThreshold' enableAutoValidationThreshold: $ref: '#/components/schemas/properties-enableAutoValidationThreshold' dataSource: $ref: '#/components/schemas/dataSource' mapping: $ref: '#/components/schemas/mapping' displayRawText: $ref: '#/components/schemas/displayRawText' mapping: type: string description: Defines how the data point is mapped to the data source nullable: true dateFormatPreference: type: string enum: - DMY - MDY - YMD nullable: true ApiUserCreate: type: object required: - organization properties: name: $ref: '#/components/schemas/User_properties-name' username: $ref: '#/components/schemas/username' email: $ref: '#/components/schemas/email' avatar: $ref: '#/components/schemas/properties-avatar' organization: $ref: '#/components/schemas/Organization_properties-identifier' additionalProperties: false properties-identifier: type: string description: Uniquely identify a collection. example: mEFayXdO OrganizationRole: type: string enum: - admin - member example: admin DataFieldCreate: type: object required: - field - dataPoint properties: categoryLabel: $ref: '#/components/schemas/categoryLabel' field: $ref: '#/components/schemas/DataFieldCreateField' dataPoint: $ref: '#/components/schemas/DataFieldCreateDataPoint' FieldsLayout: type: object properties: defaultCategory: $ref: '#/components/schemas/FieldCategory' categories: type: array items: $ref: '#/components/schemas/FieldCategory' required: - defaultCategory - categories additionalProperties: false DataField: type: object required: - field - dataPoint properties: categoryLabel: type: string description: The label of the category that this field will be put into. If not provided, the field will be put into the default category. If no category exists with the specified label, a new category will be created. field: type: object description: The field to be created. required: - label - mandatory - displayEnumValue - autoValidationThreshold - enabledChildFields - disabledChildFields properties: label: $ref: '#/components/schemas/label' fieldType: $ref: '#/components/schemas/AnnotationContentType' mandatory: $ref: '#/components/schemas/mandatory' showDropdown: $ref: '#/components/schemas/showDropdown' displayEnumValue: $ref: '#/components/schemas/displayEnumValue' autoValidationThreshold: $ref: '#/components/schemas/properties-autoValidationThreshold' enableAutoValidationThreshold: $ref: '#/components/schemas/properties-enableAutoValidationThreshold' enabledChildFields: $ref: '#/components/schemas/enabledChildFields' disabledChildFields: $ref: '#/components/schemas/disabledChildFields' dataSource: $ref: '#/components/schemas/dataSource' mapping: $ref: '#/components/schemas/mapping' displayRawText: $ref: '#/components/schemas/displayRawText' dataPoint: type: object description: The data point to be created for this field. If a data point with the same slug and collection already exists, it will be reused. required: - identifier - name - slug - description - type - multiple - noRect - parent - children properties: identifier: $ref: '#/components/schemas/DataPoint_properties-identifier' name: $ref: '#/components/schemas/DataPoint_properties-name' slug: $ref: '#/components/schemas/slug' description: $ref: '#/components/schemas/description' type: $ref: '#/components/schemas/AnnotationContentType' multiple: $ref: '#/components/schemas/multiple' noRect: $ref: '#/components/schemas/noRect' parent: $ref: '#/components/schemas/properties-parent' children: $ref: '#/components/schemas/children' manualEntry: $ref: '#/components/schemas/manualEntry' availableDataSources: $ref: '#/components/schemas/availableDataSources' User_properties-name: type: string example: Carl Johnson PaletteColorOptions: type: object required: - main properties: main: type: string light: type: string dark: type: string contrastText: type: string disabledChildFields: type: array items: $ref: '#/components/schemas/Field' DataFieldCreateDataPoint: type: object description: The data point to be created for this field. If a data point with the same slug and collection already exists, it will be reused. required: - name - slug - type properties: name: $ref: '#/components/schemas/DataPoint_properties-name' slug: $ref: '#/components/schemas/slug' description: $ref: '#/components/schemas/description' type: $ref: '#/components/schemas/AnnotationContentType' multiple: $ref: '#/components/schemas/multiple' noRect: $ref: '#/components/schemas/noRect' parent: $ref: '#/components/schemas/properties-parent' manualEntry: $ref: '#/components/schemas/manualEntry' mappingDataSource: $ref: '#/components/schemas/mappingDataSource' categoryLabel: type: string description: The label of the category that this field will be put into. If not provided, the field will be put into the default category. If no category exists with the specified label, a new category will be created. DataPoint_properties-identifier: type: string description: Uniquely identify a data point. example: XprEvgai orderBy: type: string example: label description: The field to order the results by. Leave blank for ordering by relevance. nullable: true username: type: string example: carljohnson ExtractorConfig: type: object nullable: true description: Extra configurations specific to an extractor. properties: resumeRedact: $ref: '#/components/schemas/RedactConfig' FieldDeprecated: type: object properties: label: type: string slug: type: string nullable: true deprecated: true fieldType: $ref: '#/components/schemas/AnnotationContentType' dataSource: type: string description: Data source mapping identifier nullable: true mapping: type: string description: Defines how the data point is mapped to the data source nullable: true dataPoint: type: string mandatory: type: boolean disabled: type: boolean autoValidationThreshold: type: number nullable: true showDropdown: type: boolean displayRawText: type: boolean dropNull: type: boolean description: If True, any dropdown annotations that fail to parse to a value will be discarded displayEnumValue: type: boolean fields: type: array items: $ref: '#/components/schemas/FieldDeprecated' required: - label - dataPoint - fieldType additionalProperties: true AnnotationContentType: type: string description: The different data types of annotations enum: - text - integer - float - decimal - date - datetime - daterange - boolean - enum - location - phonenumber - json - table - expectedremuneration - jobtitle - language - skill - yearsexperience - group - table_deprecated - url - image - docclf DataPointChoiceUpdate: type: object properties: dataPoint: $ref: '#/components/schemas/DataPoint_properties-identifier' organization: $ref: '#/components/schemas/Organization_properties-identifier' collection: $ref: '#/components/schemas/properties-identifier' label: $ref: '#/components/schemas/properties-label' value: $ref: '#/components/schemas/value' synonyms: $ref: '#/components/schemas/synonyms' description: $ref: '#/components/schemas/description' properties-autoValidationThreshold: type: number nullable: true minimum: 0 maximum: 1 description: Threshold for auto validation. If null, uses the collection's autoValidationThreshold. manualEntry: type: boolean description: If true, the model will not be used to predict this data point. Instead, the user will be able to manually enter the value in the validation tool. ApiUserWithKey: type: object required: - id - name - username - email - avatar - organizations - apiKey properties: id: $ref: '#/components/schemas/properties-id' name: $ref: '#/components/schemas/User_properties-name' username: $ref: '#/components/schemas/username' email: $ref: '#/components/schemas/email' avatar: $ref: '#/components/schemas/properties-avatar' organizations: type: array items: type: object required: - identifier - name properties: identifier: $ref: '#/components/schemas/Organization_properties-identifier' name: $ref: '#/components/schemas/Organization_properties-name' apiKey: type: string description: Use this key to authenticate with the API. apiKeyLastChars: type: string description: The last 4 characters of the API key. additionalProperties: false trainsExtractor: type: boolean description: Whether this collection feeds documents into the extractor's training queue. This setting can only be toggled for custom extractors. FieldCategory: type: object properties: label: type: string enabledFields: type: array items: $ref: '#/components/schemas/Field' disabledFields: type: array items: $ref: '#/components/schemas/Field' required: - label - enabledFields - disabledFields additionalProperties: false children: type: array items: $ref: '#/components/schemas/DataPoint' DataPointChoice_properties-id: type: integer description: Data point choice's ID example: 1 minimum: 1 namePlural: type: string ApiUserUpdate: type: object properties: name: $ref: '#/components/schemas/User_properties-name' username: $ref: '#/components/schemas/username' email: $ref: '#/components/schemas/email' avatar: $ref: '#/components/schemas/properties-avatar' additionalProperties: false properties-avatar: type: string nullable: true description: URL of the user's avatar. example: https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG enableAutoValidationThreshold: type: boolean default: false DataPointCreate: type: object required: - name - slug - annotationContentType - extractor - organization properties: name: $ref: '#/components/schemas/DataPoint_properties-name' slug: $ref: '#/components/schemas/slug' description: $ref: '#/components/schemas/description' annotationContentType: $ref: '#/components/schemas/AnnotationContentType' organization: $ref: '#/components/schemas/Organization_properties-identifier' extractor: $ref: '#/components/schemas/Extractor_properties-identifier' multiple: $ref: '#/components/schemas/multiple' noRect: $ref: '#/components/schemas/noRect' parent: $ref: '#/components/schemas/properties-parent' manualEntry: $ref: '#/components/schemas/manualEntry' mappingDataSource: $ref: '#/components/schemas/mappingDataSource' noRect: type: boolean properties-dataSource: type: string example: mewERBRJJ description: The mapping data source this mapping applies to. nullable: true DataPointChoiceReplaceRequest: type: object description: Request body for replacing choices of a data point. Either `collection` or `organization` is required. required: - dataPoint - choices additionalProperties: false properties: dataPoint: $ref: '#/components/schemas/DataPoint_properties-identifier' collection: $ref: '#/components/schemas/properties-identifier' organization: $ref: '#/components/schemas/Organization_properties-identifier' choices: type: array description: Incoming choices to replace existing choices of a data point. Existing choices and incoming choices are matched base on their `value`. New `value` will be created, existing `value` will be updated, and `value` not in incoming choices will be deleted. items: $ref: '#/components/schemas/DataPointChoiceForReplace' validatable: type: boolean mappingDataSource: type: string nullable: true example: mEFayXdO description: If populated, the model will learn to predict this field using the data source, rather than relying on fuzzy string matching. Organization: type: object properties: identifier: type: string description: Uniquely identify an organization. example: mEFayXdO name: type: string example: Grove Street King userRole: type: string allOf: - $ref: '#/components/schemas/OrganizationRole' nullable: true description: The role of the logged in user within the organization. avatar: type: string nullable: true description: URL of the organization's avatar. example: https://affinda-api.s3.amazonaws.com/media/org-avatar.png?AWSAccessKeyId=KEY&Signature=SIG resthookSignatureKey: type: string nullable: true description: Used to sign webhook payloads so you can verify their integrity. example: 465c6598bd34c0558f0ce256c43209d49fa85b0ff3e4c18b24e408b7563143ad isTrial: type: boolean validationToolConfig: type: object nullable: true description: Configuration of the embeddable validation tool. properties: theme: $ref: '#/components/schemas/ThemeConfig' hideActions: type: boolean description: Hide the confirm document button and other actions. hideCollection: type: boolean description: Hide the collection selector. hideEditPages: type: boolean description: Hide the edit pages button. hideExport: type: boolean description: Hide the export menu. hideFilename: type: boolean description: Hide the filename input. hideShowRawValues: type: boolean description: Hide the toggle for showing raw annotation values. hideReject: type: boolean description: Hide the reject document button. hideReparse: type: boolean description: Hide the reparse button. hideRunOcr: type: boolean description: Hide the run OCR button. hideTags: type: boolean description: Hide the tags editor. hideWarnings: type: boolean description: Hide the warnings panel. restrictDocumentSplitting: type: boolean description: Disable the page editor after a document has been split once. disableCurrencyFormatting: type: boolean description: Disable currency formatting of decimals values. disableEditDocumentMetadata: type: boolean description: Disable editing document metadata. Makes the collection selector, filename input and tags editor read only. disableManualAnnotationEditing: type: boolean description: Disable manual editing of annotation values via the validation popover. hideDocumentStatus: type: boolean description: Hide the document status indicator in the toolbar. showCustomFieldCreation: type: boolean description: Whether to show the custom field creation in the UI. MappingCreate: type: object required: - dataSource properties: dataSource: $ref: '#/components/schemas/properties-dataSource' scoreCutoff: $ref: '#/components/schemas/scoreCutoff' organization: $ref: '#/components/schemas/organization' orderBy: $ref: '#/components/schemas/orderBy' DataPointChoiceForReplace: type: object required: - value additionalProperties: false properties: value: $ref: '#/components/schemas/value' label: $ref: '#/components/schemas/properties-label' synonyms: $ref: '#/components/schemas/synonyms' description: $ref: '#/components/schemas/description' ApiUserWithoutKey: type: object required: - id - name - username - email - avatar - organizations properties: id: $ref: '#/components/schemas/properties-id' name: $ref: '#/components/schemas/User_properties-name' username: $ref: '#/components/schemas/username' email: $ref: '#/components/schemas/email' avatar: $ref: '#/components/schemas/properties-avatar' organizations: type: array items: type: object required: - identifier - name properties: identifier: $ref: '#/components/schemas/Organization_properties-identifier' name: $ref: '#/components/schemas/Organization_properties-name' apiKeyLastChars: type: string description: The last 4 characters of the API key. additionalProperties: false Organization_properties-name: type: string example: Grove Street King slug: type: string description: A camelCase string that will be used as the key in the API response. UsageByCollectionResponse: type: array description: Monthly credits consumption items: $ref: '#/components/schemas/UsageByCollection' CollectionUpdate: type: object properties: name: $ref: '#/components/schemas/name' autoValidationThreshold: $ref: '#/components/schemas/autoValidationThreshold' enableAutoValidationThreshold: $ref: '#/components/schemas/enableAutoValidationThreshold' fields: $ref: '#/components/schemas/fields' fieldsLayout: $ref: '#/components/schemas/FieldsLayout' dateFormatPreference: $ref: '#/components/schemas/dateFormatPreference' dateFormatFromDocument: $ref: '#/components/schemas/dateFormatFromDocument' extractorConfig: $ref: '#/components/schemas/ExtractorConfig' allowOpenai: $ref: '#/components/schemas/allowOpenai' trainsExtractor: $ref: '#/components/schemas/trainsExtractor' disableConfirmationIfValidationRulesFail: $ref: '#/components/schemas/disableConfirmationIfValidationRulesFail' DataPointUpdate: type: object properties: name: $ref: '#/components/schemas/DataPoint_properties-name' slug: $ref: '#/components/schemas/slug' description: $ref: '#/components/schemas/description' parent: $ref: '#/components/schemas/properties-parent' mappingDataSource: $ref: '#/components/schemas/mappingDataSource' organization: type: string example: mewlkWEKL description: The organization that this mapping belongs to. nullable: true DataPoint: type: object properties: identifier: type: string description: Uniquely identify a data point. example: XprEvgai name: type: string description: Name of the data point. slug: type: string description: A camelCase string that will be used as the key in the API response. description: type: string nullable: true annotationContentType: $ref: '#/components/schemas/AnnotationContentType' organization: $ref: '#/components/schemas/Organization' nullable: true extractor: $ref: '#/components/schemas/Extractor_properties-identifier' nullable: true multiple: type: boolean noRect: type: boolean parent: type: string description: The identifier of the parent data point if applicable. nullable: true example: DdCbJhhx children: type: array items: $ref: '#/components/schemas/DataPoint' availableDataSources: type: array items: $ref: '#/components/schemas/MappingDataSource' mappingDataSource: type: string nullable: true example: mEFayXdO description: If populated, the model will learn to predict this field using the data source, rather than relying on fuzzy string matching. manualEntry: type: boolean description: If true, the model will not be used to predict this data point. Instead, the user will be able to manually enter the value in the validation tool. required: - identifier - name - slug - organization - annotationContentType - extractor displayEnumValue: type: boolean description: If true, both the value and the label for the enums will appear in the dropdown in the validation tool. Mapping: type: object description: A mapping allows you to specify specific settings regarding a lookup against a MappingDataSource should be applied. required: - identifier - dataSource properties: identifier: type: string description: Uniquely identify a mapping. example: mEFayXdO readOnly: true organization: type: string example: mewlkWEKL description: The organization that this mapping belongs to. nullable: true dataSource: type: string example: mewERBRJJ description: The mapping data source this mapping applies to. nullable: true scoreCutoff: type: number example: 10 description: Higher values will result in more strict matching. nullable: true orderBy: type: string example: label description: The field to order the results by. Leave blank for ordering by relevance. nullable: true UsageByCollection: type: object description: Monthly credits consumption required: - month - count properties: month: type: string description: Month of the usage example: 2023-07 count: type: integer description: Usage count example: 100 additionalProperties: false Extractor: type: object required: - identifier - name - namePlural - validatable properties: identifier: type: string description: Uniquely identify an extractor. example: resume name: type: string namePlural: type: string baseExtractor: type: object nullable: true required: - identifier - name - namePlural - validatable properties: identifier: $ref: '#/components/schemas/Extractor_properties-identifier' name: $ref: '#/components/schemas/name' namePlural: $ref: '#/components/schemas/namePlural' validatable: $ref: '#/components/schemas/validatable' isCustom: $ref: '#/components/schemas/isCustom' createdDt: $ref: '#/components/schemas/createdDt' organization: $ref: '#/components/schemas/Organization' nullable: true category: type: string nullable: true example: Recruitment validatable: type: boolean isCustom: type: boolean fieldGroups: type: array nullable: true items: $ref: '#/components/schemas/FieldGroup' createdDt: type: string format: date-time lastTrainedDt: type: string format: date-time nullable: true value: type: string example: USD autoValidationThreshold: type: number Field: type: object properties: label: type: string dataPoint: type: string description: Data point identifier fieldType: $ref: '#/components/schemas/AnnotationContentType' dataSource: type: string description: Data source mapping identifier nullable: true mapping: type: string description: Defines how the data point is mapped to the data source nullable: true mandatory: type: boolean autoValidationThreshold: type: number nullable: true minimum: 0 maximum: 1 description: Threshold for auto validation. If null, uses the collection's autoValidationThreshold. enableAutoValidationThreshold: type: boolean nullable: true description: If true, the autoValidationThreshold enable auto validation from the threshold from this field if specified, else from the collection showDropdown: type: boolean deprecated: true displayEnumValue: type: boolean description: If true, both the value and the label for the enums will appear in the dropdown in the validation tool. hideEnumDetail: type: boolean description: If true, the hoverable enum value detail icon will be hidden. dropNull: type: boolean description: If True, any dropdown annotations that fail to parse to a value will be discarded enabledChildFields: type: array items: $ref: '#/components/schemas/Field' disabledChildFields: type: array items: $ref: '#/components/schemas/Field' slug: type: string nullable: true deprecated: true displayRawText: type: boolean description: If true, then the validation tool will show the user the raw text found on the page, not the value that has been parsed to a specific type. fields: type: array items: type: object nullable: true deprecated: true required: - label - dataPoint - fieldType additionalProperties: true MappingUpdate: type: object properties: scoreCutoff: $ref: '#/components/schemas/scoreCutoff' orderBy: $ref: '#/components/schemas/orderBy' properties-parent: type: string description: The identifier of the parent data point if applicable. nullable: true example: DdCbJhhx CollectionCreate: type: object required: - name - workspace properties: name: $ref: '#/components/schemas/name' workspace: $ref: '#/components/schemas/identifier' extractor: type: string description: Uniquely identify an extractor. Required if you are not a super user. example: resume baseExtractor: type: string description: Not applicable, please leave empty. This feature is reserved for super user. autoValidationThreshold: $ref: '#/components/schemas/autoValidationThreshold' enableAutoValidationThreshold: $ref: '#/components/schemas/enableAutoValidationThreshold' fields: $ref: '#/components/schemas/fields' fieldsLayout: $ref: '#/components/schemas/FieldsLayout' dateFormatPreference: $ref: '#/components/schemas/dateFormatPreference' dateFormatFromDocument: $ref: '#/components/schemas/dateFormatFromDocument' extractorConfig: $ref: '#/components/schemas/ExtractorConfig' allowOpenai: $ref: '#/components/schemas/allowOpenai' trainsExtractor: $ref: '#/components/schemas/trainsExtractor' disableConfirmationIfValidationRulesFail: $ref: '#/components/schemas/disableConfirmationIfValidationRulesFail' isCustom: type: boolean label: type: string MappingDataSource: type: object description: A mapping data source is used to map from raw data found by our AI models to records in your database. required: - identifier - organization - workspace - keyProperty - displayProperty properties: identifier: type: string description: Uniquely identify a mapping data source. example: mEFayXdO readOnly: true name: type: string example: My supplier list nullable: true keyProperty: type: string example: value description: Attribute in the schema which uniquely identifiers the value displayProperty: type: string example: value description: Attribute in the schema which is used to display the value organization: type: string example: mewlkWEKL description: The organization that this mapping data source belongs to. nullable: true workspace: type: string example: mewlkWEKL description: The workspace that this mapping data source belongs to. nullable: true schema: type: object description: The schema of the mapping data source. example: type: object $schema: http://json-schema.org/draft-07/schema# required: - label properties: label: type: string description: type: string showDropdown: type: boolean deprecated: true RedactConfig: type: object properties: redactHeadshot: type: boolean example: true redactPersonalDetails: type: boolean example: true redactWorkDetails: type: boolean example: true redactReferees: type: boolean example: true redactEducationDetails: type: boolean example: true redactLocations: type: boolean example: true redactDates: type: boolean example: true redactGender: type: boolean example: true DataPointChoiceCreate: type: object required: - dataPoint - label - value properties: dataPoint: $ref: '#/components/schemas/DataPoint_properties-identifier' organization: $ref: '#/components/schemas/Organization_properties-identifier' collection: $ref: '#/components/schemas/properties-identifier' label: $ref: '#/components/schemas/properties-label' value: $ref: '#/components/schemas/value' synonyms: $ref: '#/components/schemas/synonyms' description: $ref: '#/components/schemas/description' responses: DefaultError: description: UnexpectedError content: application/json: schema: $ref: '#/components/schemas/RequestError' x-ms-error-response: true 400Error: description: Bad request. If it is a validation error will contain a list of each invalid field content: application/json: schema: $ref: '#/components/schemas/RequestError' x-ms-error-response: true 204NoContent: description: Delete successful, no content returned 401Error: description: Authorisation error content: application/json: schema: $ref: '#/components/schemas/RequestError' x-ms-error-response: true parameters: limitParam: in: query name: limit required: false schema: type: integer minimum: 1 maximum: 100 example: 20 description: The numbers of results to return. x-ms-parameter-location: method offsetParam: in: query name: offset required: false schema: type: integer minimum: 0 example: 0 description: The number of documents to skip before starting to collect the result set. x-ms-parameter-location: method securitySchemes: ApiKeyAuth: type: http scheme: bearer description: 'Basic authentication using an API key, e.g. `{Authorization: Bearer aff_0bb4fbdf97b7e4111ff6c0015471094155f91}`. You can find your API key within the Settings page of the [Affinda web app](https://app.affinda.com/). You can obtain an API key by [signing up for a free trial](https://app.affinda.com/auth/register).'