Changing the Purchase Status

Maxim

Maxim

Last updated on Oct 8, 2026

Changes the purchase status. The status determines whether the purchase's materials and products are added to stock.

v1/purchases/update_status.php

Parameters

Field Type Required Description
purchase_id int Yes Purchase ID
status int Yes New status: 0 — Plan, 1 — Ordered, 3 — Received
date_received string No Received date. Used when moving to the Received status

The Partially received status (2) cannot be set via the API: it appears when part of the purchase is received as shipments in the Controlata interface.

date_received is used when moving to Received: it is written to the purchase and the stock entry is dated to it. In other statuses date_received is ignored.

Example request

{
    "purchase_id": 29645,
    "status": 3,
    "date_received": "2026-10-09"
}

Example response

{
    "success": true
}

Errors

Error Reason
No purchase_id in input A required field is missing (instead of purchase_id, the field's name)
Invalid status value. Must be one of: 0, 1, 3 Invalid status, including 2
Purchase not found or access denied Purchase not found or deleted
Date is not a valid date in format YYYY-MM-DD Invalid date_received