Webhooks & Troubleshooting

Webhooks & Troubleshooting


Webhooks

Subscribe to eBay event notifications through EcartAPI's webhook system.

MethodPathDescriptionAPI Reference
GET/api/v2/webhooksList all subscriptionsref
GET/api/v2/webhooks/{id}Get a single subscriptionref
POST/api/v2/webhooksCreate a subscriptionref
DELETE/api/v2/webhooks/{id}Delete a subscriptionref

Available events

Currently only one event type is supported:

resourceactionDescription
orderscreateTriggered when a new order is created in eBay

Request body

FieldRequiredDescription
resourceYesThe resource to subscribe to. Use "orders".
actionYesThe action to subscribe to. Use "create".
urlYesYour destination URL where eBay will send the notification payload.
POST /api/v2/webhooks
{
  "webhook": {
    "resource": "orders",
    "action": "create",
    "url": "https://webhook.site/becaf99a-561a-4466-8a84-80290db3f1a2"
  }
}

Authentication and token management

EcartAPI handles OAuth token refresh automatically. When a request fails with 401, EcartAPI transparently refreshes the access token using the stored refresh token and retries the call. You do not need to implement token refresh in your application.

Warning — one store per app: If you connect the same eBay store to two different EcartAPI apps, each new connection invalidates the previous refresh token. The first app will stop working with 401 errors. A single eBay store should only be connected to one EcartAPI app at a time.


Common errors and solutions

ErrorLikely causeSolution
errorId: 25604 — "SKU not found"Product not in Inventory APIVerify with GET /api/v2/products/{sku}. If 404, the product is not in the Inventory API — migrate it or create it fresh.
errorId: 25705 — "Inventory Item Group not found"Policies/locations for the wrong marketplaceUse the same marketplaceId throughout. Create policies and locations specifically for the target marketplace.
errorId: 25718 — Invalid formatWrong marketplaceId formatUse EBAY_US with an underscore, not EBAY-US with a hyphen.
errorId: 32300 — "Invalid shipment tracking number or carrier"Invalid carrier code or malformed tracking numberUse GET /api/v2/services/carriers?ecommerce=true to get valid carrier codes. → ref
404 on GET /api/v2/products/{sku}Product exists only as a legacy listingMigrate the listing first via POST /api/v2/products/listings/migrate. → ref
Price unchanged after PUT /api/v2/products/{sku}Price cannot be updated at inventory levelUpdate price at offer level via PUT /api/v1/listings/{offerId}. → ref
401 after connecting a second appSame eBay store connected to two appsReconnect the store to the intended app. One eBay store per EcartAPI app.
"This listing is already migrated"eBay only allows migration onceMigration is irreversible. Add missing variants manually — see Products & VariantsRecovery: when a variant was missed.