> For the complete documentation index, see [llms.txt](https://developer.dashdoc.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.dashdoc.com/docs/api-reference/invoices.md).

# Invoices

## GET /invoices/

> Beta: List all invoices

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Invoices"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"Invoices":{"properties":{"count":{"type":"integer"},"next":{"nullable":true,"type":"string"},"previous":{"nullable":true,"type":"string"},"results":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"}},"type":"object"},"Invoice":{"properties":{"uid":{"description":"uuid of this Invoice","format":"uuid","type":"string"},"created_by":{"$ref":"#/components/schemas/InvoiceCreatedBy"},"debtor":{"$ref":"#/components/schemas/InvoiceDebtor"},"description_template":{"description":"Ignore. Dashdoc technical data.","type":"object"},"document_number":{"description":"Invoice's number. It usually corresponds to the invoice's number defined in your invoicing tool.","type":"string"},"status":{"default":"draft","description":"Indicate the status of the invoice","enum":["draft","final","paid"],"type":"string"},"due_date":{"description":"Due date of the invoice","format":"date","nullable":true,"type":"string"},"line_groups":{"items":{"$ref":"#/components/schemas/InvoiceLineGroup"},"type":"array"},"lines":{"description":"List of lines of the invoice which do not correspond to a transport","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"created":{"$ref":"#/components/schemas/created"},"updated":{"description":"Last update on our server","format":"date-time","type":"string"},"period":{"$ref":"#/components/schemas/Invoice_period"},"transports_count":{"description":"Number of transports linked to this invoice","type":"integer"},"remote_id":{"description":"The id of the invoice in your system.","type":"string"},"invoicing_connector":{"description":"Ignore. Dashdoc technical data.","type":"object"},"file":{"description":"Invoice file path","format":"url","type":"string"},"invoicing_date":{"description":"Date of invoicing","format":"date","type":"string"},"finalized_at":{"description":"Date of invoice finalization.","format":"date-time","type":"string"},"debtor_reference":{"description":"Pre-billing reference","type":"string"},"buyer_reference":{"description":"Reference assigned by the buyer, carried as BT-10 on the electronic invoice","type":"string"},"project_reference":{"description":"Project reference, carried as BT-11 on the electronic invoice","type":"string"},"contract_reference":{"description":"Contract reference, carried as BT-12 on the electronic invoice","type":"string"},"purchase_order_reference":{"description":"Purchase order reference assigned by the customer, carried as BT-13 on the electronic invoice","type":"string"},"total_price":{"description":"Total price, excluding taxes","type":"string"},"total_tax_amount":{"description":"Total taxes amount","type":"string"}},"type":"object"},"InvoiceCreatedBy":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"PrimaryAddress_1":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string"},"country":{"$ref":"#/components/schemas/country"},"latitude":{"$ref":"#/components/schemas/latitude"},"longitude":{"$ref":"#/components/schemas/longitude"},"radius":{"default":500,"description":"Radius around the GPS coordinates within which the address is located (in meters)","type":"integer"},"coords_validated":{"default":false,"description":"if `true`, when this address is used as a loading or unloading site, the mobile app displays an itinerary button to start GPS app with guidance to these coordinates","type":"boolean"},"is_demo":{"$ref":"#/components/schemas/is_demo"},"is_carrier":{"description":"Whether this company is considered a carrier","type":"boolean"},"is_shipper":{"description":"Whether this company is considered a shipper","type":"boolean"},"is_origin":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"is_destination":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"created_by":{"$ref":"#/components/schemas/created-by"},"created_by_user":{"$ref":"#/components/schemas/created-by-user"},"created":{"$ref":"#/components/schemas/created"},"remote_id":{"description":"The id of the address in your system.","type":"string"}},"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"latitude":{"description":"Latitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"longitude":{"description":"Longitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"is_demo":{"description":"Indicates that the address is a fake one created from demonstration. Everything linked to it will be deleted when using the 'Delete demo content' button in company parameters","type":"boolean"},"created-by":{"nullable":true,"properties":{"pk":{"description":"company id","type":"number"},"name":{"description":"name of the company","type":"string"}},"type":"object"},"created-by-user":{"nullable":true,"properties":{"pk":{"type":"number"},"display_name":{"type":"string"},"company":{"description":"The company id who created the address","type":"number"},"trucker_id":{"description":"The trucker id who created the address","type":"number"}},"type":"object"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"InvoiceDebtor":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"invoicing_remote_id":{"description":"The id of the company in your invoicing system.","type":"string"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"InvoiceLineGroup":{"properties":{"transport":{"$ref":"#/components/schemas/InvoiceTransport"},"lines":{"description":"List of lines of the invoice for the transport associated with this line group.","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"description":{"description":"Description of the group of line of the invoice","type":"string"},"currency":{"type":"string"},"gas_index":{"nullable":true,"readOnly":true,"type":"string"},"gas_index_invoice_item":{"$ref":"#/components/schemas/InvoiceItem"}},"type":"object"},"InvoiceTransport":{"properties":{"uid":{"description":"uuid of the Transport","format":"uuid","type":"string"},"sequential_id":{"type":"number"},"deliveries":{"items":{"$ref":"#/components/schemas/InvoiceDelivery"},"type":"array"},"documents":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceDocument"},"type":"array"},"messages":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceMessage"},"type":"array"}},"type":"object"},"InvoiceDelivery":{"properties":{"uid":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"origin":{"$ref":"#/components/schemas/InvoiceSite"},"destination":{"$ref":"#/components/schemas/InvoiceSite"}},"type":"object"},"InvoiceSite":{"properties":{"uid":{"type":"string"},"company_name":{"type":"string"},"city":{"type":"string"}},"type":"object"},"InvoiceDocument":{"properties":{"delivery":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"file":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"category":{"description":"Type of document. Possible values are \"cmr\", \"cmr4\", \"ldv\", \"orc\", \"chc\", \"rental\" and \"loading_plan\"","type":"string"}},"type":"object"},"InvoiceMessage":{"properties":{"document":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"document_type":{"enum":["load_photo","cmr","washing_note","delivery_note","confirmation","weight_note","waste_manifest","holders_swap_note","invoice"],"maxLength":100,"type":"string"}},"type":"object"},"InvoiceLine":{"properties":{"description":{"description":"Description of the line of the invoice","type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"number"},"currency":{"type":"string"},"total_price_without_tax":{"type":"number"},"invoice_item":{"$ref":"#/components/schemas/InvoiceItem"},"is_gas_indexed":{"description":"Whether this invoice line is subject to gas indexation","nullable":true,"readOnly":true,"type":"boolean"}},"type":"object"},"InvoiceItem":{"properties":{"uid":{"format":"uuid","type":"string"},"remote_id":{"description":"The id of the invoice item in your system","type":"string"},"description":{"description":"Default description when a user selects this invoice item for an invoice line","type":"string"}},"type":"object"},"Invoice_period":{"description":"The interval between the date of first loading and last unloading among all the transports of the invoice.","properties":{"first_loading_at":{"description":"Date of first loading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"},"last_unloading_at":{"description":"Date of last unloading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"}},"type":"object"}}},"paths":{"/invoices/":{"get":{"operationId":"listInvoices","parameters":[{"description":"A page number within the paginated result set.","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Filter invoices finalized after or at a certain date","in":"query","name":"finalized_at__gte","required":false,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoices"}}},"description":"Get successful"}},"summary":"Beta: List all invoices","tags":["Invoices"]}}}}
````

## POST /invoices/

> Beta: Create a bare invoice

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Invoices"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"requestBodies":{"inline_object_2":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_object_2"}}},"required":true}},"schemas":{"inline_object_2":{"properties":{"customer_to_invoice_id":{"description":"Identifier of the invoiceable customer to invoice.","type":"integer"},"currency":{"description":"Currency of the created invoice. Defaults to EUR.","enum":["EUR","USD","GBP","PLN","HUF","RON","CZK","CAD"],"type":"string"}},"required":["customer_to_invoice_id"],"type":"object"},"inline_response_201":{"properties":{"uid":{"format":"uuid","type":"string"}},"type":"object"}}},"paths":{"/invoices/":{"post":{"operationId":"createBareInvoice","requestBody":{"$ref":"#/components/requestBodies/inline_object_2","content":{"application/json":{"schema":{"properties":{"customer_to_invoice_id":{"description":"Identifier of the invoiceable customer to invoice.","type":"integer"},"currency":{"description":"Currency of the created invoice. Defaults to EUR.","enum":["EUR","USD","GBP","PLN","HUF","RON","CZK","CAD"],"type":"string"}},"required":["customer_to_invoice_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_201"}}},"description":"Invoice created"}},"summary":"Beta: Create a bare invoice","tags":["Invoices"]}}}}
````

