Improved
Documents API keeps only /documents, person document routes and metadata read removed
18 days ago by Roots
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): usePOST /documentswith the form fieldssubject_typeset topersonandsubject_idset to the person's id. The other fields (type,file,document_number,issued_country) and theIdempotency-Keyheader are unchanged.GET /persons/{person_id}/documents(list_documents): useGET /documents?subject_type=person&subject_id={person_id}. Paging and the response are unchanged.GET /persons/{person_id}/documents/{document_id}(fetch_document_content): useGET /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 returns404. The list route returns the same metadata for every document of a subject.
What did not change
- The
document.uploadedwebhook and its payload. - The document types, file limits and the rules that decide which types a person can upload.