Example Scenario
Consider an ISV that has built an integration to Shopify using Alloy. This ISV is now looking to extend the functionality of its platform for its end-users. To do so, the ISV requires access to Shopify’sGET /admin/api/2023-10/draft_orders.json
endpoint. Without Passthrough API, the ISV would be out of luck as this endpoint is not supported within Alloy’s Shopify connector.
Fortunately, Passthrough API solves this problem. With Passthrough APIs, the ISV can specify the raw http
path to make a call to using the end-user’s underlying authentication.
Implementation
Making a Request
To forward a request, use the following curl command:cURL
method
: (required) The HTTP method of the Passthrough APIs you’re trying to make (i.e. GET, POST)path
: (required) The relative path of the endpoint to call (i.e./admin/api/2024-04/draft_orders.json
)extraHeaders
: (optional) Any headers to send along with the request. Must be in a stringified JSON format. Passnull
if not sending anything.query
: (Optional) Any query parameters for the request. Passnull
if not sending anything.body
: (Optional) Any body parameters for the request. Must be in a stringified JSON format. Passnull
if not sending anything.
More Advanced Example
The example below uses the Shopify API to create a new customer using Passthrough APIs. Note that the Passthrough API only acceptsPOST
requests.
cURL
Receiving a Response
Returning to our Shopify example, once invoked, the Passthrough API uses the underlying credential you supplied (via thecredentialId
). The passthrough API will then return the raw data from Shopify’s /admin/api/2023-10/draft_orders.json
endpoint as seen below. Alloy Unified API will return the relevant headers
, statusCode
, and data
.
JavaScript
Connectors Supported by Passthrough API
Passthrough API is currently available for the following connectors:- Aircall
- Asana
- Aspire
- Attentive Legacy
- Attentive
- Avalara
- Best Buy
- BigCommerce
- BrightPearl
- Clearbit
- Salesforce Commerce Cloud
- Customer IO
- Endear
- Facebook Ads
- Freshdesk
- Gorgias
- Hubspot
- Inveterate
- Klaviyo
- LoyaltyLion
- Magento
- Mailchimp
- MS Business Central
- Mintsoft
- Okendo
- Omnisend
- Picquer
- Postscript
- Push Owl
- ReCharge
- Retention Science
- Retently
- Salesforce CRM
- SAP S/4 Hana
- Shipbob
- ShipHero
- ShipStation
- Shopify
- Slack
- Smile IO
- Stamped IO
- Stripe
- WooCommerce
- Xero
- Yotpo
- Yotpo Loyalty
- Zendesk
- Zoho CRM