Create Vendor Return
POST/api/vendor-returns
Create a draft vendor return for goods that will be physically sent back to a supplier.
Authentication: Requires Bearer token.
Body fields:
- supplier_id (integer, required): supplier the goods return to
- warehouse_id (integer, required): warehouse the goods ship out of
- return_date (date, required, YYYY-MM-DD)
- supplier_rma_number (string, optional, max 255): the supplier's RMA reference
- reason (string, optional, max 255)
- notes (string, optional)
- currency_id (integer, optional): defaults to the account's base currency
- lines (array, optional) - each line:
- purchase_order_line_id (integer, required unless product_id is given): the received purchase order line being returned
- product_id (integer, required unless purchase_order_line_id is given; derived from the purchase order line when omitted)
- quantity (number, required, greater than 0)
- unit_cost (number, optional; when omitted it is filled from the cost basis of the purchase order line)
- reason (string, optional, max 255)
- is_write_off (boolean, optional, default false): write-off lines are expensed to cost of goods sold at ship instead of the clearing/accounts-payable split
Validation invariants:
- Single purchase order: every line that references a purchase order line must belong to the SAME purchase order. Mixing lines from different purchase orders is rejected.
- Returnable quantity: per purchase order line, the return quantity cannot exceed received quantity minus what was already returned (across other non-void returns and historical credits). Check availability first with List Returnable Lines For Purchase Order.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Content-Type
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Content-Type
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.