Get Agreement Document

View as Markdown
### Download the PDF content of an agreement document. **Available to:** All authenticated users **Environments:** Live **[Rate Limit](/overview/core-concepts/rate-limits):** No endpoint-specific limit Retrieve the generated PDF for an agreement document tied to a customer application. Use this endpoint to display an agreement to an applicant before signing, or to archive a copy of a signed document for your records. Identify the document with `agreementDocumentId` — the entity ID of an `AgreementDocument` record. The platform creates these records when you call [`prepareAgreementDocuments`](/api/rest-api-endpoints/users/prepare-agreement-documents) for a customer application, and you can list them with [`agreementDocumentDependents`](/api/rest-api-endpoints/users/agreement-document-dependents) using the CustomerApplication entity ID. On success, the response's `content` field holds the Base64-encoded PDF and `filename` holds a name derived from the document's template (e.g., `TemplateName.pdf`). On failure, `errorText` describes the problem and the other fields are absent — always check `errorText` before decoding the content. **Common Failure Scenarios** - The `agreementDocumentId` doesn't exist or isn't accessible to the calling user. - The agreement document has no stored content to download. - The request was sent to the Demo environment. **Error Messages** | `errorText` | Trigger | |-------------|---------| | `"Not found"` | The agreement document has no stored PDF content | | `"This endpoint should be called on live.tradovateapi.com"` | Called on the Demo environment |

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
agreementDocumentIdlongRequired

Response

DocumentContentResponse
errorTextstring<=8192 characters

Non-empty if the request failed

filenamestring<=64 characters
contentstring<=8192 characters