Lodge a return
Lodges a return request against one of the authenticated customer’s own
online orders. The return is created with status: "pending" for the
merchant to review.
Authentication: API key in the Authorization: Bearer header and a
customer session — either x-auth-token or x-external-auth.
Order ownership: order_id must reference an online order belonging to
the authenticated customer, and each items[].order_item_id must be a line
on that order. An order that does not exist or does not belong to the
customer returns 404.
Reason description: reason_description is required only when
reason_code is other; for every other reason it is optional.
Returns availability: if the store has returns turned off, the request
returns 422 with code returns_disabled.
After lodging a return the customer can only track its status — approving, issuing refunds or store credit, restocking, and rejecting items are handled by the merchant in their admin.
Authorizations
API Key Authentication
Use your API key in the Authorization header:
Key Types:
Secret Keys (Server-Side Only):
- Format:
tybrite_sk_live_*(production) ortybrite_sk_test_*(sandbox) - Full read/write access to all endpoints
- ⚠️ NEVER expose in client-side code or public repositories
- Required for: write operations, authentication, payment verification, AI recommendations
Publishable Keys (Client-Safe):
- Format:
tybrite_pk_live_*(production) ortybrite_pk_test_*(sandbox) - Read-only access (GET requests only, plus POST semantic search)
- ✅ Safe for client-side JavaScript, mobile apps, and public code
- Allowed for: browsing products, search, CMS content, pricing queries
Endpoint-Specific Requirements:
- Authentication endpoints (
/v1/auth/*): Secret key required - Payment verification (
POST /v1/payments/verify): Secret key required - AI Recommendations (
POST /v1/recommendations): Secret key required - Semantic Search (
POST /v1/search): Both key types allowed (read-only operation) - All write operations: Secret key required
- All read operations: Both key types allowed
Using a publishable key for restricted operations returns 403 Forbidden.
Headers
Customer session token from POST /v1/auth/login or
POST /v1/auth/verify-otp. Provide exactly one of x-auth-token, x-external-auth, or x-idp-token.
Bring-your-own-auth assertion identifying the customer. Provide exactly one of
x-auth-token, x-external-auth, or x-idp-token.
A raw token from the store's own identity provider (e.g. a Firebase ID token). Galactic Core forwards it to the store's configured Auth verifier, which validates it and returns the identity.
Verification is fail-closed: if the verifier rejects the token or is unreachable, the request is unauthenticated (401). Requires an Auth verifier to be configured for the store. Provide exactly one of x-auth-token, x-external-auth, or x-idp-token.
Query Parameters
Marketplace operator key only — and required for operator keys. On a marketplace storefront, the merchant the order belongs to. Ignored for single-store keys.
Body
The customer's online order the return is for.
"770a0622-0401-63f6-c938-557766551111"
Why the items are being returned.
damaged, defective, wrong_item, not_as_described, wrong_size, no_longer_needed, arrived_late, other "damaged"
The order lines being returned.
1Free-text explanation. Required when reason_code is other;
optional otherwise.
"The box was crushed in transit."
The resolution the customer is requesting.
full_refund, partial_refund, exchange, store_credit "full_refund"
Response
Return lodged

