Upload Enrollment Document
Returns a pre-signed URL to upload a PDF document for the specified transaction enrollment.
/enrollments/{enrollmentId}/documentsThis endpoint returns a pre-signed URL to upload a PDF document to the specified transaction enrollment. You can only upload PDF documents required to complete a specific task on the enrollment.
-
Call this endpoint with the task ID for the task that requires the document upload and the enrollment ID for the associated transaction enrollment request. These IDs are returned in the responses for the Retrieve Enrollment and List Enrollments endpoints.
-
The endpoint returns a pre-signed URL that you can use to upload the PDF document to the enrollment record. The URL expires in 24 hours.
-
Use a
PUTrequest to upload the attachment file to the pre-signed URL (uploadURL) in the response. The request must include aContent-Typeheader set toapplication/pdf.curl --request PUT \ --url "<uploadUrl>" \ --header "Content-Type: application/pdf" \ --upload-file /path/to/file.pdf
Stedi displays uploaded documents on the enrollment's details page in the Stedi portal.
Poll for document status
When you successfully upload the PDF to the pre-signed URL, the document record's status changes from PENDING to UPLOADED. You must wait for the document's status to change to UPLOADED before marking the associated task as complete. This typically takes less than 10 seconds.
You can poll the Retrieve Enrollment endpoint to determine when the status has been updated. The following example shows how to poll for a document's status.
Pending documents
After 24 hours, Stedi automatically deletes any document records that are still in the PENDING status. You'll need to call this endpoint again to get a new pre-signed URL for uploading the document.
A Stedi API Key for authentication.
Path Parameters
The enrollment ID for the transaction enrollment where you want to upload the PDF document. The enrollment ID is returned in the responses for the Create Enrollment and List Enrollments endpoints. It's also listed at the top of the enrollment's details page in the Stedi portal.
Body
Response
CreateEnrollmentDocumentUpload 200 response
The enrollment ID for the transaction enrollment request associated with the PDF document.
The pre-signed URL you can use to upload the PDF document. This URL expires after 24 hours.
A unique identifier for the document record within Stedi.
curl --request POST \ --url "https://enrollments.us.stedi.com/2024-09-01/enrollments/{enrollmentId}/documents" \ --header "Authorization: <api_key>" \ --header "Content-Type: application/json" \ --data '{ "name": "provider-license.pdf", "taskId": "11111111-1111-4111-8111-111111111111" }'{
"enrollmentId": "db6675c5-7bg7-4af9-8c68-a54a336d2911",
"uploadUrl": "https://s3.amazonaws.com/enrollment-documents/db6675c5-7bg7-4af9-8c68-a54a336d2911/provider-license.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...",
"documentId": "doc-123e4567-e89b-12d3-a456-426614174000"
}