# Billing

All invoices endpoints

## GET /v3/account/invoice

> Get details of all invoices of a user

```json
{"openapi":"3.0.1","info":{"title":"i3D.net Endpoints","version":"3.0.0"},"tags":[{"name":"Billing","description":"All invoices endpoints"}],"servers":[{"url":"https://api.i3d.net"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"PRIVATE-TOKEN","in":"header"}},"schemas":{"Invoice":{"type":"object","required":["id","creationDate","dueDate","invoiceNumber","invoiceHash","description","currency","currencySign","amountIncVAT","amountExclVAT","paymentStatus","paymentDate","isCredit","remainingAmount","totalPaidAmount"],"properties":{"id":{"type":"string","format":"","description":"The ID of the invoice","readOnly":true},"creationDate":{"type":"integer","format":"integer","description":"The date the invoice was created","readOnly":true},"dueDate":{"type":"integer","format":"integer","description":"The due date of the invoice","readOnly":true},"invoiceNumber":{"type":"string","format":"","description":"The number of the invoice","readOnly":true},"invoiceHash":{"type":"string","format":"","description":"A unique hash for this invoice","readOnly":true},"description":{"type":"string","format":"","description":"The description of the invoice"},"currency":{"type":"string","format":"","description":"The currency that is being used"},"currencySign":{"type":"string","format":"","description":"The currency sign that is being used"},"amountIncVAT":{"type":"string","format":"","description":"The amount of the invoice with VAT in cents"},"amountExclVAT":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents"},"paymentStatus":{"type":"integer","format":"integer","description":"The payment status"},"paymentDate":{"type":"integer","format":"integer","description":"The timestamp that the invoice was paid, if paid"},"isCredit":{"type":"integer","format":"integer","description":"If this field is 1 it means that invoice is a credit invoice"},"remainingAmount":{"type":"string","format":"","description":"The remaining amount of invoice"},"totalPaidAmount":{"type":"string","format":"","description":"The total paid amount of invoice"}},"additionalProperties":false},"Error":{"type":"object","required":["errorCode","errorMessage","errors"],"properties":{"errorCode":{"type":"integer","format":"integer","description":"Error code"},"errorMessage":{"type":"string","format":"","description":"Error message"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"description":"Error details"}},"additionalProperties":false},"ErrorDetails":{"type":"object","required":["property","message"],"properties":{"property":{"type":"string","format":"","description":"Property in which there is an error"},"message":{"type":"string","format":"","description":"Error message"}},"additionalProperties":false}}},"paths":{"/v3/account/invoice":{"get":{"tags":["Billing"],"summary":"Get details of all invoices of a user","operationId":"getAccountInvoices","parameters":[{"name":"RANGED-DATA","in":"header","description":"Example header and default range: RANGED-DATA:start=0,results=25","schema":{"type":"string"}},{"name":"filter","in":"query","description":"The filter to search for the description<br />\nThe filter parameter can be used to apply a more specific search, the only element that can be filtered is 'description'.<br />\nThe filter will be done on a part of the provided description (it should contain the searched element).<br />\nE.g. we need to filter for a string \"this is an example\"<br />\nRemember to urlencode the provided filter<br />\nThe final call would look like:<br />\n/billing/invoice?filter=this%20is%20an%20example","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}},"403":{"description":"Invalid credentials"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /v3/account/invoice/unpaid

> Get details of all unpaid invoices for a user (excluding credit invoices)

```json
{"openapi":"3.0.1","info":{"title":"i3D.net Endpoints","version":"3.0.0"},"tags":[{"name":"Billing","description":"All invoices endpoints"}],"servers":[{"url":"https://api.i3d.net"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"PRIVATE-TOKEN","in":"header"}},"schemas":{"Invoice":{"type":"object","required":["id","creationDate","dueDate","invoiceNumber","invoiceHash","description","currency","currencySign","amountIncVAT","amountExclVAT","paymentStatus","paymentDate","isCredit","remainingAmount","totalPaidAmount"],"properties":{"id":{"type":"string","format":"","description":"The ID of the invoice","readOnly":true},"creationDate":{"type":"integer","format":"integer","description":"The date the invoice was created","readOnly":true},"dueDate":{"type":"integer","format":"integer","description":"The due date of the invoice","readOnly":true},"invoiceNumber":{"type":"string","format":"","description":"The number of the invoice","readOnly":true},"invoiceHash":{"type":"string","format":"","description":"A unique hash for this invoice","readOnly":true},"description":{"type":"string","format":"","description":"The description of the invoice"},"currency":{"type":"string","format":"","description":"The currency that is being used"},"currencySign":{"type":"string","format":"","description":"The currency sign that is being used"},"amountIncVAT":{"type":"string","format":"","description":"The amount of the invoice with VAT in cents"},"amountExclVAT":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents"},"paymentStatus":{"type":"integer","format":"integer","description":"The payment status"},"paymentDate":{"type":"integer","format":"integer","description":"The timestamp that the invoice was paid, if paid"},"isCredit":{"type":"integer","format":"integer","description":"If this field is 1 it means that invoice is a credit invoice"},"remainingAmount":{"type":"string","format":"","description":"The remaining amount of invoice"},"totalPaidAmount":{"type":"string","format":"","description":"The total paid amount of invoice"}},"additionalProperties":false},"Error":{"type":"object","required":["errorCode","errorMessage","errors"],"properties":{"errorCode":{"type":"integer","format":"integer","description":"Error code"},"errorMessage":{"type":"string","format":"","description":"Error message"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"description":"Error details"}},"additionalProperties":false},"ErrorDetails":{"type":"object","required":["property","message"],"properties":{"property":{"type":"string","format":"","description":"Property in which there is an error"},"message":{"type":"string","format":"","description":"Error message"}},"additionalProperties":false}}},"paths":{"/v3/account/invoice/unpaid":{"get":{"tags":["Billing"],"summary":"Get details of all unpaid invoices for a user (excluding credit invoices)","operationId":"getAccountInvoiceUnpaids","parameters":[{"name":"RANGED-DATA","in":"header","description":"Example header and default range: RANGED-DATA:start=0,results=25","schema":{"type":"string"}},{"name":"filter","in":"query","description":"The filter to search for the description<br />\nThe filter parameter can be used to apply a more specific search, the only element that can be filtered is 'description'.<br />\nThe filter will be done on a part of the provided description (it should contain the searched element).<br />\nE.g. we need to filter for a string \"this is an example\"<br />\nRemember to urlencode the provided filter<br />\nThe final call would look like:<br />\n/billing/invoice?filter=this%20is%20an%20example","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}},"403":{"description":"Invalid credentials"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /v3/account/invoice/{invoiceId}

> Get invoice details by invoice ID

```json
{"openapi":"3.0.1","info":{"title":"i3D.net Endpoints","version":"3.0.0"},"tags":[{"name":"Billing","description":"All invoices endpoints"}],"servers":[{"url":"https://api.i3d.net"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"PRIVATE-TOKEN","in":"header"}},"schemas":{"InvoiceDetails":{"type":"object","required":["id","invoiceNumber","invoiceHash","clientNumber","creationDate","dueDate","paymentStatus","paymentDate","isCredit","paymentTerm","currency","currencySign","vatPercentage","vatAmount","amountIncVat","amountExclVat","items","clientDetails","companyDetails"],"properties":{"id":{"type":"integer","format":"integer","description":"The ID of the invoice","readOnly":true},"invoiceNumber":{"type":"string","format":"","description":"Invoice number","readOnly":true},"invoiceHash":{"type":"string","format":"","description":"A unique hash for this invoice","readOnly":true},"clientNumber":{"type":"string","format":"","description":"Client number","readOnly":true},"creationDate":{"type":"string","format":"","description":"The date the invoice was created","readOnly":true},"dueDate":{"type":"string","format":"","description":"The due date of the invoice","readOnly":true},"paymentStatus":{"type":"integer","format":"integer","description":"Whether or not the invoice was paid","readOnly":true},"paymentDate":{"type":"integer","format":"integer","description":"The timestamp that the invoice was paid, if paid"},"isCredit":{"type":"integer","format":"integer","description":"If this field is 1 it means that invoice is a credit invoice"},"paymentTerm":{"type":"integer","format":"integer","description":"The invoice must be paid in the given amount of time (days)","readOnly":true},"currency":{"type":"string","format":"","description":"The name of the currency that is being used","readOnly":true},"currencySign":{"type":"string","format":"","description":"The sign of the currency that is being used","readOnly":true},"vatPercentage":{"type":"integer","format":"integer","description":"Percentage of VAT applied","readOnly":true},"vatAmount":{"type":"string","format":"","description":"Amount of VAT to pay in cents","readOnly":true},"amountIncVat":{"type":"string","format":"","description":"The amount of the invoice with VAT included in cents","readOnly":true},"amountExclVat":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents","readOnly":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"description":"Invoice items","readOnly":true},"clientDetails":{"allOf":[{"$ref":"#/components/schemas/InvoiceClientDetails"}],"description":"Client details","readOnly":true},"companyDetails":{"allOf":[{"$ref":"#/components/schemas/InvoiceCompanyDetails"}],"description":"Company details","readOnly":true}},"additionalProperties":false},"InvoiceItem":{"type":"object","required":["orderId","description","periodFrom","periodTo","remarks","quantity","setupCosts","unitPrice","vatPercentage","vatAmount","amountIncVat","amountExclVat"],"properties":{"orderId":{"type":"string","format":"","description":"Purchase order ID of the item","readOnly":true},"description":{"type":"string","format":"","description":"Invoice item description","readOnly":true},"periodFrom":{"type":"string","format":"","description":"Invoiced period start for the item","readOnly":true},"periodTo":{"type":"string","format":"","description":"Invoiced period end for the item","readOnly":true},"remarks":{"type":"string","format":"","description":"Invoice item remarks","readOnly":true},"quantity":{"type":"integer","format":"integer","description":"Invoice item quantity","readOnly":true},"setupCosts":{"type":"string","format":"","description":"Invoice item setup costs in cents","readOnly":true},"unitPrice":{"type":"string","format":"","description":"Price of one unit of invoice item in cents","readOnly":true},"vatPercentage":{"type":"integer","format":"integer","description":"Percentage of VAT applied","readOnly":true},"vatAmount":{"type":"string","format":"","description":"Amount of VAT to pay in cents","readOnly":true},"amountIncVat":{"type":"string","format":"","description":"The amount of the invoice with VAT included in cents","readOnly":true},"amountExclVat":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents","readOnly":true}},"additionalProperties":false},"InvoiceClientDetails":{"type":"object","required":["fullName","companyName","email","address","zip","city","country","vatNumber","iban","bic"],"properties":{"fullName":{"type":"string","format":"","description":"Full name of the client","readOnly":true},"companyName":{"type":"string","format":"","description":"Name of the company of the client","readOnly":true},"email":{"type":"string","format":"","description":"Client email","readOnly":true},"address":{"type":"string","format":"","description":"Client address","readOnly":true},"zip":{"type":"string","format":"","description":"Client address ZIP code","readOnly":true},"city":{"type":"string","format":"","description":"Client address city","readOnly":true},"country":{"type":"string","format":"","description":"Client address country","readOnly":true},"vatNumber":{"type":"string","format":"","description":"Client VAT number","readOnly":true},"iban":{"type":"string","format":"","description":"Client bank account IBAN number","readOnly":true},"bic":{"type":"string","format":"","description":"Client bank account BIC number","readOnly":true}},"additionalProperties":false},"InvoiceCompanyDetails":{"type":"object","required":["name","address","zip","city","country","phone","email","url","iban","bic"],"properties":{"name":{"type":"string","format":"","description":"Company name","readOnly":true},"address":{"type":"string","format":"","description":"Company address","readOnly":true},"zip":{"type":"string","format":"","description":"Company ZIP code","readOnly":true},"city":{"type":"string","format":"","description":"Company address city","readOnly":true},"country":{"type":"string","format":"","description":"Company country","readOnly":true},"phone":{"type":"string","format":"","description":"Company phone","readOnly":true},"email":{"type":"string","format":"","description":"Company phone email address","readOnly":true},"url":{"type":"string","format":"","description":"Company website URL","readOnly":true},"iban":{"type":"string","format":"","description":"Company bank account IBAN number","readOnly":true},"bic":{"type":"string","format":"","description":"Company bank account BIC number","readOnly":true}},"additionalProperties":false},"Error":{"type":"object","required":["errorCode","errorMessage","errors"],"properties":{"errorCode":{"type":"integer","format":"integer","description":"Error code"},"errorMessage":{"type":"string","format":"","description":"Error message"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"description":"Error details"}},"additionalProperties":false},"ErrorDetails":{"type":"object","required":["property","message"],"properties":{"property":{"type":"string","format":"","description":"Property in which there is an error"},"message":{"type":"string","format":"","description":"Error message"}},"additionalProperties":false}}},"paths":{"/v3/account/invoice/{invoiceId}":{"get":{"tags":["Billing"],"summary":"Get invoice details by invoice ID","operationId":"getAccountInvoice","parameters":[{"name":"invoiceId","in":"path","description":"ID of the invoice to fetch details about","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDetails"}}}}},"403":{"description":"Invalid credentials"},"404":{"description":"Invalid invoice ID"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /v3/account/invoice/number/{invoiceNumber}

> Get invoice details by invoice number

```json
{"openapi":"3.0.1","info":{"title":"i3D.net Endpoints","version":"3.0.0"},"tags":[{"name":"Billing","description":"All invoices endpoints"}],"servers":[{"url":"https://api.i3d.net"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"PRIVATE-TOKEN","in":"header"}},"schemas":{"InvoiceDetails":{"type":"object","required":["id","invoiceNumber","invoiceHash","clientNumber","creationDate","dueDate","paymentStatus","paymentDate","isCredit","paymentTerm","currency","currencySign","vatPercentage","vatAmount","amountIncVat","amountExclVat","items","clientDetails","companyDetails"],"properties":{"id":{"type":"integer","format":"integer","description":"The ID of the invoice","readOnly":true},"invoiceNumber":{"type":"string","format":"","description":"Invoice number","readOnly":true},"invoiceHash":{"type":"string","format":"","description":"A unique hash for this invoice","readOnly":true},"clientNumber":{"type":"string","format":"","description":"Client number","readOnly":true},"creationDate":{"type":"string","format":"","description":"The date the invoice was created","readOnly":true},"dueDate":{"type":"string","format":"","description":"The due date of the invoice","readOnly":true},"paymentStatus":{"type":"integer","format":"integer","description":"Whether or not the invoice was paid","readOnly":true},"paymentDate":{"type":"integer","format":"integer","description":"The timestamp that the invoice was paid, if paid"},"isCredit":{"type":"integer","format":"integer","description":"If this field is 1 it means that invoice is a credit invoice"},"paymentTerm":{"type":"integer","format":"integer","description":"The invoice must be paid in the given amount of time (days)","readOnly":true},"currency":{"type":"string","format":"","description":"The name of the currency that is being used","readOnly":true},"currencySign":{"type":"string","format":"","description":"The sign of the currency that is being used","readOnly":true},"vatPercentage":{"type":"integer","format":"integer","description":"Percentage of VAT applied","readOnly":true},"vatAmount":{"type":"string","format":"","description":"Amount of VAT to pay in cents","readOnly":true},"amountIncVat":{"type":"string","format":"","description":"The amount of the invoice with VAT included in cents","readOnly":true},"amountExclVat":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents","readOnly":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"description":"Invoice items","readOnly":true},"clientDetails":{"allOf":[{"$ref":"#/components/schemas/InvoiceClientDetails"}],"description":"Client details","readOnly":true},"companyDetails":{"allOf":[{"$ref":"#/components/schemas/InvoiceCompanyDetails"}],"description":"Company details","readOnly":true}},"additionalProperties":false},"InvoiceItem":{"type":"object","required":["orderId","description","periodFrom","periodTo","remarks","quantity","setupCosts","unitPrice","vatPercentage","vatAmount","amountIncVat","amountExclVat"],"properties":{"orderId":{"type":"string","format":"","description":"Purchase order ID of the item","readOnly":true},"description":{"type":"string","format":"","description":"Invoice item description","readOnly":true},"periodFrom":{"type":"string","format":"","description":"Invoiced period start for the item","readOnly":true},"periodTo":{"type":"string","format":"","description":"Invoiced period end for the item","readOnly":true},"remarks":{"type":"string","format":"","description":"Invoice item remarks","readOnly":true},"quantity":{"type":"integer","format":"integer","description":"Invoice item quantity","readOnly":true},"setupCosts":{"type":"string","format":"","description":"Invoice item setup costs in cents","readOnly":true},"unitPrice":{"type":"string","format":"","description":"Price of one unit of invoice item in cents","readOnly":true},"vatPercentage":{"type":"integer","format":"integer","description":"Percentage of VAT applied","readOnly":true},"vatAmount":{"type":"string","format":"","description":"Amount of VAT to pay in cents","readOnly":true},"amountIncVat":{"type":"string","format":"","description":"The amount of the invoice with VAT included in cents","readOnly":true},"amountExclVat":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents","readOnly":true}},"additionalProperties":false},"InvoiceClientDetails":{"type":"object","required":["fullName","companyName","email","address","zip","city","country","vatNumber","iban","bic"],"properties":{"fullName":{"type":"string","format":"","description":"Full name of the client","readOnly":true},"companyName":{"type":"string","format":"","description":"Name of the company of the client","readOnly":true},"email":{"type":"string","format":"","description":"Client email","readOnly":true},"address":{"type":"string","format":"","description":"Client address","readOnly":true},"zip":{"type":"string","format":"","description":"Client address ZIP code","readOnly":true},"city":{"type":"string","format":"","description":"Client address city","readOnly":true},"country":{"type":"string","format":"","description":"Client address country","readOnly":true},"vatNumber":{"type":"string","format":"","description":"Client VAT number","readOnly":true},"iban":{"type":"string","format":"","description":"Client bank account IBAN number","readOnly":true},"bic":{"type":"string","format":"","description":"Client bank account BIC number","readOnly":true}},"additionalProperties":false},"InvoiceCompanyDetails":{"type":"object","required":["name","address","zip","city","country","phone","email","url","iban","bic"],"properties":{"name":{"type":"string","format":"","description":"Company name","readOnly":true},"address":{"type":"string","format":"","description":"Company address","readOnly":true},"zip":{"type":"string","format":"","description":"Company ZIP code","readOnly":true},"city":{"type":"string","format":"","description":"Company address city","readOnly":true},"country":{"type":"string","format":"","description":"Company country","readOnly":true},"phone":{"type":"string","format":"","description":"Company phone","readOnly":true},"email":{"type":"string","format":"","description":"Company phone email address","readOnly":true},"url":{"type":"string","format":"","description":"Company website URL","readOnly":true},"iban":{"type":"string","format":"","description":"Company bank account IBAN number","readOnly":true},"bic":{"type":"string","format":"","description":"Company bank account BIC number","readOnly":true}},"additionalProperties":false},"Error":{"type":"object","required":["errorCode","errorMessage","errors"],"properties":{"errorCode":{"type":"integer","format":"integer","description":"Error code"},"errorMessage":{"type":"string","format":"","description":"Error message"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"description":"Error details"}},"additionalProperties":false},"ErrorDetails":{"type":"object","required":["property","message"],"properties":{"property":{"type":"string","format":"","description":"Property in which there is an error"},"message":{"type":"string","format":"","description":"Error message"}},"additionalProperties":false}}},"paths":{"/v3/account/invoice/number/{invoiceNumber}":{"get":{"tags":["Billing"],"summary":"Get invoice details by invoice number","operationId":"getAccountInvoiceNumber","parameters":[{"name":"invoiceNumber","in":"path","description":"Number of the invoice to fetch details about","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDetails"}}}}},"403":{"description":"Invalid credentials"},"404":{"description":"Invalid invoice number"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /v3/account/invoice/{invoiceId}/pdf

> Get invoice as PDF

```json
{"openapi":"3.0.1","info":{"title":"i3D.net Endpoints","version":"3.0.0"},"tags":[{"name":"Billing","description":"All invoices endpoints"}],"servers":[{"url":"https://api.i3d.net"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"PRIVATE-TOKEN","in":"header"}},"schemas":{"Error":{"type":"object","required":["errorCode","errorMessage","errors"],"properties":{"errorCode":{"type":"integer","format":"integer","description":"Error code"},"errorMessage":{"type":"string","format":"","description":"Error message"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"description":"Error details"}},"additionalProperties":false},"ErrorDetails":{"type":"object","required":["property","message"],"properties":{"property":{"type":"string","format":"","description":"Property in which there is an error"},"message":{"type":"string","format":"","description":"Error message"}},"additionalProperties":false}}},"paths":{"/v3/account/invoice/{invoiceId}/pdf":{"get":{"tags":["Billing"],"summary":"Get invoice as PDF","operationId":"getAccountInvoicePdfs","parameters":[{"name":"invoiceId","in":"path","description":"ID of the invoice to fetch details about","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Invalid credentials"},"404":{"description":"Invalid invoice ID"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.i3d.net/api-references/general/billing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
