Affinda

App · 22 actions

Send resumes, invoices and other documents to Affinda to read, then use the extracted data and organize the results.

Actions

ActionWhat it does
Add tag to documentsTag one or more documents.
Create tagCreate a tag in a workspace.
Create workspaceCreate a workspace to hold documents in an organization.
Delete documentDelete a document and its results.
Delete tagDelete a tag.
Delete workspaceDelete a workspace.
Get credit usageSee how many credits an organization used each day over a period.
Get documentGet a document with what Affinda extracted from it.
Get document typeGet one document type.
Get workspaceGet a workspace and its document counts.
List document typesList the document types you can use, such as resumes or invoices.
List documentsList one page of documents, filtered and sorted as you choose.
List extractorsList the extractors an organization can use, including Affinda's ready-made ones.
List organizationsList the Affinda organizations you belong to.
List tagsList the tags in your workspaces.
List validation resultsList the results of a document's validation rules.
List workspacesList the workspaces in an organization.
Remove tag from documentsTake a tag off one or more documents.
Update documentRename, confirm, reject, archive or move a document.
Update tagRename a tag.
Update workspaceRename a workspace or change its settings.
Upload documentSend a document to Affinda to read, and get back what it extracted.

Add tag to documents

Tag one or more documents.

Inputs

TagtagnumberRequired
The tag's ID, from List tags or Create tag.
DocumentsidentifierslistRequired
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

NamenametextRequired
The tag's name.
Organizationorganizationtext
The organization whose workspaces to choose from. Only used to fill the workspace list.
WorkspaceworkspacetextRequired
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

OrganizationorganizationtextRequired
The organization to create it in. Pick one, or use an ID from List organizations.
NamenametextRequired
The workspace's name.
Who can see itvisibilitytext
Who can open the workspace.One of: organization (Everyone in the organization), private (Only people added to it).
Reject duplicatesrejectDuplicatestrue/false
Turn on to fail uploads that duplicate an existing document, without using credits.
Reject wrong typesrejectInvalidDocumentstrue/false
Turn on to reject documents of the wrong or an unknown type, without using credits.
Document typesdocumentTypeslist
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

Documentdocument_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

Tagtag_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

Workspaceworkspace_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

OrganizationorganizationtextRequired
The organization to report on. You must be its admin or owner.
Workspaceworkspacetext
Only usage in this workspace.
Document typedocument_typetext
Only usage for this document type.
Fromstartdate
The first day. Defaults to a year before the last day.
Toenddate
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

Documentdocument_idtextRequired
The document's ID, from Upload document or List documents.
Compact resultcompacttrue/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 typedocument_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

Workspaceworkspace_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

Organizationorganizationtext
Only document types of this organization.
Workspaceworkspacetext
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

Organizationorganizationtext
The organization whose workspaces to choose from. Only used to fill the workspace list.
Workspaceworkspacetext
Only those in this workspace.
Statestatetext
Only documents in this state.One of: uploaded, review (In review), validated, archived, rejected.
Searchsearchtext
Only documents whose file name, ID or tag name contains this text.
Tagstagslist
Only documents with these tag IDs.
Createdcreated_dttext
Only documents created in this period.One of: today, yesterday, week (This week), month (This month), year (This year).
Your IDcustom_identifiertext
Only documents with this ID of yours.
Readyreadytrue/false
Only documents that have, or haven't, finished processing.
Failedfailedtrue/false
Only documents that have, or haven't, failed.
Include extracted datainclude_datatrue/false
Turn on to include a summary of what was extracted.
Orderorderingtext
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).
Skipoffsetnumber
How many results to skip, for paging.At least 0.
Limitlimitnumber
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

OrganizationorganizationtextRequired
The organization. Pick one, or use an ID from List organizations.
Include ready-madeinclude_public_extractorstrue/false
Turn on to include Affinda's ready-made extractors.
Namenametext
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

Organizationorganizationtext
The organization whose workspaces to choose from. Only used to fill the workspace list.
Workspaceworkspacetext
Only those in this workspace.
Namenametext
Only tags with this name.
Skipoffsetnumber
How many results to skip, for paging.At least 0.
Limitlimitnumber
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

DocumentdocumenttextRequired
The document's ID, from Upload document or List documents.
Skipoffsetnumber
How many results to skip, for paging.At least 0.
Limitlimitnumber
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

OrganizationorganizationtextRequired
The organization. Pick one, or use an ID from List organizations.
Namenametext
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

TagtagnumberRequired
The tag's ID, from List tags.
DocumentsidentifierslistRequired
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

Documentdocument_idtextRequired
The document's ID, from Upload document or List documents.
File namefileNametext
The new file name.
Your IDcustomIdentifiertext
Your own ID for the document.
ConfirmedisConfirmedtrue/false
Turn on to mark the document validated.
RejectedisRejectedtrue/false
Turn on to reject the document.
ArchivedisArchivedtrue/false
Turn on to archive the document.
Organizationorganizationtext
The organization whose workspaces to choose from. Only used to fill the workspace list.
Workspaceworkspacetext
Move it to this workspace.
Document typedocumentTypetext
Change its document type.
Languagelanguagetext
The document's language as a two-letter code.
Delete atexpiryTimedate 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

Tagtag_idnumberRequired
The tag's ID, from List tags or Create tag.
Namenametext
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

Workspaceworkspace_idtextRequired
The workspace's ID, from List workspaces or Create workspace.
Namenametext
The new name.
Who can see itvisibilitytext
Who can open the workspace.One of: organization (Everyone in the organization), private (Only people added to it).
Reject duplicatesrejectDuplicatestrue/false
Turn on to fail uploads that duplicate an existing document.
Reject wrong typesrejectInvalidDocumentstrue/false
Turn on to reject documents of the wrong or an unknown type.
Document typesdocumentTypeslist
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

Organizationorganizationtext
The organization whose workspaces to choose from. Only used to fill the workspace list.
Filefiletext
The document to upload, such as a PDF, Word file or image. Give this or File URL.
File URLurltext
A public link to the document. Give this or File.
WorkspaceworkspacetextRequired
The workspace to add it to. Pick one, or use an ID from List workspaces.
Document typedocumentTypetext
The document type, if you know it. Affinda works it out if left empty.
Your IDcustomIdentifiertext
Your own ID for the document. It needn't be unique.
File namefileNametext
The file's name.
Languagelanguagetext
The document's language as a two-letter code, such as en. Use zh-cn or zh-tw for Chinese.
Delete atexpiryTimedate and time
When Affinda should delete the document. It is kept if left empty.
Wait for resultswaittrue/false
Leave on to get the results in this step. Turn off to return at once and fetch them later with Get document.
Reject duplicatesrejectDuplicatestrue/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 imageuseOcrtrue/false
Turn on to read the text with OCR, off to read it as a PDF. Affinda decides if left empty.
Low prioritylowPrioritytrue/false
Turn on to mark the document as low priority.
Compact resultcompacttrue/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"
      }
    }
  }
}

On this page