## GET /invoices/{uid}/

> Beta: Read an invoice

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Invoices"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"Invoice":{"properties":{"uid":{"description":"uuid of this Invoice","format":"uuid","type":"string"},"created_by":{"$ref":"#/components/schemas/InvoiceCreatedBy"},"debtor":{"$ref":"#/components/schemas/InvoiceDebtor"},"description_template":{"description":"Ignore. Dashdoc technical data.","type":"object"},"document_number":{"description":"Invoice's number. It usually corresponds to the invoice's number defined in your invoicing tool.","type":"string"},"status":{"default":"draft","description":"Indicate the status of the invoice","enum":["draft","final","paid"],"type":"string"},"due_date":{"description":"Due date of the invoice","format":"date","nullable":true,"type":"string"},"line_groups":{"items":{"$ref":"#/components/schemas/InvoiceLineGroup"},"type":"array"},"lines":{"description":"List of lines of the invoice which do not correspond to a transport","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"created":{"$ref":"#/components/schemas/created"},"updated":{"description":"Last update on our server","format":"date-time","type":"string"},"period":{"$ref":"#/components/schemas/Invoice_period"},"transports_count":{"description":"Number of transports linked to this invoice","type":"integer"},"remote_id":{"description":"The id of the invoice in your system.","type":"string"},"invoicing_connector":{"description":"Ignore. Dashdoc technical data.","type":"object"},"file":{"description":"Invoice file path","format":"url","type":"string"},"invoicing_date":{"description":"Date of invoicing","format":"date","type":"string"},"finalized_at":{"description":"Date of invoice finalization.","format":"date-time","type":"string"},"debtor_reference":{"description":"Pre-billing reference","type":"string"},"buyer_reference":{"description":"Reference assigned by the buyer, carried as BT-10 on the electronic invoice","type":"string"},"project_reference":{"description":"Project reference, carried as BT-11 on the electronic invoice","type":"string"},"contract_reference":{"description":"Contract reference, carried as BT-12 on the electronic invoice","type":"string"},"purchase_order_reference":{"description":"Purchase order reference assigned by the customer, carried as BT-13 on the electronic invoice","type":"string"},"total_price":{"description":"Total price, excluding taxes","type":"string"},"total_tax_amount":{"description":"Total taxes amount","type":"string"}},"type":"object"},"InvoiceCreatedBy":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"PrimaryAddress_1":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string"},"country":{"$ref":"#/components/schemas/country"},"latitude":{"$ref":"#/components/schemas/latitude"},"longitude":{"$ref":"#/components/schemas/longitude"},"radius":{"default":500,"description":"Radius around the GPS coordinates within which the address is located (in meters)","type":"integer"},"coords_validated":{"default":false,"description":"if `true`, when this address is used as a loading or unloading site, the mobile app displays an itinerary button to start GPS app with guidance to these coordinates","type":"boolean"},"is_demo":{"$ref":"#/components/schemas/is_demo"},"is_carrier":{"description":"Whether this company is considered a carrier","type":"boolean"},"is_shipper":{"description":"Whether this company is considered a shipper","type":"boolean"},"is_origin":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"is_destination":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"created_by":{"$ref":"#/components/schemas/created-by"},"created_by_user":{"$ref":"#/components/schemas/created-by-user"},"created":{"$ref":"#/components/schemas/created"},"remote_id":{"description":"The id of the address in your system.","type":"string"}},"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"latitude":{"description":"Latitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"longitude":{"description":"Longitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"is_demo":{"description":"Indicates that the address is a fake one created from demonstration. Everything linked to it will be deleted when using the 'Delete demo content' button in company parameters","type":"boolean"},"created-by":{"nullable":true,"properties":{"pk":{"description":"company id","type":"number"},"name":{"description":"name of the company","type":"string"}},"type":"object"},"created-by-user":{"nullable":true,"properties":{"pk":{"type":"number"},"display_name":{"type":"string"},"company":{"description":"The company id who created the address","type":"number"},"trucker_id":{"description":"The trucker id who created the address","type":"number"}},"type":"object"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"InvoiceDebtor":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"invoicing_remote_id":{"description":"The id of the company in your invoicing system.","type":"string"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"InvoiceLineGroup":{"properties":{"transport":{"$ref":"#/components/schemas/InvoiceTransport"},"lines":{"description":"List of lines of the invoice for the transport associated with this line group.","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"description":{"description":"Description of the group of line of the invoice","type":"string"},"currency":{"type":"string"},"gas_index":{"nullable":true,"readOnly":true,"type":"string"},"gas_index_invoice_item":{"$ref":"#/components/schemas/InvoiceItem"}},"type":"object"},"InvoiceTransport":{"properties":{"uid":{"description":"uuid of the Transport","format":"uuid","type":"string"},"sequential_id":{"type":"number"},"deliveries":{"items":{"$ref":"#/components/schemas/InvoiceDelivery"},"type":"array"},"documents":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceDocument"},"type":"array"},"messages":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceMessage"},"type":"array"}},"type":"object"},"InvoiceDelivery":{"properties":{"uid":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"origin":{"$ref":"#/components/schemas/InvoiceSite"},"destination":{"$ref":"#/components/schemas/InvoiceSite"}},"type":"object"},"InvoiceSite":{"properties":{"uid":{"type":"string"},"company_name":{"type":"string"},"city":{"type":"string"}},"type":"object"},"InvoiceDocument":{"properties":{"delivery":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"file":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"category":{"description":"Type of document. Possible values are \"cmr\", \"cmr4\", \"ldv\", \"orc\", \"chc\", \"rental\" and \"loading_plan\"","type":"string"}},"type":"object"},"InvoiceMessage":{"properties":{"document":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"document_type":{"enum":["load_photo","cmr","washing_note","delivery_note","confirmation","weight_note","waste_manifest","holders_swap_note","invoice"],"maxLength":100,"type":"string"}},"type":"object"},"InvoiceLine":{"properties":{"description":{"description":"Description of the line of the invoice","type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"number"},"currency":{"type":"string"},"total_price_without_tax":{"type":"number"},"invoice_item":{"$ref":"#/components/schemas/InvoiceItem"},"is_gas_indexed":{"description":"Whether this invoice line is subject to gas indexation","nullable":true,"readOnly":true,"type":"boolean"}},"type":"object"},"InvoiceItem":{"properties":{"uid":{"format":"uuid","type":"string"},"remote_id":{"description":"The id of the invoice item in your system","type":"string"},"description":{"description":"Default description when a user selects this invoice item for an invoice line","type":"string"}},"type":"object"},"Invoice_period":{"description":"The interval between the date of first loading and last unloading among all the transports of the invoice.","properties":{"first_loading_at":{"description":"Date of first loading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"},"last_unloading_at":{"description":"Date of last unloading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"}},"type":"object"}}},"paths":{"/invoices/{uid}/":{"get":{"operationId":"readInvoice","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The invoice"}},"summary":"Beta: Read an invoice","tags":["Invoices"]}}}}
````

