Status 409
The purchase order does not accept this command
purchase_order_refused
When it happens
The purchase order does not accept the command in its current state: only drafts and placed orders change, only drafts are deleted, placed orders are cancelled, received ones are closed, and an order is placed only with an active supplier and location. detail names the reason, current.status holds the order status now.
What to do
Read the order again and check its status: delete a draft instead of cancelling it, cancel a placed order instead of deleting it.
Can’t find the answer, or the error keeps coming back? Write to us and quote the X-Request-Id from the response so we can find the request. Contact us
Endpoints that return it
- patch
/purchase-orders/{purchase_order}Change a purchase order: a draft in full, a placed order’s lines, date and note with a revision - delete
/purchase-orders/{purchase_order}Delete a draft purchase order - post
/purchase-orders/{purchase_order}/placeMark a draft as placed with the supplier - post
/purchase-orders/{purchase_order}/cancelCancel a placed purchase order - post
/purchase-orders/{purchase_order}/closeClose a received purchase order
Response body
application/problem+json · ConflictProblem
typestringrequiredMachine type of the problem: a stable code to branch on, such as insufficient_scope. Every type has a page in the error catalog.
titlestringrequiredShort summary of the problem in the language of the request.
statusintegerrequiredHTTP status of the response.
detailstringExplanation of this occurrence in the language of the request.
currentobjectThe record as it is now, the fields the conflict is about: on_hand for stock_on_hand_changed, status for rejected order changes, status and order_id for a closed draft.
external_idstringFor external_id_in_use and external_id_archived — the taken external ID.
consent_kindstringFor consent_required — the kind of consequence to agree to.
consequencesmap of integerFor consent_required — what will change: kind of data → number of records.
- Minimum:
- 0
consent_tokenstringFor consent_required — fingerprint of the shown consequences. Repeat the request with consent[<consent_kind>]=<consent_token>.
variant_idintegerFor consent_required of a variant line in a product write — the variant: the consent is given by changing that variant (PATCH /v1/variants/{variant}).
limitintegerFor plan_limit_reached, address_book_full, bulk_operation_queue_full and webhook_endpoint_limit_reached — the limit.
- Minimum:
- 0
fieldstringFor customer_contact_in_use — the contact that belongs to another customer: phone or email.
- Values:
phoneemail
existing_customer_idintegerFor customer_contact_in_use — the customer the contact belongs to.
receivedintegerFor upload_offset_mismatch — bytes the upload has received: the offset to continue from.
- Minimum:
- 0
operation_statusstringFor bulk_operation_finished — the status the operation finished with.