{
  "info": {
    "_postman_id": "42f264b1-b0de-4c14-b672-96708d247241",
    "name": "Pritset API",
    "description": "# Pritset Public API\n\nGenerate production-ready PDF documents from reusable DOC or DOCX templates and structured JSON data. This collection covers the complete public workflow: create and manage templates, validate template data, download source templates, and generate documents either synchronously or through an asynchronous webhook.\n\n## Quick start\n\n1. Import this collection into Postman.\n    \n2. Sign up at [Pritset ](https://pritset.com?utm_source=postman-collection) and read [docs](https://pritset.com/docs/api#authentication?utm_source=postman-collection) how to get token and secret\n    \n3. Set the collection variables `apiBaseUrl` (default is `https://api.pritset.com`), `token`, and `secret` to the values provided for your Pritset or RapidAPI integration.\n    \n4. Create or upload a template and copy its ID into `templateId` where required.\n    \n5. Send your document data as JSON in the `data` multipart form field.\n    \n\n## Authentication\n\nProtected requests use the `Authorization` and `X-Secret` headers populated from the `token` and `secret` collection variables. Keep these credentials private and never commit real values to source control.\n\n## Document generation\n\n- **Direct generation** returns the generated document as an `application/pdf` response.\n    \n- **Webhook generation** queues the document, returns a request ID immediately, and sends the result to the callback URL supplied in the `url` multipart form field.\n    \n\nTemplate upload, update, and validation operations use `multipart/form-data`. Supported template formats are `.doc` and `.docx`. Usage is subject to the limits and quota of your RapidAPI subscription.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "1090560"
  },
  "item": [
    {
      "name": "Template Management",
      "item": [
        {
          "name": "List templates",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "auth": {
              "type": "inherit"
            },
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{token}}"
              },
              {
                "key": "X-Secret",
                "value": "{{secret}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": ""
            },
            "url": {
              "raw": "{{apiBaseUrl}}/api/template",
              "host": [
                "{{apiBaseUrl}}"
              ],
              "path": [
                "api",
                "template"
              ]
            },
            "description": "Lists all templates available to the authenticated account.\n\n**Authentication**  \nSend both required headers:\n\n- `Authorization: {{token}}`\n    \n- `X-Secret: {{secret}}`\n    \n\n**Endpoint**  \n`GET {{apiBaseUrl}}/api/template`\n\n**Successful response**  \nReturns `200 OK` with a JSON object containing:\n\n- `data`: array of template records\n    \n- `total`: total number of templates returned\n    \n\nEach item in `data` typically includes:\n\n- `id`: template identifier\n    \n- `name`: template name\n    \n- `tags`: template tags, may be `null`\n    \n- `templateObject`: serialized JSON string representing the template definition\n    \n\n**Note**  \n`templateObject` is returned as a JSON string, not as a nested JSON object. Parse it separately if you need to inspect the template structure."
          },
          "response": []
        },
        {
          "name": "Get template",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{token}}"
              },
              {
                "key": "X-Secret",
                "value": "{{secret}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{apiBaseUrl}}/api/template/{{templateId}}",
              "host": [
                "{{apiBaseUrl}}"
              ],
              "path": [
                "api",
                "template",
                "{{templateId}}"
              ]
            },
            "description": "Retrieves a template by its `templateId`.\n\n**Path variable**\n\n- `templateId`: The ID of the template to retrive.\n    \n\n**Required headers**\n\n- `Authorization`: Bearer or access token used to authorize the request.\n    \n- `X-Secret`: Secret key required by the API.\n    \n\n**Request body**  \nSend the request as `multipart/form-data` with these fields:\n\n- `name` (text): New template name.\n    \n- `tags` (text): Tags to associate with the template.\n    \n- `template` (file): Template file to upload.\n    \n\nThis request updates the specified template's metadata and/or uploaded template file.\n\nRetrieves a template by its `templateId`.\n\n**Authentication**  \nSend both required headers:\n\n- `Authorization: {{token}}`\n    \n- `X-Secret: {{secret}}`\n    \n\n**Successful response**  \nReturns `200 OK` with a JSON object containing template data"
          },
          "response": []
        },
        {
          "name": "Download template",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "auth": {
              "type": "inherit"
            },
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{token}}"
              },
              {
                "key": "X-Secret",
                "value": "{{secret}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": ""
            },
            "url": {
              "raw": "{{apiBaseUrl}}/api/template/download/{{templateId}}",
              "host": [
                "{{apiBaseUrl}}"
              ],
              "path": [
                "api",
                "template",
                "download",
                "{{templateId}}"
              ]
            },
            "description": "Downloads a template file for the specified template ID.\n\nProvide the required path variable `templateId` to identify which template to download. This request uses inherited authorization and requires the `Authorization` header and `X-Secret` header to be present.\n\nOn success, the endpoint returns the template content as a downloadable file. At a high level, expect a successful binary/file response for a valid template and an error response if the template is missing or access is unauthorized."
          },
          "response": []
        },
        {
          "name": "Create template",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code >= 200 && pm.response.code < 300) {",
                  "  const body = pm.response.json();",
                  "  if (body.id) pm.collectionVariables.set('templateId', body.id);",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "inherit"
            },
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "{{token}}"
              },
              {
                "key": "X-Secret",
                "value": "{{secret}}"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "name",
                  "value": "Itirenties test",
                  "type": "text",
                  "uuid": "8e276fac-8131-465b-b09c-3115c6138d98"
                },
                {
                  "key": "tags",
                  "value": "travel",
                  "type": "text",
                  "uuid": "f2d328cd-9c6f-4172-b91b-a6388f357fbb"
                },
                {
                  "key": "template",
                  "type": "file",
                  "uuid": "0f181672-2af8-479c-850d-3a44f6a3ba12",
                  "src": "/C:/Users/Yurko/Downloads/travel-tech-itinerary-template.docx"
                }
              ]
            },
            "url": {
              "raw": "{{apiBaseUrl}}/api/template",
              "host": [
                "{{apiBaseUrl}}"
              ],
              "path": [
                "api",
                "template"
              ]
            },
            "description": "Creates a new template by uploading a DOCX template file with associated metadata.\n\n**Headers**\n\n- `Authorization: {{token}}` — required bearer/auth token.\n    \n- `X-Secret: {{secret}}` — required secret header.\n    \n\n**Body**  \nSend as form-data:\n\n- `name` (text, required): Template name.\n    \n- `tags` (text): Tag or category for the template.\n    \n- `template` (file, required): Path to the DOCX template file to upload.\n    \n\n**Behavior**  \nOn a successful 2xx response, the test script checks the response JSON for an `id` field and stores it in the collection variable `templateId`."
          },
          "response": []
        },
        {
          "name": "Update template",
          "request": {
            "auth": {
              "type": "inherit"
            },
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "{{token}}"
              },
              {
                "key": "X-Secret",
                "value": "{{secret}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": ""
            },
            "url": {
              "raw": "{{apiBaseUrl}}/api/template/{{templateId}}",
              "host": [
                "{{apiBaseUrl}}"
              ],
              "path": [
                "api",
                "template",
                "{{templateId}}"
              ]
            },
            "description": "Updates an existing template identified by `templateId`.\n\n**Path variable**\n\n- `templateId`: The ID of the template to update.\n    \n\n**Required headers**\n\n- `Authorization`: Bearer or access token used to authorize the request.\n    \n- `X-Secret`: Secret key required by the API.\n    \n\n**Request body**  \nSend the request as `multipart/form-data` with these fields:\n\n- `name` (text): New template name.\n    \n- `tags` (text): Tags to associate with the template.\n    \n- `template` (file): Template file to upload.\n    \n\nThis request updates the specified template's metadata and/or uploaded template file."
          },
          "response": []
        },
        {
          "name": "Delete template",
          "request": {
            "auth": {
              "type": "inherit"
            },
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "{{token}}"
              },
              {
                "key": "X-Secret",
                "value": "{{secret}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": ""
            },
            "url": {
              "raw": "{{apiBaseUrl}}/api/template/{{templateId}}",
              "host": [
                "{{apiBaseUrl}}"
              ],
              "path": [
                "api",
                "template",
                "{{templateId}}"
              ]
            },
            "description": "Deletes an existing template identified by `templateId`.\n\n**Path parameter**\n\n- `templateId`: The ID of the template to delete.\n    \n\n**Required headers**\n\n- `Authorization: {{token}}`\n    \n- `X-Secret: {{secret}}`\n    \n\n**Behavior**  \nOn success, the request deletes the specified template and returns a success response from the API.\n\nIf the request fails, the API may return an error response such as when authentication headers are missing or invalid, the `templateId` does not exist, or the request is otherwise not permitted or cannot be processed."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Document Generation",
      "item": [
        {
          "name": "Generate PDF directly",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('PDF is returned', function () {",
                  "  const contentType = pm.response.headers.get('Content-Type') || '';",
                  "  pm.expect(contentType.toLowerCase()).to.include('application/pdf');",
                  "});"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "inherit"
            },
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "{{token}}"
              },
              {
                "key": "X-Secret",
                "value": "{{secret}}"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "data",
                  "value": "{\n  \"operator\": {\n    \"name\": \"Northstar Travel Technologies\",\n    \"support_phone\": \"+44 20 7946 0284\",\n    \"support_email\": \"travel@northstar.example\"\n  },\n  \"traveler\": {\n    \"name\": \"Alex Morgan\",\n    \"emergency_contact\": \"Jordan Morgan · +44 7700 900214\",\n    \"assistance_id\": \"GLB-ASSIST-884291\"\n  },\n  \"booking\": {\n    \"reference\": \"NST-4827-EU\"\n  },\n  \"trip\": {\n    \"title\": \"European Travel Tech Tour\",\n    \"subtitle\": \"London · Amsterdam · Barcelona\",\n    \"start_date\": \"14 September 2026\",\n    \"end_date\": \"20 September 2026\",\n    \"destinations\": \"Amsterdam, Netherlands · Barcelona, Spain\",\n    \"summary\": \"A seven-day business itinerary combining the TravelTech Europe Summit, partner meetings, product demonstrations, and hosted networking events.\",\n    \"origin\": \"London, United Kingdom\",\n    \"destination\": \"Barcelona, Spain\",\n    \"traveler_count\": 1,\n    \"nights\": 6,\n    \"pre_departure_note\": \"Check in online 24 hours before departure. Carry a valid passport, travel insurance details, and digital copies of all confirmations.\",\n    \"important_notes\": \"All times are local. Please reconfirm meeting locations on the morning of each appointment. Ground transfers include 15 minutes of complimentary waiting time. City taxes may be payable directly at the hotels.\"\n  },\n  \"qr\": {\n    \"width\": 1,\n    \"height\": 1,\n    \"url\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTQhQ4-IbmDYzTWXgI3VV3YT0G7pRm5gEn8rN9NnGrK8w&s=10\",\n    \"extension\": \".png\",\n    \"caption\": \"Scan for the live mobile itinerary\"\n  },\n  \"transport_segments\": [\n    {\n      \"date\": \"14 Sep 2026\",\n      \"type\": \"Flight\",\n      \"service_number\": \"BA 430\",\n      \"from\": \"London Heathrow (LHR)\",\n      \"to\": \"Amsterdam Schiphol (AMS)\",\n      \"departure_time\": \"08:20\",\n      \"arrival_time\": \"10:40\",\n      \"reference\": \"BA7K2Q\",\n      \"status\": \"Confirmed\"\n    },\n    {\n      \"date\": \"17 Sep 2026\",\n      \"type\": \"Flight\",\n      \"service_number\": \"KL 1513\",\n      \"from\": \"Amsterdam Schiphol (AMS)\",\n      \"to\": \"Barcelona El Prat (BCN)\",\n      \"departure_time\": \"10:05\",\n      \"arrival_time\": \"12:20\",\n      \"reference\": \"KL9M4T\",\n      \"status\": \"Confirmed\"\n    },\n    {\n      \"date\": \"20 Sep 2026\",\n      \"type\": \"Flight\",\n      \"service_number\": \"VY 7828\",\n      \"from\": \"Barcelona El Prat (BCN)\",\n      \"to\": \"London Gatwick (LGW)\",\n      \"departure_time\": \"18:15\",\n      \"arrival_time\": \"19:35\",\n      \"reference\": \"VY4P8L\",\n      \"status\": \"Confirmed\"\n    }\n  ],\n  \"accommodations\": [\n    {\n      \"check_in\": \"14 Sep 2026\",\n      \"check_out\": \"17 Sep 2026\",\n      \"name\": \"Canal House Amsterdam\",\n      \"room_type\": \"Deluxe King · Breakfast included\",\n      \"address\": \"Keizersgracht 148, 1015 CX Amsterdam\",\n      \"confirmation\": \"CHA-739251\",\n      \"status\": \"Guaranteed\"\n    },\n    {\n      \"check_in\": \"17 Sep 2026\",\n      \"check_out\": \"20 Sep 2026\",\n      \"name\": \"Eixample Central Hotel\",\n      \"room_type\": \"Executive Double · Breakfast included\",\n      \"address\": \"Carrer de Mallorca 221, 08008 Barcelona\",\n      \"confirmation\": \"ECH-620184\",\n      \"status\": \"Guaranteed\"\n    }\n  ],\n  \"reservations\": [\n    {\n      \"date\": \"14 Sep 2026\",\n      \"time\": \"11:30\",\n      \"title\": \"Private airport transfer\",\n      \"type\": \"Ground transport\",\n      \"location\": \"Amsterdam Schiphol arrivals hall\",\n      \"reference\": \"TRF-AMS-4812\"\n    },\n    {\n      \"date\": \"15 Sep 2026\",\n      \"time\": \"19:30\",\n      \"title\": \"TravelTech Europe welcome dinner\",\n      \"type\": \"Hosted event\",\n      \"location\": \"De Kas, Kamerlingh Onneslaan 3, Amsterdam\",\n      \"reference\": \"TTE-DNR-104\"\n    },\n    {\n      \"date\": \"17 Sep 2026\",\n      \"time\": \"12:50\",\n      \"title\": \"Private airport transfer\",\n      \"type\": \"Ground transport\",\n      \"location\": \"Barcelona Airport Terminal 1 arrivals\",\n      \"reference\": \"TRF-BCN-5937\"\n    },\n    {\n      \"date\": \"19 Sep 2026\",\n      \"time\": \"20:00\",\n      \"title\": \"Partner dinner\",\n      \"type\": \"Restaurant reservation\",\n      \"location\": \"7 Portes, Passeig d'Isabel II 14, Barcelona\",\n      \"reference\": \"7P-1909-AM\"\n    }\n  ],\n  \"days\": [\n    {\n      \"number\": 1,\n      \"date\": \"14 Sep 2026\",\n      \"time\": \"08:20\",\n      \"title\": \"Arrival in Amsterdam\",\n      \"description\": \"Fly from London to Amsterdam, meet the driver in the arrivals hall, transfer to the hotel, and complete registration for the summit.\",\n      \"meeting_point\": \"Driver meeting point: arrivals hall beside Café Rembrandt\"\n    },\n    {\n      \"number\": 2,\n      \"date\": \"15 Sep 2026\",\n      \"time\": \"09:00\",\n      \"title\": \"TravelTech Europe Summit · Day 1\",\n      \"description\": \"Opening keynote, SaaS distribution sessions, pre-arranged buyer meetings, and the hosted welcome dinner.\",\n      \"meeting_point\": \"RAI Amsterdam · Entrance C · Registration desk\"\n    },\n    {\n      \"number\": 3,\n      \"date\": \"16 Sep 2026\",\n      \"time\": \"09:30\",\n      \"title\": \"Summit meetings and product demonstrations\",\n      \"description\": \"Attend the engineering leadership panel, run two partner demos, and join the afternoon founder networking session.\",\n      \"meeting_point\": \"RAI Amsterdam · Hall 8 · Meeting pod M24\"\n    },\n    {\n      \"number\": 4,\n      \"date\": \"17 Sep 2026\",\n      \"time\": \"10:05\",\n      \"title\": \"Amsterdam to Barcelona\",\n      \"description\": \"Check out, fly to Barcelona, transfer to the hotel, and hold an internal preparation session for the partner workshops.\",\n      \"meeting_point\": \"Hotel lobby at 07:30 for airport transfer\"\n    },\n    {\n      \"number\": 5,\n      \"date\": \"18 Sep 2026\",\n      \"time\": \"10:00\",\n      \"title\": \"Barcelona partner workshops\",\n      \"description\": \"Product integration workshop, technical discovery session, and roadmap review with the local partner team.\",\n      \"meeting_point\": \"Pier01 Tech Barcelona · Plaça de Pau Vila 1\"\n    },\n    {\n      \"number\": 6,\n      \"date\": \"19 Sep 2026\",\n      \"time\": \"11:00\",\n      \"title\": \"Founder meetings and networking\",\n      \"description\": \"Meet three travel SaaS founders, tour the innovation hub, and attend the evening partner dinner.\",\n      \"meeting_point\": \"Aticco Urquinaona · Ronda de Sant Pere 52\"\n    },\n    {\n      \"number\": 7,\n      \"date\": \"20 Sep 2026\",\n      \"time\": \"18:15\",\n      \"title\": \"Departure for London\",\n      \"description\": \"Free morning, hotel checkout, airport transfer, and evening flight from Barcelona to London Gatwick.\",\n      \"meeting_point\": \"Hotel lobby at 14:45 for airport transfer\"\n    }\n  ]\n}\n\n",
                  "type": "text",
                  "uuid": "5d4cca9c-b397-4c14-9341-b97a9cfb26f5"
                }
              ]
            },
            "url": {
              "raw": "{{apiBaseUrl}}/api/template/process/direct/{{templateId}}",
              "host": [
                "{{apiBaseUrl}}"
              ],
              "path": [
                "api",
                "template",
                "process",
                "direct",
                "{{templateId}}"
              ]
            },
            "description": "Generates a PDF by `templateId`.\n\n**Path parameter**\n\n- `templateId`: The ID of the template to process.\n    \n\n**Body (form-data)**\n\n- `data`: JSON data to project to a template\n    \n\n**Required headers**\n\n- `Authorization: {{token}}`\n    \n- `X-Secret: {{secret}}`\n    \n\n**Behavior**  \nOn success, the request processes the specified template with JSON data and returns a success response from the API with PDF.\n\nIf the request fails, the API may return an error response such as when authentication headers are missing or invalid, the `templateId` does not exist, invalid data or missing data, or the request is otherwise not permitted or cannot be processed."
          },
          "response": []
        },
        {
          "name": "Generate PDF by webhook",
          "request": {
            "auth": {
              "type": "inherit"
            },
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "{{token}}"
              },
              {
                "key": "X-Secret",
                "value": "{{secret}}"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "data",
                  "value": "<json data string>",
                  "type": "text",
                  "uuid": "98cc2a69-3fe1-4c92-81f9-ce1e788eb985"
                },
                {
                  "key": "url",
                  "value": "<webhook url>",
                  "type": "text",
                  "uuid": "fb6ca1d7-0397-4717-870e-e7a495a2f5c3"
                }
              ]
            },
            "url": {
              "raw": "{{apiBaseUrl}}/api/template/process/webhook/{{templateId}}",
              "host": [
                "{{apiBaseUrl}}"
              ],
              "path": [
                "api",
                "template",
                "process",
                "webhook",
                "{{templateId}}"
              ]
            },
            "description": "Returns job ID and sends a PDF by `templateId` to webhook endpoint\n\n**Path parameter**\n\n- `templateId`: The ID of the template to process.\n    \n\n**Body (form-data)**\n\n- `data`: JSON data to project to a template\n    \n- `url`: webhook endpoint to respond PDF to\n    \n\n**Required headers**\n\n- `Authorization: {{token}}`\n    \n- `X-Secret: {{secret}}`\n    \n\n**Behavior**  \nOn success, the request processes the specified template with JSON data and returns a success response from the API with job ID.\n\nIf the request fails, the API may return an error response such as when authentication headers are missing or invalid, the `templateId` does not exist, invalid data or missing data, or the request is otherwise not permitted or cannot be processed."
          },
          "response": []
        }
      ]
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "apiBaseUrl",
      "value": ""
    },
    {
      "key": "token",
      "value": ""
    },
    {
      "key": "secret",
      "value": ""
    },
    {
      "key": "templateId",
      "value": ""
    }
  ]
}