## PATCH /invoices/{uid}/

> Beta: Partially update an invoice

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Invoices"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"UpdateInvoice":{"properties":{"file":{"description":"Invoice file content. **Use content-type with `multipart/form-data` value to the header of the request to send a document.**","format":"byte","type":"object"},"document_number":{"description":"The invoice number","maxLength":64,"type":"string"},"invoicing_date":{"description":"Date of invoicing.","format":"date","type":"string"},"debtor_reference":{"description":"Pre-billing reference. **Can only be set for a draft invoice**","type":"string"},"buyer_reference":{"description":"Reference assigned by the buyer, carried as BT-10 on the electronic invoice. **Can only be set for a draft invoice**","maxLength":50,"type":"string"},"project_reference":{"description":"Project reference, carried as BT-11 on the electronic invoice. **Can only be set for a draft invoice**","maxLength":50,"type":"string"},"contract_reference":{"description":"Contract reference, carried as BT-12 on the electronic invoice. **Can only be set for a draft invoice**","maxLength":50,"type":"string"},"purchase_order_reference":{"description":"Purchase order reference assigned by the customer, carried as BT-13 on the electronic invoice. **Can only be set for a draft invoice**","maxLength":50,"type":"string"}},"type":"object"},"Invoice":{"properties":{"uid":{"description":"uuid of this Invoice","format":"uuid","type":"string"},"created_by":{"$ref":"#/components/schemas/InvoiceCreatedBy"},"debtor":{"$ref":"#/components/schemas/InvoiceDebtor"},"description_template":{"description":"Ignore. Dashdoc technical data.","type":"object"},"document_number":{"description":"Invoice's number. It usually corresponds to the invoice's number defined in your invoicing tool.","type":"string"},"status":{"default":"draft","description":"Indicate the status of the invoice","enum":["draft","final","paid"],"type":"string"},"due_date":{"description":"Due date of the invoice","format":"date","nullable":true,"type":"string"},"line_groups":{"items":{"$ref":"#/components/schemas/InvoiceLineGroup"},"type":"array"},"lines":{"description":"List of lines of the invoice which do not correspond to a transport","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"created":{"$ref":"#/components/schemas/created"},"updated":{"description":"Last update on our server","format":"date-time","type":"string"},"period":{"$ref":"#/components/schemas/Invoice_period"},"transports_count":{"description":"Number of transports linked to this invoice","type":"integer"},"remote_id":{"description":"The id of the invoice in your system.","type":"string"},"invoicing_connector":{"description":"Ignore. Dashdoc technical data.","type":"object"},"file":{"description":"Invoice file path","format":"url","type":"string"},"invoicing_date":{"description":"Date of invoicing","format":"date","type":"string"},"finalized_at":{"description":"Date of invoice finalization.","format":"date-time","type":"string"},"debtor_reference":{"description":"Pre-billing reference","type":"string"},"buyer_reference":{"description":"Reference assigned by the buyer, carried as BT-10 on the electronic invoice","type":"string"},"project_reference":{"description":"Project reference, carried as BT-11 on the electronic invoice","type":"string"},"contract_reference":{"description":"Contract reference, carried as BT-12 on the electronic invoice","type":"string"},"purchase_order_reference":{"description":"Purchase order reference assigned by the customer, carried as BT-13 on the electronic invoice","type":"string"},"total_price":{"description":"Total price, excluding taxes","type":"string"},"total_tax_amount":{"description":"Total taxes amount","type":"string"}},"type":"object"},"InvoiceCreatedBy":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"PrimaryAddress_1":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string"},"country":{"$ref":"#/components/schemas/country"},"latitude":{"$ref":"#/components/schemas/latitude"},"longitude":{"$ref":"#/components/schemas/longitude"},"radius":{"default":500,"description":"Radius around the GPS coordinates within which the address is located (in meters)","type":"integer"},"coords_validated":{"default":false,"description":"if `true`, when this address is used as a loading or unloading site, the mobile app displays an itinerary button to start GPS app with guidance to these coordinates","type":"boolean"},"is_demo":{"$ref":"#/components/schemas/is_demo"},"is_carrier":{"description":"Whether this company is considered a carrier","type":"boolean"},"is_shipper":{"description":"Whether this company is considered a shipper","type":"boolean"},"is_origin":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"is_destination":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"created_by":{"$ref":"#/components/schemas/created-by"},"created_by_user":{"$ref":"#/components/schemas/created-by-user"},"created":{"$ref":"#/components/schemas/created"},"remote_id":{"description":"The id of the address in your system.","type":"string"}},"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"latitude":{"description":"Latitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"longitude":{"description":"Longitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"is_demo":{"description":"Indicates that the address is a fake one created from demonstration. Everything linked to it will be deleted when using the 'Delete demo content' button in company parameters","type":"boolean"},"created-by":{"nullable":true,"properties":{"pk":{"description":"company id","type":"number"},"name":{"description":"name of the company","type":"string"}},"type":"object"},"created-by-user":{"nullable":true,"properties":{"pk":{"type":"number"},"display_name":{"type":"string"},"company":{"description":"The company id who created the address","type":"number"},"trucker_id":{"description":"The trucker id who created the address","type":"number"}},"type":"object"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"InvoiceDebtor":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"invoicing_remote_id":{"description":"The id of the company in your invoicing system.","type":"string"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"InvoiceLineGroup":{"properties":{"transport":{"$ref":"#/components/schemas/InvoiceTransport"},"lines":{"description":"List of lines of the invoice for the transport associated with this line group.","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"description":{"description":"Description of the group of line of the invoice","type":"string"},"currency":{"type":"string"},"gas_index":{"nullable":true,"readOnly":true,"type":"string"},"gas_index_invoice_item":{"$ref":"#/components/schemas/InvoiceItem"}},"type":"object"},"InvoiceTransport":{"properties":{"uid":{"description":"uuid of the Transport","format":"uuid","type":"string"},"sequential_id":{"type":"number"},"deliveries":{"items":{"$ref":"#/components/schemas/InvoiceDelivery"},"type":"array"},"documents":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceDocument"},"type":"array"},"messages":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceMessage"},"type":"array"}},"type":"object"},"InvoiceDelivery":{"properties":{"uid":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"origin":{"$ref":"#/components/schemas/InvoiceSite"},"destination":{"$ref":"#/components/schemas/InvoiceSite"}},"type":"object"},"InvoiceSite":{"properties":{"uid":{"type":"string"},"company_name":{"type":"string"},"city":{"type":"string"}},"type":"object"},"InvoiceDocument":{"properties":{"delivery":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"file":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"category":{"description":"Type of document. Possible values are \"cmr\", \"cmr4\", \"ldv\", \"orc\", \"chc\", \"rental\" and \"loading_plan\"","type":"string"}},"type":"object"},"InvoiceMessage":{"properties":{"document":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"document_type":{"enum":["load_photo","cmr","washing_note","delivery_note","confirmation","weight_note","waste_manifest","holders_swap_note","invoice"],"maxLength":100,"type":"string"}},"type":"object"},"InvoiceLine":{"properties":{"description":{"description":"Description of the line of the invoice","type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"number"},"currency":{"type":"string"},"total_price_without_tax":{"type":"number"},"invoice_item":{"$ref":"#/components/schemas/InvoiceItem"},"is_gas_indexed":{"description":"Whether this invoice line is subject to gas indexation","nullable":true,"readOnly":true,"type":"boolean"}},"type":"object"},"InvoiceItem":{"properties":{"uid":{"format":"uuid","type":"string"},"remote_id":{"description":"The id of the invoice item in your system","type":"string"},"description":{"description":"Default description when a user selects this invoice item for an invoice line","type":"string"}},"type":"object"},"Invoice_period":{"description":"The interval between the date of first loading and last unloading among all the transports of the invoice.","properties":{"first_loading_at":{"description":"Date of first loading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"},"last_unloading_at":{"description":"Date of last unloading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"}},"type":"object"}}},"paths":{"/invoices/{uid}/":{"patch":{"operationId":"partialUpdateInvoice","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoice"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"Update successful"}},"summary":"Beta: Partially update an invoice","tags":["Invoices"]}}}}
````

