{"components":{"schemas":{"Buyer":{"additionalProperties":false,"properties":{"address":{"description":"Required for a Peppol invoice.","type":"string"},"city":{"description":"Required for a Peppol invoice.","type":"string"},"country":{"type":"string"},"email":{"description":"Required when channel is pdf. The invoice is emailed to this address.","type":"string"},"legalEntityId":{"type":"string"},"name":{"type":"string"},"peppolId":{"description":"Required for a Peppol invoice. Four digits, a colon, then the identifier.","type":"string"},"postalCode":{"description":"Required for a Peppol invoice.","type":"string"},"registryCode":{"type":"string"},"vatNumber":{"type":"string"}},"required":["name","country"],"type":"object"},"InvoiceRequest":{"additionalProperties":false,"properties":{"bankId":{"description":"One saved company bank. Omit it to use the first saved account.","type":"integer"},"budgetType":{"type":"string"},"buyer":{"$ref":"#/components/schemas/Buyer"},"buyerReference":{"type":"string"},"caCode":{"type":"string"},"channel":{"description":"pdf emails the invoice to buyer.email. pdf_email is accepted as the same channel.","enum":["peppol","earve","pdf"],"type":"string"},"contractReference":{"type":"string"},"currency":{"type":"string"},"dueDate":{"type":"string"},"greekPublicSector":{"type":"boolean"},"issueDate":{"description":"YYYY-MM-DD","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/Line"},"maxItems":200,"type":"array"},"notes":{"type":"string"},"number":{"type":"string"},"paymentReference":{"type":"string"},"projectReference":{"type":"string"},"purchaseOrder":{"type":"string"}},"required":["channel","number","issueDate","dueDate","buyer","lines"],"type":"object"},"Line":{"additionalProperties":false,"properties":{"cpv":{"description":"Required on every line of a Greek public-sector invoice.","type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"taxRate":{"type":"number"},"unit":{"description":"Required for an Estonian e-invoice.","type":"string"},"unitPrice":{"type":"number"},"vatTreatment":{"enum":["zero_rated","exempt","not_taxable"],"type":"string"}},"required":["description","quantity","unitPrice"],"type":"object"}},"securitySchemes":{"bearer":{"scheme":"bearer","type":"http"}}},"externalDocs":{"description":"Guide and examples","url":"https://invoicier.com/en/api"},"info":{"contact":{"email":"support@invoicier.com","name":"Invoicier support","url":"https://invoicier.com/en/api"},"description":"One company, one key. Read invoices, purchases, partners, the stored PDF, and the original extra files that arrived with a purchase. Send a Peppol invoice, an Estonian e-invoice, or a PDF invoice by email with POST /api/v1/invoices. Invoicier builds the legal document and an invoice PDF from the posted fields. The key is a bearer token, shown once, and exists only after the company account is validated. Send Idempotency-Key on every send. The same key and body return the stored result for 24 hours. A different body with that key returns 409. A full plan returns transaction_limit and does not send. Locked purchases omit the number, due date, currency, total, and lines, and their PDF and extra files return invoice_locked.","termsOfService":"https://invoicier.com/terms","title":"Invoicier API","version":"2.2.0"},"openapi":"3.0.3","paths":{"/api/v1/invoices":{"get":{"operationId":"listInvoices","summary":"List sales invoices"},"post":{"operationId":"sendInvoice","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}},"required":true},"responses":{"200":{"description":"The invoice was sent. The body is the public invoice."},"202":{"description":"earve_uncertain means the e-invoice may already exist. Do not send it again."},"400":{"description":"The invoice was refused before it was sent."},"403":{"description":"The plan limit or an Estonian gate refused the send."},"409":{"description":"The idempotency key is in progress or was reused for a different body."},"500":{"description":"send_uncertain means the Peppol invoice may already exist. Do not send it again."}},"summary":"Send a Peppol invoice, an Estonian e-invoice, or a PDF invoice by email"}},"/api/v1/invoices/{id}":{"get":{"operationId":"getInvoice","summary":"Get one sales invoice"}},"/api/v1/invoices/{id}/pdf":{"get":{"operationId":"getInvoicePdf","summary":"Download the stored sales PDF"}},"/api/v1/partners":{"get":{"operationId":"listPartners","summary":"List partners"}},"/api/v1/partners/{id}":{"get":{"operationId":"getPartner","summary":"Get one partner"}},"/api/v1/purchases":{"get":{"operationId":"listPurchases","summary":"List purchase invoices"}},"/api/v1/purchases/{id}":{"get":{"operationId":"getPurchase","summary":"Get one purchase invoice, including original extra-file names"}},"/api/v1/purchases/{id}/attachments/{attachmentId}":{"get":{"operationId":"getPurchaseAttachment","summary":"Download one original extra file. Peppol files are fetched from the stored link. The Estonian file id is xml."}},"/api/v1/purchases/{id}/pdf":{"get":{"operationId":"getPurchasePdf","summary":"Download the stored purchase PDF"}}},"security":[{"bearer":[]}],"servers":[{"url":"https://app.invoicier.com"}]}
