Talroo Platform REST APIs API Reference

This page lists all the REST APIs for Talroo's Application Platform.

API Endpoint
https://api-stage.talroo.com/
Schemes: https
Version: 2.0.1

Campaign

Campaign Resource

Return a list of Campaigns

GET /campaigns
x-api-key: string
in header

Bearer token auth header using idToken.

page: integer (int32) 0
in query

page

size: integer (int32) 10
in query

size

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "entities": [
      "{}",
      "{}"
    ],
    "entity": "{}"
  },
  "_meta": {
    "previousPage": true,
    "last": true,
    "numberOfElements": 6,
    "offset": 1,
    "nextPage": true,
    "limit": 0,
    "totalPages": 5,
    "sort": {
      "unsorted": true,
      "sorted": true,
      "empty": true
    },
    "first": true,
    "totalElements": 5
  },
  "error": {
    "code": "code",
    "message": "message",
    "status": 2,
    "timestamp": "2000-01-23T04:56:07.000+00:00"
  }
}

Create a Campaign

POST /campaigns

campaignDTO

x-api-key: string
in header

Bearer token auth header using idToken.

Request Content-Types: application/json
Request Example
{
  "name": "string",
  "poolId": "integer",
  "budgetInDollars": "integer",
  "cpcInCents": "integer",
  "cpcGoalCents": "integer",
  "budgetPacing": "boolean",
  "status": "string",
  "feedFilter": "integer",
  "pacingDayOfMonth": "integer",
  "jobFeed": {
    "feedUrl": "string",
    "feedFormat": "string",
    "cpcControl": "READ_FROM_FEED"
  }
}
200 OK

OK

201 Created

Created

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

Response Content-Types: application/json
Response Example (200 OK)
{
  "campaignId": "integer",
  "name": "string",
  "poolId": "integer",
  "budgetInDollars": "integer",
  "cpcInCents": "integer",
  "cpcGoalCents": "integer",
  "budgetPacing": "boolean",
  "status": "string",
  "feedFilter": "integer",
  "pacingDayOfMonth": "integer",
  "jobFeed": {
    "feedUrl": "string",
    "feedFormat": "string",
    "cpcControl": "READ_FROM_FEED"
  }
}

Returns reporting information about campaign

GET /campaigns/{campaignId}/report
x-api-key: string
in header

Bearer token auth header using idToken.

campaignId: integer (int32)
in path

campaignId

reportParameters: string
in query

Comma separated list of desired report parameters (refer to Reporting model for supported values). If this parameter is not specified the response will contain all supported report parameters.

200 OK

OK

type
object
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "entity": "{}"
  }
}

Return a Campaign by its ID

GET /campaigns/{campaignId}
x-api-key: string
in header

Bearer token auth header using idToken.

campaignId: integer (int32)
in path

campaignId

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "entities": [
      "{}",
      "{}"
    ],
    "entity": "{}"
  },
  "_meta": {
    "previousPage": true,
    "last": true,
    "numberOfElements": 6,
    "offset": 1,
    "nextPage": true,
    "limit": 0,
    "totalPages": 5,
    "sort": {
      "unsorted": true,
      "sorted": true,
      "empty": true
    },
    "first": true,
    "totalElements": 5
  },
  "error": {
    "code": "code",
    "message": "message",
    "status": 2,
    "timestamp": "2000-01-23T04:56:07.000+00:00"
  }
}

Update a Campaign

PUT /campaigns/{campaignId}

Payload containing campaign information

x-api-key: string
in header

Bearer token auth header using idToken.

campaignId: integer (int32)
in path

campaignId

Request Content-Types: application/json
Request Example
{
  "name": "string",
  "poolId": "integer",
  "budgetInDollars": "integer",
  "cpcInCents": "integer",
  "cpcGoalCents": "integer",
  "budgetPacing": "boolean",
  "status": "string",
  "feedFilter": "integer",
  "pacingDayOfMonth": "integer",
  "jobFeed": {
    "feedUrl": "string",
    "feedFormat": "string",
    "cpcControl": "READ_FROM_FEED"
  }
}
201 Created

Created

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "entities": [
      "{}",
      "{}"
    ],
    "entity": "{}"
  },
  "_meta": {
    "previousPage": true,
    "last": true,
    "numberOfElements": 6,
    "offset": 1,
    "nextPage": true,
    "limit": 0,
    "totalPages": 5,
    "sort": {
      "unsorted": true,
      "sorted": true,
      "empty": true
    },
    "first": true,
    "totalElements": 5
  },
  "error": {
    "code": "code",
    "message": "message",
    "status": 2,
    "timestamp": "2000-01-23T04:56:07.000+00:00"
  }
}

Delete a Campaign

