Connections
The Connection Object
The Connections endpoints are used to manage Connections, which are the individual storefronts, payment processors, or accounting systems that businesses have shared with you. You can use these endpoints to create a new connection manually and send an authentication link directly to a merchant, or get access to the raw credentials for a specific platform (Shopify, WooCommerce, Quickbooks Online, etc.).
To understand the lifecycle of a Connection and the important events that occur when a merchant connects/disconnects their platform, see Connection Lifecycle.
Properties
idstringThe UUID of the connection. Generated by Rutter.
orgIdstringYour organization id.
platformenumThe underlying platform.
List Connections
Request Parameters
statusenumqueryOptionalFilter results by connection status. If omitted, will return all active, not_ready, and unhealthy connections.
Response Body
Fetch a Connection
Request Parameters
access_tokenstringqueryRequiredThe access token of the connection.
Response Body
Fetch a Connection Status
The Connection Status endpoint allows you to retrieve information about a connection's historical and recent data syncs.
Not every platform has detailed support for sync information about each data object, e.g. fields within the total property. If a platform does not support a metadata field, the value will be null.
Request Parameters
access_tokenstringqueryRequiredThe access token of the connection.
Response Body
Create a Connection
Create connections programmatically using the Create a Connection API. There are three ways to use this API:
- Create a connection that allows the merchant to select which platform they want to connect. This is done by leaving the request body empty.
- Create a connection with existing credentials. This is done by specifying the platform and including the associated credentials (OAuth, Basic Auth, etc.) for the connection. Rutter will use these fields to make the authenticated API requests to the platform. To see what values are required for each platform, see the Platform Specific Required Body Params table below or contact support@rutterapi.com for more support.
- For Intuit Bank Feeds only, all new connections must be created by calling this endpoint with the body
"platform": "INTUIT_BANK_FEEDS". Please see our guide for more details.
A connection's access_token is unique and does not expire. To rotate the access_token for a connection, you can use the /connections/access_token/invalidate endpoint. This endpoint generates a new access_token while invalidating the old one.
Sync Configuration
You can optionally include a syncConfig field when creating a connection to customize how data is synced. This allows you to specify which entities to sync, historical data timeframes, and incremental sync frequency. Sync configuration is currently supported for most accounting platforms.
For complete details about sync configuration structure and options, see Sync Configuration.
Connection URL
One of the returned fields in the connection object from the Create a Connection endpoint is the link_url, which is a unique, stable link that you can send to a business for Business Authentication.
The link_url points to the Rutter Link web app, which handles the authentication flow for each Ecommerce platform. Once the merchant completes the Link authentication flow, a CONNECTION_UPDATED event will be fired to your Webhook URL, and you will be able to fetch data for their store through this Connection.
There are a few query parameters that you can specify to a connection URL to customize the authentication experience. Here are some examples:
Loads the authentication flow directly to the Wix-specific step: https://link.rutterapi.com/connection/123?platform=wix
Loads the authentication flow directly to the Wix-specific step and on completion the merchant will be redirected to Google: https://link.rutterapi.com/connection/123?platform=wix&redirect_url=https%3A%2F%2Fwww.google.com
| Query Param | Example Value | Description |
|---|---|---|
| platform | SHOPIFY | If platform is specified, the Rutter Link flow will start directly at the authentication process for the specified platform, skipping the screen for choosing the platform. See Supported Platforms for the respective ENUM values. |
| redirect_url | https://www.google.com?q=customparameter | If redirect_url is specified, the merchant will be redirected to the URL specified, and a public_token query parameter for the connection will be added to this url. If the value is https://www.google.com?q=customparameter, the final URL will be https://www.google.com?q=customparameter&public_token=PUBLIC_TOKEN |
| shopifystore | example | if shopifyStore is specified, the Shopify authentication screen will be pre-filled with the store URL. If the value is example, Rutter Link will show example.myshopify.com |
Request Body
- ALL OF:
platformenumThe underlying platform.
scopestringOptionalsyncConfigobjectOptionalOptional sync configuration for the connection. Supported for Dynamics 365 Business Central, FreshBooks, Moneybird, NetSuite, Odoo, QuickBooks, QuickBooks Desktop, Sage Business Cloud, Sage Intacct v2, Stripe, Xero, and Zoho Books.
syncConfig attributesCredentials for BigCommerce
oauth_client_idstringOptionalBigCommerce App Client ID
oauth_access_tokenstringBigCommerce Store Access Token
store_urlstringBigCommerce merchant .mybigcommerce.com domain URL
oauth_client_secretstringOptionalBigCommerce App Client Secret
Credentials for Amazon
amazon_access_key_idstringAWS User Access Key ID
oauth_client_idstringSP-API App Client ID
amazon_secret_access_keystringAWS User Secret Access Key
amazon_seller_regionenumRegion of Amazon seller - must be one of na (North America), eu (Europe), or fe (Far East).
amazon_selling_partner_rolestringAWS Role ARN used in SP-API app
oauth_client_secretstringSP-API App Client Secret
oauth_refresh_tokenstringSP-API Refresh Token
Credentials for Shopify Private App
basic_passwordstringPrivate Shopify App Password
basic_usernamestringPrivate Shopify App API Key
store_urlstringShopify merchant .myshopify.com domain URL
Credentials for Shopify Public App
oauth_client_idstringShopify Public App Client ID
oauth_access_tokenstringShopify Merchant Access Token
oauth_client_secretstringShopify Public App Client Secret
store_urlstringShopify merchant .myshopify.com domain URL
Credentials for PrestaShop
api_keystringPrestaShop API Key
store_urlstringPrestaShop merchant domain URL
Credentials for Shoper
oauth_access_tokenstringShoper merchant OAuth Access Token
oauth_refresh_tokenstringShoper merchant OAuth Refresh Token
store_urlstringShoper merchant domain URL
Credentials for WooCommerce
basic_passwordstringWooCommerce Rest API Consumer Secret
basic_usernamestringWooCommerce Rest API Consumer Key
store_urlstringWooCommerce merchant website URL
Credentials for Magento
basic_passwordstringMagento Admin User Password
basic_usernamestringMagento Admin User Username
store_urlstringMagento merchant website URL
Credentials for eBay
oauth_client_idstringEbay Developer OAuth Client ID
oauth_client_secretstringEbay Developer OAuth Client Secret
oauth_refresh_tokenstringEbay OAuth Refresh Token
Credentials for Lazada
oauth_client_idstringOAuth Client ID
countrystringCountry Code for Merchant (e.g. id, sg, th)
oauth_access_tokenstringOAuth Access Token
oauth_client_secretstringOAuth Client Secret
oauth_refresh_tokenstringOAuth Refresh Token
Credentials for Fnac
partner_idstringPartner ID
shop_idstringShop ID
keystringKey
Credentials for Square
oauth_client_idstringSquare Developer OAuth Client ID
oauth_client_secretstringSquare Developer OAuth Client Secret
oauth_refresh_tokenstringSquare OAuth Refresh Token
Credentials for Stripe
account_idstringStripe Account ID
oauth_access_tokenstringStripe OAuth Access Token
Credentials for Quickbooks
oauth_client_idstringOAuth Client ID
realm_idstringRealm ID
oauth_client_secretstringOAuth Client Secret
oauth_refresh_tokenstringOAuth Refresh Token
environmentstringOptionalEnvironment (e.g. sandbox)
Credentials for Netsuite
token_idstringToken ID
consumer_keystringConsumer Key
consumer_secretstringConsumer Secret
store_namestringStore Name (for sandbox you should put it in the form '1000000_SB1')
token_secretstringToken Secret
Credentials for Walmart
oauth_client_idstringWalmart Developer OAuth Client ID
seller_idstringOptionalFor OAuth connections, the Walmart Seller ID.
oauth_client_secretstringWalmart Developer OAuth Client Secret
oauth_refresh_tokenstringOptionalWalmart OAuth Refresh Token. If provided, the connection is created as an OAuth 2.0 connection.
Credentials for Xero
oauth_client_idstringOAuth Client ID
tenant_idstringThe Xero Tenant ID
user_idstringThe Xero User ID
oauth_client_secretstringOAuth Client Secret
oauth_refresh_tokenstringOAuth Refresh Token
Credentials for Zoho Books
oauth_client_idstringOAuth Client ID
organization_idstringZoho Books Organization ID
oauth_access_tokenstringOAuth Access Token
oauth_client_secretstringOAuth Client Secret
oauth_refresh_tokenstringOAuth Refresh Token
regionstringOptionalZoho region (e.g., com, eu, in, com.au)
Response Body
1{
2 "platform": "SHOPIFY",
3 "oauth_client_id": "CLIENT_ID",
4 "oauth_access_token": "ACCESS_TOKEN",
5 "store_url": "shopifystore.myshopify.com",
6 "oauth_client_secret": "CLIENT_SECRET"
7}
1{
2 "connection": {
3 "id": "00000000-0000-0000-0000-000000000000",
4 "access_token": "00000000-0000-0000-0000-000000000000",
5 "link_url": "https://link.rutterapi.com/connection/00000000-0000-0000-0000-000000000000",
6 "name": "Example Connection"
7 }
8}
Update a Connection
Request Parameters
idstringpathRequiredThe Rutter generated unique ID of the object.
Request Body
namestringCustomer-supplied unique name of the connection. Must be unique across all connections. Must be at most 30 characters.
Response Body
1{
2 "name": "Example Connection"
3}
1{
2 "connection": {
3 "id": "00000000-0000-0000-0000-000000000000",
4 "access_token": "00000000-0000-0000-0000-000000000000",
5 "link_url": "https://link.rutterapi.com/connection/00000000-0000-0000-0000-000000000000",
6 "name": "Example Connection"
7 }
8}
Delete a Connection
Request Parameters
idstringpathRequiredThe Rutter connection ID to delete.
Response Body
1{
2 "success": true
3}
Trigger Incremental Sync
The Trigger Incremental Sync API endpoint allows you to manually trigger an Incremental Sync for a given connection. This will sync all objects that have been updated or created since the last sync. An example of when you may want to trigger an Incremental Sync is if you know new objects have been created in a platform, and you want to sync these new objects as soon as possible (rather than wait for Rutter's scheduled Incremental Sync to run).
NOTE: This functionality should only be used on a one-off basis. Rutter automatically schedules Incremental Syncs periodically and one doesn't typically need to make this API call except in rare cases. For each Incremental Sync triggered, Rutter may skip that many scheduled Incremental Syncs.
After receiving a success response, a sync will be queued and started shortly. You will begin to receive webhooks for updated/created objects if you are subscribed to them.
Request Parameters
access_tokenstringqueryRequiredThe access token of the connection.
Request Body
object_typesarrayOptionalThe Rutter object types which you would like to sync. If an empty array is provided, no entities will be synced. If object_types is not defined, all entities will be synced.
Response Body
1{
2 "success": true
3}
Invalidate Access Token
This endpoint generates a new access_token while invalidating the old one.
Request Parameters
access_tokenstringqueryRequiredThe access token of the connection.
Response Body
1{
2 "new_access_token": "00000000-0000-0000-0000-000000000000"
3}
Trigger Data Recovery Backfill
The Trigger Data Recovery Backfill API endpoint is a heavyweight operation to reload all historical data for a given connection. Backfills can significantly impact a connection's performance and normal data sync cadence and should be used with care.
If you trigger a Backfill, this will pause the scheduled Incremental Syncs that Rutter automatically performs for the connection until the Backfill is complete. Backfills may also cause rate limits to be hit on the source platform due to the quantity of data being synced.
Backfills should only be used in two scenarios:
- You have added a new entity to your Data Sync Config and need to retrieve historical data for that entity.
- You have identified data gaps that need remediation. This is an extremely rare occurrence.
Do not use this endpoint for regular data syncs. Consider using our Trigger Incremental Sync endpoint instead.
After receiving a success response, a sync will be queued and started shortly.
Request Parameters
access_tokenstringqueryRequiredThe access token of the connection.
Request Body
start_datestringThe start date of the backfill (e.g. 2023-02-07), up to 5 years ago.
end_datestringOptionalThe end date of the backfill (e.g. 2023-03-14). If none provided, defaults to today.
include_webhooksbooleanOptionalYou can receive webhooks for updated/created objects found during the backfill if you are subscribed to them by including true here. Defaults to false. Please be careful that depending on the order of the Rutter object types synced, webhooks sent in this way may be incomplete.
object_typesarrayThe Rutter object types for which you would like to create a backfill. Note that linked objects will not be backfilled unless you specify them explicitly. For example, if you backfill invoice, this will not backfill invoice_payment for the same time period unless you also specify it.
remarksstringOptionalRemarks for why you are creating this backfill.
Response Body
1{
2 "success": true
3}
Have questions?
Contact support for personalized guidance.