This guide is for customers using Version 1 of the API who want to migrate directly to PriceAPI in the Metoda world. It simplifies the API while introducing more flexibility and a cleaner structure.
What Changed
- The base URL has been updated to
https://priceapi.metoda.com - Versioned endpoints (
/v2/...) are now used - A required
topicparameter defines what data to collect - Response structures have been simplified and standardized
- Parameter names have been updated for consistency
New Workflow
The overall workflow remains the same:
- Create a job
- Poll its status
- Download the results
Endpoints
POST /v2/jobsGET /v2/jobs/{job_id}GET /v2/jobs/{job_id}/download
Required Action
Update your integration to:
- Use the new base URL
- Switch to v2 endpoints
- Update request parameters where needed
Before (Version 1)
POST https://api.priceapi.com/jobs
GET https://api.priceapi.com/jobs/{id}After (Version 2)
POST https://priceapi.metoda.com/v2/jobs
GET https://priceapi.metoda.com/v2/jobs/{job_id}
GET https://priceapi.metoda.com/v2/jobs/{job_id}/downloadNew Parameter: topic
topicVersion 2 introduces a required parameter topic, which defines the type of data to collect.
Compared to Version 1, topics are an additional capability that expand the kinds of data you can request. In Version 1, only product and offer data was available. Version 2 now supports new topics like:
product_and_offers(recommended for Version 1 users)searchreviewsbestsellers
To replicate Version 1 behavior, use:
"topic": "product_and_offers"Renamed Parameters
| Before | Now |
|---|---|
source_id | id |
keyword | term |
Updated Response Structure
Responses are now more structured and consistent.
Root Structure
{
"job_id": "...",
"status": "finished",
"results": [ ... ]
}Example Results:
"results": [
{
"query": {
"source": "google_shopping",
"country": "de",
"topic": "offers",
"key": "id",
"value": "2680289002714187668",
"max_pages": 1,
"max_age": 1200,
"sort_by": "ranking_descending",
"condition": "any",
"shipping": "any"
},
"success": true,
"metadata": {
"from_cache": false,
"page_count_delivered": 1,
"page_count_from_cache": 0,
"page_count_live": 1,
"request_count": 1,
"updated_at": "2017-12-12T16:49:40Z"
},
"content": { ... }
},
// More results ...
]<results type="array">
<result>
<query>
<source>google_shopping</source>
<country>de</country>
<topic>offers</topic>
<key>id</key>
<value>2680289002714187668</value>
<max-pages type="integer">1</max-pages>
<max-age type="integer">1200</max-age>
<sort-by>ranking_descending</sort-by>
<condition>any</condition>
<shipping>any</shipping>
</query>
<success type="boolean">true</success>
<metadata>
<from-cache type="boolean">false</from-cache>
<page-count-delivered type="integer">1</page-count-delivered>
<page-count-from-cache type="integer">0</page-count-from-cache>
<page-count-live type="integer">1</page-count-live>
<request-count type="integer">27</request-count>
<updated-at type="dateTime">2017-12-12T16:36:13Z</updated-at>
</metadata>
<content><!-- ... --></content>
</result>
<!-- More results -->
</results>Results Structure
Each result includes:
querysuccessmetadatacontent
Success Handling
-
success: truemeans the datasource was successfully accessed -
If no data is found,
successis stilltruecontentwill benullor[]
-
Errors include:
success: false- a
reasonfield
Timeout Parameter
You can control how long a job runs using the timeout parameter.
- Defines max runtime (in minutes)
- Jobs return partial results if timeout is reached Default: 1440 minutes (24 hours)
Testing Your Integration
We recommend using the test datasource:
- Behaves like a real datasource (e.g. Amazon)
- Does not consume credits This allows you to safely validate your integration before going live.
What’s Unchanged
- The job-based workflow
- Authentication method
- Core request/response concept
Important Notes
-
The old base URL (
https://api.priceapi.com) will be deprecated -
After deprecation, requests will fail
-
Make sure to update:
- Environment variables
- Hardcoded URLs
- API client configurations
Need Help?
If you run into any issues, please contact support or refer to the latest API documentation.