DocMake
The PDF DocMake makes from the Return Authorization template

The first page of the document DocMake makes from the sample values on this page.

Operations

Return Authorization

An RMA is permission to send something back. It exists so the returns bay can tell an expected parcel from a mystery one: the number goes on the outside of the box, and anything that arrives without it sits on a shelf unidentified while a support ticket quietly ages.

The header settles the commercial terms before the unit moves. Who is returning it, against which order and invoice, the date the authorization expires, who pays the return freight, the address and bay the parcel should reach, and whether a restocking fee applies. The rows then carry part number, item, serial number, quantity, the fault as the customer described it and the agreed outcome, which usually comes down to replacement, repair, credit, refund or disposal on site.

Support agents raise these from a ticket, so the template is worth wiring to the helpdesk rather than filling in by hand. One payload can render both copies: the customer's, with the packing and shipping instructions, and the internal one the returns bay uses to book units in and record what the inspection actually found.

Blanks to fill

authorization_number Authorization number
issue_date Issued
valid_until Valid until
customer_name Customer
customer_contact Contact
customer_email Contact email
original_order Original order
invoice_reference Invoice reference
support_ticket Support ticket
return_reason Why it is coming back
return_address Return address
freight_paid_by Return freight paid by
restocking_fee Restocking fee
packing_instructions Packing instructions
authorized_by Authorized by
company_name Company
returned_units[] One per item, so a row is added for every item in the list

The data behind the preview

This is the exact JSON that produced the document above. Change the values, POST them to the API, and you get your version back as DOCX or PDF. Lists grow and shrink with your data; the layout adapts.

  1. 01 Sign up free and duplicate this template into your workspace.
  2. 02 Adjust the wording and branding in the visual editor.
  3. 03 Fill it in the app, share it as a form link, or call the API.
sample-data.json
{
  "company_name": "Marlowe Instruments",
  "authorization_number": "RA-2026-0663",
  "issue_date": "2 September 2026",
  "valid_until": "30 September 2026",
  "customer_name": "Pendlebury Water Services",
  "customer_contact": "Aoife Rennick, Maintenance Lead",
  "customer_email": "aoife.rennick@pendleburywater.example",
  "original_order": "ORD-2026-5518",
  "invoice_reference": "INV-2026-7742",
  "support_ticket": "TK-88104",
  "returned_units": [
    {
      "part_number": "MI-4420",
      "item": "Flow meter",
      "serial_number": "A17734",
      "quantity": "1",
      "fault_reported": "Reads zero on flow",
      "agreed_outcome": "Repair in warranty"
    },
    {
      "part_number": "MI-4420",
      "item": "Flow meter",
      "serial_number": "A17802",
      "quantity": "1",
      "fault_reported": "Display resets",
      "agreed_outcome": "Repair in warranty"
    },
    {
      "part_number": "MI-2210",
      "item": "Pressure transmitter",
      "serial_number": "C4471",
      "quantity": "1",
      "fault_reported": "Drifts 0.4 bar warm",
      "agreed_outcome": "Quote before repair"
    },
    {
      "part_number": "MI-4425",
      "item": "Flow sensor",
      "serial_number": "A18110",
      "quantity": "1",
      "fault_reported": "Cable cut on site",
      "agreed_outcome": "Repair, chargeable"
    },
    {
      "part_number": "MI-9005",
      "item": "Sensor cable, 10 m",
      "serial_number": "Not serialised",
      "quantity": "4",
      "fault_reported": "Ordered in error",
      "agreed_outcome": "Credit less the fee"
    }
  ],
  "return_reason": "Two flow meters failed on the same site within six weeks of being fitted, and the pressure transmitter drifts once the plant room warms up. The four sensor cables were ordered in error and have not been opened.",
  "return_address": "Marlowe Instruments, Returns, Unit 12 Sandon Way, Stoke on Trent ST4 7RR, United Kingdom",
  "freight_paid_by": "Marlowe Instruments for the items in warranty, the customer for the rest",
  "restocking_fee": "15 per cent on the unopened cables, nothing on the faulty units",
  "packing_instructions": "Send each meter in its own box with the original foam. Do not send the mounting brackets or the mains leads. Write the authorization number on the outside of every box and put a copy of this sheet inside the first one.",
  "authorized_by": "Gareth Tolhurst, Service Manager"
}

