Create eBay Integration
POST/api/ebay
Create a new eBay integration instance. The response includes a redirect_url pointing to the eBay consent page; open it to authorize the connection. After authorization completes, listings and orders are automatically imported in the background.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Body fields:
- name (string, required): Unique display name for the connection.
- integration_id (integer, required): ID of the eBay integration definition.
- integration_settings (object, required): Channel settings. Required keys: start_date (date string - orders created before this date are not imported), store_id (integer), auto_link_products (boolean), auto_create_products (boolean), sales_nominal_code_id, cogs_nominal_code_id, shipping_revenue_nominal_code_id, shipping_refund_nominal_code_id, sales_returns_allowances_nominal_code_id (integers or null). Optional keys: pricing (object with masterOfPrice {id, name} and pricing_tier_id), inventory (object with masterOfStock, selectedWarehouses), emailCustomers (boolean, default false), proforma_marketplace_cost_percentage (number or null), proforma_payment_cost_percentage (number or null), sync_sales_order_invoices_to_accounting (boolean, default true), sync_sales_credit_to_accounting (boolean, default true), batch_period_sales_order_fulfillments (string or null), batch_period_customer_returns (string or null).
- connection_settings (object, optional): OAuth tokens (access_token, refresh_token, expiresAccessToken, expiresRefreshToken). Normally omitted - tokens are stored automatically when the OAuth authorization completes.
- is_automatic_sync_enabled (boolean, optional, default false).
- environment (string, optional): "production" or "sandbox".
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.