Skip to main content

API Reference

Prisjakt Click and Conversion API (1.0.0)

Download OpenAPI specification:Download

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.

Clients

Operations for clients.

Retrieve a client by ID

Retrieve a client by ID.

Authorizations:
apiKey
path Parameters
client_id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The ID for the client to retrieve

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
{
  • "id": "lb4xiAVZZWkXiYxfxa146e4tbkYa702P",
  • "roles": [
    ]
}

Docs

Operations for retrieving the API documentation.

Retrieve the documentation page for the API

Retrieve the documentation page for the API.

Responses

Retrieve the Open API specification for the API

Retrieve the Open API specification for the API.

Responses

Response samples

Content type
application/json
"string"

Events

Operations for managing events.

Retrieve an event by ID

Retrieve an event by ID.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
event_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The event ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
{
  • "id": "52907745-7672-470e-a803-a2f8feb52944",
  • "click_id": "52907745-7672-470e-a803-a2f8feb52944",
  • "external_event_id": "2jclyrr-kgvz82",
  • "event_name": "purchase",
  • "event_time": "2019-08-24T14:15:22Z",
  • "data": {
    }
}

Health

Operations for health checks.

Retrieve the health status of the API

Retrieve the health status of the API.

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

Pixels

Operations for managing pixels.

Create a new event for a pixel

Create a new event for a pixel.

Note! To avoid sending duplicate events, send a unique external event ID with each event. If an event with the same external event ID already exists within the last 30 days, the request will fail with a 409 Conflict response.

The client ID must have the shop_user or event_publisher role.

Authorizations:
apiKey
path Parameters
pixel_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The pixel ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

Request Body schema: application/json
required

The event data