## Beta: Mark paid

> Mark an invoice as paid

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Invoices"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"Invoice":{"properties":{"uid":{"description":"uuid of this Invoice","format":"uuid","type":"string"},"created_by":{"$ref":"#/components/schemas/InvoiceCreatedBy"},"debtor":{"$ref":"#/components/schemas/InvoiceDebtor"},"description_template":{"description":"Ignore. Dashdoc technical data.","type":"object"},"document_number":{"description":"Invoice's number. It usually corresponds to the invoice's number defined in your invoicing tool.","type":"string"},"status":{"default":"draft","description":"Indicate the status of the invoice","enum":["draft","final","paid"],"type":"string"},"due_date":{"description":"Due date of the invoice","format":"date","nullable":true,"type":"string"},"line_groups":{"items":{"$ref":"#/components/schemas/InvoiceLineGroup"},"type":"array"},"lines":{"description":"List of lines of the invoice which do not correspond to a transport","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"created":{"$ref":"#/components/schemas/created"},"updated":{"description":"Last update on our server","format":"date-time","type":"string"},"period":{"$ref":"#/components/schemas/Invoice_period"},"transports_count":{"description":"Number of transports linked to this invoice","type":"integer"},"remote_id":{"description":"The id of the invoice in your system.","type":"string"},"invoicing_connector":{"description":"Ignore. Dashdoc technical data.","type":"object"},"file":{"description":"Invoice file path","format":"url","type":"string"},"invoicing_date":{"description":"Date of invoicing","format":"date","type":"string"},"finalized_at":{"description":"Date of invoice finalization.","format":"date-time","type":"string"},"debtor_reference":{"description":"Pre-billing reference","type":"string"},"buyer_reference":{"description":"Reference assigned by the buyer, carried as BT-10 on the electronic invoice","type":"string"},"project_reference":{"description":"Project reference, carried as BT-11 on the electronic invoice","type":"string"},"contract_reference":{"description":"Contract reference, carried as BT-12 on the electronic invoice","type":"string"},"purchase_order_reference":{"description":"Purchase order reference assigned by the customer, carried as BT-13 on the electronic invoice","type":"string"},"total_price":{"description":"Total price, excluding taxes","type":"string"},"total_tax_amount":{"description":"Total taxes amount","type":"string"}},"type":"object"},"InvoiceCreatedBy":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"PrimaryAddress_1":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string"},"country":{"$ref":"#/components/schemas/country"},"latitude":{"$ref":"#/components/schemas/latitude"},"longitude":{"$ref":"#/components/schemas/longitude"},"radius":{"default":500,"description":"Radius around the GPS coordinates within which the address is located (in meters)","type":"integer"},"coords_validated":{"default":false,"description":"if `true`, when this address is used as a loading or unloading site, the mobile app displays an itinerary button to start GPS app with guidance to these coordinates","type":"boolean"},"is_demo":{"$ref":"#/components/schemas/is_demo"},"is_carrier":{"description":"Whether this company is considered a carrier","type":"boolean"},"is_shipper":{"description":"Whether this company is considered a shipper","type":"boolean"},"is_origin":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"is_destination":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"created_by":{"$ref":"#/components/schemas/created-by"},"created_by_user":{"$ref":"#/components/schemas/created-by-user"},"created":{"$ref":"#/components/schemas/created"},"remote_id":{"description":"The id of the address in your system.","type":"string"}},"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"latitude":{"description":"Latitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"longitude":{"description":"Longitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"is_demo":{"description":"Indicates that the address is a fake one created from demonstration. Everything linked to it will be deleted when using the 'Delete demo content' button in company parameters","type":"boolean"},"created-by":{"nullable":true,"properties":{"pk":{"description":"company id","type":"number"},"name":{"description":"name of the company","type":"string"}},"type":"object"},"created-by-user":{"nullable":true,"properties":{"pk":{"type":"number"},"display_name":{"type":"string"},"company":{"description":"The company id who created the address","type":"number"},"trucker_id":{"description":"The trucker id who created the address","type":"number"}},"type":"object"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"InvoiceDebtor":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"invoicing_remote_id":{"description":"The id of the company in your invoicing system.","type":"string"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"InvoiceLineGroup":{"properties":{"transport":{"$ref":"#/components/schemas/InvoiceTransport"},"lines":{"description":"List of lines of the invoice for the transport associated with this line group.","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"description":{"description":"Description of the group of line of the invoice","type":"string"},"currency":{"type":"string"},"gas_index":{"nullable":true,"readOnly":true,"type":"string"},"gas_index_invoice_item":{"$ref":"#/components/schemas/InvoiceItem"}},"type":"object"},"InvoiceTransport":{"properties":{"uid":{"description":"uuid of the Transport","format":"uuid","type":"string"},"sequential_id":{"type":"number"},"deliveries":{"items":{"$ref":"#/components/schemas/InvoiceDelivery"},"type":"array"},"documents":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceDocument"},"type":"array"},"messages":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceMessage"},"type":"array"}},"type":"object"},"InvoiceDelivery":{"properties":{"uid":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"origin":{"$ref":"#/components/schemas/InvoiceSite"},"destination":{"$ref":"#/components/schemas/InvoiceSite"}},"type":"object"},"InvoiceSite":{"properties":{"uid":{"type":"string"},"company_name":{"type":"string"},"city":{"type":"string"}},"type":"object"},"InvoiceDocument":{"properties":{"delivery":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"file":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"category":{"description":"Type of document. Possible values are \"cmr\", \"cmr4\", \"ldv\", \"orc\", \"chc\", \"rental\" and \"loading_plan\"","type":"string"}},"type":"object"},"InvoiceMessage":{"properties":{"document":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"document_type":{"enum":["load_photo","cmr","washing_note","delivery_note","confirmation","weight_note","waste_manifest","holders_swap_note","invoice"],"maxLength":100,"type":"string"}},"type":"object"},"InvoiceLine":{"properties":{"description":{"description":"Description of the line of the invoice","type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"number"},"currency":{"type":"string"},"total_price_without_tax":{"type":"number"},"invoice_item":{"$ref":"#/components/schemas/InvoiceItem"},"is_gas_indexed":{"description":"Whether this invoice line is subject to gas indexation","nullable":true,"readOnly":true,"type":"boolean"}},"type":"object"},"InvoiceItem":{"properties":{"uid":{"format":"uuid","type":"string"},"remote_id":{"description":"The id of the invoice item in your system","type":"string"},"description":{"description":"Default description when a user selects this invoice item for an invoice line","type":"string"}},"type":"object"},"Invoice_period":{"description":"The interval between the date of first loading and last unloading among all the transports of the invoice.","properties":{"first_loading_at":{"description":"Date of first loading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"},"last_unloading_at":{"description":"Date of last unloading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"}},"type":"object"}}},"paths":{"/invoices/{uid}/mark-paid/":{"post":{"description":"Mark an invoice as paid","operationId":"markPaidInvoice","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"Invoice marked as paid"}},"summary":"Beta: Mark paid","tags":["Invoices"]}}}}
````

