certs-api API v0.1.0-preview
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Prisa Group Certificates
Authentication
- API Key (X-API-Key)
- Parameter Name: X-API-Key, in: header. Api KEY
Carriers
carriers
Code samples
# You can also use wget
curl -X GET /prisa/certs/carriers \
-H 'Accept: application/json' \
-H 'X-API-Key: XXXXXXX'
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'XXXXXXX'
}
r = requests.get('/prisa/certs/carriers', headers = headers)
print(r.json())
URL obj = new URL("/prisa/certs/carriers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /prisa/certs/carriers
This endpoint is used to get the supports from the database selected
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
database | query | string | false | database source, by default selected last EGM |
Example responses
200 Response
{
"database": {
"id": "EIA0N3PR",
"description": "EMISORAS PRISA EGM - 3º Ac. 2023"
},
"carriers": [
{
"code": "LOS40DANCE",
"description": "LOS40 DANCE",
"subtype": "CADENA"
},
{
"code": "5897",
"description": "MADRID FM 40CLASSIC",
"subtype": "EMISORA"
},
{
"code": "5895",
"description": "BARCELONA FM 40CLASSIC",
"subtype": "EMISORA"
},
{
"code": "8106",
"description": "LOS40 CLASSIC IN 40CLASSIC",
"subtype": "EMISORA"
}
]
}
400 Response
{
"status": "Bad Request",
"errorCode": "400",
"errorMessage": "Bad Request",
"statusCode": 400
}
401 Response
{
"status": "Unauthorized",
"errorCode": "401",
"errorMessage": "Unauthorized",
"statusCode": 401
}
403 Response
{
"status": "Forbidden",
"errorCode": "403",
"errorMessage": "Forbidden",
"statusCode": 403
}
404 Response
{
"status": "Not Found",
"errorCode": "404",
"errorMessage": "Not Found",
"statusCode": 404
}
500 Response
{
"status": "Internal Server Error",
"errorCode": "500",
"errorMessage": "Internal Server Error",
"statusCode": 500
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | CarrierList |
400 | Bad Request | Bad Request | Problem |
401 | Unauthorized | Unauthorized | Problem |
403 | Forbidden | Forbidden | Problem |
404 | Not Found | Not Found | Problem |
500 | Internal Server Error | Internal Server Error | Problem |
Databases
databases
Code samples
# You can also use wget
curl -X GET /prisa/certs/databases \
-H 'Accept: application/json' \
-H 'X-API-Key: XXXXXXX'
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'XXXXXXX'
}
r = requests.get('/prisa/certs/databases', headers = headers)
print(r.json())
URL obj = new URL("/prisa/certs/databases");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /prisa/certs/databases
This endpoint is used to get the databases list
Example responses
200 Response
[
{
"id": "EIA0N3PR",
"description": "EMISORAS PRISA EGM - 3º Ac. 2023"
}
]
400 Response
{
"status": "Bad Request",
"errorCode": "400",
"errorMessage": "Bad Request",
"statusCode": 400
}
401 Response
{
"status": "Unauthorized",
"errorCode": "401",
"errorMessage": "Unauthorized",
"statusCode": 401
}
403 Response
{
"status": "Forbidden",
"errorCode": "403",
"errorMessage": "Forbidden",
"statusCode": 403
}
404 Response
{
"status": "Not Found",
"errorCode": "404",
"errorMessage": "Not Found",
"statusCode": 404
}
500 Response
{
"status": "Internal Server Error",
"errorCode": "500",
"errorMessage": "Internal Server Error",
"statusCode": 500
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Database |
400 | Bad Request | Bad Request | Problem |
401 | Unauthorized | Unauthorized | Problem |
403 | Forbidden | Forbidden | Problem |
404 | Not Found | Not Found | Problem |
500 | Internal Server Error | Internal Server Error | Problem |
Plan
plan
Code samples
# You can also use wget
curl -X POST /prisa/certs/plan \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-API-Key: XXXXXXX'
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'XXXXXXX'
}
r = requests.post('/prisa/certs/plan', headers = headers)
print(r.json())
URL obj = new URL("/prisa/certs/plan");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /prisa/certs/plan
This endpoint is used to get the planification from carriers and variables
Body parameter
{
"filter": "string",
"vars": [
"string"
],
"insertions": [
{
"code": "string",
"description": "string",
"subtype": "string",
"date": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
database | query | string | false | database source, by default selected last EGM |
body | body | Plan | false | plan request |
Example responses
200 Response
{
"requestTime": "2024/3/20 13:25:14",
"requestHash": "31eef1cd-f343-4833-80c8-0626b8bf3569",
"results": {
"plan": [
{
"statistic": "Insertion",
"formatted": "572",
"value": 572
},
{
"statistic": "Contact",
"formatted": "1.556,1",
"value": 1556.076422065799
},
{
"statistic": "Cover",
"formatted": "169,7",
"value": 169.6959676294357
},
{
"statistic": "GRP",
"formatted": "3,74",
"value": 3.735614681689323
}
]
}
}
400 Response
{
"status": "Bad Request",
"errorCode": "400",
"errorMessage": "Bad Request",
"statusCode": 400
}
401 Response
{
"status": "Unauthorized",
"errorCode": "401",
"errorMessage": "Unauthorized",
"statusCode": 401
}
403 Response
{
"status": "Forbidden",
"errorCode": "403",
"errorMessage": "Forbidden",
"statusCode": 403
}
404 Response
{
"status": "Not Found",
"errorCode": "404",
"errorMessage": "Not Found",
"statusCode": 404
}
500 Response
{
"status": "Internal Server Error",
"errorCode": "500",
"errorMessage": "Internal Server Error",
"statusCode": 500
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | PlanResponse |
400 | Bad Request | Bad Request | Problem |
401 | Unauthorized | Unauthorized | Problem |
403 | Forbidden | Forbidden | Problem |
404 | Not Found | Not Found | Problem |
500 | Internal Server Error | Internal Server Error | Problem |
Vars
variables
Code samples
# You can also use wget
curl -X GET /prisa/certs/variables \
-H 'Accept: application/json' \
-H 'X-API-Key: XXXXXXX'
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'XXXXXXX'
}
r = requests.get('/prisa/certs/variables', headers = headers)
print(r.json())
URL obj = new URL("/prisa/certs/variables");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /prisa/certs/variables
This endpoint is used to get the variables from the database selected
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
database | query | string | false | database source, by default selected last EGM |
Example responses
200 Response
{
"database": {
"id": "string",
"description": "string"
},
"variables": [
{
"code": "string",
"description": "string",
"type": "string",
"subtype": "string",
"categories": [
{
"code": "string",
"description": "string"
}
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | VariableList |
Schemas
Carrier
{
"code": "string",
"description": "string",
"subtype": "string"
}
Represents a Carrier
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | none |
description | string | false | none | none |
subtype | string | false | none | none |
CarrierList
{
"database": {
"id": "string",
"description": "string"
},
"carriers": [
{
"code": "string",
"description": "string",
"subtype": "string"
}
]
}
Carrier list
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
database | Database | false | none | Database |
carriers | [Carrier] | false | none | [Represents a Carrier] |
Category
{
"code": "string",
"description": "string"
}
Represents a Category
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | none |
description | string | false | none | none |
Database
{
"id": "string",
"description": "string"
}
Database
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
description | string | false | none | none |
Insertion
{
"code": "string",
"description": "string",
"subtype": "string",
"date": "string"
}
Represents an insertion
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | none |
description | string | false | none | none |
subtype | string | false | none | none |
date | string | false | none | none |
Plan
{
"filter": "string",
"vars": [
"string"
],
"insertions": [
{
"code": "string",
"description": "string",
"subtype": "string",
"date": "string"
}
]
}
Represents a plan object with filter, variables, and insertions
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
filter | string | false | none | none |
vars | [string] | false | none | none |
insertions | [Insertion] | false | none | [Represents an insertion] |
PlanResponse
{
"requestTime": "string",
"requestHash": "string",
"results": {
"property1": [
{
"statistic": "string",
"formatted": "string",
"value": 0
}
],
"property2": [
{
"statistic": "string",
"formatted": "string",
"value": 0
}
]
},
"version": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
requestTime | string | false | none | none |
requestHash | string | false | none | none |
results | object | false | none | none |
» additionalProperties | [PlanResult] | false | none | none |
version | string | false | none | none |
PlanResult
{
"statistic": "string",
"formatted": "string",
"value": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
statistic | string | false | none | none |
formatted | string | false | none | none |
value | number | false | none | none |
Problem
{
"status": "string",
"errorMessage": "string",
"errorCode": "string",
"statusCode": 0
}
This represents a problem response
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
status | string | false | none | none |
errorMessage | string | false | none | none |
errorCode | string | false | none | none |
statusCode | integer(int32) | false | none | none |
Variable
{
"code": "string",
"description": "string",
"type": "string",
"subtype": "string",
"categories": [
{
"code": "string",
"description": "string"
}
]
}
Represents a variable
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | none |
description | string | false | none | none |
type | string | false | none | none |
subtype | string | false | none | none |
categories | [Category] | false | none | [Represents a Category] |
VariableList
{
"database": {
"id": "string",
"description": "string"
},
"variables": [
{
"code": "string",
"description": "string",
"type": "string",
"subtype": "string",
"categories": [
{
"code": "string",
"description": "string"
}
]
}
]
}
Variable list
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
database | Database | false | none | Database |
variables | [Variable] | false | none | [Represents a variable] |