Skip to content

API Reference ​

Base URL ​

https://app.sellerlegend.com/api

All API requests must be made over HTTPS.

Authentication ​

All requests require a valid OAuth 2.0 Bearer token. Include it in the Authorization header:

Authorization: Bearer {ACCESS_TOKEN}

See Getting Started and OAuth Token Management for details on obtaining and refreshing tokens.

Request Headers ​

HeaderValueRequired
AuthorizationBearer {ACCESS_TOKEN}Yes
Content-Typeapplication/jsonYes (POST requests)
Acceptapplication/jsonRecommended

Account Selection ​

Most endpoints require you to specify which Amazon account to query. Include one of the following as a query parameter:

MethodParameter(s)Example
By account titleaccount_title?account_title=My Store US
By seller + marketplaceseller_id & marketplace_id?seller_id=A1234567890&marketplace_id=ATVPDKIKX0DER
By groupgroup_title?group_title=North America

Pagination ​

Paginated responses include the following fields:

FieldDescription
current_pageThe current page number
totalTotal number of records
per_pageNumber of records per page
last_pageThe last available page number

Use the page query parameter to navigate between pages.

Rate Limits ​

API requests are rate-limited to 180 requests per minute. The rate limit window resets every minute.

Response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed (180)
X-RateLimit-RemainingRequests remaining in current window
Retry-AfterSeconds to wait before retrying (only on 429)

When rate limited, implement exponential backoff before retrying.

Error Codes ​

CodeMeaning
401Unauthorized — invalid or expired token
403Forbidden — insufficient permissions
404Resource not found
422Validation error — check request parameters
429Rate limit exceeded — slow down requests
500Internal server error

Python SDK ​

The SellerLegend Python SDK provides a convenient wrapper around the API.

Installation:

bash
pip install sellerlegend-api

Client Initialization:

python
from sellerlegend_api import SellerLegendClient

# Initialize with an existing access token
client = SellerLegendClient(
    access_token="YOUR_ACCESS_TOKEN"
)

# Or initialize with OAuth credentials
client = SellerLegendClient(
    client_id="your-client-id",
    client_secret="your-client-secret",
    redirect_uri="https://yourapp.com/callback"
)

Token Refresh Pattern:

python
from sellerlegend_api import SellerLegendClient

class TokenManager:
    def refresh_and_get_client(self, refresh_token):
        client = SellerLegendClient(
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
            refresh_token=refresh_token
        )

        new_tokens = client.refresh_token()

        # Store the new tokens — the old refresh token is now invalid
        self.update_tokens_in_database(
            access_token=new_tokens['access_token'],
            refresh_token=new_tokens['refresh_token'],
            expires_in=new_tokens['expires_in']
        )

        return SellerLegendClient(
            access_token=new_tokens['access_token']
        )

See each endpoint page for usage examples in Python, PHP, JavaScript, and cURL.

Downloadable Resources ​

Available Endpoints ​

SectionEndpoints
UserCurrent user info, account listing
SalesOrders, statistics, daily sales, transactions
InventoryInventory listing with velocity metrics
COGSCost periods — read, create, delete
ReportsRequest, check status, and download reports
WarehouseWarehouse inventory and inbound shipments
Supply ChainRestock suggestions
NotificationsInventory, price, and restock alerts
ConnectionsSP-API and PPC connection status
Service StatusAPI health check
PPCSponsored Products, Brands, and Display advertising data
SchemaDiscover filterable columns for any datatable