Prepare Agreement Documents

View as Markdown
### Prepare the agreement documents for a customer application. **Available to:** All authenticated users **Environments:** Live **[Rate Limit](/overview/core-concepts/rate-limits):** 10 requests per hour, 30-second back-off, counts all requests Generate the set of agreement documents the applicant needs to sign for a customer application. The system builds the documents from the application's applicant details, so call this after submitting them with [`submitApplicant`](/api/rest-api-endpoints/users/submit-applicant). Provide the `customerApplicationId` returned by [`startCustomerApplication`](/api/rest-api-endpoints/users/start-customer-application). A successful response returns a `successHashCode`; the generated documents are stored as `AgreementDocument` entities linked to the application. To work with the prepared documents: - List them with [`agreementDocumentDependents`](/api/rest-api-endpoints/users/agreement-document-dependents), passing the `customerApplicationId` as `masterid`. The returned `id` values are the `agreementIds` you pass to [`signAgreementDocuments`](/api/rest-api-endpoints/users/sign-agreement-documents). - Fetch a document's content for display with [`getAgreementDocument`](/api/rest-api-endpoints/users/get-agreement-document). **Common Failure Scenarios** - `customerApplicationId` does not reference an existing application. - The application does not yet have applicant details — submit them first with [`submitApplicant`](/api/rest-api-endpoints/users/submit-applicant). **Error Messages** | `errorText` | Trigger | |-------------|---------| | Non-empty `errorText` | Document preparation failed; the field describes the reason. | **Next Steps** - Present the prepared documents to the applicant, then sign them with [`signAgreementDocuments`](/api/rest-api-endpoints/users/sign-agreement-documents).

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
customerApplicationIdlongRequired

Response

AgreementDocumentsResponse
errorTextstring<=8192 characters

Non-empty if the request failed

successHashCodelong