Error
A valid request URL is required to generate request examples{
"id": 123,
"project_ids": [
123
],
"invoice_number": "<string>",
"invoice_date": "2023-12-25",
"currency": "PLN",
"net_amount": "<string>",
"paid_amount": "<string>",
"outstanding_amount": "<string>",
"payment_status": "unpaid",
"status": "draft",
"supplier_id": 123,
"supplier_company_name": "<string>",
"due_date": "2023-12-25",
"due_date_overridden": true,
"payment_terms_basis": {
"source": "purchase_order",
"purchase_order_id": 123,
"payment_term_id": 123,
"label": "<string>",
"trigger": "order",
"due_days": 123
},
"overdue": true,
"purchase_orders": [
{
"id": 123,
"label": "<string>",
"project_ids": [
123
],
"items_amount": "<string>",
"invoiced_amount": "<string>",
"paid_amount": "<string>"
}
],
"matched_at": "2023-11-07T05:31:56Z",
"exceptions_accepted_at": "2023-11-07T05:31:56Z",
"exceptions_accepted_by_id": 123,
"exceptions_acceptance_note": "<string>",
"position": 123,
"supplier_contact_name": "<string>",
"supplier_contact_email": "<string>",
"supplier_contact_phone": "<string>",
"supplier_address": "<string>",
"created_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": 123,
"project_id": 123,
"package_id": 123,
"package_section_id": 123,
"quantity": "400.00",
"unit_price": "10.00",
"amount": "<string>",
"matches": [
{
"id": 123,
"goods_receipt_item_id": 123,
"inspection_id": 123,
"matched_quantity": "<string>",
"result": "matched",
"exception_reason": "price_variance"
}
],
"supplier_invoice_id": 123,
"purchase_order_item": {
"id": 123,
"purchase_order_id": 123,
"label": "<string>",
"description": "<string>",
"package_section_id": 123,
"category_id": 123,
"package_baseline_item_id": 123
},
"charge_purchase_order": {
"id": 123,
"label": "<string>"
},
"category_id": 123,
"category": "<string>",
"package_baseline_item_id": 123,
"description": "<string>",
"position": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"attachments": [
{
"id": 123,
"filename": "<string>",
"content_type": "application/pdf",
"byte_size": 123,
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_id": 123,
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"payments": [
{
"id": 123,
"amount": "2500.00",
"paid_on": "2023-12-25",
"reference": "<string>",
"notes": "<string>",
"allocations": [
{
"purchase_order": {
"id": 123,
"label": "<string>"
},
"amount": "<string>"
}
],
"created_by_id": 123,
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"code": "<string>"
}
]
}{
"error": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"code": "<string>"
}
]
}SupplierInvoice
Create supplier invoice
Creates a draft invoice, optionally with items. The supplier is picked as supplier_id (its name copied once, contact fields not sent filled from the company); without it the supplier is copied from the PO of the first PO-linked item.
POST
/
supplier_invoices
Error
A valid request URL is required to generate request examples{
"id": 123,
"project_ids": [
123
],
"invoice_number": "<string>",
"invoice_date": "2023-12-25",
"currency": "PLN",
"net_amount": "<string>",
"paid_amount": "<string>",
"outstanding_amount": "<string>",
"payment_status": "unpaid",
"status": "draft",
"supplier_id": 123,
"supplier_company_name": "<string>",
"due_date": "2023-12-25",
"due_date_overridden": true,
"payment_terms_basis": {
"source": "purchase_order",
"purchase_order_id": 123,
"payment_term_id": 123,
"label": "<string>",
"trigger": "order",
"due_days": 123
},
"overdue": true,
"purchase_orders": [
{
"id": 123,
"label": "<string>",
"project_ids": [
123
],
"items_amount": "<string>",
"invoiced_amount": "<string>",
"paid_amount": "<string>"
}
],
"matched_at": "2023-11-07T05:31:56Z",
"exceptions_accepted_at": "2023-11-07T05:31:56Z",
"exceptions_accepted_by_id": 123,
"exceptions_acceptance_note": "<string>",
"position": 123,
"supplier_contact_name": "<string>",
"supplier_contact_email": "<string>",
"supplier_contact_phone": "<string>",
"supplier_address": "<string>",
"created_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": 123,
"project_id": 123,
"package_id": 123,
"package_section_id": 123,
"quantity": "400.00",
"unit_price": "10.00",
"amount": "<string>",
"matches": [
{
"id": 123,
"goods_receipt_item_id": 123,
"inspection_id": 123,
"matched_quantity": "<string>",
"result": "matched",
"exception_reason": "price_variance"
}
],
"supplier_invoice_id": 123,
"purchase_order_item": {
"id": 123,
"purchase_order_id": 123,
"label": "<string>",
"description": "<string>",
"package_section_id": 123,
"category_id": 123,
"package_baseline_item_id": 123
},
"charge_purchase_order": {
"id": 123,
"label": "<string>"
},
"category_id": 123,
"category": "<string>",
"package_baseline_item_id": 123,
"description": "<string>",
"position": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"attachments": [
{
"id": 123,
"filename": "<string>",
"content_type": "application/pdf",
"byte_size": 123,
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_id": 123,
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"payments": [
{
"id": 123,
"amount": "2500.00",
"paid_on": "2023-12-25",
"reference": "<string>",
"notes": "<string>",
"allocations": [
{
"purchase_order": {
"id": 123,
"label": "<string>"
},
"amount": "<string>"
}
],
"created_by_id": 123,
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"code": "<string>"
}
]
}{
"error": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"code": "<string>"
}
]
}Body
application/json
The supplier is picked as supplier_id; its name is copied once (never changes afterwards) and the contact fields not sent are filled from the company. Without it the supplier (company and all supplier fields) is copied from the PO of the first PO-linked item.
Response
Created