Upload Enrollment Document

Returns a pre-signed URL to upload a PDF document for the specified transaction enrollment.

POST/enrollments/{enrollmentId}/documents

This 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.

  1. 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.

  2. 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.

  3. Use a PUT request to upload the attachment file to the pre-signed URL (uploadURL) in the response. The request must include a Content-Type header set to application/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.

Authorization
RequiredHeader

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

application/json
name
StringRequired

The file name of the PDF document you want to upload. The name should include the file extension, such as provider-license.pdf. This name will be displayed in the Stedi portal.

taskId
StringRequired

The ID for the task associated with this document upload.

Response

application/json

CreateEnrollmentDocumentUpload 200 response

enrollmentId
StringRequired

The enrollment ID for the transaction enrollment request associated with the PDF document.

uploadUrl
StringRequired

The pre-signed URL you can use to upload the PDF document. This URL expires after 24 hours.

documentId
StringRequired

A unique identifier for the document record within Stedi.