What this API does?
This REST API enables secure integration with third-party software and external applications allowing full programmatic access to your account data without logging into the user interface.
Using the API, you can manage your product portfolio end-to-end, including:
The API is designed to support backend integrations, data pipelines, reporting systems, and custom automation workflows.
Typical use cases
Depending on your system architecture and data ownership model, integration can be fully automated or partially delegated to the Price2Spy interface.
External application manages products and URLs; Price2Spy provides pricing data.
In this model the external application is the primary system of record for products and their associated URLs.
How it works?
⇒ Product and URLs managed in Price2Spy; pricing data consumed by external application.
In this scenario, products and URLs are created and maintained directly within the Price2Spy web interface.
How it works?
Key Characteristics
Typical Use Case
This approach is suitable when:
⇐ External application supplies products and URLs; pricing alerts handled by Price2Spy.
In this model, the external application supplies product URLs but does not retrieve structured pricing data.
How it works?
Typical Use Case
This approach is suitable when:
Production Environment
Use this environment for live integrations and regular price monitoring.
REST API Base URL
https://api.price2spy.com/rest/v1
In the production environment, price checks are executed according to your account configuration.
Test Setup (Development)
Price2Spy does not provide a separate public development API endpoint. Instead, testing can be performed directly in your active account – make sure not to delete any relevant data.
To access the API, you will need:
These credentials are used to generate the HMAC signature required for authentication.
To obtain credentials:
These credentials are used to generate the HMAC signature required for authentication.
If you do not have access, contact support@price2spy.com
Keep your Client Secret secure. It should never be exposed in frontend applications or shared publicly.
Timestamps
Prices & Currencies
The interactive Swagger interface allows you to:
Swagger URL: https://api.price2spy.com/rest/swagger-ui.html#/
This is the recommended starting point for developers implementing the integration.
What’s Next?
To simplify API testing with Postman, we have prepared a step by step guide and a ready to use Postman collection. You can access the setup instructions and download the collection using the provided links:
Price2Spy API uses HMAC-SHA256 authentication to ensure secure, tamper-proof API access for all requests. This method verifies both the origin and integrity of each request using a shared secret between the client and Price2Spy.
All HMAC authenticated requests must be sent over HTTPS (TLS) for security.
Every authenticated API request must include the following headers:
| Header | Description |
|---|---|
| Host | API hostname and port (e.g., api.price2spy.com:443) |
| X-P2S-Date | Request timestamp in UNIX Epoch format (within ±15 min of server time) |
| Authorization | HMAC authentication header containing Client ID and signature |
| Content-Type | Must be application/json for POST and PUT requests |
To build the signature, first construct the String-To-Sign using the canonical request parts:
Sign
HTTP_METHOD + '\n' +
host_with_port + '\n' +
content_type + '\n' +
resource_path + '\n' +
date_in_unix_epoch + '\n' +
request_payloadSign constructed as:
POST
api.price2spy.com:443
application/json
/rest/v1/get-products
1700485915
{"active": true}Sign constructed as:
GET
api.price2spy.com:443
/rest/v1/get-brands
1700485915When generating or validating HMAC signatures, the API may return standard JSON errors similar to:
| Error Message | Meaning |
|---|---|
| HMAC signature mismatch | Signature sent does not match expected value |
| Authorization header with HmacSHA256 scheme not provided | Missing or incorrect Authorization header |
| HMAC invalid timestamp header | Timestamp is not valid (wrong format) |
| HMAC missing timestamp header | Missing X-P2S-Date header |
The Price2Spy REST API provides a comprehensive set of endpoints to manage products, URLs, brands, categories, suppliers, and pricing data. Below is a high-level overview of available endpoints grouped by functionality.
| HTTP Method | Endpoint | Description |
|---|---|---|
| POST | /v1/insert-product | Add a new product to Price2Spy |
| POST | /v1/insert-url | Add a new URL for monitoring for an existing product |
| POST | /v1/update-product | Update an existing product’s information |
| POST | /v1/update-url | Update an existing URL’s information |
| POST | /v1/delete-product/{id} | Delete a product from Price2Spy |
| POST | /v1/delete-url/{id} | Delete a URL from a product |
| POST | /v1/get-current-pricing-data | Retrieve current pricing data for products and URLs |
| POST | /v1/get-products | Retrieve detailed information about products |
| POST | /v1/get-urls | Retrieve detailed information about URLs |
| GET | /v1/get-brands | Retrieve the list of brands |
| GET | /v1/get-categories | Retrieve the list of categories |
| GET | /v1/get-suppliers | Retrieve the list of suppliers |
This section provides a detailed example of a Price2Spy API endpoint to demonstrate request structure, response format, and usage conventions.
For full parameter definitions, all available endpoints, and possible error codes, please refer to the Swagger API documentation:
https://api.price2spy.com/rest/swagger-ui.html#/rest-api
Purpose:
Retrieve current pricing data for products and their monitored URLs. This endpoint is commonly used for analytics, reporting, and automated price monitoring.
curl -X POST "https://api.price2spy.com/rest/v1/get-current-pricing-data" \
-H "Content-Type: application/json" \
-H "X-P2S-Date: 1700417770" \
-H "Authorization: HmacSHA256 {Client_ID}:{Signature}" \
-d '{
"active": true,
"brandName": "Example Brand",
"searchMode": "LIKE"
}'{
"products": {
"product": [
{
"productId": 123,
"productName": "Example Product",
"brandName": "Example Brand",
"minPrice": {
"amount": 9.99,
"currency": "EUR"
},
"maxPrice": {
"amount": 12.49,
"currency": "EUR"
},
"urls": {
"url": [
{
"siteHumanName": "Example Shop",
"lastMeasurement": {
"price": {
"amount": 10.99,
"currency": "EUR"
},
"available": true,
"dateChecked": "2026-01-23 09:55:00"
}
}
]
}
}
]
}
}This section provides key recommendations and guidelines to ensure reliable, secure, and efficient integration with the Price2Spy REST API.
Common HMAC errors include:
Tips for compliance:
Monitor 429 responses and implement exponential backoff before retrying
This is the most common issue when integrating with the API and usually indicates that the generated signature does not match the server-side calculation.
Common causes
How to fix it
Yes, for POST and PUT requests
For GET requests
Yes — always
Any header used in the string-to-sign must also be included in the actual request.
Minimum required headers
Additional rules
A 401 Unauthorized response with message:
Hmac signature mismatch
usually indicates a mismatch between your request and the expected format.
Things to check
No — use the current timestamp.
Best practice
Important rules
Common mistakes
The string-to-sign must follow this exact structure:
HTTP_METHOD
HOST
CONTENT_TYPE
RESOURCE_PATH
TIMESTAMP
REQUEST_BODY
Key rules
This usually happens due to incorrect handling of Content-Type and request body.
For GET requests
Common mistakes
Including:
This leads to signature mismatch.
Every request must include:
Additionally
Recommended approach
The most frequent issue is:
Mismatch between the string-to-sign and the actual HTTP request
This includes:
If you encounter any issues or have questions related to the Price2Spy API, please contact our support team: