tys.returns.create()
create(ret: OutcomeReturnInput, options?: RequestOptions): Promise<OutcomeReturnResult>Parameters
Section titled “Parameters”retOutcomeReturnInputRequiredProperties
idstringRequiredYour return (or RMA) ID.
order_idstringRequiredline_idstringRequiredquantityintegerRequiredreasonstringOptionalsize_too_small, size_too_large, fit_other, style, quality, damaged_or_wrong, changed_mind, other; Shopify's ReturnReason codes (SIZE_TOO_SMALL…) and common returns-platform words are mapped. Empty: unspecified.
exchangebooleanOptionalThe item was exchanged rather than refunded.
exchange_sizestringOptionalThe size sent in exchange (implies exchange).
returned_atstringRequiredoptionsRequestOptionsOptionalReturns
Section titled “Returns”Promise<OutcomeReturnResult>: What was recorded.
Example
Section titled “Example”await tys.returns.create({ id: "RMA-7", order_id: "1001", line_id: "1", quantity: 1, reason: "size_too_small", returned_at: new Date().toISOString(),});tys.returns.create({ "id": "RMA-7", "order_id": "1001", "line_id": "1", "quantity": 1, "reason": "size_too_small", "returned_at": datetime.now(timezone.utc).isoformat(),})curl -X POST https://api.tryyoursize.com/v1/returns \ -H "Authorization: Bearer $TRYYOURSIZE_SECRET_KEY" \ -H "TYS-Version: 2026-10-25" \ -H "Content-Type: application/json" \ -d '{"id":"RMA-7","order_id":"1001","line_id":"1","quantity":1,"reason":"size_too_small","returned_at":"2026-11-02T09:00:00Z"}'See also
Section titled “See also”Was this page helpful?
Thank you. We read every answer.