## Beta: Mark not paid

> Mark an invoice as not paid.

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Invoices"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"Invoice":{"properties":{"uid":{"description":"uuid of this Invoice","format":"uuid","type":"string"},"created_by":{"$ref":"#/components/schemas/InvoiceCreatedBy"},"debtor":{"$ref":"#/components/schemas/InvoiceDebtor"},"description_template":{"description":"Ignore. Dashdoc technical data.","type":"object"},"document_number":{"description":"Invoice's number. It usually corresponds to the invoice's number defined in your invoicing tool.","type":"string"},"status":{"default":"draft","description":"Indicate the status of the invoice","enum":["draft","final","paid"],"type":"string"},"due_date":{"description":"Due date of the invoice","format":"date","nullable":true,"type":"string"},"line_groups":{"items":{"$ref":"#/components/schemas/InvoiceLineGroup"},"type":"array"},"lines":{"description":"List of lines of the invoice which do not correspond to a transport","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"created":{"$ref":"#/components/schemas/created"},"updated":{"description":"Last update on our server","format":"date-time","type":"string"},"period":{"$ref":"#/components/schemas/Invoice_period"},"transports_count":{"description":"Number of transports linked to this invoice","type":"integer"},"remote_id":{"description":"The id of the invoice in your system.","type":"string"},"invoicing_connector":{"description":"Ignore. Dashdoc technical data.","type":"object"},"file":{"description":"Invoice file path","format":"url","type":"string"},"invoicing_date":{"description":"Date of invoicing","format":"date","type":"string"},"finalized_at":{"description":"Date of invoice finalization.","format":"date-time","type":"string"},"debtor_reference":{"description":"Pre-billing reference","type":"string"},"buyer_reference":{"description":"Reference assigned by the buyer, carried as BT-10 on the electronic invoice","type":"string"},"project_reference":{"description":"Project reference, carried as BT-11 on the electronic invoice","type":"string"},"contract_reference":{"description":"Contract reference, carried as BT-12 on the electronic invoice","type":"string"},"purchase_order_reference":{"description":"Purchase order reference assigned by the customer, carried as BT-13 on the electronic invoice","type":"string"},"total_price":{"description":"Total price, excluding taxes","type":"string"},"total_tax_amount":{"description":"Total taxes amount","type":"string"}},"type":"object"},"InvoiceCreatedBy":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"PrimaryAddress_1":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"name":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string"},"country":{"$ref":"#/components/schemas/country"},"latitude":{"$ref":"#/components/schemas/latitude"},"longitude":{"$ref":"#/components/schemas/longitude"},"radius":{"default":500,"description":"Radius around the GPS coordinates within which the address is located (in meters)","type":"integer"},"coords_validated":{"default":false,"description":"if `true`, when this address is used as a loading or unloading site, the mobile app displays an itinerary button to start GPS app with guidance to these coordinates","type":"boolean"},"is_demo":{"$ref":"#/components/schemas/is_demo"},"is_carrier":{"description":"Whether this company is considered a carrier","type":"boolean"},"is_shipper":{"description":"Whether this company is considered a shipper","type":"boolean"},"is_origin":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"is_destination":{"description":"Legacy, not relevant for a company's primary address. Consider creating a separate address associated with this partner instead.\n","type":"boolean"},"created_by":{"$ref":"#/components/schemas/created-by"},"created_by_user":{"$ref":"#/components/schemas/created-by-user"},"created":{"$ref":"#/components/schemas/created"},"remote_id":{"description":"The id of the address in your system.","type":"string"}},"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"latitude":{"description":"Latitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"longitude":{"description":"Longitude using the decimal GPS coordinates (WGS84). At 7 decimals, the position is accurate around the centimeter.","format":"float","nullable":true,"type":"number"},"is_demo":{"description":"Indicates that the address is a fake one created from demonstration. Everything linked to it will be deleted when using the 'Delete demo content' button in company parameters","type":"boolean"},"created-by":{"nullable":true,"properties":{"pk":{"description":"company id","type":"number"},"name":{"description":"name of the company","type":"string"}},"type":"object"},"created-by-user":{"nullable":true,"properties":{"pk":{"type":"number"},"display_name":{"type":"string"},"company":{"description":"The company id who created the address","type":"number"},"trucker_id":{"description":"The trucker id who created the address","type":"number"}},"type":"object"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"InvoiceDebtor":{"properties":{"pk":{"description":"Dashdoc's internal id.","type":"number"},"invoicing_remote_id":{"description":"The id of the company in your invoicing system.","type":"string"},"name":{"type":"string"},"primary_address":{"$ref":"#/components/schemas/PrimaryAddress_1"},"country":{"$ref":"#/components/schemas/country"},"vat_number":{"type":"string"}},"type":"object"},"InvoiceLineGroup":{"properties":{"transport":{"$ref":"#/components/schemas/InvoiceTransport"},"lines":{"description":"List of lines of the invoice for the transport associated with this line group.","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"description":{"description":"Description of the group of line of the invoice","type":"string"},"currency":{"type":"string"},"gas_index":{"nullable":true,"readOnly":true,"type":"string"},"gas_index_invoice_item":{"$ref":"#/components/schemas/InvoiceItem"}},"type":"object"},"InvoiceTransport":{"properties":{"uid":{"description":"uuid of the Transport","format":"uuid","type":"string"},"sequential_id":{"type":"number"},"deliveries":{"items":{"$ref":"#/components/schemas/InvoiceDelivery"},"type":"array"},"documents":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceDocument"},"type":"array"},"messages":{"description":"See https://developer.dashdoc.eu/docs/tutorials/retrieve-transport-tracking-data#get-documents-and-photos-with-their-type","items":{"$ref":"#/components/schemas/InvoiceMessage"},"type":"array"}},"type":"object"},"InvoiceDelivery":{"properties":{"uid":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"origin":{"$ref":"#/components/schemas/InvoiceSite"},"destination":{"$ref":"#/components/schemas/InvoiceSite"}},"type":"object"},"InvoiceSite":{"properties":{"uid":{"type":"string"},"company_name":{"type":"string"},"city":{"type":"string"}},"type":"object"},"InvoiceDocument":{"properties":{"delivery":{"description":"uuid of the Delivery","format":"uuid","type":"string"},"file":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"category":{"description":"Type of document. Possible values are \"cmr\", \"cmr4\", \"ldv\", \"orc\", \"chc\", \"rental\" and \"loading_plan\"","type":"string"}},"type":"object"},"InvoiceMessage":{"properties":{"document":{"description":"path of the document","format":"url","type":"string"},"reference":{"type":"string"},"document_type":{"enum":["load_photo","cmr","washing_note","delivery_note","confirmation","weight_note","waste_manifest","holders_swap_note","invoice"],"maxLength":100,"type":"string"}},"type":"object"},"InvoiceLine":{"properties":{"description":{"description":"Description of the line of the invoice","type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"number"},"currency":{"type":"string"},"total_price_without_tax":{"type":"number"},"invoice_item":{"$ref":"#/components/schemas/InvoiceItem"},"is_gas_indexed":{"description":"Whether this invoice line is subject to gas indexation","nullable":true,"readOnly":true,"type":"boolean"}},"type":"object"},"InvoiceItem":{"properties":{"uid":{"format":"uuid","type":"string"},"remote_id":{"description":"The id of the invoice item in your system","type":"string"},"description":{"description":"Default description when a user selects this invoice item for an invoice line","type":"string"}},"type":"object"},"Invoice_period":{"description":"The interval between the date of first loading and last unloading among all the transports of the invoice.","properties":{"first_loading_at":{"description":"Date of first loading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"},"last_unloading_at":{"description":"Date of last unloading among all the transports of the invoice.","format":"date-time","nullable":true,"type":"string"}},"type":"object"}}},"paths":{"/invoices/{uid}/mark-not-paid/":{"post":{"description":"Mark an invoice as not paid.","operationId":"markNotPaidInvoice","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"Invoice marked as not paid"}},"summary":"Beta: Mark not paid","tags":["Invoices"]}}}}
````

