Skip to content

tys.returns.create()

Method@tryyoursize/node

create(ret: OutcomeReturnInput, options?: RequestOptions): Promise<OutcomeReturnResult>
retOutcomeReturnInputRequired
Properties
idstringRequired

Your return (or RMA) ID.

order_idstringRequired
line_idstringRequired
quantityintegerRequired
reasonstringOptional

size_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.

exchangebooleanOptional

The item was exchanged rather than refunded.

exchange_sizestringOptional

The size sent in exchange (implies exchange).

returned_atstringRequired
optionsRequestOptionsOptional

Promise<OutcomeReturnResult>: What was recorded.

await tys.returns.create({
id: "RMA-7",
order_id: "1001",
line_id: "1",
quantity: 1,
reason: "size_too_small",
returned_at: new Date().toISOString(),
});

Was this page helpful?