Abrir en Magpie

New invoice has Import JSON below the form. It fills in the invoice form from a JSON document, such as one an assistant writes from a timesheet, a quote or an email. Choose Copy the prompt to copy this format with the instructions an assistant needs, give it the timesheet or quote, paste its answer into the box, and choose Fill in the form. Import JSON is on a new invoice only, not on a draft being edited.

Importing fills in the form; it does not save anything. Check the invoice and choose Create draft to save it.

The subtotal, discount, tax and total are worked out from the items, as on a typed invoice; a document cannot set them. The document is checked against the same rules as the form, and each problem is shown on the field it belongs to, so you can correct it in the form.

The document

{
  "contact": "Northgate Studio",
  "issueDate": "2026-09-30",
  "dueDate": "2026-10-30",
  "currency": "GBP",
  "items": []
}
Field Type Notes
contact string, required Who to bill. See below.
issueDate string, optional YYYY-MM-DD. Today if left out.
dueDate string, optional YYYY-MM-DD, on or after the issue date. Worked out from the contact's payment terms if left out.
currency string, optional A three-letter code such as GBP. Your invoicing default if left out.
taxRatePercent number, optional 0 to 100. Chooses your tax rate with exactly this percentage for every item that does not name its own. Refused if you have no such rate. Items without a tax use your rate for new items when this is left out.
discount object, optional { "amount": 50, "isPercent": false }. A percentage discount cannot exceed 100.
notes string, optional Shown on the invoice.
terms string, optional Payment terms shown at the foot. Your default if left out.
items array, required At least one line item.

The contact

contact is a name, not an id. It must match a contact already in this Personal or team space, either its listed name or its company name, exactly (capitals do not matter).

If no contact matches, or more than one does, the import is refused. Add the contact first, or rename one of the two.

Line items

{ "description": "Design work, September", "quantity": 12, "unitPrice": 75, "tax": "VAT" }
Field Type Notes
description string, required What the item is for.
quantity number, optional Above zero. Defaults to 1.
unitPrice number, required Zero or more, in whole currency units, 75 or 75.50, not pence or cents.
tax string, optional The name of one of your tax rates, as shown in Invoicing settings › Tax rates, such as VAT or VAT 20%. none means no tax. A name that matches no rate is refused.

Write amounts the way they appear on the invoice. unitPrice is the price for one; the line total is worked out for you. quantity can have up to four decimal places, such as 1.25 hours.

A complete example

{
  "contact": "Northgate Studio",
  "issueDate": "2026-09-30",
  "dueDate": "2026-10-30",
  "currency": "GBP",
  "discount": { "amount": 10, "isPercent": true },
  "notes": "Spring range, phase one.",
  "terms": "Payment within 30 days by bank transfer.",
  "items": [
    { "description": "Design work, September", "quantity": 12, "unitPrice": 75, "tax": "VAT" },
    { "description": "Photography day rate", "quantity": 1, "unitPrice": 480, "tax": "VAT" },
    { "description": "Print proofs", "quantity": 3, "unitPrice": 22.5, "tax": "none" }
  ]
}

If an import is rejected for a reason you can't work out, Contact support.

Preguntar al soporte de Magpie

Envía al equipo de Magpie una pregunta sobre cualquier cosa que este artículo no responda.