iotoms Docs

Generate quotation PDF

POST
/api/v1/sales/quotations/{id}/pdf

Renders a fresh PDF of the quotation from the merchant's quotation template and returns its pdfUrl. Pass templateId to use a specific template instead of the default.

How to use it

  1. Find the quotation ID with List quotations.
  2. Optionally pass templateId from List report templates; otherwise the active quotation template is used.
  3. A fresh PDF is rendered and stored, and the response gives its download link in pdfUrl.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Query Parameters

templateId?integer

ID of a report template to render with, from List report templates. Omit to use the merchant's active quotation template.

Formatint64

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request was processed; otherwise an error status.

message*string

Short human-readable message describing the outcome, e.g. which record was saved or why the call failed.

data?

Where to download the quotation PDF and which template produced it.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/sales/quotations/497f6eca-6276-4993-bfeb-53cbbbba6f08/pdf' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "quotationId": "98c8afab-b1d9-462f-9483-5a2dbf34985f",    "quoteNumber": "string",    "templateId": 0,    "templateVersion": 0,    "pdfUrl": "string",    "generatedAt": "string"  }}