Square API Configuration
Request
POST https://api.fivetran.com/v1/connections
{ "group_id": "group_id", "service": "square", "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": "accessToken", "client_secret": "clientSecret", "client_id": "clientId", "schema": "schema_name" } }
Config parameters
| Name | Description |
|---|---|
api_access_token | The Square API access token of your application. |
client_secret | The Application Secret of your organization. |
client_id | The Application ID of your organization. |
schema (required) | Destination schema name. Schema name is permanent and cannot be changed after connection creation |
Authorization
There are three ways to authorize this connector type:
- API access token: By specifying the values for the
client_idandapi_access_tokenparameters in the request.POST https://api.fivetran.com/v1/connections{ "service": "square", "group_id": "group_id", "config": { "client_id": "clientId", "api_access_token": "accessToken" } } - Oauth: By specifying the values for the
client_idandclient_secretparameters in the request.POST https://api.fivetran.com/v1/connections{ "service": "square", "group_id": "group_id", "config": { "client_id": "clientId", "client_secret": "clientSecret" } } By using the Connect Card or the Fivetran dashboard.
Retrieving the access token
- Log in to https://developer.squareup.com/apps with your personal credentials and click on the View Details option displayed under your Application ID.
- Switch to Production Settings option in the bottom left corner.
- Select Credentials menu on the left side of the screen.
- Click on Show option for Personal Access Token tab.
- Copy the
access Token.
Required scopes
The following scopes are required for this connector:
- MERCHANT_PROFILE_READ
- PAYMENTS_READ
- SETTLEMENTS_READ
- ORDERS_READ
- BANK_ACCOUNTS_READ
- ITEMS_READ
- CUSTOMERS_READ
- INVENTORY_READ
- EMPLOYEES_READ
- TIMECARDS_SETTINGS_READ
- CASH_DRAWER_READ
- LOYALTY_READ
- TIMECARDS_READ
- DISPUTES_READ
- SUBSCRIPTIONS_READ
- INVOICES_READ
- GIFTCARDS_READ
- MERCHANT_PROFILE_READ
- DEVICE_CREDENTIAL_MANAGEMENT
- VENDOR_READ
- BANK_ACCOUNTS_READ