POST
/
v2
/
redacted_resumes
Upload a resume for redacting
curl --request POST \
  --url https://{region}.affinda.com/v2/redacted_resumes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'identifier=<string>' \
  --form 'customIdentifier=<string>' \
  --form fileName=Document.pdf \
  --form url=https://api.affinda.com/static/sample_resumes/example.pdf \
  --form language=en \
  --form wait=true \
  --form redactHeadshot=true \
  --form redactPersonalDetails=true \
  --form redactWorkDetails=true \
  --form redactEducationDetails=true \
  --form redactReferees=true \
  --form redactLocations=true \
  --form redactDates=true \
  --form redactGender=true \
  --form redactPdfMetadata=true \
  --form expiryTime=2023-11-07T05:31:56Z
{
  "data": {
    "redactedPdf": "https://api-data.affinda.com/media/redacted_resumes/resume_redacted.pdf"
  },
  "meta": {
    "identifier": "<string>",
    "customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834",
    "fileName": "Document.pdf",
    "ready": true,
    "readyDt": "2020-12-10T01:43:32.276724Z",
    "failed": false,
    "expiryTime": "2023-11-07T05:31:56Z",
    "language": "en",
    "pdf": "https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
    "parentDocument": {
      "identifier": "<string>"
    },
    "childDocuments": [
      {
        "identifier": "<string>"
      }
    ],
    "pages": [
      {
        "id": 2,
        "pageIndex": 0,
        "image": "https://affinda-api.s3.amazonaws.com/media/pages/Page.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
        "imageTranslated": "https://affinda-api.s3.amazonaws.com/media/pages/PageTranslated.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
        "height": 700,
        "width": 500,
        "rotation": 90
      }
    ],
    "isVerified": false,
    "reviewUrl": "https://app.affinda.com/review/XJ5kK123?signature=12345",
    "ocrConfidence": 0.97,
    "createdDt": "2023-11-07T05:31:56Z",
    "documentType": "resume",
    "regionBias": {
      "country": "<string>",
      "countries": [
        "<string>"
      ],
      "squareCoordinates": [
        123
      ],
      "strict": true
    },
    "isOcrd": true
  },
  "error": {
    "errorCode": "document_conversion_failed",
    "errorDetail": "Unable to convert word document"
  }
}

Authorizations

Authorization
string
header
required

Basic authentication using an API key, e.g. {Authorization: Bearer 75z0bb4fbdf97b7e4111ff6c0015471094155f91}. You can find your API key within the Settings page of the Affinda web app. You can obtain an API key by signing up for a free trial.

Body

multipart/form-data

Resume to upload, either via fileupload or URL to a file

file
file

File as binary data blob. Supported formats: PDF, DOC, DOCX, TXT, RTF, HTML, PNG, JPG, TIFF, ODT, XLS, XLSX

identifier
string
deprecated

Deprecated in favor of customIdentifier.

customIdentifier
string

Specify a custom identifier for the document if you need one, not required to be unique.

fileName
string | null

Optional filename of the file

Example:

"Document.pdf"

url
string | null

URL to download the resume.

Example:

"https://api.affinda.com/static/sample_resumes/example.pdf"

language
string | null

Language code in ISO 639-1 format. Must specify zh-cn or zh-tw for Chinese.

Example:

"en"

wait
boolean
default:true

If "true" (default), will return a response only after processing has completed. If "false", will return an empty data object which can be polled at the GET endpoint until processing is complete.

Example:

true

redactHeadshot
string
default:true

Whether to redact headshot

redactPersonalDetails
string
default:true

Whether to redact personal details (e.g. name, address)

redactWorkDetails
string
default:true

Whether to redact work details (e.g. company names)

redactEducationDetails
string
default:true

Whether to redact education details (e.g. university names)

redactReferees
string
default:true

Whether to redact referee details

redactLocations
string
default:true

Whether to redact location names

redactDates
string
default:true

Whether to redact dates

redactGender
string
default:true

Whether to redact gender

redactPdfMetadata
string
default:true

Whether to redact PDF metadata

expiryTime
string<date-time> | null

The date/time in ISO-8601 format when the document will be automatically deleted. Defaults to no expiry.

Response

Only returned when wait=True, will return the created redacted resume

data
object | null
required
meta
object
required
error
object
required