Preview a legal document for an offer
Returns the current version of a legal document as Markdown, filled with the values of the caller's offer: the amount, the tenure, the fee, the payment plan and the account terms. The app shows this text before the customer accepts the offer. The preview creates nothing, so a client can repeat it. Requires an active user who owns the account. An offer that the account cannot draw fails with the error of the payment preview.
Authorization
oauth2 Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.
In: header
Path Parameters
Id of the legal document.
Request Body
application/json
The credit offer that the document describes.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/legal-documents/flex-credit-terms/preview" \ -H "Content-Type: application/json" \ -d '{ "account_id": "550e8400-e29b-41d4-a716-446655440000", "amount": { "value": 100000, "currency": "KES" }, "tenure": {} }'{ "id": "flex-credit-terms", "title": "Flex Credit purchase terms", "version": "1.0-draft", "effective_date": "2019-08-24", "markdown": "# Flex Credit purchase terms"}{ "code": "BAD_REQUEST", "description": "Bad Request"}{ "code": "UNAUTHORISED", "description": "Unauthorised"}{ "code": "FORBIDDEN", "description": "Forbidden"}{ "code": "BAD_REQUEST", "description": "Invalid input"}{ "code": "RATE_LIMIT_EXCEEDED", "description": "Too Many Requests"}{ "code": "INTERNAL_ERROR", "description": "Internal Server Error"}Get a legal document GET
Returns the current version of a legal document as Markdown. A label in brackets, such as [fee], stands in place of each value of an offer. A website shows this version to a reader who has no offer. The endpoint needs no authentication.
List the caller's accounts GET
Lists the caller's loan, credit, current, and Flex Credit accounts. Returns the SUMMARY view (the latest account per type) by default. Returns every account (the ALL view) when a status filter or an account number filter is set, or when the view parameter requests ALL. Requires an authenticated, active user.