Skip to main content

📝 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
Use the Third Party Labels API when:
  • 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
Both APIs can coexist across different merchants — they are not mutually exclusive at the platform level.

⚙️ 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. The ship_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.
All shipment webhooks are sent to your endpoint — not only those for return policies configured for external labels. Your integration must filter events appropriately based on your business logic.

🔁 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 a ship-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
See the Ship by Loop shipment webhook reference for the complete payload schema.

Step 2: Submit available services

Respond to ship-by-loop.services.requested by calling Add available services to a shipment with the carrier options you can offer:
Timing is critical. The shopper portal waits approximately 15 seconds for carrier options before showing the return-method card. If your response doesn’t arrive in that window, the shopper falls back to any standard return methods available — no error is shown. A late response still succeeds on the API side, but the portal has stopped waiting, so that shopper will not see your options. Respond as quickly as possible.
Key points for submitting services:
  • Each service must include external_id, name, carrier, and packages
  • 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 a ship-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:
At least one of label_url or qr_code_url is required for each order. If you omit both, the API returns a 422 error.

Step 4: Handle cancellations

When a return or label is cancelled, Loop sends a ship-by-loop.cancellation.requested webhook. Your integration should:
  1. Stop any in-progress work for this shipment
  2. Void or refund any carrier label already purchased
  3. Acknowledge with a 200 response
Loop does not expect any API call in response — just the webhook acknowledgement.

📍 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 (not InPost or inpost) 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).
Contact partnersupport@loopreturns.com if you need the full list of supported carrier identifiers for proper portal rendering.

⚠️ 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:
Reporting an error is purely informational. It records the error for visibility but does not change the shipment’s state, retry anything, or notify the shopper. You can still call /services or /orders afterward. Errors are not deduplicated — retrying the same call records duplicate entries.

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 the carrier 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:
  1. Authorize your integration — Install and authorize your app via OAuth. This API requires the ship_by_loop:write scope, which is only available via OAuth 2.0 (not API keys).
  2. 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.
  3. 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.
  4. Enable shopper carrier choice — If you’re providing multiple carrier options, enable the “Allow shopper to choose carrier” setting on the return policy.
  5. 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:
  1. Webhook delivery — Confirm your endpoint receives ship-by-loop.services.requested when a return is initiated.
  2. Service response timing — Ensure your /services response arrives within the ~15 second wait window.
  3. Carrier display — Verify carrier names render with correct icons and location links in the portal.
  4. Label generation — Confirm labels/QR codes display correctly to the shopper after you call /orders.
  5. Tracking — If the policy processes on tracking events, verify Loop can track your carriers using the carrier and tracking_number you provide.
  6. Cancellation handling — Test that your integration properly voids labels when receiving cancellation webhooks.
Always use test or sandbox credentials when available to avoid affecting live return data or triggering real customer notifications.

📚 API and webhook reference


✅ Conclusion

The Ship by Loop Services API enables you to provide a first-class, shopper-facing carrier choice experience for merchants using your label services. By responding to webhooks with available services and recording orders when purchases are made, your integration participates directly in the return flow. For questions about specific configurations or to begin the partner onboarding process, contact your Loop representative or reach out to support@loopreturns.com.