contract-acceptances

Stable. Describes behaviour that is built and covered by tests in this repository.

API reference

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

NameInTypeDescription
id requiredpathstring · uuid
pdfquerybooleanAlso draw the page as a PDF

Responses

StatusMeaningBody
200OKGetContractSnapshotResponse
404Error envelopeError
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

FieldTypeDescription
error requiredobject

GetContractSnapshotResponse

FieldTypeDescription
html requiredstring
sha256 requiredstring
group_id requiredstring · uuid
pdfstring · byteThe page as a PDF, base64; only with pdf=true and when the page can be drawn
pdf_unavailablebooleantrue when pdf=true was asked and the page cannot be drawn in the PDF font