Skip to main content
POST
https://searchcompany-main.up.railway.app
/
api
/
shopify
/
connect
Connect Shopify
curl --request POST \
  --url https://searchcompany-main.up.railway.app/api/shopify/connect \
  --header 'Content-Type: application/json' \
  --data '
{
  "shop_domain": "<string>"
}
'
{
  "oauth_url": "<string>",
  "state": "<string>"
}

Connect Shopify

Initiates the Shopify OAuth flow by generating an authorization URL.

Request Body

shop_domain
string
required
The Shopify store domain (e.g., “my-store.myshopify.com”)

Response

oauth_url
string
The Shopify OAuth URL to redirect the user to
state
string
CSRF protection state parameter

Example

curl -X POST https://api.searchcompany.ai/api/shopify/connect \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"shop_domain": "my-store.myshopify.com"}'
{
  "oauth_url": "https://my-store.myshopify.com/admin/oauth/authorize?client_id=...",
  "state": "org-slug:random-token"
}