tys.returns.create()
Esta página aún no está disponible en tu idioma.
Record a return of an order line (idempotent by return id and line).
def create(ret: OutcomeReturnInput, *, idempotency_key: Optional[str] = None) -> OutcomeReturnResultParameters
Section titled “Parameters”retOutcomeReturnInputObligatorioPropiedades
idstringObligatorioYour return (or RMA) ID.
order_idstringObligatorioline_idstringObligatorioquantityintegerObligatorioreasonstringOpcionalsize_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.
exchangebooleanOpcionalThe item was exchanged rather than refunded.
exchange_sizestringOpcionalThe size sent in exchange (implies exchange).
returned_atstringObligatorioidempotency_keyOptional[str]Opcional= NoneReturns
Section titled “Returns”OutcomeReturnResult: What was recorded.
Example
Section titled “Example”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(),})await tys.returns.create({ id: "RMA-7", order_id: "1001", line_id: "1", quantity: 1, reason: "size_too_small", returned_at: new Date().toISOString(),});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”¿Te ha resultado útil esta página?
Gracias. Leemos todas las respuestas.