Skip to main content

GET Ad Schedules by Filter

Overview


The following table contains important information about the GET method in regards to receiving the ad schedules by filters.

GET Ad Schedules by Filter
MethodGET
URL or Endpoint/api/projects/projectId/ad-schedules
HeadersAuthorization
ParametersprojectId, search, page, take, order, insertDate
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeDescription
projectIdYesstringUnique ID of the project.

The description of the query parameters is as follows:

Parameter NameTypeDescription
searchstringA search term to filter ad schedules by.
orderstringIndicates whether the results are ordered by ascending or descending. Default is "asc".
insertDatestring($date-time)Filter by the date when the ad schedule was inserted.
pageintegerThe page number to retrieve. Default is 1.
takeintegerNumber of ad schedules per page. Default is 10.

Request Body

The request does not contain a request body.

Response

{
"success": true,
"errors": [],
"messages": [],
"result": {
"currentPage": 0,
"totalPages": 0,
"pageSize": 0,
"totalCount": 0,
"items": [
{
"publicId": "{publicId}",
"name": "{name}",
"type": "{type}",
"playerBidding": "{playerBidding}",
"playerType": "{playerType}",
"dateCreated": "2024-05-28T11:44:17.062Z",
"orderNumber": 0
}
]
},
"resultInfo": null,
"statusCode": 200
}

Information about the fields that appear when you receive the response are displayed in the table below.

Top-Level Properties

Field NameTypeDescription
successbooleanIf the response is successful it will return true. Otherwise will return false.
errorsarray[string]Indicates if there was an error.
messagesarray[string]Returns the response message from back-end.
resultobjectReturns the paginated response object.
currentPageintegerIndicates the current page.
totalPagesintegerThe total number of pages.
pageSizeintegerIndicates how many ad schedules are per page.
totalCountintegerThe total number of ad schedules matching the filter.
itemsarray[object]Returns the ad schedules on the current page.
resultInfostringReturns extra information about the result.
statusCodeintegerReturns the HTTP Status Code.

items Properties

Field NameTypeDescription
publicIdstringThe public ID of the ad schedule.
namestringThe name of the ad schedule.
typestringThe type of the ad schedule.
playerBiddingstringThe bidding template associated with the ad schedule.
playerTypestringThe type of the player assigned to the ad schedule.
dateCreatedstring($date-time)The date when the ad schedule was created.
orderNumberinteger or nullThe order number of the ad schedule.

If the action is successful, the service sends back an HTTP 200 or 201 response.

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed