contract-acceptances
Stable. Describes behaviour that is built and covered by tests in this repository.
GET /v1/contract-acceptances/{id}/snapshot #
The page the customer accepted, as it was rendered then
A self-contained HTML document in html (no script, no external resource), written again from the stored record. Its sha256 is the snapshot_sha256 of the acceptance, and the page that was mailed to the customer. It holds the seller's texts and the customer's name, so show it as untrusted content, for example in a sandboxed frame.
With pdf=true the same page is also drawn as a PDF, the customer's copy (text only, in Noto Sans, ending with the sha256 of the page it was drawn from): base64 in pdf. A page with a character the font cannot draw (an Arabic text, a name in Chinese) has no PDF: pdf_unavailable is true and the HTML page is the only copy.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string · uuid | |
pdf | query | boolean | Also draw the page as a PDF |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | GetContractSnapshotResponse |
404 | Error envelope | Error |
Example response
{
"html": "string",
"sha256": "string",
"group_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e"
}curl
curl -X GET https://YOUR-API-ADDRESS/v1/contract-acceptances/<id>/snapshot \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"Models
Error
| Field | Type | Description |
|---|---|---|
error required | object |
GetContractSnapshotResponse
| Field | Type | Description |
|---|---|---|
html required | string | |
sha256 required | string | |
group_id required | string · uuid | |
pdf | string · byte | The page as a PDF, base64; only with pdf=true and when the page can be drawn |
pdf_unavailable | boolean | true when pdf=true was asked and the page cannot be drawn in the PDF font |