Generate this document via the API

One template plus changing data is the whole point. The list of blanks above is the contract, and every new set of values comes back in the same layout: fill it in the app, hand someone a form link, or POST the JSON and get the file straight back.

The request below carries this page's own values, so it runs as soon as the template exists in your workspace. Swap the values for yours and the response is your document.

make-return-merchandise-authorization.sh
curl -X POST https://app.docmake.io/api/v1/render \
  -H "Authorization: Bearer $DOCMAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  --output return-merchandise-authorization.pdf \
  --data-binary @- <<'JSON'
{
  "template_id": "tmpl_your_template_id",
  "format": "pdf",
  "data": {
    "company_name": "Marlowe Instruments",
    "authorization_number": "RA-2026-0663",
    "issue_date": "2 September 2026",
    "valid_until": "30 September 2026",
    "customer_name": "Pendlebury Water Services",
    "customer_contact": "Aoife Rennick, Maintenance Lead",
    "customer_email": "aoife.rennick@pendleburywater.example",
    "original_order": "ORD-2026-5518",
    "invoice_reference": "INV-2026-7742",
    "support_ticket": "TK-88104",
    "returned_units": [
      {
        "part_number": "MI-4420",
        "item": "Flow meter",
        "serial_number": "A17734",
        "quantity": "1",
        "fault_reported": "Reads zero on flow",
        "agreed_outcome": "Repair in warranty"
      },
      {
        "part_number": "MI-4420",
        "item": "Flow meter",
        "serial_number": "A17802",
        "quantity": "1",
        "fault_reported": "Display resets",
        "agreed_outcome": "Repair in warranty"
      },
      {
        "part_number": "MI-2210",
        "item": "Pressure transmitter",
        "serial_number": "C4471",
        "quantity": "1",
        "fault_reported": "Drifts 0.4 bar warm",
        "agreed_outcome": "Quote before repair"
      },
      {
        "part_number": "MI-4425",
        "item": "Flow sensor",
        "serial_number": "A18110",
        "quantity": "1",
        "fault_reported": "Cable cut on site",
        "agreed_outcome": "Repair, chargeable"
      },
      {
        "part_number": "MI-9005",
        "item": "Sensor cable, 10 m",
        "serial_number": "Not serialised",
        "quantity": "4",
        "fault_reported": "Ordered in error",
        "agreed_outcome": "Credit less the fee"
      }
    ],
    "return_reason": "Two flow meters failed on the same site within six weeks of being fitted, and the pressure transmitter drifts once the plant room warms up. The four sensor cables were ordered in error and have not been opened.",
    "return_address": "Marlowe Instruments, Returns, Unit 12 Sandon Way, Stoke on Trent ST4 7RR, United Kingdom",
    "freight_paid_by": "Marlowe Instruments for the items in warranty, the customer for the rest",
    "restocking_fee": "15 per cent on the unopened cables, nothing on the faulty units",
    "packing_instructions": "Send each meter in its own box with the original foam. Do not send the mounting brackets or the mains leads. Write the authorization number on the outside of every box and put a copy of this sheet inside the first one.",
    "authorized_by": "Gareth Tolhurst, Service Manager"
  }
}
JSON

tmpl_your_template_id is a stand-in: build this template in the visual editor and copy the id it shows, or create one with POST /api/v1/templates. Keys, formats, strict mode and batches are in the API reference.

Or let an AI assistant do it

The DocMake MCP server lets Claude and other assistants make this document the same way. Install it once:

claude mcp add docmake \
  --env DOCMAKE_API_KEY=dm_your_api_key \
  -- npx -y @docmake/mcp@latest

Then ask for the document in plain words:

Make a PDF from my Return Authorization template with authorization number "RA-2026-0663" and issued "2 September 2026".

How the MCP server works →

More operations templates