Articles on: Shopify

Rest API connection method

Connect directly to a supplier's REST API endpoint in syncX: Stock Sync to automate product imports and inventory updates in JSON or XML format. Configuring custom API authentication, query parameters, and request bodies lets you pull real-time catalog data without relying on manual file uploads.



How to Set Up a REST API Feed


Go to App → Create new feed → Select connection → Step 1: Feed manager → REST API


  1. Test the Endpoint First: Before configuring your feed, test the API request in an API client such as Postman to confirm that the endpoint is accessible and returns product data.
  2. Enter Endpoint URL: Paste the live Endpoint URL for your API request into the URL field.
  3. Select Authorization Type: Choose the required authentication method (Basic Auth, Bearer Token, OAuth2, OAuth2 with password, or No Auth) and enter your credentials.
  4. Add Header or Query Parameters: Enter any required Header Params or Query Params in their respective fields. Learn more about query and header parameters here.
  5. Configure Body Raw (Optional): If you want to filter specific collections or categories from the REST API, enter your filter payload in the Body Raw field.
  6. Choose HTTP Method and File Format: Select the appropriate HTTP method (GET, POST, or PUT), choose the matching File Format (JSON or XML), and save your connection.


REST API Connection Setup Overview


Live Endpoint Required: The API endpoint itself must be directly accessible to Stock Sync—API documentation or a Swagger page alone is not sufficient.


If your supplier's endpoint blocks external requests, ask them to make the API URL reachable and whitelist Stock Sync's server IP address: 52.20.189.51.



REST API Connection Detailed Breakdown


1. Authorization Types

Select the authentication method matching your supplier's API security requirements:


  • Basic Auth: Authenticates requests using a Username and Password only.


Basic Auth Configuration


  • Bearer Token: Authenticates requests using a static or generated API token entered into the Token field.


Bearer Token Configuration


  • OAuth2: Provides consented token-based access without sharing user credentials. Enter all required OAuth2 details (such as client ID, client secret, scope, and token endpoint).


OAuth2 Configuration


  • OAuth2 with Password: Authenticates consented OAuth2 sessions using a username and password alongside your OAuth2 credentials.


OAuth2 with Password Configuration


  • No Auth: Connects directly to public or IP-whitelisted endpoints that do not require authentication headers or tokens.


2. HTTP Methods & Request Filtering

Select the exact HTTP request method and payload structure expected by your supplier's API:


HTTP Method

Function & Usage

GET

Retrieves product and inventory information from the server.

PUT

Used to create or update resource payloads on the server.

POST

Submits enclosed data in the request message body (commonly used when sending filter payloads).


Use the Body Raw field to pass JSON or XML filter parameters (such as specific categories or collections) when querying the REST API.


3. Checklist for Custom API Assistance

If you need our technical team to configure or test a custom REST API connection for your store, test the request in Postman first and provide the following details:


  1. API documentation
  2. Accessible API URL / endpoint
  3. Authorization details (API key, token, username and password, or full OAuth2 credentials including client ID, client secret, scope, token endpoint/generation procedure, and required request body)
  4. Required header, query, or body parameters
  5. HTTP method (GET, POST, or PUT) and file format (JSON or XML)
  6. Pagination details and a representative sample response


Custom API connections may require backend configuration and technical review to verify that product and variant data sync accurately.



Key Rules & Technical Details


  • GraphQL Not Currently Supported: GraphQL is not available as a self-service connection method (currently in development with no confirmed release date). If a supplier only offers GraphQL, ask if they provide a REST API endpoint or use another supported source method.
  • Alternative Data-Source Methods: Beyond REST API, Stock Sync supports FTP/SFTP, Google Sheets, Dropbox, and downloadable HTTP/HTTPS URLs.
  • Multi-File FTP Consistency: If using an FTP connection that retrieves multiple files, all files must share the exact same column names in the identical order and structure.



Troubleshooting Steps


  • Issue: Stock Sync cannot reach or retrieve data from the REST API endpoint → Solution: Test the request in Postman to verify the endpoint returns valid JSON or XML, confirm you provided a live endpoint (not a Swagger documentation URL), and ask your supplier to whitelist Stock Sync's IP address (52.20.189.51).
  • Issue: Authentication fails with 401 Unauthorized or 403 Forbidden errors → Solution: Double-check your selected Authorization Type (Basic Auth, Bearer Token, OAuth2, or OAuth2 with password) and ensure all tokens, client secrets, or header parameters match your Postman configuration.
  • Issue: Supplier only provides a GraphQL API endpoint → Solution: Check with your supplier for an alternative REST API endpoint, or export their catalog to a supported source such as FTP/SFTP, Google Sheets, Dropbox, or a downloadable HTTP/HTTPS URL.



Good Articles to Continue


Updated on: 02/12/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!