Prisjakt Click and Conversion API
home
The click and conversion API, coupled with our conversion pixel called PJ Pixel, provides shops with a tool to optimize marketing strategy and drive sales. With this combination, shops can retrieve Prisjakt's click and conversion statistics, gain insights into customer behavior, and make data-driven decisions to improve their cost of sales. The click and conversion API is a way for businesses to track their performance on Prisjakt, enabling them to increase their visibility, attract more customers, and ultimately grow their revenue.
Authentication
All requests to the API require authentication using a client ID and a client secret provided by Prisjakt. The client ID is required for all requests, while the client secret is required for most requests. To authenticate a request, provide the client ID and client secret as headers in the request. Here's an example using curl:
curl --request GET \
--header 'client-id: <client-id>' \
--header 'client-secret: <client-secret>' \
...
Make sure to replace <client-id>
and <client-secret>
with your actual values. You can obtain these values from Prisjakt.
REST API
The base address of the Prisjakt Click and Conversion API is https://api.schibsted.com/prisjakt/click
.
The REST API endpoints are organized by resource type. Please refer to the API reference to learn more about the different endpoints and their functionalities.
Rate Limiting
To ensure good performance and availability of the API for all users, rate limiting is applied to the Client ID.
Production: 10,000 requests in 1 hour
The returned HTTP headers of any API request show your current rate limit status:
HEADER | DESCRIPTION |
---|---|
X-RateLimit-Limit | The maximum number of requests you're permitted to make per hour. |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-RateLimit-Reset | The time in milliseconds when the current rate limit window resets. |
If the current rate limit has been exceeded, the API will return an HTTP status code 429 Too Many Requests
with the following headers:
Status: 429 Too Many Requests
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 600000 (in milliseconds)
Please wait until the rate limit resets before making additional requests.
Pagination
In certain cases, the API provides paginated responses to requests. When a response is paginated, the response headers will contain a link header. If the response fits on a single page, the link header will be omitted.
The link header contains the URLs for the previous, next, first, and last pages of results:
The URL for the previous page is followed by "rel=prev".
The URL for the next page is followed by "rel=next".
The URL for the last page is followed by "rel=last".
The URL for the first page is followed by "rel=first".
Here is a complete example of a link header when a user has visited the last page (page 7 in this example):
Link: <https://pre-api.schibsted.com/pixels/5c034de4-8e86-4d16-9fd1-20cfec6c97e4/events?from=2023-04-01T17%3A32%3A28.000Z&to=2023-04-21T17%3A32%3A28.000Z&page=1>; rel="first", <https://pre-api.schibsted.com/pixels/5c034de4-8e86-4d16-9fd1-20cfec6c97e4/events?from=2023-04-01T17%3A32%3A28.000Z&to=2023-04-21T17%3A32%3A28.000Z&page=7>; rel="last", <https://pre-api.schibsted.com/pixels/5c034de4-8e86-4d16-9fd1-20cfec6c97e4/events?from=2023-04-01T17%3A32%3A28.000Z&to=2023-04-21T17%3A32%3A28.000Z&page=6>; rel="prev"