How do I integrate competitor price data into my ERP via API?
Linking competitor price data to your ERP via API can remove manual copying of figures and bring them straight into the commercial team's workflow. 4pricing has no native ERP connector: the link is built by your own developer (or your ERP vendor's) on the documented REST API, and what you do with the data inside the ERP stays your decision.
Short answer
- You create an API key in the 4pricing panel; it is sent in the X-API-Key header and needs an active plan.
- You read the data with GET /products/ (tracked products, each with its shop and current price) and GET /products/{product_id}/history (the history of checks); reads cost no credits.
- Your developer writes a job that runs periodically and updates the competitor price field in your ERP; the limit is 60 requests per minute per account.
- The webhook is not a price feed: it fires only on alert events, so it does not replace reading through the API.
Typical architecture of the ERP link, built by your team
- Generate the API key in the 4pricing.net panel; the full value is shown only once, at creation.
- Add the products to track with POST /products/ (the shop page URL) and keep the returned id; for many products at once use the CSV import, with the url column required and at most 2000 rows per import.
- Your developer writes a job that calls GET /products/ as often as prices are checked (every 6 hours by default) and, if you need the evolution, GET /products/{product_id}/history.
- The job maps the JSON fields to your ERP schema (for example competitor_price from current_price_cents, best_offer_retailer from retailer, scan_at from last_scraped_at).
- Optionally, configure a webhook URL on the account, which receives signed alert events; what your endpoint does with them is your own code.
- Validate the link: compare the ERP data with the platform panel on a few pilot products.
Example JSON response and ERP mapping
A GET /products/ call returns objects with fields such as id, name, retailer, current_price_cents, currency, in_stock, role (own or competitor), group_id and last_scraped_at. Careful: the price comes in minor units, so you divide by 100 in your ERP. Prices are as recorded, with no currency conversion and no VAT handling. For a competitor minimum within the same group_id, either compute it in the job from the products with role competitor, or read the group comparison (GET /groups/{group_id}/comparison), which already gives you the minimum, the median and the cheapest shop.
Mapping the fields of the GET /products/ response onto the ERP schema.
| API field | ERP field | Transformation |
|---|---|---|
| current_price_cents | competitor_price | Price in minor units, so divide by 100 |
| retailer | best_offer_retailer | The retailer with the lowest price within the same group_id |
| last_scraped_at | scan_at | Copied as is: it shows when the last check ran |
Common API integration mistakes
- Polling more often than prices are checked and exceeding the 60 requests per minute limit; align the job with the check interval.
- Not handling 429 (limit exceeded) and 5xx errors; add retry with exponential backoff.
- Storing prices without a timestamp: without last_scraped_at you do not know how old the data is.
How 4pricing helps
4pricing.net does not offer native connectors to ERPs, e-commerce platforms or marketplaces. It offers a REST API with API keys and an OpenAPI specification, which you import into your HTTP client or a code generator. Reads (list, history, comparison) cost no credits; calls that fetch a shop page (search, new product from a URL, refresh) cost one credit each. You can also push your own prices into 4pricing through the API (/own-products), with no scraping and no credit. The export available is a CSV of the product list. Alerts can reach you in the panel or by a signed webhook, on the check cycle you set.