Skip to content

API – Orders

Paths are under https://api.innovanet.com. Header Authorization: Bearer inv_mcp_…. The innovanet() function is in the API chapter.

The order list has no success envelope. A successful response is the object with records directly. An error has success: false.

GET /api/orders

Parameter Type Required Description
page integer no default 1
per_page integer no default 20
search string no
project_id integer no
company_id integer no partner
order_type integer no from GET /api/orders/types
processing integer no processing status
valid_from, valid_to date no
parent_only boolean no true hides subordinate orders
order_by string no default order_id
order_dir string no asc or desc

PHP

$res = innovanet('GET', '/api/orders?page=1&per_page=20&parent_only=1');

Response 200

{
  "records": [
    {
      "order_id": 15,
      "order_number": "OB20260015",
      "order_subject": "Servis vozidla",
      "order_type": 1,
      "order_project": 42,
      "order_total": "1000.00",
      "order_total_with_vat": "1230.00",
      "order_valid_from": "2026-11-05",
      "order_valid_to": "2026-12-31",
      "order_processing": 1,
      "supplement_count": 0
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20,
  "total_pages": 1
}

Tile counts are in a success envelope: GET /api/orders/stats returns data.total, new, paused, approved, rejected, expiring_soon.

Code lists: GET /api/orders/types, /party-roles, /processing-statuses, /invoicing-frequencies, /tcs-types.

Detail: GET /api/orders/15 returns { "success": true, "data": { "order": {}, ... } }.

POST /api/orders

Field Type Required Description
order_party_pid integer yes partner company_id, the partner must exist
order_party_role integer yes party role: 1 supplier, 2 customer
order_type integer yes
order_subject string yes subject, at most 500
order_owner integer yes responsible person, master user id
order_technical integer yes technical person
order_supplier_owner integer yes
order_supplier_technical integer yes
order_payment_type integer yes
order_currency integer yes currency id, the currency must exist
order_total number yes amount without VAT, not negative
order_total_with_vat number no not negative and not lower than order_total
order_valid_from date yes not in the past
order_valid_to date yes not earlier than order_valid_from
order_place string yes place of performance
order_place_country string yes for example SK
order_project integer no the project must exist
order_payment_term integer no payment term in days, 0 to 3650
order_invoicing_frequency integer no in months, 0 to 60
order_other_conditions string no
order_parent_contract integer no parent contract, must exist and must not be deleted
order_tcs integer no terms and conditions id

Request

{
  "order_party_pid": 120,
  "order_party_role": 1,
  "order_type": 1,
  "order_subject": "Servis vozidla",
  "order_owner": 15,
  "order_technical": 15,
  "order_supplier_owner": 15,
  "order_supplier_technical": 15,
  "order_payment_type": 1,
  "order_currency": 1,
  "order_total": 1000,
  "order_total_with_vat": 1230,
  "order_valid_from": "2026-11-06",
  "order_valid_to": "2026-12-31",
  "order_place": "Bratislava",
  "order_place_country": "SK",
  "order_project": 42
}

cURL

curl -sS -X POST "https://api.innovanet.com/api/orders" \
  -H "Authorization: Bearer inv_mcp_…" \
  -H "Content-Type: application/json" \
  -d "{\"order_party_pid\":120,\"order_party_role\":1,\"order_type\":1,\"order_subject\":\"Servis vozidla\",\"order_owner\":15,\"order_technical\":15,\"order_supplier_owner\":15,\"order_supplier_technical\":15,\"order_payment_type\":1,\"order_currency\":1,\"order_total\":1000,\"order_valid_from\":\"2026-11-06\",\"order_valid_to\":\"2026-12-31\",\"order_place\":\"Bratislava\",\"order_place_country\":\"SK\"}"

PHP

$res = innovanet('POST', '/api/orders', [
    'order_party_pid' => 120,
    'order_party_role' => 1,
    'order_type' => 1,
    'order_subject' => 'Servis vozidla',
    'order_owner' => 15,
    'order_technical' => 15,
    'order_supplier_owner' => 15,
    'order_supplier_technical' => 15,
    'order_payment_type' => 1,
    'order_currency' => 1,
    'order_total' => 1000,
    'order_valid_from' => '2026-11-06',
    'order_valid_to' => '2026-12-31',
    'order_place' => 'Bratislava',
    'order_place_country' => 'SK',
]);

Response 201

{
  "success": true,
  "message": "Order created",
  "data": {
    "order_id": 15,
    "order_number": "OB20260015"
  }
}

A missing or invalid field returns 422 and errors per field. Besides the format, the API checks that:

  • the amounts are not negative and the amount with VAT is not lower than the amount without VAT,
  • the project, partner, currency and parent contract exist,
  • order_party_role is 1 or 2,
  • order_warranty is 0 to 600 months and order_invoicing_repetition 0 to 1200,
  • a retainer given in percent (type 1, order_retainer_short_value and order_retainer_long_value) is at most 100 %.

The same rules apply to PUT. A database error on save does not expose technical details (SQL, server) to the client; a general message is returned.

Other writes

Update: PUT /api/orders/15 with the fields you change. Response 200, data is null.

Status: POST /api/orders/15/status.

{ "action": "approve" }

action is approve, reject or pause. A change to the same status (approving an approved order, pausing a paused one, rejecting a rejected one) returns a 400 error and adds no duplicate note. Approval requires a valid approval limit for the order amount, currency and project, otherwise an error is returned. An approved order under a framework contract is counted in the cashflow through the contract.

Response 200

{
  "success": true,
  "data": { "new_status": 3 }
}

Duplication: POST /api/orders/15/duplicate with no body. Response 201 with a new order_id and order_number.

Note: POST /api/orders/15/notes. The PDF is a file: GET /api/orders/15/pdf.

Other paths

Each path below belongs to this module. Field names are the ones the API reads. A downloaded file is not JSON.

Paths with an order {id} (attachments, signed and original order, PDF, archive location, status change, duplicate) require the order to be visible to the caller (order owner, project manager, orders manager or administrator). Otherwise the API returns 403. An attachment that does not belong to the order in the path returns 404.

GET /api/orders/party-roles

No body.

Response 200 – Envelope { "success": true, "data": ... }.

GET /api/orders/processing-statuses

No body.

Response 200 – Envelope { "success": true, "data": ... }.

GET /api/orders/invoicing-frequencies

No body.

Response 200 – Envelope { "success": true, "data": ... }.

GET /api/orders/tcs-types

No body.

Response 200 – Envelope { "success": true, "data": ... }.

POST /api/orders/check-blacklist

Body

Field Type Required
company_id string no
{
  "company_id": "text"
}
$res = innovanet('POST', '/api/orders/check-blacklist', [
    'company_id' => 'text',
]);

The API reads these fields. A field is required when the table says yes.

Response 200 – Envelope { "success": true, "data": ... }.

POST /api/orders/{id}/send-email

Body

Field Type Required
emails string no
language string no
subject string no
body string no
{
  "emails": "text",
  "language": "text",
  "subject": "text",
  "body": "text"
}
$res = innovanet('POST', '/api/orders/1/send-email', [
    'emails' => 'text',
    'language' => 'text',
    'subject' => 'text',
    'body' => 'text',
]);

The API reads these fields. A field is required when the table says yes.

Response 200 – Envelope { "success": true, "data": ... }.

PUT /api/orders/{id}/archive-location

Body

Field Type Required
location_number string yes
location_whole string yes
{
  "location_number": "text",
  "location_whole": "text"
}
$res = innovanet('PUT', '/api/orders/1/archive-location', [
    'location_number' => 'text',
    'location_whole' => 'text',
]);

Response 200 – Envelope { "success": true, "data": ... }.

GET /api/orders/{id}/attachments

No body.

Response 200 – Envelope { "success": true, "data": ... }.

POST /api/orders/{id}/attachments

Body

Field Type Required
file file yes

The file is sent as multipart, not in JSON.

Response 201 – Envelope { "success": true, "data": ... }.

GET /api/orders/{id}/attachments/download

Parameters

Field Type Required
attachment_id string no

The API reads these fields. A field is required when the table says yes.

Response – The response is a file, not JSON.

DELETE /api/orders/{id}/attachments

Parameters

Field Type Required
attachment_id string no

The API reads these fields. A field is required when the table says yes.

Response 200 – Envelope { "success": true, "data": ... }.

POST /api/orders/{id}/signed

Body

Field Type Required
file file yes

The file is sent as multipart, not in JSON.

Response 201 – Envelope { "success": true, "data": ... }.

GET /api/orders/{id}/signed/download

No body.

Response – The response is a file, not JSON.

GET /api/orders/{id}/original/download

No body.

Response – The response is a file, not JSON.

GET /api/orders/{id}/pdf/download

Parameters

Field Type Required
lang string no

The API reads these fields. A field is required when the table says yes.

Response – The response is a file, not JSON.


Want to try this feature? Start your innovanet trial →