--- title: "Fixed-Schema Connectors" slug: "dataset-based-connectors-via-api" description: "Easily create data sources via API in Dataddo with dataset-based or non-dataset-based connectors. Access any data available through the official APIs." updated: 2023-11-20T09:38:35Z published: 2023-11-20T09:38:35Z canonical: "docs.dataddo.com/dataset-based-connectors-via-api" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.dataddo.com/llms.txt > Use this file to discover all available pages before exploring further. # Fixed-Schema Connectors Fixed-schema connectors provide a set of dataset templates which typically represents an definition of a call to API endpoint and transformation pipeline expression. The examples of such connectors is [Shopify](/docs/shopify), [ExactOnline](/docs/exact-online), [Xero](/docs/xero), [Stripe](/docs/stripe) or [Semrush](/docs/semrush). ## Prerequisites - You have the link to [API endpoint documentation](https://app.swaggerhub.com/apis-docs/Dataddo/dataddo-api/2.0#/). - You have successfuly [created an Authorizer](/headless/docs/creating-an-authorizer-via-api) to the desired service. ## Implementation Fixed-schema connectors require the following workflow: 1. Call the **/connectors/{connectorId}/actions/authorization** endpoint for obtain the list of active authorizers. If none is available [create a new one](/headless/docs/creating-an-authorizer-via-api). ID of the authorizer is passed as **oAuthId** parameter in the next stages. 2. Call the **/connectors/{connectorId}/templates** endpoint to acquire the list of available templates. Use ID of the template to obtain template details by calling **/connectors/{connectorId}/templates/{id}**. Each template consist of request object with **url**, **header**, **body**, **method**, **transformation** and **emitter** attributes. You will need those in the following steps. 3. Check API endpoint documentation for availability of **/actions/*** endpoints. This indicate that there are additional parameters that needs to be supplied. 4. Check attributes in the request object (i.e. url, header, transformation) if containing placeholders with double curly brackets (e.g. **{{subdomain}}**). If, so this indicates that such param need to be supplied in **parameters** attribute. 5. As an example, if **request.url** has the value **https://{{subdomain}}.shopify.com** you will need to pass the attribute **subdomain** with your value as part of the **parameters** object. 6. Send the [full payload](/headless/docs/dataset-based-connectors-via-api#payload-schema) to the **/preview** endpoint to test the functionality of the payload. If successful, you can create the source by calling **/create-source** endpoint. [Embedded object](https://cdn.document360.io/084ed225-3f99-4644-a2da-39ca0cd5ef45/Images/Documentation/create_source_dataset.svg) ## Payload schema Use this schema when calling **/preview** and **/create-source** endpoints for testing the payload and creating the source. The **payload structure is common for all fixed-schema connectors**. ``` { "connectorId":"CONNECTOR_ID", "templateId":"TEMPLATE_ID", "label":"My Test", "type":"CONNECTOR_ID", "oAuthId":"1234", "request": { "url":"", "header":[], "method":"GET", "body":"", "transformation":"[]", "emitter":"[]" }, "parameters":{}, "syncFrequency":"custom", "hour":"3", "minute":"25", "dayOfWeek":"*", "dayOfMonth":"*", "month":"*", "timezone":"UTC", "strategy":"clean" } ``` | Param | Type | Description | | --- | --- | --- | | **connectorId** | STRING | Use same identifier as in URL. | | **templateId** | STRING | Use the template ID used for obtaining the request object. | | **label** | STRING | Use any value for the description of the newly created source. | | **type** | STRING | Use the same value as for **connectorId**. | | **oAuthId** | STRING | ID of the authorizer to be used. Call /authorization endpoint to obtain the list of authorizers. | | **request** | OBJECT | Object containing of url, header, method, body, transformation and emitter attributes. Obtain it by calling /connectors/{connectorId}/templates/{id} method. | | **request.url** | STRING | URL of an api endpoint. | | request.header | ARRAY | HTTP headers of the API call. Authozation headers are automatically added. | | **request.method** | STRING | HTTP method of the API call. | | request.body | STRING | HTTP body of the API call. | | **request.transformation** | STRING | Transformation pipeline expression of the call. Read more in dedicated [Transformation pipeline](/docs/transformation-pipeline) article. | | request.emitter | STRING | Emitter expression of the call. Read more in dedicated [Transformation pipeline](/docs/transformation-pipeline) article. | | parameters | OBJECT | Object of keys and values to replace placeholders in request object. Placeholders are strings in double brackets such as **{{url}}**. To do the replacement for this example, provide value with key **url**. | | **strategy** | ENUM | Default is **clean**. You can use **incremental** if you want to incrementally storing data in Dataddo SmartCache. | | **timezone** | STRING | Timezone name (e.g. Europe/London). Full list available in [timezone list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). | | **syncFrequency** | STRING | Use custom as value. | | **minute** | STRING | Minute (0 - 59). Compatible with Cron expression. | | hour | STRING | Hour (0 - 23). Compatible with Cron expression. | | dayOfWeek | STRING | Day of the week (0 - 6) (Sunday to Saturday). Compatible with Cron expression. | | dayOfMonth | STRING | Day of the month (1 - 31). Compatible with Cron expression. | | month | STRING | Month in year (1 - 12). Compatible with Cron expression. |