PRODUCT
Follow

Overview

You can use the site resource to retrieve a set of sites, retrieve a specific site, retrieve sections from a specific site, and create site sections for a specific site.

Resource URL

Depending on the API user that was created for you, use one of the following URLs:

  • https://api.sizmek.com/rest/sites/global

  • https://adapi.sizmek.com/sas/sites/global

Note

Note: Confirm with your Sizmek customer success manager regarding the correct URL to use.

Objects Used by This Resource

HTTP Method and URI List

HTTP Method

URI

Description

GET

/sites/global

Retrieves multiple sites.

GET

/sites/global/{Id}

Retrieves a specific sites.

GET

/siteSections/global

Retrieves multiple site sections.

Method Examples and Request Parameters

Important

Important:

  • For PUT calls, do the following:

    • We recommend that for any PUT method that updates an object, you include the entire "result": object from the GET response in the request body. If there is missing information, even if it is read-only, the request might fail.

    • You must also change the "result": to "entities": and make the entities contents into an array. For example, here is the output from the GET request:

       { "result": { "type": "Advertiser", ... } }      

      You should make the following modifications, including your specific modifications, to the json object that you submit for the request.

       { "entities": [{ "type": "Advertiser", ... }] }   
      
  • For POST calls, do the following:

    • Include the fields marked as Required, as indicated in the corresponding Object article.

    • Format the JSON object as follows:

       { "entities": [{ "type": "Advertiser", ... }] }   

Get Multiple Sites

Retrieves multiple Sites.

Request Query Parameters

Name

Description

Type

Required

Notes

advertiserId

Retrieves all sites under the specific advertiser.

Long

Optional

from

Starting index by which to fetch new sites for paging purposes.

Long

Required

Getting multiple entities requires using from and max query parameters.

max

Maximum number of sites to fetch for each page.

Long

Required

accountId

ID of account.

Long

Optional

sort

Sort by field name (see here).

String

Optional

order

Sort order ASC or DESC, required if sort field name is specified (see here).

String

Optional

Note

Note: Required if a sort field name is specified.

By default, the API response is ascending.

q

Filtering options for the request (see here).

String

Optional

Example of query string: q={"1":{"NAME":["Test"]}}

Note

Note: The date is according to the Unix epoch timestamp.

advertiserId

ID of advertiser.

Long

Optional

Request Format

Depending on the API user that was created for you, use one of the following URLs:

  • GET https://api.sizmek.com/rest/sites/global?from=0&max=250

  • GET https://adapi.sizmek.com/sas/sites/global?from=0&max=250

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the sites' details filtered by data ownership.

Get a Site

Retrieves a specific site.

Request Parameters

Name

Description

Type

Required

Notes

id

ID of the requested site

Integer

Required

Request Format

Depending on the API user that was created for you, use one of the following URLs:

  • GET https://api.sizmek.com/rest/sites/1083756754

  • GET https://adapi.sizmek.com/sas/sites/1083756754

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the site details filtered by data ownership. If there is no site or data ownership, the request returns an empty response.

Get a Site Section

Retrieves a specific site section.

Request Parameters

Name

Description

Type

Required

Notes

id

ID of the requested site

Integer

Required

Request Format

Depending on the API user that was created for you, use one of the following URLs:

  • GET https://api.sizmek.com/rest/siteSections/global?from=0&max=250&order=asc&siteId=1073772236&sort=namehttps://developers.sizmek.com/hc/en-us/articles/360021102231

  • GET https://adapi.sizmek.com/sas/siteSections/global?from=0&max=250&order=asc&siteId=1073772236&sort=namehttps://developers.sizmek.com/hc/en-us/articles/360021102231

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the site details filtered by data ownership. If there is no site or data ownership, the request returns an empty response.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk