Skip to navigation

Agreement Document L Dependents

View as Markdown

Retrieve the agreement documents for several customer applications.

Available to: Traders (own records); organization administrators (any user in their organization)

Environments: Demo, Live

Rate Limit: No endpoint-specific limit

Return the agreement documents for several customer applications in a single call. Pass the customer application IDs as masterids, and use each record’s customerApplicationId to group the results. Prefer this over repeated agreementDocumentDependents calls. Each record carries the agreementDocumentTemplateId of the template it was generated from and a timestamp for when it was created. Where set, signedTimestamp records when the document was signed (a document without one is still unsigned), and locale marks a localized copy; the default-language document has no locale. Documents generated from templates for administrator use only aren’t returned. Documents from templates flagged personalGuarantor also aren’t returned for an entity application that names a separate personal guarantor, until that guarantor signs.

Calling prepareAgreementDocuments for a customer application creates these records; you can’t create or change them directly through the API. Pass their IDs to signAgreementDocuments as agreementIds when the applicant signs, and download the stored PDF with getAgreementDocument.

prepareAgreementDocuments, signAgreementDocuments, and getAgreementDocument are available on Live only, so you’ll typically query these records on Live.

Common Failure Scenarios

  • Any one of the customer applications in masterids doesn’t exist, or is one you can’t access. The whole call returns HTTP 401 with "Access is denied", not HTTP 404.
  • Agreement documents you can’t access are left out of the response array. The call doesn’t return an error for them.
  • The masterids parameter is missing or repeated (HTTP 404), or contains a value that isn’t a number (HTTP 500).
  • The caller’s user type, or the API key’s permissions, can’t read agreement documents. This returns HTTP 401 with "Access is denied".

Error Messages

MessageResponseTrigger
"Access is denied"401The caller’s user type, or the API key’s permissions, can’t read agreement documents.
"Access is denied"401Any one of the customer applications in masterids doesn’t exist, or the caller can’t see it.
(no message text)404The masterids parameter is missing or repeated.
"Internal Server Error, error id: {id}"500A value in masterids isn’t a number. The error ID is generated per request.

Related Endpoints

Authentication

AuthorizationBearer

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

Query parameters

masteridslist of longsRequired
List of CustomerApplication entity IDs

Response

AgreementDocument
customerApplicationIdlong
timestampdatetime
agreementDocumentTemplateIdlong
idlongOptional
signedTimestampdatetimeOptional
localestringOptional<=64 characters