event_name
required
string
Value: "purchase"
event_time
string (UTCDateTime) ^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(...

ISO 8601 date and time in UTC

external_event_id
string (ExternalEventId) [ 1 .. 100 ] characters

An external event id.

required
object
signed_click_id
required
string <string> (SignedUUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...

UUIDv4 with a 16-character signature appended. UUID and signature is delimited with a _ character (UUID_signature).

Responses

Request samples

Content type
application/json
{
  • "event_name": "purchase",
  • "event_time": "2023-05-01T15:03:01Z",
  • "external_event_id": "2jclyrr-kgvz82",
  • "data": {
    },
  • "signed_click_id": "239cd31f-9d43-4cb4-b8dc-2057fe18c289_1b05fa7f1c34d125"
}

Response samples

Content type
application/json
{
  • "title": "A short summary of the problem",
  • "status": 0.1,
  • "detail": "An explanation specific to this occurrence of the problem",
  • "context": {
    }
}

Create multiple events for a pixel

Create multiple events for a pixel.

Note! If an event with the same external event ID already exists, the existing event will be updated with the new data.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
pixel_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The pixel ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Request Body schema: application/json
required

The batch of events

Array
event_name
required
string
Value: "purchase"
event_time
string (UTCDateTime) ^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(...

ISO 8601 date and time in UTC

external_event_id
string (ExternalEventId) [ 1 .. 100 ] characters

An external event id.

required
object
signed_click_id
required
string <string> (SignedUUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...

UUIDv4 with a 16-character signature appended. UUID and signature is delimited with a _ character (UUID_signature).

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "title": "A short summary of the problem",
  • "status": 0.1,
  • "detail": "An explanation specific to this occurrence of the problem",
  • "context": {
    }
}

Retrieve all events for a pixel

Retrieve all events for a pixel within a given date interval. The maximum interval is 60 days between the from and to dates. The events are returned in reverse chronological order.

When a response is paginated, the response headers will include a link header. The link header will be omitted if all results fit on a single page.

The link header provides the URL for the previous, next, first, and last page 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".

In some cases, only a subset of these links are available. For example, the link to the previous page won't be included if you are on the first page of results.

If you are paginating through the events, note that the data is not stable. If new events are added while you are paginating, you may see the same event again on the next page, so you should use the event ID to determine where to start the next page.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
pixel_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The pixel ID

query Parameters
from
required
string (UTCDateTime) ^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(...
Example: from=2023-05-01T15:03:01Z

The start date

page
number <double> >= 1
Default: 1

The page number. Defaults to 1.

per_page
number <double> [ 1 .. 100 ]
Default: 100

The number of events per page. Defaults to 100.

to
required
string (UTCDateTime) ^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(...
Example: to=2023-05-01T15:03:01Z

The end date

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a pixel by ID

Retrieve a pixel by ID.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
pixel_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The pixel ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
{
  • "id": "52907745-7672-470e-a803-a2f8feb52944",
  • "enabled": true
}

Update a pixel.

Update a pixel.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
pixel_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The pixel ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Request Body schema: application/json
required

The pixel data

enabled
boolean

Responses

Request samples

Content type
application/json
{
  • "enabled": true
}

Response samples

Content type
application/json
{
  • "title": "A short summary of the problem",
  • "status": 0.1,
  • "detail": "An explanation specific to this occurrence of the problem",
  • "context": {
    }
}

Retrieve the purchase summary for a pixel

Retrieve the purchase summary for a pixel within a given date interval. The maximum interval is 60 days between the from and to dates. The response includes the total number of purchase events and the total value of the purchase events for each currency.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
pixel_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The pixel ID

query Parameters
from
required
string (UTCDateTime) ^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(...
Example: from=2023-05-01T15:03:01Z

The start date

to
required
string (UTCDateTime) ^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(...
Example: to=2023-05-01T15:03:01Z

The end date

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
{
  • "per_day": [
    ],
  • "summaries": [
    ]
}

getConversions

Retrieve conversions for a pixel within a given date interval.

Authorizations:
apiKey
path Parameters
pixel_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The pixel ID

query Parameters
from
required
string (UTCDateTime) ^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(...
Example: from=2023-05-01T15:03:01Z

The start date

page
number <double> >= 1
Default: 1

The page number. Defaults to 1.

per_page
number <double> [ 1 .. 100 ]
Default: 100

The number of events per page. Defaults to 100.

to
required
string (UTCDateTime) ^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(...
Example: to=2023-05-01T15:03:01Z

ISO 8601 date and time in UTC

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Shops

Operations for managing shops.

Create a new client for a shop

Create a new client for a shop.

The client ID must have the admin role.

Authorizations:
apiKey
path Parameters
shop_id
required
integer <int32> (ShopId) [ 1 .. 999999 ]
Example: 123456

The shop ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Request Body schema: application/json
required
roles
required
Array of strings (CreateableRole)
Items Enum: "event_publisher" "shop_user"

Responses

Request samples

Content type
application/json
{
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "title": "A short summary of the problem",
  • "status": 0.1,
  • "detail": "An explanation specific to this occurrence of the problem",
  • "context": {
    }
}

Create a new pixel for a shop

Create a new pixel for a shop.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
shop_id
required
integer <int32> (ShopId) [ 1 .. 999999 ]
Example: 123456

The shop ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
{
  • "title": "A short summary of the problem",
  • "status": 0.1,
  • "detail": "An explanation specific to this occurrence of the problem",
  • "context": {
    }
}

Retrieve all pixels for a shop

Retrieve all pixels for a shop

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
shop_id
required
integer <int32> (ShopId) [ 1 .. 999999 ]
Example: 123456

The shop ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a shop by ID

Retrieve a shop by ID.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
shop_id
required
integer <int32> (ShopId) [ 1 .. 999999 ]
Example: 123456

The shop ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
{
  • "id": 123456,
  • "clients": [
    ],
  • "pixels": [
    ]
}

Clicks

Retrieve a click by ID

Retrieve a click by ID.

The client ID must have the shop_user role.

Authorizations:
apiKey
path Parameters
click_id
required
string <uuid> (UUID) [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}...
Example: 52907745-7672-470e-a803-a2f8feb52944

The click ID

header Parameters
client-id
required
string <string> (ClientId)
Example: lb4xiAVZZWkXiYxfxa146e4tbkYa702P

The client ID

client-secret
required
string <string> (ClientSecret)
Example: QciJ4AEjYjkE2f5pX5scLzPJi8lk9C

The client secret

Responses

Response samples

Content type
application/json
{
  • "id": "52907745-7672-470e-a803-a2f8feb52944",
  • "forwarded_date": "2021-09-01T12:00:00.000Z",
  • "invoicing": {
    },
  • "location": {
    },
  • "request": {
    }
}