Decide a quote’s review
A reviewer’s decision on the quote, as the review queue’s Approve, Reject and Request changes: approve keeps it a quote; reject and request_changes move it to its Rejected or Changes Requested status, note kept as the feedback and in the activity. The status map then moves it, as in the admin. Approving a quote signed with payment due later places it, which also needs Change orders. Send the record’s version from its read, a list row or your last change (or its updated_at as expected_updated_at); changed since: 409 STALE_VERSION with the current version. The answer carries the next version. Refused with the queue’s sentence: 422 RULE_REFUSED, 409 STATUS_CONFLICT. Needs Approve and reject (a key: Prices and exceptions).
Required access
- API key
- Create and change quotesAndPrices and exceptionspermissions
- Request limit
- Counts as 5 requests. Each key has a capacity of 15, restored at 0.6 a second.
Idempotent-Replayed: true. Responses are saved for 24 hours.Headers
Bearer and your key, opk_….
Up to 100 characters (letters, digits, - _ : .). Kept for 24 hours.
application/json. A body is at most 256 KB.
Parameters
The id from a list.
Body
JSONapprove keeps the record its kind (a quote a Quote, an order an Order); reject and request_changes use its kind’s Rejected and Changes Requested statuses.
One of approve, reject, request_changes.
The record’s updated_at as you last read it (its own read), when you don’t send version: a record changed since is refused.
The reviewer’s feedback (up to 2,000 characters): kept on the record and written to its activity. Usually sent with reject and request_changes.
The record’s version as the last answer about it gave it (its read, a list row or your last change), sent back as it is. A record changed since is refused with the current version. Send this or expected_updated_at.
Returns
OK: decision, id, kind, message, status_id, unchanged, version
Errors
Errors use { "error": { "code", "message" } }. Use code to handle the error. View all error codes.
The request isn’t valid (see error.code), or the API version isn’t supported.
No valid access token or API key.
The store’s subscription isn’t active.
Not allowed: the API is off for this store, or the caller lacks the scope or permission.
Not found, or not visible to this caller.
Wrong method for this path; Allow lists every method the path takes.
The request body didn’t arrive in time.
The same Idempotency-Key is still being processed (REQUEST_IN_PROGRESS), its outcome is unknown (OUTCOME_UNKNOWN: check the record), or the record changed since it was read.
The request body is too large.
The request is valid JSON but can’t be done (a rule of the store refuses it), or the Idempotency-Key was used with a different body.
The app is older than the oldest version still served (error.code CLIENT_TOO_OLD); see error.min_version and error.upgrade_url.
Over a rate limit; wait Retry-After seconds.
Something went wrong on our side. A write may have partly happened: check the record before retrying it.
Busy, switched off, or billing couldn’t be checked; wait Retry-After seconds.