## Beta: Add a custom line to an invoice

> Add a custom line to an existing draft invoice.\
> \
> The invoice must be in draft status. If the invoicing method requires\
> mandatory invoice items, an \`invoice\_item\_uid\` must be provided.<br>

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Invoices"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"requestBodies":{"inline_object_3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_object_3"}}},"required":true}},"schemas":{"inline_object_3":{"properties":{"description":{"description":"Description of the invoice line.","type":"string"},"quantity":{"description":"Quantity (up to 3 decimal places).","format":"decimal","type":"string"},"unit_price":{"description":"Unit price (up to 4 decimal places).","format":"decimal","type":"string"},"invoice_item_uid":{"description":"UID of the invoice item to associate with this line. Required when the invoicing method mandates invoice items.","format":"uuid","nullable":true,"type":"string"}},"required":["quantity","unit_price"],"type":"object"}}},"paths":{"/invoices/{uid}/lines/":{"post":{"description":"Add a custom line to an existing draft invoice.\n\nThe invoice must be in draft status. If the invoicing method requires\nmandatory invoice items, an `invoice_item_uid` must be provided.\n","operationId":"addInvoiceLine","parameters":[{"in":"path","name":"uid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/inline_object_3","content":{"application/json":{"schema":{"properties":{"description":{"description":"Description of the invoice line.","type":"string"},"quantity":{"description":"Quantity (up to 3 decimal places).","format":"decimal","type":"string"},"unit_price":{"description":"Unit price (up to 4 decimal places).","format":"decimal","type":"string"},"invoice_item_uid":{"description":"UID of the invoice item to associate with this line. Required when the invoicing method mandates invoice items.","format":"uuid","nullable":true,"type":"string"}},"required":["quantity","unit_price"],"type":"object"}}},"required":true},"responses":{"204":{"description":"Invoice line created successfully"},"400":{"description":"Bad request (e.g. invoice is not in draft status, or missing mandatory invoice item)"},"404":{"description":"Invoice not found"}},"summary":"Beta: Add a custom line to an invoice","tags":["Invoices"]}}}}
````
