Using the API
Authentication
All requests to the Loop API require an API key with the correct scopes.
Create API Keys
- Log in to the Loop Admin.
- Navigate to Returns Management > Tools & integrations > Developer Tools.
- Click Generate API key, then add the scopes you want to allow the API key to access.
Scope | Available Endpoints |
---|---|
Returns | Process Return, Remove Line Items, Cancel Return, Flag Return, Close Return, Get Return Notes, Create Return Note, Detailed Returns List, Get Return Details, Advanced Shipping Notice, Grade Items, Assess Dispositions, Create Fraud Report |
Orders | Create Return Deep Link, Create Return Deep Link with QR Code, List Blocklist Items, Get Blocklist Item, Create Blocklist Item, Delete Blocklist Item, List Allowlist Items, Create Allowlist Item, Get Allowlist Item, Delete Allowlist Item |
Carts | Create Cart, Get Cart, Update Cart, Delete Cart |
Developer Tools | Get Webhooks, Create Webhook, Delete Webhook, Update Webhook |
Destinations (Read) | Get All Destinations, Get Destination Details |
Destinations (Write) | Create Destination, Update Destination, Delete Destination |
Happy Returns Shipments (Read) | Get Shipment Information, Get Shipments, Get Shipment Items |
You can also refer to the documentation for each endpoint to determine the required scopes.
- Give the API key a descriptive name, then click Generate.
Edit keys
In addition to creating API keys, you can also edit and delete keys from the Developer Tools page.
Using API Keys
Every request requires a key to be provided in the X-Authorization
header.
An invalid API key will result in a 401 Unauthorized
response code. An API key is invalid if or lacks the required scopes for the requested endpoint.