Shopify API Configuration
Request
POST https://api.fivetran.com/v1/connections
{ "group_id": "group_id", "service": "shopify", "trust_certificates": true, "trust_fingerprints": true, "run_setup_tests": true, "paused": false, "pause_after_trial": false, "sync_frequency": 1440, "data_delay_sensitivity": "NORMAL", "data_delay_threshold": 0, "daily_sync_time": "14:00", "schedule_type": "auto", "connect_card_config": { "redirect_uri": "https://your.site/path", "hide_setup_guide": true }, "proxy_agent_id": "proxy_agent_id", "private_link_id": "private_link_id", "networking_method": "Directly", "hybrid_deployment_agent_id": "hybrid_deployment_agent_id", "destination_configuration": { "virtual_warehouse": "virtual_warehouse" }, "destination_schema_names": "SOURCE_NAMING", "config": { "api_access_token": "string", "app_url": "string", "backward_sync_limit": "string", "client_id": "string", "client_secret": "string", "historical_sync_time_frame": "ALL_TIME | DATE_LIMIT", "shop": "my_shop", "schema": "schema_name" }, "auth": { "access_token": "my_access_token" } }
Config parameters
| Name | Description |
|---|---|
api_access_token | API access token of your custom or public app. |
app_url | App store url of your app |
backward_sync_limit | Limit of the Historical Sync Time for selected tables |
client_id | Client ID of your app |
client_secret | Client secret of your app |
historical_sync_time_frame | Used to configure Historical sync timeframe for selected tables |
shop | The Shopify shop name. Can be found in the URL before .myshopify.com. |
schema (required) | Destination schema name. Schema name is permanent and cannot be changed after connection creation |
Authorization
There are two ways to authorize this connector type:
- By specifying the value for the
access_tokenparameter in theauthsection.POST https://api.fivetran.com/v1/connections{ "service": "shopify", "group_id": "group_id", "auth": { "access_token": "my_access_token" } }Auth Parameters
Name Description access_tokenThe Shopify access token. By using the Connect Card or the Fivetran dashboard.
Authentication
Shopify connections can be authenticated in different ways - Powered by Fivetran customers may use public or custom apps, whereas direct Fivetran customers typically use custom app credentials. The fields you include in your API request when creating a Shopify connection depend on which authentication path you choose.
Use the following scenario table to determine which fields to include in your API requests:
| Scenario | Fields to send |
|---|---|
| You have a public app and have already completed the OAuth flow with Shopify, and generated an access token. | api_access_token |
| You have a public app and want Fivetran to handle the OAuth flow for you. | client_id, client_secret, app_url |
| You have a custom app. | client_id, client_secret |
| You have a legacy custom app with a pre-generated access token. | api_access_token |
Example API requests
Token-based authentication (pre-generated access token)
Use this pattern when you have an existing Shopify API access token:
{
"service": "shopify",
"group_id": "your_group_id",
"config": {
"shop": "mystore",
"api_access_token": "shpat_xxxxxxxxxxxxxxxxxxxx"
}
}
OAuth-based authentication (public app)
Use this pattern when you want Fivetran to perform OAuth using your public app credentials:
{
"service": "shopify",
"group_id": "your_group_id",
"config": {
"shop": "mystore",
"client_id": "your_app_client_id",
"client_secret": "your_app_client_secret",
"app_url": "https://apps.shopify.com/your-app-name"
}
}
Custom app authentication
Use this pattern for direct customers who are using a custom Shopify app:
{
"service": "shopify",
"group_id": "your_group_id",
"config": {
"shop": "mystore",
"client_id": "your_custom_app_client_id",
"client_secret": "your_custom_app_client_secret"
}
}