Follow product feed updates with a webhook and the API
Subscribe a webhook to products.updated. Dropday then notifies your endpoint after each product feed import, and your system reads the updated products through the Dropday API.
To update your webshop from a feed, build an integration of your own: it subscribes to products.updated, reads the products from the Dropday API and writes the stock or purchase price in your shop.
Add a webhook for products.updated
You need a user who can manage the account, and a product feed in Dropday.
Go to Settings → Webhooks.
Add a webhook: give it a name, a description and the URL of your endpoint.
Subscribe it to the
products.updatedevent.
If you had entered a webhook URL in the earlier single webhook URL setting, Dropday has moved it into a webhook subscribed to products.updated.
What the event contains
After each product feed import, Dropday sends products.updated to every active webhook that is subscribed to it, as a JSON POST. The body is an envelope with id, event, created_at and data. In data, the event carries product_feed_id, account_id and updated_at, not the product data itself.
The example below shows where these fields sit. The values are placeholders: Dropday fills in the real values of the import.
Each request has an X-Dropday-Event header and an X-Dropday-Signature header. The signature is the lowercase hexadecimal HMAC-SHA256 of the raw request body, keyed with the webhook's secret. Set up order and tracking webhooks shows how to verify it.
When a delivery fails, because your endpoint gives no successful response within 10 seconds or returns an error, Dropday retries it automatically. It makes up to 5 attempts, waiting 1 minute, 5 minutes, 15 minutes and 1 hour between attempts.
Read the updated products
The event doesn't contain the products. Two endpoints of the Dropday API return imported products, and both only read data:
GET https://dropday.io/api/v1/products/newlists the active products that were updated in the last 24 hours;GET https://dropday.io/api/v1/productslists all active imported products of your account, 100 per page.
Both use the same headers as the order API: api-key with your API key and account-id with your Account ID. A missing or wrong pair returns HTTP status 403.
To find your API key and Account ID, go to Store Integration and choose the DropdayAPI tile on the screen Choose your e-commerce platform. Under Developers information, that page lists API-key and Account-ID, each with a Copy button.
This request reads the products updated in the last 24 hours. Replace YOUR_API_KEY and YOUR_ACCOUNT_ID with your own values:
The response has a data array with one entry per product. Each product has id, project_id, product_feed_id, sku, ean13, name, purchase_price, stock_quantity, active (always 1 in these responses), created_at and updated_at. The example shows one product in that array, with placeholder values; other parts of the response are not shown.
Your integration then writes stock_quantity or purchase_price to the matching product in your shop. The Dropday API documentation is published at docs.dropday.io.