{"openapi":"3.1.0","info":{"title":"Main Reference","version":"1.0.0"},"paths":{"/documents":{"get":{"operationId":"documents_getAListOfDocuments","summary":"Get a list of documents","tags":["documents"],"parameters":[{"name":"filter","in":"query","description":"Query filter in JSON format. Supports filtering by document properties with operators.\n\n**Filter by company:**\n```json\n{\"company\": {\"eq\": \"507f1f77bcf86cd799439011\"}}\n```\n\n**Filter by public state (single value):**\n```json\n{\"publicState\": {\"in\": [\"approved\"]}}\n```\n\n**Filter by multiple states:**\n```json\n{\"publicState\": {\"in\": [\"approved\", \"exported\"]}}\n```\n\n**Filter by document type:**\n```json\n{\"type\": {\"in\": [\"000000000000000000000017\", \"000000000000000000000018\"]}}\n```\n\n**Filter by page count:**\n```json\n{\"pageCount\": {\"eq\": 11}}\n```\n\n**Filter by date range:**\n```json\n{\"creation\": {\"gte\": \"2024-01-01T00:00:00.000Z\", \"lte\": \"2024-12-31T23:59:59.999Z\"}}\n```\n\n**Filter by data fields:**\n```json\n{\"data.totalAmount\": {\"gte\": 1000}}\n```\n\n**Combine multiple filters:**\n```json\n{\n  \"type\": {\"in\": [\"000000000000000000000017\"]},\n  \"publicState\": {\"in\": [\"approved\"]},\n  \"pageCount\": {\"eq\": 11}\n}\n```\n\n**Filter by client data:**\n```json\n{\"clientData.externalId\": {\"eq\": \"ORDER-123\"}}\n```\n\n**Available operators:**\n- `eq` - Equals\n- `ne` - Not equals\n- `gt` - Greater than\n- `gte` - Greater than or equal\n- `lt` - Less than\n- `lte` - Less than or equal\n- `in` - Value in array","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Field to sort documents by. Prefix with `-` for descending order (e.g., `-creation` for newest first).","required":false,"schema":{"type":"string"}},{"name":"select","in":"query","description":"Comma-separated fields to include in the response. You can specify any field path using dot notation.\n\n**Common fields:** `_id`, `company`, `publicState`, `type`, `data`, `data.invoiceNumber`, `clientData`, `creation`, `confidence`, `pageCount`\n\n**Examples:**\n- To get basic info: `_id,publicState,type`\n- To get specific data fields: `_id,data.invoiceNumber,data.totalAmount`\n- To get all data: `data,type,company,confidence,publicState,creation`","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"skip","in":"query","description":"**`(List pagination element)`**\n number of documents to skip of the list .The list is made up of documents that comply with the terms have been defined in the query.The skips start from the top of the list.\n","required":false,"schema":{"type":"number","format":"double","default":0}},{"name":"limit","in":"query","description":"**`(List pagination element)`**\n total number of documents to retrieve (max. 500) of the list.The retrieval starts from the established position by the value of the param skip.\n","required":false,"schema":{"type":"number","format":"double","maximum":500,"default":50}}],"responses":{"200":{"description":"List of documents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Documents_getAListOfDocuments_Response_200"}}}},"400":{"description":"Missing some or all parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrMissingParams"}}}},"429":{"description":"Too many requests were sent to the server in a short period of time. The\nresponse contains headers conforming to the [ratelimit standardization\ndraft adopted by the IETF](https://github.com/ietf-wg-httpapi/ratelimit-headers/blob/main/draft-ietf-httpapi-ratelimit-headers.md/)\n * RateLimit-Limit - Limit of requests per window\n * RateLimit-Remaining - Remaining requests for current window\n * RateLimit-Reset - Seconds until window resets\n * Retry-After - Seconds caller should wait before retrying\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAListOfDocumentsRequestTooManyRequestsError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAListOfDocumentsRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/documents/{id}":{"get":{"operationId":"documents_getDocumentInfo","summary":"Get document info","tags":["documents"],"parameters":[{"name":"id","in":"path","description":"id of the document to retrieve","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get documento info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Missing some or all parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrMissingParams"}}}},"410":{"description":"The document has expired and is no longer accessible or modifiable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentInfoRequestGoneError"}}}},"429":{"description":"Too many requests were sent to the server in a short period of time. The\nresponse contains headers conforming to the [ratelimit standardization\ndraft adopted by the IETF](https://github.com/ietf-wg-httpapi/ratelimit-headers/blob/main/draft-ietf-httpapi-ratelimit-headers.md/)\n * RateLimit-Limit - Limit of requests per window\n * RateLimit-Remaining - Remaining requests for current window\n * RateLimit-Reset - Seconds until window resets\n * Retry-After - Seconds caller should wait before retrying\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentInfoRequestTooManyRequestsError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentInfoRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]},"put":{"operationId":"documents_updateDocumentInformation","summary":"Update document information","description":"Update the extracted data or custom metadata of a document — for example, to submit corrections or feedback on the extracted fields. Documents in `pendingCorrection` or `approved` state can be updated through this endpoint.\n","tags":["documents"],"parameters":[{"name":"id","in":"path","description":"id of the document to modify","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentInformationRequestBadRequestError"}}}},"403":{"description":"User is not authorized to carry out this action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentInformationRequestForbiddenError"}}}},"410":{"description":"The document has expired and is no longer accessible or modifiable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentInformationRequestGoneError"}}}},"429":{"description":"Too many requests were sent to the server in a short period of time. The\nresponse contains headers conforming to the [ratelimit standardization\ndraft adopted by the IETF](https://github.com/ietf-wg-httpapi/ratelimit-headers/blob/main/draft-ietf-httpapi-ratelimit-headers.md/)\n * RateLimit-Limit - Limit of requests per window\n * RateLimit-Remaining - Remaining requests for current window\n * RateLimit-Reset - Seconds until window resets\n * Retry-After - Seconds caller should wait before retrying\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentInformationRequestTooManyRequestsError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentInformationRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPutRequestBody"}}}},"security":[{"ApiKeyAuth":[]}]}},"/documents/{id}/ocr":{"get":{"operationId":"documents_getDocumentOcrInfo","summary":"Get document ocr info","tags":["documents"],"parameters":[{"name":"id","in":"path","description":"id of the document to get","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Document ocr info by id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Documents_getDocumentOcrInfo_Response_200"}}}},"400":{"description":"Provided id is not correctly formatted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentOcrInfoRequestBadRequestError"}}}},"403":{"description":"User is not authorized to carry out this action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentOcrInfoRequestForbiddenError"}}}},"404":{"description":"Element was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentOcrInfoRequestNotFoundError"}}}},"429":{"description":"Too many requests were sent to the server in a short period of time. The\nresponse contains headers conforming to the [ratelimit standardization\ndraft adopted by the IETF](https://github.com/ietf-wg-httpapi/ratelimit-headers/blob/main/draft-ietf-httpapi-ratelimit-headers.md/)\n * RateLimit-Limit - Limit of requests per window\n * RateLimit-Remaining - Remaining requests for current window\n * RateLimit-Reset - Seconds until window resets\n * Retry-After - Seconds caller should wait before retrying\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentOcrInfoRequestTooManyRequestsError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentOcrInfoRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/documents/{id}/text":{"get":{"operationId":"documents_getDocumentPlainOcrText","summary":"Get document plain ocr text","tags":["documents"],"parameters":[{"name":"id","in":"path","description":"id of the document to get","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Document ocr text by id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Documents_getDocumentPlainOcrText_Response_200"}}}},"400":{"description":"Provided id is not correctly formatted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentPlainOcrTextRequestBadRequestError"}}}},"403":{"description":"User is not authorized to carry out this action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentPlainOcrTextRequestForbiddenError"}}}},"404":{"description":"Element was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentPlainOcrTextRequestNotFoundError"}}}},"429":{"description":"Too many requests were sent to the server in a short period of time. The\nresponse contains headers conforming to the [ratelimit standardization\ndraft adopted by the IETF](https://github.com/ietf-wg-httpapi/ratelimit-headers/blob/main/draft-ietf-httpapi-ratelimit-headers.md/)\n * RateLimit-Limit - Limit of requests per window\n * RateLimit-Remaining - Remaining requests for current window\n * RateLimit-Reset - Seconds until window resets\n * Retry-After - Seconds caller should wait before retrying\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentPlainOcrTextRequestTooManyRequestsError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentPlainOcrTextRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/documents/{id}/type":{"put":{"operationId":"documents_changeTheTypeOfADocument","summary":"Change the type of a document","description":"**Deprecated.** Use [Update document information](/api-reference/main-reference/documents/update-document-information) (`PUT /documents/{id}`) instead — it now handles all document updates, including changing the document type. This endpoint is kept for backward compatibility and should not be used in new integrations.\n","tags":["documents"],"parameters":[{"name":"id","in":"path","description":"id of the document which type will be changed","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeTheTypeOfADocumentRequestBadRequestError"}}}},"403":{"description":"User is not authorized to carry out this action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeTheTypeOfADocumentRequestForbiddenError"}}}},"410":{"description":"The document has expired and is no longer accessible or modifiable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeTheTypeOfADocumentRequestGoneError"}}}},"429":{"description":"Too many requests were sent to the server in a short period of time. The\nresponse contains headers conforming to the [ratelimit standardization\ndraft adopted by the IETF](https://github.com/ietf-wg-httpapi/ratelimit-headers/blob/main/draft-ietf-httpapi-ratelimit-headers.md/)\n * RateLimit-Limit - Limit of requests per window\n * RateLimit-Remaining - Remaining requests for current window\n * RateLimit-Reset - Seconds until window resets\n * Retry-After - Seconds caller should wait before retrying\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeTheTypeOfADocumentRequestTooManyRequestsError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeTheTypeOfADocumentRequestInternalServerError"}}}}},"deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Document type ID or alias (e.g., \"invoice\", \"receipt\", or a custom type ID from your environment)"}},"required":["type"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/documents/{id}/publicState":{"put":{"operationId":"documents_changeThePublicStateOfADocument","summary":"Change the publicState of a document","description":"**Deprecated.** Use [Update document information](/api-reference/main-reference/documents/update-document-information) (`PUT /documents/{id}`) instead — it now handles all document updates, including changing the public state. This endpoint is kept for backward compatibility and should not be used in new integrations.\n","tags":["documents"],"parameters":[{"name":"id","in":"path","description":"id of the document which type will be changed","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeThePublicStateOfADocumentRequestBadRequestError"}}}},"403":{"description":"User is not authorized to carry out this action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeThePublicStateOfADocumentRequestForbiddenError"}}}},"410":{"description":"The document has expired and is no longer accessible or modifiable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeThePublicStateOfADocumentRequestGoneError"}}}},"429":{"description":"Too many requests were sent to the server in a short period of time. The\nresponse contains headers conforming to the [ratelimit standardization\ndraft adopted by the IETF](https://github.com/ietf-wg-httpapi/ratelimit-headers/blob/main/draft-ietf-httpapi-ratelimit-headers.md/)\n * RateLimit-Limit - Limit of requests per window\n * RateLimit-Remaining - Remaining requests for current window\n * RateLimit-Reset - Seconds until window resets\n * Retry-After - Seconds caller should wait before retrying\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeThePublicStateOfADocumentRequestTooManyRequestsError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeThePublicStateOfADocumentRequestInternalServerError"}}}}},"deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"publicState":{"$ref":"#/components/schemas/DocumentsIdPublicStatePutRequestBodyContentApplicationJsonSchemaPublicState"}},"required":["publicState"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/companies":{"post":{"operationId":"companies_createANewCompany","summary":"Create a new company.","tags":["companies"],"responses":{"200":{"description":"The company was successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Companies_createANewCompany_Response_200"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewCompanyRequestBadRequestError"}}}},"403":{"description":"User is not authorized to carry out this action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewCompanyRequestForbiddenError"}}}},"404":{"description":"Enterprise was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewCompanyRequestNotFoundError"}}}},"409":{"description":"A company with the same CIF and country code was already created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewCompanyRequestConflictError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewCompanyRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2","description":"country code in two-digits format (ISO 3166-1 alpha-2)"},"taxId":{"type":"string","description":"Tax id number"},"name":{"type":"string","description":"Business name of company"},"clientData":{"$ref":"#/components/schemas/CompaniesPostRequestBodyContentApplicationJsonSchemaClientData","description":"custom data that Invofox's clients can store in a company"},"clients":{"type":"array","items":{"$ref":"#/components/schemas/CompaniesPostRequestBodyContentApplicationJsonSchemaClientsItems"},"description":"clients list linked to the company to be created"},"providers":{"type":"array","items":{"$ref":"#/components/schemas/CompaniesPostRequestBodyContentApplicationJsonSchemaProvidersItems"},"description":"providers list linked to the company to be created"}},"required":["countryCode","taxId","name"]}}}},"security":[{"ApiKeyAuth":[]}]},"get":{"operationId":"companies_retrieveAListOfManagedCompanies","summary":"Retrieve a list of managed companies.","description":"This request is **`ONLY available`** for managed companies.","tags":["companies"],"parameters":[{"name":"skip","in":"query","description":"How many companies to skip at the start","required":false,"schema":{"type":"number","format":"double"}},{"name":"limit","in":"query","description":"Maximum number of companies returned by query","required":false,"schema":{"type":"number","format":"double"}},{"name":"sort","in":"query","description":"Key-value pairs where key is the name of field to sort by, and value is one of 1 (ascending) or -1 (descending)","required":false,"schema":{"$ref":"#/components/schemas/CompaniesGetParametersSort"}},{"name":"countryCode","in":"query","description":"Country code to filter the list of companies","required":false,"schema":{"type":"string"}},{"name":"taxId","in":"query","description":"Tax id to filter the list of companies","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Company name to filter the list of companies","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of companies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Companies_retrieveAListOfManagedCompanies_Response_200"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveAListOfManagedCompaniesRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/companies/{id}":{"put":{"operationId":"companies_updateACompany","summary":"Update a company.","tags":["companies"],"parameters":[{"name":"id","in":"path","description":"id of the company to modify","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The company was successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Companies_updateACompany_Response_200"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateACompanyRequestBadRequestError"}}}},"403":{"description":"User is not authorized to carry out this action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateACompanyRequestForbiddenError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateACompanyRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2","description":"country code in two-digits format (ISO 3166-1 alpha-2)"},"taxId":{"type":"string","description":"Tax id number"},"name":{"type":"string","description":"Business name of company"}},"required":["countryCode","taxId","name"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"companies_deleteACompany","summary":"Delete a company.","description":"Only recently created companies (without documents, providers, clients, or imports/exports associated to them) can be deleted.","tags":["companies"],"parameters":[{"name":"id","in":"path","description":"id of the company to modify","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The company was successfully deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Companies_deleteACompany_Response_200"}}}},"400":{"description":"Company has some active resources (documents, providers, clients, or imports/exports) associated to it, and therefore cannot be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteACompanyRequestBadRequestError"}}}},"403":{"description":"User is not authorized to carry out this action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteACompanyRequestForbiddenError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteACompanyRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/companies/{id}/providers":{"post":{"operationId":"providers_createANewProvider","summary":"Create a new provider.","description":"Create a new provider for specified company.","tags":["providers"],"parameters":[{"name":"id","in":"path","description":"id of the company to add a provider to","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Provider successfully registered for specified company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Providers_createANewProvider_Response_201"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewProviderRequestBadRequestError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewProviderRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2","description":"country code in two-digits format (ISO 3166-1 alpha-2)"},"taxId":{"type":"string","description":"Tax id number"},"name":{"type":"string","description":"Business name of enterprise"}},"required":["countryCode","taxId","name"]}}}},"security":[{"ApiKeyAuth":[]}]},"get":{"operationId":"providers_getAListOfProviders","summary":"Get a list of providers.","description":"Get a list of providers for specified company.","tags":["providers"],"parameters":[{"name":"id","in":"path","description":"id of the company to get providers from","required":true,"schema":{"type":"string"}},{"name":"skip","in":"query","description":"How many providers to skip at the start","required":false,"schema":{"type":"number","format":"double"}},{"name":"limit","in":"query","description":"Maximum number of providers returned by query","required":false,"schema":{"type":"number","format":"double"}},{"name":"sort","in":"query","description":"Key-value pairs where key is the name of field to sort by, and value is one of 1 (ascending) or -1 (descending)","required":false,"schema":{"$ref":"#/components/schemas/CompaniesIdProvidersGetParametersSort"}},{"name":"taxId","in":"query","description":"Tax id to filter the list of providers","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Provider name to filter the list of providers","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of providers for specified company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Providers_getAListOfProviders_Response_200"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAListOfProvidersRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/companies/{id}/providers/{providerId}":{"put":{"operationId":"providers_modifyAProvider","summary":"Modify a provider.","description":"Modify a provider for specified company.","tags":["providers"],"parameters":[{"name":"id","in":"path","description":"id of the provider's company to modify","required":true,"schema":{"type":"string"}},{"name":"providerId","in":"path","description":"provider id to be modified","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Provider successfully modified for specified company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Providers_modifyAProvider_Response_200"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyAProviderRequestBadRequestError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyAProviderRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2","description":"country code in two-digits format (ISO 3166-1 alpha-2)"},"taxId":{"type":"string","description":"Tax id number"},"name":{"type":"string","description":"Business name of enterprise"}},"required":["countryCode","taxId","name"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"providers_deleteProvider","summary":"Delete provider.","description":"Delete provider for specified company.","tags":["providers"],"parameters":[{"name":"id","in":"path","description":"company id of the company to delete a provider to","required":true,"schema":{"type":"string"}},{"name":"providerId","in":"path","description":"provider id to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Provider successfully deleted for specified company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Providers_deleteProvider_Response_200"}}}},"404":{"description":"Provider was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProviderRequestNotFoundError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProviderRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/companies/{id}/clients":{"post":{"operationId":"clients_createANewClient","summary":"Create a new client.","description":"Create a new client for specified company.","tags":["clients"],"parameters":[{"name":"id","in":"path","description":"id of the company to add a client to","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Client successfully registered for specified company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clients_createANewClient_Response_201"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewClientRequestBadRequestError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateANewClientRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2","description":"country code in two-digits format (ISO 3166-1 alpha-2)"},"taxId":{"type":"string","description":"Tax id number"},"name":{"type":"string","description":"Business name of enterprise"}},"required":["countryCode","name"]}}}},"security":[{"ApiKeyAuth":[]}]},"get":{"operationId":"clients_getAListOfClients","summary":"Get a list of clients.","description":"Get a list of clients for specified company.","tags":["clients"],"parameters":[{"name":"id","in":"path","description":"id of the company to get clients from","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Key-value pairs where keys correspond to CompanyEnterprises's model schema","required":false,"schema":{"$ref":"#/components/schemas/CompaniesIdClientsGetParametersFilter"}}],"responses":{"200":{"description":"List of clients for specified company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clients_getAListOfClients_Response_200"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAListOfClientsRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/companies/{id}/clients/{clientId}":{"put":{"operationId":"clients_modifyAClient","summary":"Modify a client.","description":"Modify a client for specified company.","tags":["clients"],"parameters":[{"name":"id","in":"path","description":"id of the client's company to modify","required":true,"schema":{"type":"string"}},{"name":"clientId","in":"path","description":"client id to be modified","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Client successfully modified for specified company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clients_modifyAClient_Response_200"}}}},"400":{"description":"Request error of one of many supported types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyAClientRequestBadRequestError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyAClientRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2","description":"country code in two-digits format (ISO 3166-1 alpha-2)"},"taxId":{"type":"string","description":"Tax id number"},"name":{"type":"string","description":"Business name of enterprise"}},"required":["countryCode","taxId","name"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"clients_deleteClient","summary":"Delete  client .","description":"Delete a client for specified company.","tags":["clients"],"parameters":[{"name":"id","in":"path","description":"company id of the company to delete a client to","required":true,"schema":{"type":"string"}},{"name":"clientId","in":"path","description":"client id to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Client successfully deleted for specified company","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clients_deleteClient_Response_200"}}}},"404":{"description":"Client was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteClientRequestNotFoundError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteClientRequestInternalServerError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/users/":{"post":{"operationId":"users_createANewUser","summary":"Create a new user.","description":"Create a new user on **an account**.","tags":["users"],"responses":{"204":{"description":"An invitation email has been sent to the specified user.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"securityGroups":{"type":"array","items":{"type":"string"}}},"required":["account","name","email","securityGroups"]}}}},"security":[{"ApiKeyAuth":[]}]}},"/users":{"get":{"operationId":"users_listUsersForAnAccount","summary":"List users for an account.","description":"Lists the users that have a role in an account, or in one of its environments.\n\n**Permissions:** with `environment`, the caller needs the `envDev` role or higher on that environment.\n\n- **API keys:** `environment` is required. An API key always acts as `envDev` on the environment it belongs to, so it can only list that environment. Without `environment` it gets `403`.\n- **Dashboard users:** without `environment`, the caller needs `accountAdmin` on the account; otherwise the API answers `403`.\n\n**Pagination:** results are paginated. If you don't send `limit`, only the first 50 users are returned. Use `count` to know the total and page with `skip` and `limit`. There is no maximum `limit`.\n\nFilters are plain query parameters (`?environment=...&limit=100`), not a JSON `filter` object.","tags":["users"],"parameters":[{"name":"account","in":"query","description":"Account to list users for. Defaults to the caller's account.","required":false,"schema":{"type":"string"}},{"name":"environment","in":"query","description":"Only list users with access to this environment: users with a role on the environment, plus account admins. Required when calling with an API key, and it must be the environment the key belongs to.","required":false,"schema":{"type":"string"}},{"name":"role","in":"query","description":"Only list users with this role. Any other value answers `400`.","required":false,"schema":{"$ref":"#/components/schemas/UsersGetParametersRole"}},{"name":"sort","in":"query","description":"Field to sort users by. Prefix with `-` for descending order (e.g., `-creation` for newest first). Without it, the order is not guaranteed.","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","description":"**`(List pagination element)`**\n number of users to skip from the start of the list.\n","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","description":"**`(List pagination element)`**\n number of users to return, starting at `skip`. Defaults to 50. There is no maximum. `0` or a non-numeric value returns an empty `result`.\n","required":false,"schema":{"type":"integer","minimum":1,"default":50}}],"responses":{"200":{"description":"A list of users. `count` is the total number of matching users, not the number returned in `result`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_listUsersForAnAccount_Response_200"}}}},"403":{"description":"The caller lacks the required role: `accountAdmin` without `environment` (never available to an API key), or `envDev` or higher on the environment with it.","content":{"application/json":{"schema":{"description":"Any type"}}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"users_deleteAListOfUsers","summary":"Delete a list of users.","tags":["users"],"parameters":[{"name":"account","in":"query","required":true,"schema":{"type":"string"}},{"name":"ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Preview of the changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_deleteAListOfUsers_Response_200"}}}},"400":{"description":"There was an issue deleting the users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrSomeUsersCannotBeDeleted"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAListOfUsersRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"boolean","description":"Whether to preview the changes or not"}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/users/{id}":{"get":{"operationId":"users_getTheDetailsOfAUser","summary":"Get the details of a user.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_getTheDetailsOfAUser_Response_200"}}}}},"security":[{"ApiKeyAuth":[]}]},"put":{"operationId":"users_updateAUser","summary":"Update a user.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_updateAUser_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"securityGroups":{"type":"array","items":{"type":"string"}}},"required":["name","email","securityGroups"]}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"operationId":"users_deleteAUser","summary":"Delete a user.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"account","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Preview of the changes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_deleteAUser_Response_200"}}}},"400":{"description":"There was an issue deleting the user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrUserCannotBeDeleted"}}}},"404":{"description":"Element was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAUserRequestNotFoundError"}}}},"500":{"description":"Unkown server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAUserRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"boolean","description":"Whether to preview the changes or not"}}}}}},"security":[{"ApiKeyAuth":[]}]}}},"tags":[{"name":"documents"},{"name":"companies"},{"name":"providers"},{"name":"clients"},{"name":"users"}],"servers":[{"url":"https://api.invofox.com","description":"Production server"}],"components":{"schemas":{"DocumentClientData":{"type":"object","properties":{},"description":"\"Additional data to be added to each document. Must be an object\n or an array of objects. If data to be specified to each document\n is different, this parameter should have the following format:\n `[\n    {\n      _filename: <name of the file to which attach this data>,\n      <key>: <value>\n    },\n    ...\n    {\n      _filename: <name of the file to which attach this data>,\n      <key>: <value>\n    }\n ]`.\"\n","title":"DocumentClientData"},"DocumentType":{"type":"string","enum":["invoice","deliveryNote","promissoryNote","ticket","supplyInvoice"],"title":"DocumentType"},"DocumentPublicState":{"type":"string","enum":["processing","pendingCorrection","discarded","approved","exported","error"],"default":"processing","title":"DocumentPublicState"},"DocumentConfidence":{"type":"string","enum":["high","medium","low"],"title":"DocumentConfidence"},"DocumentProcessInfoResult":{"type":"string","enum":["verified","not verified","discarded"],"title":"DocumentProcessInfoResult"},"DocumentProcessInfo":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/DocumentProcessInfoResult"}},"title":"DocumentProcessInfo"},"ErrorSeverity":{"type":"string","enum":["high","medium","low"],"description":"Error severity","title":"ErrorSeverity"},"ErrorCode":{"type":"string","enum":["ERR_FILE_TOO_BIG","ERR_TOO_MANY_PAGES","ERR_UNSUPPORTED_FILE_FORMAT","ERR_EMPTY_VALUE","ERR_INVALID_FORMAT","ERR_LOW_CONFIDENCE","ERR_HANDWRITTEN_DOC","ERR_INVALID_DOC_TYPE","ERR_CROPPED_DOC","ERR_MULTI_DOC_PAGE_FOUND","ERR_PAGES_MISSING","ERR_BAD_QUALITY","ERR_OTHER"],"description":"Descriptive error code\n* `ERR_FILE_TOO_BIG` - The uploaded file is too big (max 50 MB)\n* `ERR_TOO_MANY_PAGES` - Document has too many pages (max. 10)\n* `ERR_UNSUPPORTED_FILE_FORMAT` - Document's format not supported\n* `ERR_EMPTY_VALUE` - No value extracted\n* `ERR_INVALID_FORMAT` - Extracted value has an invalid format\n* `ERR_LOW_CONFIDENCE` - Extracted value has low confidence\n* `ERR_HANDWRITTEN_DOC` - Document is handwritten\n* `ERR_INVALID_DOC_TYPE` - Document type is unknown (not invoice,\n    ticket, etc)\n* `ERR_CROPPED_DOC` - Document is cropped hence has missing\n    information\n* `ERR_MULTI_DOC_PAGE_FOUND` - File contains multiple documents\n* `ERR_PAGES_MISSING` - Document has missing pages hence is\n    incomplete\n* `ERR_DUPLICATED_DOCUMENT` - Document is duplicated\n* `ERR_MISSING_INFO` - Document is missing required information\n* `ERR_BAD_QUALITY` - Document has bad quality\n* `ERR_OTHER` - Generic error\n","title":"ErrorCode"},"ErrorInfo":{"type":"object","properties":{},"description":"Additional information related to the error (if any)","title":"ErrorInfo"},"ErrorFieldsItems":{"type":"object","properties":{"name":{"type":"string","description":"field name"},"prefix":{"type":"string","description":"If the field is an array, the key of the array in data"},"index":{"type":"number","format":"double","description":"If the field belongs to an array, the index in the array"},"groupIndex":{"type":"number","format":"double","description":"If the field is an additional data, the first index in data.additionalData array"},"splitIndex":{"type":"number","format":"double","description":"If the field is an additional data, the second index in data.additionalData array"}},"title":"ErrorFieldsItems"},"Error":{"type":"object","properties":{"severity":{"$ref":"#/components/schemas/ErrorSeverity","description":"Error severity"},"code":{"$ref":"#/components/schemas/ErrorCode","description":"Descriptive error code\n* `ERR_FILE_TOO_BIG` - The uploaded file is too big (max 50 MB)\n* `ERR_TOO_MANY_PAGES` - Document has too many pages (max. 10)\n* `ERR_UNSUPPORTED_FILE_FORMAT` - Document's format not supported\n* `ERR_EMPTY_VALUE` - No value extracted\n* `ERR_INVALID_FORMAT` - Extracted value has an invalid format\n* `ERR_LOW_CONFIDENCE` - Extracted value has low confidence\n* `ERR_HANDWRITTEN_DOC` - Document is handwritten\n* `ERR_INVALID_DOC_TYPE` - Document type is unknown (not invoice,\n    ticket, etc)\n* `ERR_CROPPED_DOC` - Document is cropped hence has missing\n    information\n* `ERR_MULTI_DOC_PAGE_FOUND` - File contains multiple documents\n* `ERR_PAGES_MISSING` - Document has missing pages hence is\n    incomplete\n* `ERR_DUPLICATED_DOCUMENT` - Document is duplicated\n* `ERR_MISSING_INFO` - Document is missing required information\n* `ERR_BAD_QUALITY` - Document has bad quality\n* `ERR_OTHER` - Generic error\n"},"timestamp":{"type":"string","format":"date-time","description":"Timestamp when the error happened"},"user":{"type":"string","format":"UserId","description":"User that reported the error (if any)"},"info":{"$ref":"#/components/schemas/ErrorInfo","description":"Additional information related to the error (if any)"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ErrorFieldsItems"},"description":"document data fields related to the error (if any)"}},"title":"Error"},"DocumentValidationInfoResult":{"type":"string","enum":["valid","discarded"],"title":"DocumentValidationInfoResult"},"DocumentValidationInfo":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"},"description":"Array of validation errors"},"result":{"$ref":"#/components/schemas/DocumentValidationInfoResult"},"comments":{"type":"string","description":"Comments added by the validator user (if any)"},"validator":{"type":"string","format":"UserId","description":"The user that added the validation (if any)"}},"title":"DocumentValidationInfo"},"DocumentApprovalInfoResult":{"type":"string","enum":["approved","processing"],"title":"DocumentApprovalInfoResult"},"DocumentApprovalInfoAppliedWorkflow":{"type":"object","properties":{},"title":"DocumentApprovalInfoAppliedWorkflow"},"DocumentApprovalInfoStepsItemsInfo":{"type":"object","properties":{},"title":"DocumentApprovalInfoStepsItemsInfo"},"DocumentApprovalInfoStepsItems":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"type":{"type":"string"},"info":{"$ref":"#/components/schemas/DocumentApprovalInfoStepsItemsInfo"}},"title":"DocumentApprovalInfoStepsItems"},"DocumentApprovalInfo":{"type":"object","properties":{"beginning":{"type":"string","format":"date-time"},"result":{"$ref":"#/components/schemas/DocumentApprovalInfoResult"},"comments":{"type":"string"},"appliedWorkflow":{"$ref":"#/components/schemas/DocumentApprovalInfoAppliedWorkflow"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/DocumentApprovalInfoStepsItems"}}},"title":"DocumentApprovalInfo"},"DocumentImportInfo":{"type":"object","properties":{},"title":"DocumentImportInfo"},"DocumentImport":{"type":"object","properties":{"ref":{"type":"string","format":"ImportId"},"channel":{"type":"string"},"info":{"$ref":"#/components/schemas/DocumentImportInfo"}},"title":"DocumentImport"},"DocumentExportsItemsSummaryItems":{"type":"object","properties":{},"title":"DocumentExportsItemsSummaryItems"},"DocumentExportsItems":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"ref":{"type":"string","format":"ExportId"},"summary":{"type":"array","items":{"$ref":"#/components/schemas/DocumentExportsItemsSummaryItems"}}},"title":"DocumentExportsItems"},"DocumentGeometryPagesItemsUnit":{"type":"string","enum":["inch","pixel"],"description":"Unit measure of width and height","title":"DocumentGeometryPagesItemsUnit"},"DocumentGeometryPagesItems":{"type":"object","properties":{"width":{"type":"number","format":"double","description":"Page width in units"},"height":{"type":"number","format":"double","description":"Page height in units"},"unit":{"$ref":"#/components/schemas/DocumentGeometryPagesItemsUnit","description":"Unit measure of width and height"},"angle":{"type":"number","format":"double","description":"Rotation of the page"}},"title":"DocumentGeometryPagesItems"},"DocumentGeometryBoxes":{"type":"object","properties":{},"description":"\"Keys replicate structure of field `data` whereas values are objects of the form \\\n  { \\\n    page: number, \\\n    box: array(number) \\\n  } \\\n  where \\\n    `page` is the index of the page where the box is located. \\\n    `box` has 8 coordinates representing the vertices of the box \\\n      [p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y] \\\n\"\n","title":"DocumentGeometryBoxes"},"DocumentGeometry":{"type":"object","properties":{"pages":{"type":"array","items":{"$ref":"#/components/schemas/DocumentGeometryPagesItems"}},"boxes":{"$ref":"#/components/schemas/DocumentGeometryBoxes","description":"\"Keys replicate structure of field `data` whereas values are objects of the form \\\n  { \\\n    page: number, \\\n    box: array(number) \\\n  } \\\n  where \\\n    `page` is the index of the page where the box is located. \\\n    `box` has 8 coordinates representing the vertices of the box \\\n      [p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y] \\\n\"\n"}},"title":"DocumentGeometry"},"Document":{"type":"object","properties":{"_id":{"type":"string","format":"DocumentId"},"account":{"type":"string","format":"AccountId","description":"Account the document belongs to."},"environment":{"type":"string","format":"EnvironmentId","description":"Environment the document belongs to."},"company":{"type":"string","format":"CompanyId","description":"Company the document belongs to."},"creator":{"type":"string","format":"UserId","description":"User that uploaded the document"},"clientData":{"$ref":"#/components/schemas/DocumentClientData","description":"\"Additional data to be added to each document. Must be an object\n or an array of objects. If data to be specified to each document\n is different, this parameter should have the following format:\n `[\n    {\n      _filename: <name of the file to which attach this data>,\n      <key>: <value>\n    },\n    ...\n    {\n      _filename: <name of the file to which attach this data>,\n      <key>: <value>\n    }\n ]`.\"\n"},"type":{"$ref":"#/components/schemas/DocumentType"},"name":{"type":"string","description":"Original name of the uploaded file"},"isGroundTruth":{"type":"boolean","description":"Indicates the document is marked as Ground Truth (GT)"},"creation":{"type":"string","format":"date-time","description":"Upload timestamp"},"images":{"type":"array","items":{"type":"string","format":"URL"},"description":"Array of Azure Storage URLs (SAS) to access the document extracted images"},"original":{"type":"string","format":"URL","description":"Azure Storage URL (SAS) to access the original file"},"mimetype":{"type":"string"},"data":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Extracted document data. Structure varies by document type."},"publicState":{"$ref":"#/components/schemas/DocumentPublicState","default":"processing"},"confidence":{"$ref":"#/components/schemas/DocumentConfidence"},"processInfo":{"$ref":"#/components/schemas/DocumentProcessInfo"},"validationInfo":{"$ref":"#/components/schemas/DocumentValidationInfo"},"approvalInfo":{"$ref":"#/components/schemas/DocumentApprovalInfo"},"duplicated":{"type":"boolean","deprecated":true},"import":{"$ref":"#/components/schemas/DocumentImport"},"exports":{"type":"array","items":{"$ref":"#/components/schemas/DocumentExportsItems"}},"geometry":{"$ref":"#/components/schemas/DocumentGeometry"},"deleted":{"type":"boolean","description":"Indicates whether the document has been logically deleted"}},"title":"Document"},"Documents_getAListOfDocuments_Response_200":{"type":"object","properties":{"skip":{"type":"number","format":"double"},"limit":{"type":"number","format":"double"},"count":{"type":"number","format":"double"},"result":{"type":"array","items":{"$ref":"#/components/schemas/Document"}}},"title":"Documents_getAListOfDocuments_Response_200"},"ErrMissingParamsAdditionalInfo":{"type":"object","properties":{"param":{"type":"string","description":"Name of missing parameter, if there is only one"},"params":{"type":"array","items":{"type":"string"},"description":"Names of missing parameters, if there are several"}},"title":"ErrMissingParamsAdditionalInfo"},"ErrMissingParams":{"type":"object","properties":{"code":{"type":"string"},"additionalInfo":{"$ref":"#/components/schemas/ErrMissingParamsAdditionalInfo"}},"description":"Missing some or all parameters","title":"ErrMissingParams"},"GetAListOfDocumentsRequestTooManyRequestsError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetAListOfDocumentsRequestTooManyRequestsError"},"GetAListOfDocumentsRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetAListOfDocumentsRequestInternalServerError"},"GetDocumentInfoRequestGoneError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentInfoRequestGoneError"},"GetDocumentInfoRequestTooManyRequestsError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentInfoRequestTooManyRequestsError"},"GetDocumentInfoRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentInfoRequestInternalServerError"},"OcrResultUnit":{"type":"string","enum":["inch","pixel"],"description":"Unit measure of width and height","title":"OcrResultUnit"},"OcrResultLinesItemsAppearance":{"type":"object","properties":{},"description":"Style of the line","title":"OcrResultLinesItemsAppearance"},"OcrResultLinesItemsWordsItems":{"type":"object","properties":{"boundingBox":{"type":"string","description":"Coordinates bounding the line"},"text":{"type":"string","description":"Text read from the line"},"confidence":{"type":"number","format":"double"}},"title":"OcrResultLinesItemsWordsItems"},"OcrResultLinesItems":{"type":"object","properties":{"boundingBox":{"type":"array","items":{"type":"number","format":"double"},"description":"Coordinates bounding the line"},"text":{"type":"string","description":"Text read from the line"},"appearance":{"$ref":"#/components/schemas/OcrResultLinesItemsAppearance","description":"Style of the line"},"words":{"type":"array","items":{"$ref":"#/components/schemas/OcrResultLinesItemsWordsItems"},"description":"Array of words read for this line"}},"title":"OcrResultLinesItems"},"OcrResult":{"type":"object","properties":{"page":{"type":"number","format":"double","description":"Page number"},"angle":{"type":"number","format":"double","description":"Rotation angle"},"width":{"type":"number","format":"double","description":"Page width in units"},"height":{"type":"number","format":"double","description":"Page height in units"},"unit":{"$ref":"#/components/schemas/OcrResultUnit","description":"Unit measure of width and height"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OcrResultLinesItems"},"description":"Array of lines read for this page"}},"title":"OcrResult"},"Documents_getDocumentOcrInfo_Response_200":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/OcrResult"},"description":"Array of pages read"}},"title":"Documents_getDocumentOcrInfo_Response_200"},"GetDocumentOcrInfoRequestBadRequestError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentOcrInfoRequestBadRequestError"},"GetDocumentOcrInfoRequestForbiddenError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentOcrInfoRequestForbiddenError"},"DocumentsIdOcrGetResponsesContentApplicationJsonSchemaAdditionalInfo":{"type":"object","properties":{},"title":"DocumentsIdOcrGetResponsesContentApplicationJsonSchemaAdditionalInfo"},"GetDocumentOcrInfoRequestNotFoundError":{"type":"object","properties":{"code":{"type":"string"},"additionalInfo":{"$ref":"#/components/schemas/DocumentsIdOcrGetResponsesContentApplicationJsonSchemaAdditionalInfo"}},"title":"GetDocumentOcrInfoRequestNotFoundError"},"GetDocumentOcrInfoRequestTooManyRequestsError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentOcrInfoRequestTooManyRequestsError"},"GetDocumentOcrInfoRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentOcrInfoRequestInternalServerError"},"Documents_getDocumentPlainOcrText_Response_200":{"type":"object","properties":{"result":{"type":"array","items":{"type":"string"},"description":"Array of pages read"}},"title":"Documents_getDocumentPlainOcrText_Response_200"},"GetDocumentPlainOcrTextRequestBadRequestError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentPlainOcrTextRequestBadRequestError"},"GetDocumentPlainOcrTextRequestForbiddenError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentPlainOcrTextRequestForbiddenError"},"DocumentsIdTextGetResponsesContentApplicationJsonSchemaAdditionalInfo":{"type":"object","properties":{},"title":"DocumentsIdTextGetResponsesContentApplicationJsonSchemaAdditionalInfo"},"GetDocumentPlainOcrTextRequestNotFoundError":{"type":"object","properties":{"code":{"type":"string"},"additionalInfo":{"$ref":"#/components/schemas/DocumentsIdTextGetResponsesContentApplicationJsonSchemaAdditionalInfo"}},"title":"GetDocumentPlainOcrTextRequestNotFoundError"},"GetDocumentPlainOcrTextRequestTooManyRequestsError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentPlainOcrTextRequestTooManyRequestsError"},"GetDocumentPlainOcrTextRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetDocumentPlainOcrTextRequestInternalServerError"},"DocumentPutRequestBodyData":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"],"title":"DocumentPutRequestBodyData"},"DocumentPutRequestBody":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DocumentPutRequestBodyData"},"description":"Document data to update. Can contain any field extracted from the document."},"clientData":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Custom metadata object for your application's use. This data is stored with the document but not processed by Invofox.\n\nThe object is merged into the stored `clientData`: keys you omit are kept, keys you send are added or overwritten, and a key set to `null` is stored as `null`. Keys cannot be removed. Nested objects are merged the same way; arrays are replaced as a whole. Sending `clientData: null` leaves the stored value unchanged.\n"}},"title":"DocumentPutRequestBody"},"ErrWrongParamAdditionalInfoValid":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Valid values","title":"ErrWrongParamAdditionalInfoValid"},"ErrWrongParamAdditionalInfo":{"type":"object","properties":{"param":{"type":"string","description":"Name of parameter with wrong value"},"provided":{"type":"string","description":"Provided value"},"valid":{"$ref":"#/components/schemas/ErrWrongParamAdditionalInfoValid","description":"Valid values"}},"title":"ErrWrongParamAdditionalInfo"},"ErrWrongParam":{"type":"object","properties":{"code":{"type":"string"},"additionalInfo":{"$ref":"#/components/schemas/ErrWrongParamAdditionalInfo"}},"description":"Wrong value for a parameter","title":"ErrWrongParam"},"ErrParamTooBigAdditionalInfo":{"type":"object","properties":{"param":{"type":"string","description":"Name of parameter with wrong value"},"provided":{"type":"string","description":"Provided value"},"maxSize":{"type":"string","description":"Specifies what the max size is"}},"title":"ErrParamTooBigAdditionalInfo"},"ErrParamTooBig":{"type":"object","properties":{"code":{"type":"string"},"additionalInfo":{"$ref":"#/components/schemas/ErrParamTooBigAdditionalInfo"}},"description":"The size of a parameter is too big","title":"ErrParamTooBig"},"UpdateDocumentInformationRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrWrongParam"},{"$ref":"#/components/schemas/ErrParamTooBig"}],"title":"UpdateDocumentInformationRequestBadRequestError"},"UpdateDocumentInformationRequestForbiddenError":{"type":"object","properties":{"code":{"type":"string"}},"title":"UpdateDocumentInformationRequestForbiddenError"},"UpdateDocumentInformationRequestGoneError":{"type":"object","properties":{"code":{"type":"string"}},"title":"UpdateDocumentInformationRequestGoneError"},"UpdateDocumentInformationRequestTooManyRequestsError":{"type":"object","properties":{"code":{"type":"string"}},"title":"UpdateDocumentInformationRequestTooManyRequestsError"},"UpdateDocumentInformationRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"UpdateDocumentInformationRequestInternalServerError"},"ChangeTheTypeOfADocumentRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrWrongParam"}],"title":"ChangeTheTypeOfADocumentRequestBadRequestError"},"ChangeTheTypeOfADocumentRequestForbiddenError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ChangeTheTypeOfADocumentRequestForbiddenError"},"ChangeTheTypeOfADocumentRequestGoneError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ChangeTheTypeOfADocumentRequestGoneError"},"ChangeTheTypeOfADocumentRequestTooManyRequestsError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ChangeTheTypeOfADocumentRequestTooManyRequestsError"},"ChangeTheTypeOfADocumentRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ChangeTheTypeOfADocumentRequestInternalServerError"},"DocumentsIdPublicStatePutRequestBodyContentApplicationJsonSchemaPublicState":{"type":"string","enum":["pendingCorrection","discarded","approved","exported"],"title":"DocumentsIdPublicStatePutRequestBodyContentApplicationJsonSchemaPublicState"},"ChangeThePublicStateOfADocumentRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrWrongParam"}],"title":"ChangeThePublicStateOfADocumentRequestBadRequestError"},"ChangeThePublicStateOfADocumentRequestForbiddenError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ChangeThePublicStateOfADocumentRequestForbiddenError"},"ChangeThePublicStateOfADocumentRequestGoneError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ChangeThePublicStateOfADocumentRequestGoneError"},"ChangeThePublicStateOfADocumentRequestTooManyRequestsError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ChangeThePublicStateOfADocumentRequestTooManyRequestsError"},"ChangeThePublicStateOfADocumentRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ChangeThePublicStateOfADocumentRequestInternalServerError"},"CompaniesPostRequestBodyContentApplicationJsonSchemaClientData":{"type":"object","properties":{},"description":"custom data that Invofox's clients can store in a company","title":"CompaniesPostRequestBodyContentApplicationJsonSchemaClientData"},"CompaniesPostRequestBodyContentApplicationJsonSchemaClientsItems":{"type":"object","properties":{"name":{"type":"string","description":"Client name"},"taxId":{"type":"string","description":"Tax id number"},"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2","description":"country code in two-digits format (ISO 3166-1 alpha-2)"}},"title":"CompaniesPostRequestBodyContentApplicationJsonSchemaClientsItems"},"CompaniesPostRequestBodyContentApplicationJsonSchemaProvidersItems":{"type":"object","properties":{"name":{"type":"string","description":"Provider name"},"taxId":{"type":"string","description":"Tax id number"},"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2","description":"country code in two-digits format (ISO 3166-1 alpha-2)"}},"title":"CompaniesPostRequestBodyContentApplicationJsonSchemaProvidersItems"},"CompanyDataCustom":{"type":"object","properties":{},"title":"CompanyDataCustom"},"CompanyData":{"type":"object","properties":{"custom":{"$ref":"#/components/schemas/CompanyDataCustom"}},"title":"CompanyData"},"CompanyClientData":{"type":"object","properties":{},"title":"CompanyClientData"},"Company":{"type":"object","properties":{"_id":{"type":"string","format":"CompanyId"},"account":{"type":"string","format":"AccountId"},"environment":{"type":"string","format":"EnvironmentId"},"name":{"type":"string"},"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2"},"taxId":{"type":"string","description":"Tax id number"},"data":{"$ref":"#/components/schemas/CompanyData"},"clientData":{"$ref":"#/components/schemas/CompanyClientData"}},"title":"Company"},"Companies_createANewCompany_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Company"}},"title":"Companies_createANewCompany_Response_200"},"CreateANewCompanyRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrMissingParams"},{"$ref":"#/components/schemas/ErrWrongParam"}],"title":"CreateANewCompanyRequestBadRequestError"},"CreateANewCompanyRequestForbiddenError":{"type":"object","properties":{"code":{"type":"string"}},"title":"CreateANewCompanyRequestForbiddenError"},"CompaniesPostResponsesContentApplicationJsonSchemaAdditionalInfo":{"type":"object","properties":{"CIF":{"type":"string","description":"Tax id number"}},"title":"CompaniesPostResponsesContentApplicationJsonSchemaAdditionalInfo"},"CreateANewCompanyRequestNotFoundError":{"type":"object","properties":{"code":{"type":"string"},"additionalInfo":{"$ref":"#/components/schemas/CompaniesPostResponsesContentApplicationJsonSchemaAdditionalInfo"}},"title":"CreateANewCompanyRequestNotFoundError"},"CreateANewCompanyRequestConflictError":{"type":"object","properties":{"code":{"type":"string"}},"title":"CreateANewCompanyRequestConflictError"},"CreateANewCompanyRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"CreateANewCompanyRequestInternalServerError"},"CompaniesGetParametersSort":{"type":"object","properties":{},"title":"CompaniesGetParametersSort"},"Companies_retrieveAListOfManagedCompanies_Response_200":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"count":{"type":"number","format":"double"}},"title":"Companies_retrieveAListOfManagedCompanies_Response_200"},"RetrieveAListOfManagedCompaniesRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"RetrieveAListOfManagedCompaniesRequestInternalServerError"},"Companies_updateACompany_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Company"}},"title":"Companies_updateACompany_Response_200"},"UpdateACompanyRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrMissingParams"},{"$ref":"#/components/schemas/ErrWrongParam"}],"title":"UpdateACompanyRequestBadRequestError"},"UpdateACompanyRequestForbiddenError":{"type":"object","properties":{"code":{"type":"string"}},"title":"UpdateACompanyRequestForbiddenError"},"UpdateACompanyRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"UpdateACompanyRequestInternalServerError"},"Companies_deleteACompany_Response_200":{"type":"object","properties":{},"title":"Companies_deleteACompany_Response_200"},"DeleteACompanyRequestBadRequestError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteACompanyRequestBadRequestError"},"DeleteACompanyRequestForbiddenError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteACompanyRequestForbiddenError"},"DeleteACompanyRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteACompanyRequestInternalServerError"},"CompanyEnterpriseType":{"type":"string","enum":["client","provider"],"title":"CompanyEnterpriseType"},"CompanyEnterpriseState":{"type":"string","enum":["pending","validated","discarded"],"title":"CompanyEnterpriseState"},"CompanyEnterprise":{"type":"object","properties":{"_id":{"type":"string","format":"CompanyEnterpriseId"},"account":{"type":"string","format":"AccountId"},"environment":{"type":"string","format":"EnvironmentId"},"company":{"type":"string","format":"CompanyId"},"name":{"type":"string"},"countryCode":{"type":"string","format":"ISO 3166-1 alpha-2"},"taxId":{"type":"string","description":"Tax id number"},"type":{"$ref":"#/components/schemas/CompanyEnterpriseType"},"state":{"$ref":"#/components/schemas/CompanyEnterpriseState"}},"title":"CompanyEnterprise"},"Providers_createANewProvider_Response_201":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/CompanyEnterprise"}},"title":"Providers_createANewProvider_Response_201"},"ErrRelationAlreadyRegisteredAdditionalInfoType":{"type":"string","enum":["provider","client"],"title":"ErrRelationAlreadyRegisteredAdditionalInfoType"},"ErrRelationAlreadyRegisteredAdditionalInfo":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ErrRelationAlreadyRegisteredAdditionalInfoType"}},"title":"ErrRelationAlreadyRegisteredAdditionalInfo"},"ErrRelationAlreadyRegistered":{"type":"object","properties":{"code":{"type":"string"},"additionalInfo":{"$ref":"#/components/schemas/ErrRelationAlreadyRegisteredAdditionalInfo"}},"description":"A provider/client with the same CIF has already been registered for this company","title":"ErrRelationAlreadyRegistered"},"CreateANewProviderRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrMissingParams"},{"$ref":"#/components/schemas/ErrRelationAlreadyRegistered"}],"title":"CreateANewProviderRequestBadRequestError"},"CreateANewProviderRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"CreateANewProviderRequestInternalServerError"},"CompaniesIdProvidersGetParametersSort":{"type":"object","properties":{},"title":"CompaniesIdProvidersGetParametersSort"},"Providers_getAListOfProviders_Response_200":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/CompanyEnterprise"}},"count":{"type":"number","format":"double"}},"title":"Providers_getAListOfProviders_Response_200"},"GetAListOfProvidersRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetAListOfProvidersRequestInternalServerError"},"Providers_modifyAProvider_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/CompanyEnterprise"}},"title":"Providers_modifyAProvider_Response_200"},"ModifyAProviderRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrMissingParams"},{"$ref":"#/components/schemas/ErrRelationAlreadyRegistered"}],"title":"ModifyAProviderRequestBadRequestError"},"ModifyAProviderRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ModifyAProviderRequestInternalServerError"},"Providers_deleteProvider_Response_200":{"type":"object","properties":{},"title":"Providers_deleteProvider_Response_200"},"DeleteProviderRequestNotFoundError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteProviderRequestNotFoundError"},"DeleteProviderRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteProviderRequestInternalServerError"},"Clients_createANewClient_Response_201":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/CompanyEnterprise"}},"title":"Clients_createANewClient_Response_201"},"CreateANewClientRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrMissingParams"},{"$ref":"#/components/schemas/ErrRelationAlreadyRegistered"}],"title":"CreateANewClientRequestBadRequestError"},"CreateANewClientRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"CreateANewClientRequestInternalServerError"},"CompaniesIdClientsGetParametersFilter":{"type":"object","properties":{},"title":"CompaniesIdClientsGetParametersFilter"},"Clients_getAListOfClients_Response_200":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/CompanyEnterprise"}},"count":{"type":"number","format":"double"}},"title":"Clients_getAListOfClients_Response_200"},"GetAListOfClientsRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"GetAListOfClientsRequestInternalServerError"},"Clients_modifyAClient_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/CompanyEnterprise"}},"title":"Clients_modifyAClient_Response_200"},"ModifyAClientRequestBadRequestError":{"oneOf":[{"$ref":"#/components/schemas/ErrMissingParams"},{"$ref":"#/components/schemas/ErrRelationAlreadyRegistered"}],"title":"ModifyAClientRequestBadRequestError"},"ModifyAClientRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"ModifyAClientRequestInternalServerError"},"Clients_deleteClient_Response_200":{"type":"object","properties":{},"title":"Clients_deleteClient_Response_200"},"DeleteClientRequestNotFoundError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteClientRequestNotFoundError"},"DeleteClientRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteClientRequestInternalServerError"},"UsersGetParametersRole":{"type":"string","enum":["accountAdmin","envAdmin","envDev","envUser"],"title":"UsersGetParametersRole"},"UserRoleScope":{"type":"string","enum":["account","environment"],"description":"`account` roles apply to every environment of the account. `environment` roles apply only to `environment`.","title":"UserRoleScope"},"UserRoleRole":{"type":"string","enum":["accountAdmin","envAdmin","envDev","envUser"],"title":"UserRoleRole"},"UserRole":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"scope":{"$ref":"#/components/schemas/UserRoleScope","description":"`account` roles apply to every environment of the account. `environment` roles apply only to `environment`."},"account":{"type":"string"},"environment":{"type":"string","description":"Only present when `scope` is `environment`."},"role":{"$ref":"#/components/schemas/UserRoleRole"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","description":"User who granted the role. Missing on older rows."}},"title":"UserRole"},"UserListItem":{"type":"object","properties":{"_id":{"type":"string"},"account":{"type":"string","description":"Account the user was created in. To know which accounts and environments the user can access, read `roles`."},"creator":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"lang":{"type":"string"},"creation":{"type":"string","format":"date-time"},"verifiedAt":{"type":"string","format":"date-time","description":"First time the user logged in. Users who never logged in are not listed."},"lastAccessAt":{"type":"string","format":"date-time","description":"Last time the user logged in. Missing if unknown."},"remote":{"type":"boolean"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/UserRole"},"description":"The user's role rows within the requested account (and environment, when `environment` is sent). Roles on other environments are not included."}},"description":"A user as returned by `GET /users`, with their role rows in the requested scope.","title":"UserListItem"},"Users_listUsersForAnAccount_Response_200":{"type":"object","properties":{"count":{"type":"integer"},"result":{"type":"array","items":{"$ref":"#/components/schemas/UserListItem"}}},"title":"Users_listUsersForAnAccount_Response_200"},"User":{"type":"object","properties":{"_id":{"type":"string"},"account":{"type":"string"},"creator":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"lang":{"type":"string"},"creation":{"type":"string","format":"date-time"},"securityGroups":{"type":"array","items":{"type":"string"}}},"title":"User"},"Users_getTheDetailsOfAUser_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/User"}},"title":"Users_getTheDetailsOfAUser_Response_200"},"Users_updateAUser_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/User"}},"title":"Users_updateAUser_Response_200"},"UsersIdDeleteResponsesContentApplicationJsonSchemaReason":{"type":"string","enum":["ERR_USER_CANNOT_DELETE_ITSELF","ERR_USER_ALREADY_DELETED","WARN_USER_HAS_LOCKED_DOCUMENTS"],"title":"UsersIdDeleteResponsesContentApplicationJsonSchemaReason"},"UsersIdDeleteResponsesContentApplicationJsonSchemaType":{"type":"string","enum":["warning","error"],"title":"UsersIdDeleteResponsesContentApplicationJsonSchemaType"},"Users_deleteAUser_Response_200":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/User"},"reason":{"$ref":"#/components/schemas/UsersIdDeleteResponsesContentApplicationJsonSchemaReason"},"type":{"$ref":"#/components/schemas/UsersIdDeleteResponsesContentApplicationJsonSchemaType"}},"title":"Users_deleteAUser_Response_200"},"ErrUserCannotBeDeletedCode":{"type":"string","enum":["ERR_USER_CANNOT_DELETE_ITSELF","ERR_USER_ALREADY_DELETED"],"title":"ErrUserCannotBeDeletedCode"},"ErrUserCannotBeDeleted":{"type":"object","properties":{"status":{"type":"number","format":"double"},"code":{"$ref":"#/components/schemas/ErrUserCannotBeDeletedCode"},"message":{"type":"string"}},"description":"The user cannot be deleted","title":"ErrUserCannotBeDeleted"},"UsersIdDeleteResponsesContentApplicationJsonSchemaAdditionalInfo":{"type":"object","properties":{},"title":"UsersIdDeleteResponsesContentApplicationJsonSchemaAdditionalInfo"},"DeleteAUserRequestNotFoundError":{"type":"object","properties":{"code":{"type":"string"},"additionalInfo":{"$ref":"#/components/schemas/UsersIdDeleteResponsesContentApplicationJsonSchemaAdditionalInfo"}},"title":"DeleteAUserRequestNotFoundError"},"DeleteAUserRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteAUserRequestInternalServerError"},"UsersDeleteResponsesContentApplicationJsonSchemaResultValidItems":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/User"}},"title":"UsersDeleteResponsesContentApplicationJsonSchemaResultValidItems"},"UsersDeleteResponsesContentApplicationJsonSchemaResultErrorItemsReason":{"type":"string","enum":["ERR_USER_CANNOT_DELETE_ITSELF","ERR_USER_ALREADY_DELETED"],"title":"UsersDeleteResponsesContentApplicationJsonSchemaResultErrorItemsReason"},"UsersDeleteResponsesContentApplicationJsonSchemaResultErrorItems":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/User"},"reason":{"$ref":"#/components/schemas/UsersDeleteResponsesContentApplicationJsonSchemaResultErrorItemsReason"}},"title":"UsersDeleteResponsesContentApplicationJsonSchemaResultErrorItems"},"UsersDeleteResponsesContentApplicationJsonSchemaResultWarningItemsReason":{"type":"string","enum":["WARN_USER_HAS_LOCKED_DOCUMENTS"],"title":"UsersDeleteResponsesContentApplicationJsonSchemaResultWarningItemsReason"},"UsersDeleteResponsesContentApplicationJsonSchemaResultWarningItems":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/User"},"reason":{"$ref":"#/components/schemas/UsersDeleteResponsesContentApplicationJsonSchemaResultWarningItemsReason"}},"title":"UsersDeleteResponsesContentApplicationJsonSchemaResultWarningItems"},"UsersDeleteResponsesContentApplicationJsonSchemaResult":{"type":"object","properties":{"valid":{"type":"array","items":{"$ref":"#/components/schemas/UsersDeleteResponsesContentApplicationJsonSchemaResultValidItems"}},"error":{"type":"array","items":{"$ref":"#/components/schemas/UsersDeleteResponsesContentApplicationJsonSchemaResultErrorItems"}},"warning":{"type":"array","items":{"$ref":"#/components/schemas/UsersDeleteResponsesContentApplicationJsonSchemaResultWarningItems"}}},"title":"UsersDeleteResponsesContentApplicationJsonSchemaResult"},"Users_deleteAListOfUsers_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/UsersDeleteResponsesContentApplicationJsonSchemaResult"}},"title":"Users_deleteAListOfUsers_Response_200"},"ErrSomeUsersCannotBeDeletedCode":{"type":"string","enum":["ERR_SOME_USERS_CANNOT_BE_DELETED"],"title":"ErrSomeUsersCannotBeDeletedCode"},"ErrSomeUsersCannotBeDeleted":{"type":"object","properties":{"status":{"type":"number","format":"double"},"code":{"$ref":"#/components/schemas/ErrSomeUsersCannotBeDeletedCode"},"message":{"type":"string"}},"description":"Some users cannot be deleted","title":"ErrSomeUsersCannotBeDeleted"},"DeleteAListOfUsersRequestInternalServerError":{"type":"object","properties":{"code":{"type":"string"}},"title":"DeleteAListOfUsersRequestInternalServerError"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}}}