📝 Overview
The Ship by Loop Services API enables external shipping providers (such as 3PLs, WMS partners, or cross-border shipping partners) to offer carrier and return method options directly to shoppers during the return flow. This integration promotes your label service from a passive label provider to a first-class, shopper-selectable shipping option.When to use which API? The Ship by Loop Services API and the existing
Third Party Labels API serve
different use cases. See Choosing the right
integration below to determine which one
fits your needs.
Key capabilities
- Shopper carrier choice — Let shoppers select from available carriers/return methods you provide, rather than receiving a carrier unilaterally assigned after the return is submitted.
- Multilabel support — Support multiple packages per return, each with their own label.
- Full lifecycle control — Respond to service requests, record orders and labels, and handle cancellations via webhooks.
How it works
The integration follows a webhook-driven request/response model:🔄 Choosing the right integration
Loop offers two APIs for external label providers. Choose the one that matches your merchants’ needs:
Use the Ship by Loop Services API when:
- Your merchants need to offer shoppers a choice of carriers or return methods
- You need multilabel capabilities
- Your platform can reliably respond to webhooks in real time
- A single label per return is sufficient
- You prefer the flexibility of polling in addition to webhooks
- You need the ability to remediate label issues after return submission
⚙️ Prerequisites
Before integrating with the Ship by Loop Services API, complete the following setup:Accept the Label Provider Terms
Start by filling out this form, which sends a signable version of Loop’s terms to your preferred signatory. Contact Kent Woodyard (kent@loopreturns.com) with any questions about the terms.Register your integration and obtain OAuth credentials
The Ship by Loop Services API requires OAuth 2.0 authentication. Theship_by_loop:write scope is restricted and cannot be granted to API keys — you must use OAuth 2.0 tokens.
Follow the steps in the Authorize with OAuth guide to register your integration.
When requesting OAuth credentials, include the following scopes:
Set up webhooks
After your integration completes the OAuth flow, subscribe to the Ship by Loop shipment webhooks. Webhooks are the only way to receive notifications — there is no polling API for this surface. See the Ship by Loop shipment webhook reference for the full webhook payload schema and trigger details. Work with your Loop representative to configure webhook subscriptions for the Ship by Loop triggers your integration needs.🔁 Integration lifecycle
Step 1: Receive service requests
When a shopper initiates a return through a policy using Ship by Loop with external labels, Loop sends aship-by-loop.services.requested webhook to your endpoint.
The webhook payload includes full shipment details:
- Origin address — the shopper’s address
- Destination address — the returns warehouse
- Outbound order details — original order number, carrier, tracking, total value
- Packages — each package with dimensions, weight, and item details
Step 2: Submit available services
Respond toship-by-loop.services.requested by calling Add available services to a shipment with the carrier options you can offer:
- Each service must include
external_id,name,carrier, andpackages - The same package ID can appear under multiple services (for shopper carrier choice)
- A single service can cover multiple packages
- Services are presented to the shopper as carrier options
Step 3: Record orders and labels
When the shopper selects a carrier, Loop sends aship-by-loop.purchase.requested webhook. The service field on each package is now populated with the chosen service.
Respond by calling Record orders on a shipment with tracking and label information:
Step 4: Handle cancellations
When a return or label is cancelled, Loop sends aship-by-loop.cancellation.requested webhook. Your integration should:
- Stop any in-progress work for this shipment
- Void or refund any carrier label already purchased
- Acknowledge with a
200response
📍 Carrier names and portal display
If the carrier name you provide doesn’t map to a known Ship by Loop carrier, the portal displays a default icon and generic treatment. To get the correct carrier icon, location finder link, and priority placement:- Map to Loop’s carrier identifiers — For example, InPost in the UK must be sent as carrier name
inpost-uk(notInPostorinpost) to receive the proper icon, location link, and top-of-list pinning. - Consistent naming — Use lowercase with hyphens for regional variants (e.g.,
royal-mail,dpd-uk,evri).
⚠️ Error handling
Reporting errors to Loop
If you encounter an error generating a label or providing services, report it using Report errors on a shipment:What the shopper sees
The shopper portal does not display terminal error states. If a label cannot be generated, the portal continues to show “your label is coming” messaging. This is a known limitation of the Ship by Loop surface.🚨 Important limitations
QR codes and printed labels
A carrier that offers both QR codes and printed labels must return both under the same service. If your platform treats these as separate services, you must choose one format (QR or printed label) when configuring the service — you cannot offer both as separate shopper choices.Partner downtime
Unlike the Third Party Labels API (where Loop can remediate after a return is submitted), partner downtime on this API prevents shoppers from submitting returns. Carrier selection happens before the return is submitted, so if your service is unavailable when Loop requests services, the shopper cannot complete their return through policies using your integration. Ensure high availability of your webhook endpoint and services response.No polling — webhooks only
This API has no polling endpoint. Your integration must be capable of receiving and processing webhooks reliably. There is no way to ask Loop “what’s pending for me?”Shop-level configuration
Currently, you cannot use both Ship by Loop’s first-party carriers and external partner labels within the same shop. When using this integration, the merchant should not enable any first-party Ship by Loop carriers in Loop Admin — your external partner provides all carrier options instead.Tracking
Shipment tracking is handled by Loop using thecarrier and tracking_number you provide when calling /orders. You do not push tracking events yourself.
This differs from the Third Party Labels API, where Loop auto-tracks supported carriers but partners must push status updates for carriers Loop doesn’t track automatically.
If the merchant’s return policy is configured to process returns on tracking events, verify that Loop supports tracking for your carriers before going live.
🛠️ Merchant setup
Merchants using your integration need to complete the following setup in Loop Admin:-
Authorize your integration — Install and authorize your app via OAuth. This API requires the
ship_by_loop:writescope, which is only available via OAuth 2.0 (not API keys). - Configure Ship by Loop — Navigate to the Ship by Loop settings. The wallet does not need to be funded. Do not enable any first-party Ship by Loop carriers — your external partner provides the carrier options instead.
- Create a return policy — Create or edit a return policy and select Ship by Loop as the label provider. Do not add a payment method to the policy.
- Enable shopper carrier choice — If you’re providing multiple carrier options, enable the “Allow shopper to choose carrier” setting on the return policy.
- Test the integration — Submit a test return through the configured policy to verify carrier options appear and labels are generated correctly.
🧪 Testing your integration
Before going live, verify the complete flow:-
Webhook delivery — Confirm your endpoint receives
ship-by-loop.services.requestedwhen a return is initiated. -
Service response timing — Ensure your
/servicesresponse arrives within the ~15 second wait window. - Carrier display — Verify carrier names render with correct icons and location links in the portal.
-
Label generation — Confirm labels/QR codes display correctly to the shopper after you call
/orders. -
Tracking — If the policy processes on tracking events, verify Loop can track your carriers using the
carrierandtracking_numberyou provide. - Cancellation handling — Test that your integration properly voids labels when receiving cancellation webhooks.