Improved

Documents API keeps only /documents, person document routes and metadata read removed

Breaking changes: the three person-scoped document routes and GET /documents/{document_id} are removed. Upload, list and download a person's documents with /documents.

Breaking changes

  • The person-scoped document routes are removed. They return 404.
    • POST /persons/{person_id}/documents (upload_document): use POST /documents with the form fields subject_type set to person and subject_id set to the person's id. The other fields (type, file, document_number, issued_country) and the Idempotency-Key header are unchanged.
    • GET /persons/{person_id}/documents (list_documents): use GET /documents?subject_type=person&subject_id={person_id}. Paging and the response are unchanged.
    • GET /persons/{person_id}/documents/{document_id} (fetch_document_content): use GET /documents/{document_id}/content. The document id is enough, so the person id is no longer part of the path.
  • GET /documents/{document_id} (read_document_metadata) is removed. It returns 404. The list route returns the same metadata for every document of a subject.

What did not change

  • The document.uploaded webhook and its payload.
  • The document types, file limits and the rules that decide which types a person can upload.