Error
A valid request URL is required to generate request examples{
"id": 123,
"project_ids": [
123
],
"label": "<string>",
"status": "draft",
"revision": 123,
"currency": "PLN",
"supplier_id": 123,
"supplier_company_name": "<string>",
"items_count": 123,
"total_amount": "296000.00",
"invoiced_amount": "<string>",
"paid_amount": "<string>",
"outstanding_amount": "<string>",
"name": "<string>",
"notes": "<string>",
"position": 123,
"supplier_contact_name": "<string>",
"supplier_contact_email": "<string>",
"supplier_contact_phone": "<string>",
"supplier_address": "<string>",
"issued_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"voided_by_id": 123,
"created_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"payment_schedule": {
"covered_amount": "<string>",
"unscheduled_amount": "<string>",
"exceeds_total": true,
"overdue_amount": "<string>",
"next_due_date": "2023-12-25"
},
"payment_terms": [
{
"id": 123,
"label": "<string>",
"term_type": "percentage",
"trigger": "order",
"due_days": 123,
"expected_amount": "<string>",
"paid_amount": "<string>",
"outstanding_amount": "<string>",
"payment_status": "unpaid",
"overdue": true,
"payment_term_id": 123,
"percent": "<string>",
"amount": "<string>",
"position": 123,
"due_date": "2023-12-25"
}
],
"items": [
{
"id": 123,
"project_id": 123,
"purchase_order": {
"id": 123,
"label": "<string>",
"status": "<string>"
},
"package_id": 123,
"package_section_id": 123,
"match_type": "two_way",
"category_id": 123,
"quantity": "1000.00",
"unit_price": "10.00",
"received_quantity": "<string>",
"accepted_quantity": "<string>",
"matched_quantity": "<string>",
"invoiced_quantity": "<string>",
"baseline_item": {
"id": 123,
"identifier": "<string>",
"name": "<string>",
"package_id": 123
},
"description": "<string>",
"category": "<string>",
"unit_type": "<string>",
"price_variance_percent": "2.0000",
"quantity_variance_percent": "0.0000",
"amount_variance_absolute": "50.00",
"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"
}
]
}{
"error": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"code": "<string>"
}
]
}{
"error": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"code": "<string>"
}
]
}PurchaseOrder
Issue purchase order
draft → open. Writes revision 0 (a full snapshot of the header and all items).
POST
/
purchase_orders
/
{id}
/
issue
Error
A valid request URL is required to generate request examples{
"id": 123,
"project_ids": [
123
],
"label": "<string>",
"status": "draft",
"revision": 123,
"currency": "PLN",
"supplier_id": 123,
"supplier_company_name": "<string>",
"items_count": 123,
"total_amount": "296000.00",
"invoiced_amount": "<string>",
"paid_amount": "<string>",
"outstanding_amount": "<string>",
"name": "<string>",
"notes": "<string>",
"position": 123,
"supplier_contact_name": "<string>",
"supplier_contact_email": "<string>",
"supplier_contact_phone": "<string>",
"supplier_address": "<string>",
"issued_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"voided_by_id": 123,
"created_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"payment_schedule": {
"covered_amount": "<string>",
"unscheduled_amount": "<string>",
"exceeds_total": true,
"overdue_amount": "<string>",
"next_due_date": "2023-12-25"
},
"payment_terms": [
{
"id": 123,
"label": "<string>",
"term_type": "percentage",
"trigger": "order",
"due_days": 123,
"expected_amount": "<string>",
"paid_amount": "<string>",
"outstanding_amount": "<string>",
"payment_status": "unpaid",
"overdue": true,
"payment_term_id": 123,
"percent": "<string>",
"amount": "<string>",
"position": 123,
"due_date": "2023-12-25"
}
],
"items": [
{
"id": 123,
"project_id": 123,
"purchase_order": {
"id": 123,
"label": "<string>",
"status": "<string>"
},
"package_id": 123,
"package_section_id": 123,
"match_type": "two_way",
"category_id": 123,
"quantity": "1000.00",
"unit_price": "10.00",
"received_quantity": "<string>",
"accepted_quantity": "<string>",
"matched_quantity": "<string>",
"invoiced_quantity": "<string>",
"baseline_item": {
"id": 123,
"identifier": "<string>",
"name": "<string>",
"package_id": 123
},
"description": "<string>",
"category": "<string>",
"unit_type": "<string>",
"price_variance_percent": "2.0000",
"quantity_variance_percent": "0.0000",
"amount_variance_absolute": "50.00",
"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"
}
]
}{
"error": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"code": "<string>"
}
]
}{
"error": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"code": "<string>"
}
]
}Response
OK
draft until issued (an open order can be reverted to it); open once issued (receipts and invoices allowed); closed = no more deliveries (invoices still allowed); cancelled; voided = kept as history but counted nowhere (procured quantity, budget), final.
Available options:
draft, open, closed, cancelled, voided