PubQ Data API (v1)

API for accessing data related to companies, sales locations, and orders.

Download OpenAPI description
Overview
PubQ Support

support@pubq.se

License

MIT

Languages
Servers
Mock server

https://docs.pubq.se/_mock/apis/openapi/

Production server

https://data.pubq.se/v1/api/

Companies

Operations

Orders

Operations

Metrics

Operations

Get apps by company ID

Request

Retrieves a list of applications associated with a given company ID. The current implementation returns a dummy payload.

Path
idstringrequired

The ID of the company to retrieve apps for.

curl -i -X GET \
  'https://docs.pubq.se/_mock/apis/openapi/apps/{id}'

Responses

A list of apps.

Bodyapplication/jsonArray [
appIdstring

The unique identifier for the app.

Example: "app_xyz123"
namestring

The name of the app.

Example: "My Awesome Application"
]
Response
application/json
[ { "appId": "app_xyz123", "name": "My Awesome Application" } ]

Get metrics for a specific app

Request

Retrieves metrics for a specified application ID within a given time range. The current implementation returns a dummy payload.

Path
appIdstringrequired

The ID of the application to retrieve metrics for.

Query
fromstring

Start timestamp for metrics (Unix timestamp or YYYY-MM-DD string).

tostring

End timestamp for metrics (Unix timestamp or YYYY-MM-DD string).

curl -i -X GET \
  'https://docs.pubq.se/_mock/apis/openapi/metrics/{appId}?from=string&to=string'

Responses

Metrics data for the application.

Bodyapplication/json
appIdstring

The ID of the application.

Example: "app_xyz123"
totalCompletedOrdersinteger(int32)
Example: 150
newUsersinteger(int32)
Example: 25
activeUsersinteger(int32)
Example: 120
appOpensinteger(int32)
Example: 500
iosUsersinteger(int32)
Example: 70
androidUsersinteger(int32)
Example: 50
cartsCreatedinteger(int32)
Example: 200
cartsIdlinginteger(int32)
Example: 15
averageSessionLengthnumber(float)

Average session length in seconds or minutes.

Example: 180.5
Response
application/json
{ "appId": "app_xyz123", "totalCompletedOrders": 150, "newUsers": 25, "activeUsers": 120, "appOpens": 500, "iosUsers": 70, "androidUsers": 50, "cartsCreated": 200, "cartsIdling": 15, "averageSessionLength": 180.5 }

Get metrics for a specific vendor

Request

Retrieves metrics for a specified vendor route name within a given time range. The current implementation returns a dummy payload and has a potential issue with appId in the response (see implementation notes).

Path
routeNamestringrequired

The route name of the vendor to retrieve metrics for.

Query
fromstring

Start timestamp for metrics (Unix timestamp or YYYY-MM-DD string).

tostring

End timestamp for metrics (Unix timestamp or YYYY-MM-DD string).

curl -i -X GET \
  'https://docs.pubq.se/_mock/apis/openapi/metrics/vendor/{routeName}?from=string&to=string'

Responses

Metrics data for the vendor.

Bodyapplication/json
routeNamestring

The route name of the vendor.

Example: "vendor_route_abc"
totalCompletedOrdersinteger(int32)
Example: 150
newUsersinteger(int32)
Example: 25
activeUsersinteger(int32)
Example: 120
appOpensinteger(int32)
Example: 500
iosUsersinteger(int32)
Example: 70
androidUsersinteger(int32)
Example: 50
cartsCreatedinteger(int32)
Example: 200
cartsIdlinginteger(int32)
Example: 15
averageSessionLengthnumber(float)

Average session length in seconds or minutes.

Example: 180.5
Response
application/json
{ "routeName": "vendor_route_abc", "totalCompletedOrders": 150, "newUsers": 25, "activeUsers": 120, "appOpens": 500, "iosUsers": 70, "androidUsers": 50, "cartsCreated": 200, "cartsIdling": 15, "averageSessionLength": 180.5 }