Imports
Start turning an existing document into a template
Paid plans only. Takes a PDF three ways: a multipart file part, a JSON file_url the API fetches (public https only), or JSON { "upload": true }, which answers with a one-time upload link and an import in awaiting_upload. Answers in under a second with the import in uploaded; the work happens after, so poll GET /v1/imports/{id}. The same bytes from the same account inside 24 hours are the same import and answer 200 with existing: true unless force is true. A feature that is switched off on the deployment answers 503 import_disabled.
post/v1/imports
Request
- Base URL: https://api.galleyrender.com
- URL: https://api.galleyrender.com/v1/imports
- Auth: HTTP bearer
Request body
Example request
{
"options": {
"name": "ashcroft-invoice",
"hint": "invoice"
}
}Response
The same bytes were imported by this account in the last 24 hours; this is that import, with existing: true.
Example response
{
"id": "imp_4tq8m2x7k1bv",
"document_kind": "invoice",
"closest_starter": "invoice",
"language": "en",
"questions": [
{
"id": "q1",
"prompt": "Is this paragraph printed the same on every document, or does it change?",
"options": [
{
"value": "field_with_default"
}
]
}
],
"fonts_substituted": [
{
"from": "Helvetica",
"to": "public-sans"
}
],
"draft_summary": {
"fields": [
"buyer.name",
"invoice_number",
"line_items[]"
]
},
"template": {
"ref": "ashcroft-invoice@1"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.