Affinda
App · 22 actions
Send resumes, invoices and other documents to Affinda to read, then use the extracted data and organize the results.
Actions
| Action | What it does |
|---|---|
| Add tag to documents | Tag one or more documents. |
| Create tag | Create a tag in a workspace. |
| Create workspace | Create a workspace to hold documents in an organization. |
| Delete document | Delete a document and its results. |
| Delete tag | Delete a tag. |
| Delete workspace | Delete a workspace. |
| Get credit usage | See how many credits an organization used each day over a period. |
| Get document | Get a document with what Affinda extracted from it. |
| Get document type | Get one document type. |
| Get workspace | Get a workspace and its document counts. |
| List document types | List the document types you can use, such as resumes or invoices. |
| List documents | List one page of documents, filtered and sorted as you choose. |
| List extractors | List the extractors an organization can use, including Affinda's ready-made ones. |
| List organizations | List the Affinda organizations you belong to. |
| List tags | List the tags in your workspaces. |
| List validation results | List the results of a document's validation rules. |
| List workspaces | List the workspaces in an organization. |
| Remove tag from documents | Take a tag off one or more documents. |
| Update document | Rename, confirm, reject, archive or move a document. |
| Update tag | Rename a tag. |
| Update workspace | Rename a workspace or change its settings. |
| Upload document | Send a document to Affinda to read, and get back what it extracted. |
Add tag to documents
Tag one or more documents.
Inputs
- Tag
tagnumberRequired - The tag's ID, from List tags or Create tag.
- Documents
identifierslistRequired - The IDs of the documents to tag.
Outputs
dataobject- Affinda's answer, empty when it worked.
Example output
{
"data": {}
}Create tag
Create a tag in a workspace.
Inputs
- Name
nametextRequired - The tag's name.
- Organization
organizationtext - The organization whose workspaces to choose from. Only used to fill the workspace list.
- Workspace
workspacetextRequired - The workspace it belongs to. Pick one, or use an ID from List workspaces.
Outputs
dataobject- The tag.
Example output
{
"data": {
"documentCount": 4,
"id": 1,
"name": "Grove Street King",
"workspace": "mEFayXdO"
}
}Create workspace
Create a workspace to hold documents in an organization.
Inputs
- Organization
organizationtextRequired - The organization to create it in. Pick one, or use an ID from List organizations.
- Name
nametextRequired - The workspace's name.
- Who can see it
visibilitytext - Who can open the workspace.One of:
organization(Everyone in the organization),private(Only people added to it). - Reject duplicates
rejectDuplicatestrue/false - Turn on to fail uploads that duplicate an existing document, without using credits.
- Reject wrong types
rejectInvalidDocumentstrue/false - Turn on to reject documents of the wrong or an unknown type, without using credits.
- Document types
documentTypeslist - The IDs of the document types to use in this workspace.
Outputs
dataobject- The workspace.
Example output
{
"data": {
"confirmedDocsCount": 12,
"identifier": "mEFayXdO",
"ingestEmail": "mefayxdo@ingest.affinda.com",
"name": "Grove Street King",
"organization": {
"identifier": "mEFayXdO",
"name": "Grove Street King"
},
"rejectDuplicates": false,
"rejectInvalidDocuments": false,
"unvalidatedDocsCount": 3,
"visibility": "organization"
}
}Delete document
Delete a document and its results.
Inputs
- Document
document_idtextRequired - The document's ID, from Upload document or List documents.
Outputs
dataobject- Affinda's answer, empty when it worked.
Example output
{
"data": {}
}Delete tag
Delete a tag.
Inputs
- Tag
tag_idnumberRequired - The tag's ID, from List tags or Create tag.
Outputs
dataobject- Affinda's answer, empty when it worked.
Example output
{
"data": {}
}Delete workspace
Delete a workspace.
Inputs
- Workspace
workspace_idtextRequired - The workspace's ID, from List workspaces or Create workspace.
Outputs
dataobject- Affinda's answer, empty when it worked.
Example output
{
"data": {}
}Get credit usage
See how many credits an organization used each day over a period.
Inputs
- Organization
organizationtextRequired - The organization to report on. You must be its admin or owner.
- Workspace
workspacetext - Only usage in this workspace.
- Document type
document_typetext - Only usage for this document type.
- From
startdate - The first day. Defaults to a year before the last day.
- To
enddate - The last day. Defaults to today.
Outputs
dataobject- Daily credit use.
Example output
{
"data": {
"end": "2025-04-30",
"items": [
{
"count": 123,
"date": "2025-04-15"
}
],
"scope": "organization",
"scopeIdentifier": "mEFayXdO",
"start": "2025-04-01",
"total": 4320
}
}Get document
Get a document with what Affinda extracted from it.
Inputs
- Document
document_idtextRequired - The document's ID, from Upload document or List documents.
- Compact result
compacttrue/false - Turn on for a shorter result with only the extracted values.
Outputs
dataobject- The document.
Example output
{
"data": {
"data": {},
"extractor": "resume",
"meta": {
"createdDt": "2020-12-10T01:43:30.000000Z",
"customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834",
"documentType": "mEFayXdO",
"failed": false,
"file": "https://affinda-api.s3.amazonaws.com/media/documents/Document.docx",
"fileName": "Document.pdf",
"identifier": "mEFayXdO",
"isArchived": false,
"isConfirmed": false,
"isRejected": false,
"language": "en",
"pdf": "https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf",
"ready": true,
"readyDt": "2020-12-10T01:43:32.276724Z",
"reviewUrl": "https://app.affinda.com/validate/mEFayXdO",
"tags": [
{
"documentCount": 4,
"id": 1,
"name": "Grove Street King",
"workspace": "mEFayXdO"
}
],
"workspace": {
"identifier": "mEFayXdO",
"name": "Grove Street King"
}
}
}
}Get document type
Get one document type.
Inputs
- Document type
document_type_idtextRequired - The document type. Pick one, or use an ID from List document types.
Outputs
dataobject- The document type.
Example output
{
"data": {
"description": "Resumes and CVs",
"identifier": "mEFayXdO",
"ingest_email": "resumes@ingest.affinda.com",
"name": "Grove Street King",
"organization": "mEFayXdO"
}
}Get workspace
Get a workspace and its document counts.
Inputs
- Workspace
workspace_idtextRequired - The workspace's ID, from List workspaces or Create workspace.
Outputs
dataobject- The workspace.
Example output
{
"data": {
"confirmedDocsCount": 12,
"identifier": "mEFayXdO",
"ingestEmail": "mefayxdo@ingest.affinda.com",
"name": "Grove Street King",
"organization": {
"identifier": "mEFayXdO",
"name": "Grove Street King"
},
"rejectDuplicates": false,
"rejectInvalidDocuments": false,
"unvalidatedDocsCount": 3,
"visibility": "organization"
}
}List document types
List the document types you can use, such as resumes or invoices.
Inputs
- Organization
organizationtext - Only document types of this organization.
- Workspace
workspacetext - Only document types used in this workspace.
Outputs
datalist- The document types.
Example output
{
"data": [
{
"description": "Resumes and CVs",
"identifier": "mEFayXdO",
"ingest_email": "resumes@ingest.affinda.com",
"name": "Grove Street King",
"organization": "mEFayXdO"
}
]
}List documents
List one page of documents, filtered and sorted as you choose.
Inputs
- Organization
organizationtext - The organization whose workspaces to choose from. Only used to fill the workspace list.
- Workspace
workspacetext - Only those in this workspace.
- State
statetext - Only documents in this state.One of:
uploaded,review(In review),validated,archived,rejected. - Search
searchtext - Only documents whose file name, ID or tag name contains this text.
- Tags
tagslist - Only documents with these tag IDs.
- Created
created_dttext - Only documents created in this period.One of:
today,yesterday,week(This week),month(This month),year(This year). - Your ID
custom_identifiertext - Only documents with this ID of yours.
- Ready
readytrue/false - Only documents that have, or haven't, finished processing.
- Failed
failedtrue/false - Only documents that have, or haven't, failed.
- Include extracted data
include_datatrue/false - Turn on to include a summary of what was extracted.
- Order
orderingtext - How to sort them.One of:
-created_dt(Newest first),created_dt(Oldest first),file_name(File name A to Z),-file_name(File name Z to A),-validated_dt(Recently validated first),-archived_dt(Recently archived first). - Skip
offsetnumber - How many results to skip, for paging.At least 0.
- Limit
limitnumber - How many results to return, up to 100.From 1 to 100.
Outputs
dataobject- One page of documents.
Example output
{
"data": {
"count": 1,
"next": "https://api.affinda.com/v3/documents?limit=20&offset=20",
"previous": "https://api.affinda.com/v3/documents?limit=20&offset=0",
"results": [
{
"data": {},
"extractor": "resume",
"meta": {
"createdDt": "2020-12-10T01:43:30.000000Z",
"customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834",
"documentType": "mEFayXdO",
"failed": false,
"file": "https://affinda-api.s3.amazonaws.com/media/documents/Document.docx",
"fileName": "Document.pdf",
"identifier": "mEFayXdO",
"isArchived": false,
"isConfirmed": false,
"isRejected": false,
"language": "en",
"pdf": "https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf",
"ready": true,
"readyDt": "2020-12-10T01:43:32.276724Z",
"reviewUrl": "https://app.affinda.com/validate/mEFayXdO",
"tags": [
{
"documentCount": 4,
"id": 1,
"name": "Grove Street King",
"workspace": "mEFayXdO"
}
],
"workspace": {
"identifier": "mEFayXdO",
"name": "Grove Street King"
}
}
}
]
}
}List extractors
List the extractors an organization can use, including Affinda's ready-made ones.
Inputs
- Organization
organizationtextRequired - The organization. Pick one, or use an ID from List organizations.
- Include ready-made
include_public_extractorstrue/false - Turn on to include Affinda's ready-made extractors.
- Name
nametext - Only extractors with this name.
Outputs
datalist- The extractors.
Example output
{
"data": [
{
"createdDt": "2020-12-10T01:43:30.000000Z",
"identifier": "mEFayXdO",
"isCustom": false,
"name": "Grove Street King",
"namePlural": "Resumes",
"validatable": true
}
]
}List organizations
List the Affinda organizations you belong to.
Inputs
None.
Outputs
datalist- The organizations.
Example output
{
"data": [
{
"identifier": "mEFayXdO",
"isTrial": false,
"name": "Grove Street King",
"userRole": "admin"
}
]
}List tags
List the tags in your workspaces.
Inputs
- Organization
organizationtext - The organization whose workspaces to choose from. Only used to fill the workspace list.
- Workspace
workspacetext - Only those in this workspace.
- Name
nametext - Only tags with this name.
- Skip
offsetnumber - How many results to skip, for paging.At least 0.
- Limit
limitnumber - How many results to return, up to 100.From 1 to 100.
Outputs
datalist- The tags.
Example output
{
"data": [
{
"documentCount": 4,
"id": 1,
"name": "Grove Street King",
"workspace": "mEFayXdO"
}
]
}List validation results
List the results of a document's validation rules.
Inputs
- Document
documenttextRequired - The document's ID, from Upload document or List documents.
- Skip
offsetnumber - How many results to skip, for paging.At least 0.
- Limit
limitnumber - How many results to return, up to 100.From 1 to 100.
Outputs
datalist- The validation results.
Example output
{
"data": [
{
"annotations": [
1,
2,
3
],
"document": "mEFayXdO",
"id": 1,
"message": "Expected a match",
"passed": true,
"ruleSlug": "supplier-name-is-alphanumeric"
}
]
}List workspaces
List the workspaces in an organization.
Inputs
- Organization
organizationtextRequired - The organization. Pick one, or use an ID from List organizations.
- Name
nametext - Only workspaces with this name.
Outputs
datalist- The workspaces.
Example output
{
"data": [
{
"confirmedDocsCount": 12,
"identifier": "mEFayXdO",
"ingestEmail": "mefayxdo@ingest.affinda.com",
"name": "Grove Street King",
"organization": {
"identifier": "mEFayXdO",
"name": "Grove Street King"
},
"rejectDuplicates": false,
"rejectInvalidDocuments": false,
"unvalidatedDocsCount": 3,
"visibility": "organization"
}
]
}Remove tag from documents
Take a tag off one or more documents.
Inputs
- Tag
tagnumberRequired - The tag's ID, from List tags.
- Documents
identifierslistRequired - The IDs of the documents to untag.
Outputs
dataobject- Affinda's answer, empty when it worked.
Example output
{
"data": {}
}Update document
Rename, confirm, reject, archive or move a document.
Inputs
- Document
document_idtextRequired - The document's ID, from Upload document or List documents.
- File name
fileNametext - The new file name.
- Your ID
customIdentifiertext - Your own ID for the document.
- Confirmed
isConfirmedtrue/false - Turn on to mark the document validated.
- Rejected
isRejectedtrue/false - Turn on to reject the document.
- Archived
isArchivedtrue/false - Turn on to archive the document.
- Organization
organizationtext - The organization whose workspaces to choose from. Only used to fill the workspace list.
- Workspace
workspacetext - Move it to this workspace.
- Document type
documentTypetext - Change its document type.
- Language
languagetext - The document's language as a two-letter code.
- Delete at
expiryTimedate and time - When Affinda should delete the document.
Outputs
dataobject- The document.
Example output
{
"data": {
"data": {},
"extractor": "resume",
"meta": {
"createdDt": "2020-12-10T01:43:30.000000Z",
"customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834",
"documentType": "mEFayXdO",
"failed": false,
"file": "https://affinda-api.s3.amazonaws.com/media/documents/Document.docx",
"fileName": "Document.pdf",
"identifier": "mEFayXdO",
"isArchived": false,
"isConfirmed": false,
"isRejected": false,
"language": "en",
"pdf": "https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf",
"ready": true,
"readyDt": "2020-12-10T01:43:32.276724Z",
"reviewUrl": "https://app.affinda.com/validate/mEFayXdO",
"tags": [
{
"documentCount": 4,
"id": 1,
"name": "Grove Street King",
"workspace": "mEFayXdO"
}
],
"workspace": {
"identifier": "mEFayXdO",
"name": "Grove Street King"
}
}
}
}Update tag
Rename a tag.
Inputs
- Tag
tag_idnumberRequired - The tag's ID, from List tags or Create tag.
- Name
nametext - The new name.
Outputs
dataobject- The tag.
Example output
{
"data": {
"documentCount": 4,
"id": 1,
"name": "Grove Street King",
"workspace": "mEFayXdO"
}
}Update workspace
Rename a workspace or change its settings.
Inputs
- Workspace
workspace_idtextRequired - The workspace's ID, from List workspaces or Create workspace.
- Name
nametext - The new name.
- Who can see it
visibilitytext - Who can open the workspace.One of:
organization(Everyone in the organization),private(Only people added to it). - Reject duplicates
rejectDuplicatestrue/false - Turn on to fail uploads that duplicate an existing document.
- Reject wrong types
rejectInvalidDocumentstrue/false - Turn on to reject documents of the wrong or an unknown type.
- Document types
documentTypeslist - The IDs of the document types to use in this workspace.
Outputs
dataobject- The workspace.
Example output
{
"data": {
"confirmedDocsCount": 12,
"identifier": "mEFayXdO",
"ingestEmail": "mefayxdo@ingest.affinda.com",
"name": "Grove Street King",
"organization": {
"identifier": "mEFayXdO",
"name": "Grove Street King"
},
"rejectDuplicates": false,
"rejectInvalidDocuments": false,
"unvalidatedDocsCount": 3,
"visibility": "organization"
}
}Upload document
Send a document to Affinda to read, and get back what it extracted.
Inputs
- Organization
organizationtext - The organization whose workspaces to choose from. Only used to fill the workspace list.
- File
filetext - The document to upload, such as a PDF, Word file or image. Give this or File URL.
- File URL
urltext - A public link to the document. Give this or File.
- Workspace
workspacetextRequired - The workspace to add it to. Pick one, or use an ID from List workspaces.
- Document type
documentTypetext - The document type, if you know it. Affinda works it out if left empty.
- Your ID
customIdentifiertext - Your own ID for the document. It needn't be unique.
- File name
fileNametext - The file's name.
- Language
languagetext - The document's language as a two-letter code, such as en. Use zh-cn or zh-tw for Chinese.
- Delete at
expiryTimedate and time - When Affinda should delete the document. It is kept if left empty.
- Wait for results
waittrue/false - Leave on to get the results in this step. Turn off to return at once and fetch them later with Get document.
- Reject duplicates
rejectDuplicatestrue/false - Turn on to fail if the document duplicates an existing one, without using credits. Uses the workspace's setting if left empty.
- Read as image
useOcrtrue/false - Turn on to read the text with OCR, off to read it as a PDF. Affinda decides if left empty.
- Low priority
lowPrioritytrue/false - Turn on to mark the document as low priority.
- Compact result
compacttrue/false - Turn on for a shorter result with only the extracted values.
Outputs
dataobject- The document.
Example output
{
"data": {
"data": {},
"extractor": "resume",
"meta": {
"createdDt": "2020-12-10T01:43:30.000000Z",
"customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834",
"documentType": "mEFayXdO",
"failed": false,
"file": "https://affinda-api.s3.amazonaws.com/media/documents/Document.docx",
"fileName": "Document.pdf",
"identifier": "mEFayXdO",
"isArchived": false,
"isConfirmed": false,
"isRejected": false,
"language": "en",
"pdf": "https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf",
"ready": true,
"readyDt": "2020-12-10T01:43:32.276724Z",
"reviewUrl": "https://app.affinda.com/validate/mEFayXdO",
"tags": [
{
"documentCount": 4,
"id": 1,
"name": "Grove Street King",
"workspace": "mEFayXdO"
}
],
"workspace": {
"identifier": "mEFayXdO",
"name": "Grove Street King"
}
}
}
}