Getting started
Every route is served under https://app.hexvan.com/api, takes and answers JSON. Create an API key in the app, under Settings › Integrations, and send it with every request:
curl https://app.hexvan.com/api/contacts?sort=newest \
-H 'Authorization: Bearer hxv_…'A key acts as the person who created it, until they revoke it. Using Zapier? Hexvan is there already: paste your key when Zapier asks to connect it.
- Who may call a route. Public: anyone. Signed in: any member of the business. Administrator: its administrators only. Every route only ever sees the data of the business signed in.
- Lists come in pages: ask for
pageandpageSize(up to 100), and readitemsandtotal. - Updates replace the whole thing: a
PUTtakes every field, as the app's forms send them. Empty text isnull. - Money is in cents (
1250is 12.50), tax rates are percentages. - Errors answer
{ "error": { "code", "message", "details?" } }:422with the fields at fault,409when something else still needs it,402once the trial or the subscription is over (reading still works),429when called too often.
Building something with Hexvan? Tell us at hello@hexvan.com.
Who you are
Current user and company
Response · 200
{ "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "email": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": [ "admin", "member" ] }, "hasPassword": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "email", "name", "role", "hasPassword", "createdAt" ], "additionalProperties": false }, "company": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "slug": { "type": "string" }, "onboarded": { "type": "boolean" }, "email": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "companyNumber": { "type": [ "string", "null" ] }, "vatNumber": { "type": [ "string", "null" ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "defaultVatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "paymentTermsDays": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "iban": { "type": [ "string", "null" ] }, "invoiceFooter": { "type": [ "string", "null" ] }, "quoteFooter": { "type": [ "string", "null" ] }, "distanceUnit": { "type": "string", "enum": [ "km", "mi" ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "name", "slug", "onboarded", "email", "phone", "address", "companyNumber", "vatNumber", "currency", "taxName", "defaultVatRate", "paymentTermsDays", "iban", "invoiceFooter", "quoteFooter", "distanceUnit", "createdAt" ], "additionalProperties": false } }, "required": [ "user", "company" ], "additionalProperties": false }
API keys
List your API keys, the newest first (paginated)
Query parameters
{ "type": "object", "properties": { "page": { "default": 1, "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "default": 25, "type": "integer", "minimum": 1, "maximum": 100 } } }Response · 200
{ "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "preview": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "name", "preview", "createdAt" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "items", "total", "page", "pageSize" ], "additionalProperties": false }Create an API key, to connect another tool (Zapier…): it acts as you, and is shown only once
Request body
{ "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "name" ] }Response · 201
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "preview": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "key": { "type": "string" } }, "required": [ "id", "name", "preview", "createdAt", "key" ], "additionalProperties": false }Revoke one of your API keys: what uses it stops working at once
Answers
204 No Content.
Contacts
Search the contacts, by name or the newest first (paginated)
Query parameters
{ "type": "object", "properties": { "page": { "default": 1, "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "default": 25, "type": "integer", "minimum": 1, "maximum": 100 }, "search": { "type": "string", "maxLength": 100 }, "sort": { "default": "name", "type": "string", "enum": [ "name", "newest" ] } } }Response · 200
{ "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "companyNumber": { "type": [ "string", "null" ] }, "vatNumber": { "type": [ "string", "null" ] }, "peppolId": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "notes": { "type": [ "string", "null" ] }, "source": { "type": "string", "enum": [ "manual", "website", "directory" ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "name", "companyName", "companyNumber", "vatNumber", "peppolId", "email", "phone", "address", "notes", "source", "createdAt", "updatedAt" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "items", "total", "page", "pageSize" ], "additionalProperties": false }Get a contact
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "companyNumber": { "type": [ "string", "null" ] }, "vatNumber": { "type": [ "string", "null" ] }, "peppolId": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "notes": { "type": [ "string", "null" ] }, "source": { "type": "string", "enum": [ "manual", "website", "directory" ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "name", "companyName", "companyNumber", "vatNumber", "peppolId", "email", "phone", "address", "notes", "source", "createdAt", "updatedAt" ], "additionalProperties": false }Create a contact
Request body
{ "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "companyName": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ] }, "companyNumber": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ] }, "vatNumber": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ] }, "peppolId": { "anyOf": [ { "anyOf": [ { "type": "string", "const": "" }, { "type": "string", "pattern": "^\\d{4}:[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$" } ] }, { "type": "null" } ] }, "email": { "anyOf": [ { "type": "string", "maxLength": 254 }, { "type": "null" } ] }, "phone": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } } }, "notes": { "anyOf": [ { "type": "string", "maxLength": 5000 }, { "type": "null" } ] } }, "required": [ "name", "address" ] }Response · 201
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "companyNumber": { "type": [ "string", "null" ] }, "vatNumber": { "type": [ "string", "null" ] }, "peppolId": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "notes": { "type": [ "string", "null" ] }, "source": { "type": "string", "enum": [ "manual", "website", "directory" ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "name", "companyName", "companyNumber", "vatNumber", "peppolId", "email", "phone", "address", "notes", "source", "createdAt", "updatedAt" ], "additionalProperties": false }Update a contact
Request body
{ "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "companyName": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ] }, "companyNumber": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ] }, "vatNumber": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ] }, "peppolId": { "anyOf": [ { "anyOf": [ { "type": "string", "const": "" }, { "type": "string", "pattern": "^\\d{4}:[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$" } ] }, { "type": "null" } ] }, "email": { "anyOf": [ { "type": "string", "maxLength": 254 }, { "type": "null" } ] }, "phone": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } } }, "notes": { "anyOf": [ { "type": "string", "maxLength": 5000 }, { "type": "null" } ] } }, "required": [ "name", "address" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "companyNumber": { "type": [ "string", "null" ] }, "vatNumber": { "type": [ "string", "null" ] }, "peppolId": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "notes": { "type": [ "string", "null" ] }, "source": { "type": "string", "enum": [ "manual", "website", "directory" ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "name", "companyName", "companyNumber", "vatNumber", "peppolId", "email", "phone", "address", "notes", "source", "createdAt", "updatedAt" ], "additionalProperties": false }Delete a contact without appointments, quotes nor invoices
Answers
204 No Content.
Reminders
List reminders between two dates (by date and time), without a date, or of a contact (the latest first), done or not (paginated)
Query parameters
{ "type": "object", "properties": { "page": { "default": 1, "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "default": 25, "type": "integer", "minimum": 1, "maximum": 100 }, "from": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "to": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "undated": { "type": "string" }, "done": { "type": "string" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }Response · 200
{ "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "title": { "type": "string" }, "date": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "startTime": { "anyOf": [ { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, { "type": "null" } ] }, "contactId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "contact": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "done": { "type": "boolean" }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "title", "date", "startTime", "contactId", "contact", "address", "done", "pictureIds", "createdAt" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "items", "total", "page", "pageSize" ], "additionalProperties": false }Get a reminder
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "title": { "type": "string" }, "date": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "startTime": { "anyOf": [ { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, { "type": "null" } ] }, "contactId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "contact": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "done": { "type": "boolean" }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "title", "date", "startTime", "contactId", "contact", "address", "done", "pictureIds", "createdAt" ], "additionalProperties": false }Add a reminder (with a date, or none)
Request body
{ "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 2000 }, "date": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "startTime": { "anyOf": [ { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, { "type": "null" } ] }, "contactId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } } } }, "required": [ "title" ] }Response · 201
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "title": { "type": "string" }, "date": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "startTime": { "anyOf": [ { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, { "type": "null" } ] }, "contactId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "contact": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "done": { "type": "boolean" }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "title", "date", "startTime", "contactId", "contact", "address", "done", "pictureIds", "createdAt" ], "additionalProperties": false }Update a reminder
Request body
{ "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 2000 }, "date": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "startTime": { "anyOf": [ { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, { "type": "null" } ] }, "contactId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } } } }, "required": [ "title" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "title": { "type": "string" }, "date": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "startTime": { "anyOf": [ { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, { "type": "null" } ] }, "contactId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "contact": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "done": { "type": "boolean" }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "title", "date", "startTime", "contactId", "contact", "address", "done", "pictureIds", "createdAt" ], "additionalProperties": false }Mark a reminder as done (or not)
Request body
{ "type": "object", "properties": { "done": { "type": "boolean" } }, "required": [ "done" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "title": { "type": "string" }, "date": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "startTime": { "anyOf": [ { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, { "type": "null" } ] }, "contactId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "contact": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "done": { "type": "boolean" }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "title", "date", "startTime", "contactId", "contact", "address", "done", "pictureIds", "createdAt" ], "additionalProperties": false }Delete a reminder
Answers
204 No Content.A day: its reminders (by time) and the base of the company, for the map
Response · 200
{ "type": "object", "properties": { "date": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "base": { "anyOf": [ { "type": "object", "properties": { "lat": { "type": "number", "minimum": -90, "maximum": 90 }, "lng": { "type": "number", "minimum": -180, "maximum": 180 } }, "required": [ "lat", "lng" ], "additionalProperties": false }, { "type": "null" } ] }, "appointments": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "title": { "type": "string" }, "date": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "startTime": { "anyOf": [ { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, { "type": "null" } ] }, "contactId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "contact": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, { "type": "null" } ] }, "address": { "type": "object", "properties": { "street": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "country": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "lat": { "anyOf": [ { "type": "number", "minimum": -90, "maximum": 90 }, { "type": "null" } ] }, "lng": { "anyOf": [ { "type": "number", "minimum": -180, "maximum": 180 }, { "type": "null" } ] } }, "required": [ "street", "postalCode", "city", "country", "lat", "lng" ], "additionalProperties": false }, "done": { "type": "boolean" }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "title", "date", "startTime", "contactId", "contact", "address", "done", "pictureIds", "createdAt" ], "additionalProperties": false } } }, "required": [ "date", "base", "appointments" ], "additionalProperties": false }
Quotes
List quotes, most recent first (by status, invoiced or not, contact, text; paginated)
Query parameters
{ "type": "object", "properties": { "page": { "default": 1, "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "default": 25, "type": "integer", "minimum": 1, "maximum": 100 }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "invoiced": { "type": "string" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "search": { "type": "string", "maxLength": 100 } } }Response · 200
{ "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "items", "total", "page", "pageSize" ], "additionalProperties": false }Get a quote with its lines and VAT breakdown
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "footer": { "type": [ "string", "null" ] }, "signature": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "image": { "type": "string" } }, "required": [ "by", "at", "image" ], "additionalProperties": false }, { "type": "null" } ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt", "lines", "vat", "notes", "footer", "signature", "pictureIds" ], "additionalProperties": false }Write a quote for a customer (as a draft)
Request body
{ "type": "object", "properties": { "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "notes": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ] }, "lines": { "minItems": 1, "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate" ] } } }, "required": [ "contactId", "issueDate", "lines" ] }Response · 201
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "footer": { "type": [ "string", "null" ] }, "signature": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "image": { "type": "string" } }, "required": [ "by", "at", "image" ], "additionalProperties": false }, { "type": "null" } ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt", "lines", "vat", "notes", "footer", "signature", "pictureIds" ], "additionalProperties": false }Update a draft quote
Request body
{ "type": "object", "properties": { "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "notes": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ] }, "lines": { "minItems": 1, "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate" ] } } }, "required": [ "contactId", "issueDate", "lines" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "footer": { "type": [ "string", "null" ] }, "signature": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "image": { "type": "string" } }, "required": [ "by", "at", "image" ], "additionalProperties": false }, { "type": "null" } ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt", "lines", "vat", "notes", "footer", "signature", "pictureIds" ], "additionalProperties": false }Send a draft quote: it gets the next number and cannot change anymore
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "footer": { "type": [ "string", "null" ] }, "signature": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "image": { "type": "string" } }, "required": [ "by", "at", "image" ], "additionalProperties": false }, { "type": "null" } ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt", "lines", "vat", "notes", "footer", "signature", "pictureIds" ], "additionalProperties": false }Record that the customer accepted a quote
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "footer": { "type": [ "string", "null" ] }, "signature": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "image": { "type": "string" } }, "required": [ "by", "at", "image" ], "additionalProperties": false }, { "type": "null" } ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt", "lines", "vat", "notes", "footer", "signature", "pictureIds" ], "additionalProperties": false }Record that the customer declined a quote
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "footer": { "type": [ "string", "null" ] }, "signature": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "image": { "type": "string" } }, "required": [ "by", "at", "image" ], "additionalProperties": false }, { "type": "null" } ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt", "lines", "vat", "notes", "footer", "signature", "pictureIds" ], "additionalProperties": false }The customer signs a sent quote on the spot (on this phone): it is accepted
Request body
{ "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "signature": { "type": "string", "maxLength": 400000, "pattern": "^data:image\\/png;base64,[A-Za-z0-9+/]+=*$" } }, "required": [ "name", "signature" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "footer": { "type": [ "string", "null" ] }, "signature": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "image": { "type": "string" } }, "required": [ "by", "at", "image" ], "additionalProperties": false }, { "type": "null" } ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt", "lines", "vat", "notes", "footer", "signature", "pictureIds" ], "additionalProperties": false }Convert a sent quote into a draft invoice, with the same lines (accepting it)
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "sent", "accepted", "declined" ] }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "validUntil": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "invoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "signUrl": { "type": [ "string", "null" ] }, "signed": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "by", "at" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "footer": { "type": [ "string", "null" ] }, "signature": { "anyOf": [ { "type": "object", "properties": { "by": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "image": { "type": "string" } }, "required": [ "by", "at", "image" ], "additionalProperties": false }, { "type": "null" } ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "id", "number", "status", "contactId", "contact", "issueDate", "validUntil", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "invoiceId", "signUrl", "signed", "createdAt", "lines", "vat", "notes", "footer", "signature", "pictureIds" ], "additionalProperties": false }Delete a draft quote
Answers
204 No Content.
Invoices
List invoices, most recent first (by status, contact, text; paginated)
Query parameters
{ "type": "object", "properties": { "page": { "default": 1, "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "default": 25, "type": "integer", "minimum": 1, "maximum": 100 }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "string" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "search": { "type": "string", "maxLength": 100 } } }Response · 200
{ "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "items", "total", "page", "pageSize" ], "additionalProperties": false }What customers owe (and how much is overdue), and what was paid this month
Response · 200
{ "type": "object", "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "receivableCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "overdueReceivableCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "overdueReceivableCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "paidThisMonthCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "draftCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "currency", "receivableCents", "overdueReceivableCents", "overdueReceivableCount", "paidThisMonthCents", "draftCount" ], "additionalProperties": false }Get an invoice with its lines and VAT breakdown
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "creditedInvoiceNumber": { "type": [ "string", "null" ] }, "creditNotes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "number", "status", "totalCents" ], "additionalProperties": false } } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt", "lines", "vat", "notes", "pictureIds", "creditedInvoiceNumber", "creditNotes" ], "additionalProperties": false }Create an invoice (as a draft)
Request body
{ "type": "object", "properties": { "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "notes": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ] }, "lines": { "minItems": 1, "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate" ] } } }, "required": [ "contactId", "issueDate", "lines" ] }Response · 201
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "creditedInvoiceNumber": { "type": [ "string", "null" ] }, "creditNotes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "number", "status", "totalCents" ], "additionalProperties": false } } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt", "lines", "vat", "notes", "pictureIds", "creditedInvoiceNumber", "creditNotes" ], "additionalProperties": false }Update a draft invoice
Request body
{ "type": "object", "properties": { "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "notes": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ] }, "lines": { "minItems": 1, "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate" ] } } }, "required": [ "contactId", "issueDate", "lines" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "creditedInvoiceNumber": { "type": [ "string", "null" ] }, "creditNotes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "number", "status", "totalCents" ], "additionalProperties": false } } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt", "lines", "vat", "notes", "pictureIds", "creditedInvoiceNumber", "creditNotes" ], "additionalProperties": false }An issued invoice or credit note as a UBL e-invoice (Peppol BIS Billing 3.0), for accounting software and e-invoicing networks
Response · 200
{ "type": "object", "properties": { "filename": { "type": "string" }, "content": { "type": "string" } }, "required": [ "filename", "content" ], "additionalProperties": false }Issue a draft invoice: it gets the next number and cannot change anymore
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "creditedInvoiceNumber": { "type": [ "string", "null" ] }, "creditNotes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "number", "status", "totalCents" ], "additionalProperties": false } } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt", "lines", "vat", "notes", "pictureIds", "creditedInvoiceNumber", "creditNotes" ], "additionalProperties": false }Mark an issued invoice as paid (a credit note as settled: refunded)
Request body
{ "type": "object", "properties": { "paidOn": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" } }, "required": [ "paidOn" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "creditedInvoiceNumber": { "type": [ "string", "null" ] }, "creditNotes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "number", "status", "totalCents" ], "additionalProperties": false } } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt", "lines", "vat", "notes", "pictureIds", "creditedInvoiceNumber", "creditNotes" ], "additionalProperties": false }Mark a paid invoice as not paid (a payment recorded by mistake)
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "creditedInvoiceNumber": { "type": [ "string", "null" ] }, "creditNotes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "number", "status", "totalCents" ], "additionalProperties": false } } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt", "lines", "vat", "notes", "pictureIds", "creditedInvoiceNumber", "creditNotes" ], "additionalProperties": false }Write a draft credit note for an issued invoice, with its lines (to take back all or part of it)
Response · 201
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "creditedInvoiceNumber": { "type": [ "string", "null" ] }, "creditNotes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "number", "status", "totalCents" ], "additionalProperties": false } } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt", "lines", "vat", "notes", "pictureIds", "creditedInvoiceNumber", "creditNotes" ], "additionalProperties": false }Cancel an issued invoice (it keeps its number)
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "invoice", "credit_note" ] }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "overdue": { "type": "boolean" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "issueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "dueDate": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "paidOn": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ] }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "taxName": { "type": [ "string", "null" ] }, "subtotalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "creditedInvoiceId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 500 }, "quantity": { "type": "number", "minimum": 0, "maximum": 1000000 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 }, "netCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "description", "quantity", "unitPriceCents", "vatRate", "netCents" ], "additionalProperties": false } }, "vat": { "type": "array", "items": { "type": "object", "properties": { "rate": { "type": "number" }, "baseCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "rate", "baseCents", "vatCents" ], "additionalProperties": false } }, "notes": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "creditedInvoiceNumber": { "type": [ "string", "null" ] }, "creditNotes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "cancelled" ] }, "totalCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "number", "status", "totalCents" ], "additionalProperties": false } } }, "required": [ "id", "kind", "number", "status", "overdue", "contactId", "contact", "issueDate", "dueDate", "paidOn", "currency", "taxName", "subtotalCents", "vatCents", "totalCents", "creditedInvoiceId", "createdAt", "lines", "vat", "notes", "pictureIds", "creditedInvoiceNumber", "creditNotes" ], "additionalProperties": false }Delete a draft invoice
Answers
204 No Content.
Receipts
List receipts, most recent first (of a provider, by text; paginated)
Query parameters
{ "type": "object", "properties": { "page": { "default": 1, "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "default": 25, "type": "integer", "minimum": 1, "maximum": 100 }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "search": { "type": "string", "maxLength": 100 } } }Response · 200
{ "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": "string" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "date": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "amountCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "method": { "anyOf": [ { "type": "string", "enum": [ "cash", "card", "transfer", "cheque", "other" ] }, { "type": "null" } ] }, "description": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "number", "contactId", "contact", "date", "amountCents", "currency", "method", "description", "pictureIds", "createdAt" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "items", "total", "page", "pageSize" ], "additionalProperties": false }Get a receipt
Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": "string" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "date": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "amountCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "method": { "anyOf": [ { "type": "string", "enum": [ "cash", "card", "transfer", "cheque", "other" ] }, { "type": "null" } ] }, "description": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "number", "contactId", "contact", "date", "amountCents", "currency", "method", "description", "pictureIds", "createdAt" ], "additionalProperties": false }Keep a receipt of what was paid to a provider (numbered at once)
Request body
{ "type": "object", "properties": { "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "amountCents": { "type": "integer", "minimum": 1, "maximum": 100000000000 }, "description": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ] } }, "required": [ "contactId", "amountCents" ] }Response · 201
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": "string" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "date": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "amountCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "method": { "anyOf": [ { "type": "string", "enum": [ "cash", "card", "transfer", "cheque", "other" ] }, { "type": "null" } ] }, "description": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "number", "contactId", "contact", "date", "amountCents", "currency", "method", "description", "pictureIds", "createdAt" ], "additionalProperties": false }Correct a receipt (it keeps its number)
Request body
{ "type": "object", "properties": { "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "amountCents": { "type": "integer", "minimum": 1, "maximum": 100000000000 }, "description": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ] } }, "required": [ "contactId", "amountCents" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "number": { "type": "string" }, "contactId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "contact": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "companyName": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "companyName", "phone" ], "additionalProperties": false }, "date": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "amountCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "method": { "anyOf": [ { "type": "string", "enum": [ "cash", "card", "transfer", "cheque", "other" ] }, { "type": "null" } ] }, "description": { "type": [ "string", "null" ] }, "pictureIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "number", "contactId", "contact", "date", "amountCents", "currency", "method", "description", "pictureIds", "createdAt" ], "additionalProperties": false }Delete a receipt kept by mistake (its number is never given again)
Answers
204 No Content.
Catalog
Search the products and services of the catalog, by name (paginated)
Query parameters
{ "type": "object", "properties": { "page": { "default": 1, "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "default": 25, "type": "integer", "minimum": 1, "maximum": 100 }, "search": { "type": "string", "maxLength": 100 }, "kind": { "type": "string", "enum": [ "service", "product" ] } } }Response · 200
{ "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "service", "product" ] }, "name": { "type": "string" }, "unitPriceCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatRate": { "type": "number" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "kind", "name", "unitPriceCents", "vatRate", "createdAt", "updatedAt" ], "additionalProperties": false } }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageSize": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "items", "total", "page", "pageSize" ], "additionalProperties": false }Add a product or a service to the catalog
Request body
{ "type": "object", "properties": { "kind": { "type": "string", "enum": [ "service", "product" ] }, "name": { "type": "string", "minLength": 1, "maxLength": 500 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 } }, "required": [ "kind", "name", "unitPriceCents", "vatRate" ] }Response · 201
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "service", "product" ] }, "name": { "type": "string" }, "unitPriceCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatRate": { "type": "number" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "kind", "name", "unitPriceCents", "vatRate", "createdAt", "updatedAt" ], "additionalProperties": false }Update a product or a service (quotes and invoices keep their own copy)
Request body
{ "type": "object", "properties": { "kind": { "type": "string", "enum": [ "service", "product" ] }, "name": { "type": "string", "minLength": 1, "maxLength": 500 }, "unitPriceCents": { "type": "integer", "minimum": -100000000000, "maximum": 100000000000 }, "vatRate": { "type": "number", "minimum": 0, "maximum": 100 } }, "required": [ "kind", "name", "unitPriceCents", "vatRate" ] }Response · 200
{ "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "service", "product" ] }, "name": { "type": "string" }, "unitPriceCents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "vatRate": { "type": "number" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", "kind", "name", "unitPriceCents", "vatRate", "createdAt", "updatedAt" ], "additionalProperties": false }Remove a product or a service from the catalog (quotes and invoices keep their lines)
Answers
204 No Content.