DELETE /campaigns/{campaignId}
x-api-key: string
in header

Bearer token auth header using idToken.

campaignId: integer (int32)
in path

campaignId

200 OK

OK

204 No Content

No Content

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

Response Content-Types: application/json

User

User Resource

Refresh Authorization Token

GET /users/{userId}/refresh
RefreshToken: string
in header

Valid refresh token.

userId: string
in path

user's id

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

Response Content-Types: application/json
Response Example (200 OK)
{
  "idToken": "newIdToken",
  "accessToken": "newAccessToken"
}

Schema Definitions

Campaign: object

campaignId:
integer
name:
string
poolId:
integer
budgetInDollars:
integer
cpcInCents:
integer
cpcGoalCents:
integer
budgetPacing:
boolean
status:
string
feedFilter:
integer
pacingDayOfMonth:
integer
jobFeed:
object
feedUrl:
string
feedFormat:
string
cpcControl:
string READ_FROM_FEED, SET_CPC
Example
{
  "campaignId": "integer",
  "name": "string",
  "poolId": "integer",
  "budgetInDollars": "integer",
  "cpcInCents": "integer",
  "cpcGoalCents": "integer",
  "budgetPacing": "boolean",
  "status": "string",
  "feedFilter": "integer",
  "pacingDayOfMonth": "integer",
  "jobFeed": {
    "feedUrl": "string",
    "feedFormat": "string",
    "cpcControl": "READ_FROM_FEED"
  }
}

CampaignNoId: object

name:
string
poolId:
integer
budgetInDollars:
integer
cpcInCents:
integer
cpcGoalCents:
integer
budgetPacing:
boolean
status:
string
feedFilter:
integer
pacingDayOfMonth:
integer
jobFeed:
object
feedUrl:
string
feedFormat:
string
cpcControl:
string READ_FROM_FEED, SET_CPC
Example
{
  "name": "string",
  "poolId": "integer",
  "budgetInDollars": "integer",
  "cpcInCents": "integer",
  "cpcGoalCents": "integer",
  "budgetPacing": "boolean",
  "status": "string",
  "feedFilter": "integer",
  "pacingDayOfMonth": "integer",
  "jobFeed": {
    "feedUrl": "string",
    "feedFormat": "string",
    "cpcControl": "READ_FROM_FEED"
  }
}

Reporting: object

reportParameters:
string SPENDING
Example
{
  "reportParameters": "string"
}

Data: object

entities:
object[]
object
entity:
object
Example
{
  "entities": [
    "{}",
    "{}"
  ],
  "entity": "{}"
}

SingleData: object

entity:
object
Example
{
  "entity": "{}"
}

ConfirmUser: object

confirmationCode:
integer
Example
{
  "confirmationCode": 123456
}

ConfirmUserResponse: object

status:
string
Example
{
  "status": "ConfirmSignUpResponse()"
}

RefreshTokenResponse: object

idToken:
string
accessToken:
string
Example
{
  "idToken": "newIdToken",
  "accessToken": "newAccessToken"
}

Meta: object

first:
boolean
last:
boolean
limit:
integer (int32)
nextPage:
boolean
numberOfElements:
integer (int32)
offset:
integer (int32)
previousPage:
boolean
sort:
Sort
totalElements:
integer (int64)
totalPages:
integer (int32)
Example
{
  "previousPage": true,
  "last": true,
  "numberOfElements": 6,
  "offset": 1,
  "nextPage": true,
  "limit": 0,
  "totalPages": 5,
  "sort": {
    "unsorted": true,
    "sorted": true,
    "empty": true
  },
  "first": true,
  "totalElements": 5
}

ResponsePageOfCampaign: object

_meta:
Meta
data:
Data
error:
TalrooError
Example
{
  "data": {
    "entities": [
      "{}",
      "{}"
    ],
    "entity": "{}"
  },
  "_meta": {
    "previousPage": true,
    "last": true,
    "numberOfElements": 6,
    "offset": 1,
    "nextPage": true,
    "limit": 0,
    "totalPages": 5,
    "sort": {
      "unsorted": true,
      "sorted": true,
      "empty": true
    },
    "first": true,
    "totalElements": 5
  },
  "error": {
    "code": "code",
    "message": "message",
    "status": 2,
    "timestamp": "2000-01-23T04:56:07.000+00:00"
  }
}

Sort: object

empty:
boolean
sorted:
boolean
unsorted:
boolean
Example
{
  "unsorted": true,
  "sorted": true,
  "empty": true
}

TalrooError: object

code:
string
message:
string
status:
integer (int32)
timestamp:
string (date-time)
Example
{
  "code": "code",
  "message": "message",
  "status": 2,
  "timestamp": "2000-01-23T04:56:07.000+00:00"
}