API Reference

Complete endpoint documentation for Brandclub Sync.

Base URL: https://sync.brandclub.com (production) or https://sync-beta.brandclub.com (sandbox)

Authentication: All requests (except /retailers/available) require an OAuth access token:

Authorization: Bearer {access_token}

The SDK obtains and includes tokens automatically.


Retailers

List Connected Retailers

GET /sync/retailers

Returns user's linked retailer accounts.

Query Parameters:

  • limit (integer) - Max results

  • offset (integer) - Pagination offset

  • status (string) - Filter by status: active, error, pending

Response:

[
  {
    "retailerId": 1,
    "displayName": "Amazon",
    "status": "active",
    "lastSyncAt": "2024-12-09T10:30:00Z"
  }
]

List Available Retailers

Public endpoint (no auth). Returns all retailers users can connect.

Response:

Get Retailer Details

Response: Same as retailer object in list.

Trigger Retailer Sync

Manually trigger sync for a specific retailer.

Response:

Sync All Retailers

Triggers sync for all connected retailers.


Orders

List Orders

Query Parameters:

  • retailer_id - Filter by retailer

  • limit - Max results (default: 50, max: 100)

  • offset - Pagination

Response:

Get Order Details

Returns single order with full details.


Sync Status

Get Latest Sync

Returns most recent sync session.

Response:

Get Sync By ID

Returns specific sync batch status.

Sync Statuses:

  • queued - Waiting

  • connecting - Authenticating

  • scanning - Fetching orders

  • completed - Done

  • error - Failed

  • userintervention - MFA required


User Profile

Get User Info

OIDC standard endpoint. Returns user profile.

Response:


OAuth Endpoints

Authorization

SDK handles this automatically.

Token Exchange

SDK handles this automatically.

Revoke Token


Errors

All errors follow this format:

Status Codes:

  • 401 - Unauthorized (invalid token)

  • 403 - Forbidden (missing permission)

  • 404 - Not found

  • 429 - Rate limit exceeded

  • 502 - Upstream service error

Rate Limits

  • 100 requests/minute per user

  • 10 syncs/hour per retailer

Discovery

OIDC discovery document:

JWKS for token validation:

OpenAPI Specification

Full OpenAPI 3.0 spec available at api-spec.json

Last updated