Plug returns into the system you already use
A public REST API for handling returns and complaints across all your sales channels. Plug it into your store platform, middleware, ERP, or your own software.
See the API documentation · Create a free account

When the API makes sense
- You run your own store and want a return form that matches your own layout.
- Your team works in an ERP or WMS and doesn’t want to switch between systems.
- You’re an agency or integrator plugging returns into several clients at once.
- You sell across multiple channels and want a single view on your side.
Looking for a ready-made tool without writing code? RetJet also works on its own, through the dashboard. See features, integrations, and pricing.
What you can do
Requests. Open a return or complaint on behalf of a customer, fetch the list of cases and the details of a single one, change status within the workflow.
Products from an order. Find the items a customer can return: by email and order number, by phone and Allegro login, or by shipment number alone. Order data is fetched at the moment of the request, you don’t import the whole database just in case. (We cover the same mechanism from the store’s side, not the code’s, in Lightweight integration without importing orders.)
Bulk operations. Status change, assigning an owner, starring: up to 100 requests in a single call. Requests whose state doesn’t allow the change come back in the response instead of silently disappearing.
Return amount. Approve or adjust the amount and currency. Update a line item in the request: confirmed quantity and amount.
Talking to the customer. Add a message visible to the customer or an internal note. Attach photos and documents: as URLs or base64 data.
History and team. Fetch the request’s timeline, filtered by event type and visibility. Set a resolution deadline, add watchers, tag the case.
Store configuration. Return reasons, product conditions, resolution methods, return points, and sales channels: exactly as the store set them up.
Your first call in three steps
- Generate a key in account settings, API keys section.
- Add the header
Authorization: Bearer <your-key>. - Check the connection:
GET /v1/sale-channelsreturns your sales channels.
The key belongs to the company, not to the account of the person who created it. The integration won’t stop working when an employee leaves.
Don’t see the API keys section in settings? Write to us, we’ll enable access.
What you can rely on
Limits are explicit. 60 requests in a burst, refilling at 60 per minute, plus 10,000 requests per day per key. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset for whichever limit is closer to running out. A refusal carries Retry-After with the wait time.
Every request has an identifier. An X-Request-Id header comes back in the response. Give it to us in a support request and we’ll find that exact call in the logs.
Pagination without guessing. Collections return X-Total-Count, X-Total-Pages, X-Page, and X-Per-Page, and the Link header carries a rel="next" relation. 30 records per page by default, 100 at most.
A spec instead of a description. Full OpenAPI 1.0.0 in JSON and YAML, plus Swagger UI and ReDoc. Generate a client in your language from it.
PHP library: our first official client
You don’t have to write an HTTP layer from scratch. We released an official PHP library, currently in beta.
composer require retjet/returns-api-php-client:^0.1@beta
use RetJetApi\Returns\Client;
$client = Client::create('YOUR_API_KEY');
$rma = $client->rmaRequests()->get(1234);
echo $rma->identifier;
Requires PHP 8.2 and any PSR-18/PSR-17 implementation (Guzzle, Symfony HTTP Client, or whatever you already use in your project). MIT licensed, code on GitHub: RetJet/returns-api-php-client.
Beta means beta: the library’s API may still change before 1.0. RetJet’s own API is stable at v1. Treat the library as a convenience, not a requirement for integrating. We read issues and pull requests in the repository.
Writing in another language? Generate a client from the OpenAPI spec, or write to us: we prioritize future libraries based on requests.
Before you start writing code
Three things worth knowing upfront.
Keep the key server-side. It grants read and write access to all of the company’s returns. The API doesn’t return CORS headers, so a browser can’t call it directly anyway. Calls go through your backend.
The request list has pagination, not filters. GET /v1/rma-requests accepts page and limit. If you’re building your own views by status or by customer, store request identifiers on your side at creation time: POST returns the full request with id, uuid, and identifier.
Today it’s returns and complaints. Shipments and parcel tracking will join under the same base address, versioned separately. What you write today won’t stop working.
Frequently asked questions
Do I have to import orders into RetJet?
No. You fetch order data at the moment a customer requests a return, via GET /v1/ordered-products. There’s no syncing the whole database just in case.
What can I use to find an order? By email together with the order number, by phone together with an Allegro login, or by shipment number alone.
Can I call the API from a browser, straight from a form on my site? No. The API doesn’t return CORS headers, and the key grants full access to the company’s returns. The form talks to your server, the server talks to RetJet’s API.
What happens to the integration when the person who set it up leaves? Nothing. Keys are tied to the company, not to a user account.
What format does the API respond in? JSON. The full spec follows the OpenAPI standard, with a Swagger UI and ReDoc interface.
Does the API replace the RetJet dashboard? No, it works alongside it. A request opened via the API shows up in the dashboard, and the other way around.
Is there a ready-made library for my language?
PHP for now: retjet/returns-api-php-client on Packagist, in beta, MIT licensed. For other languages, generate a client from the OpenAPI spec.
How much does API access cost?
Closing
The documentation is public. Take a look before you create an account, you’ll see exactly what the API does and doesn’t do.