Skip to main content
POST
Resolve a receipt recorded without stock

Authorizations

Authorization
string
header
required

API key issued per entity via Settings > Developers > API Keys. Each key carries scopes (e.g. orders:read, products:write). Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.

Headers

Idempotency-Key
string

Client-generated unique key for idempotent POST/PATCH/DELETE operations. Alias for the Idempotency parameter. Max 255 chars. On retry with the same key, the original response is returned without re-executing the operation. Keys expire after 24 hours. A second request with the same key sent while the first is still running waits for it and returns its answer; if the first is still running after 20 seconds the second answers 409 idempotency_key_in_use (retryable, nothing done). An answer carrying retryable: true is not cached. Reusing a key with a different request body answers 409 idempotency_key_collision (nothing done; send the new request with a fresh key). The replay, the wait and these two 409 codes come from the idempotency layer, so they apply to the operations that run it, each of which can answer the two codes whether or not its own 409 response lists them. The handlers of these operations take the header but do not run the layer, so on them the key neither replays nor answers either code: createPaymentPlan, chargePaymentPlanInstallment, setProductLocations, updateOrder, emailOrder, updateOrderItem, confirmPickup, markOrderNoShow, applyExistingPaymentToInvoices, updatePackage, movePackageItem, changePackageBox, changePackageCarrier, voidPackageLabel, printPackageLabel, emailPackage, setProNumberV1, setPackageProNumber, sendPurchaseOrderToVendorV1, notifyRevisionPurchaseOrderV1, addMaintenanceLog, generateBOLV1, createReportJobV1 and customerAcknowledgeRevision; recordVendorPrepaymentV1 and recordCustomerDepositV1 hand the key to their own write instead.

Maximum string length: 255

Path Parameters

id
string<uuid>
required
receipt_item_id
string<uuid>
required

A receipt item of the return recorded as received without stock entering (its stock_mode is stock_missing).

Body

application/json
mode
enum<string>
required

How the item is resolved. Any other value is refused 422 repair_mode_invalid.

Available options:
book_missing_stock,
reverse_unbacked
note
string

The physical count that found the units (book_missing_stock), or why the count is reversed, in 10 characters or more (else 422 count_note_required). Required unless note_id is sent.

Minimum string length: 10
note_id
string<uuid>

A note of this entity that already says it, instead of note (one that is not this entity's is refused 422 note_not_found).

quantity
integer

The units to resolve, 1 up to the item's units still waiting (default all of them). Booking the stock books all of them; any other number is refused 422 quantity_invalid.

Required range: x >= 1
entered_cost
object

On book_missing_stock, the unit cost the units are booked at when neither the receipt item nor the sale carries one (422 receipt_cost_required names it); a line whose cost is known from the sale refuses it.

Response

Resolved. The return as GET /returns/{id} answers it, with what this act did as repair_stock.

data
object
required

RMA (return merchandise authorization). Phase A -- refund_amount is readOnly via PATCH; written only by POST /v1/returns/{id}/refund.