SmartXSP
  • Welcome to SmartXSP
  • How to create your first campaign
  • SmartPulse
    • Advanced Tracking
  • Transition Effects
  • Social Generator
  • Ad Serving
    • Getting Started for Publishers
      • [ENG] Publishers : Testing Guide
      • [FRA] Editeurs : Manuel d'intégration
  • Settings
    • Site custom settings
    • Macro in Creative URL
  • API Documentation
    • Starter Guide
    • Campaign
    • Creative
    • Account
  • Looker Studio Connector
    • Looker Studio : what is this connector
    • Support
  • Register SmartXSP
  • Terms & conditions
    • Privacy
    • Terms
  • Troubleshooting
    • No URL
Powered by GitBook
On this page
  • Properties description
  • Search campaigns
  • Get campaign details
  • Create a new campaign
  • Get Campaign Report
  1. API Documentation

Campaign

Properties description

Property
Type
Description

id

Integer

Campaign unique identification.

name

String

Campaign name defined par user during creation

state

Enum

Current state of the campaign, it can take this values : - waiting - running - paused - completed - archived

account_id

Integer

Id of the account associated to the campaign

owner_account_id

Integer

Id of the owner account or parent account generally used for agency customer campaigns.

product_id

Integer

Id of the main product of the campaign (SmartCover, SmartRead, SmartPulse or Display).

start_at

Datetime

Start of the campaign, GMT timezone

stop_at

Datetime

Stop of the campaign, GMT timezone

budget

Integer

Maximum amount of impressions to deliver during the campaign

sell_price

Decimal

Sell price to the final customer, for information only, not required.

buy_price

Decimal

Maximium CPM price used for bidding.

impressions

Integer

Amount of ad impressions (eg to ad calls).

visible_impressions

Integer

Amount of ad displayed more than 1 second on the user screen.

clicks

Integer

Amount of clicks generated by the campaign

exposure_time

Integer

Amount of seconds when the ad is displayed (at minimum 50% of his content) on user screen.

created_at

Datetime

Creation date of the campaign, GMT timezone

updated_at

Datetime

Last update of the campaign, GMT timezone

deleted_at

Datetime

Field used for softdeleting the campaign. This property is null for active campaign.

Search campaigns

GET https://api.smartxsp.io/campaigns

Query Parameters

Name
Type
Description

String

Headers

Name
Type
Description

Authorization*

String

The Bearer token you get during login process.

{
    "success":true,
    "data":{
        "user":{
            "id":1,
            "name":"John Doe",
            "email":"johndoe@smartxsp.io",
            "account_id":1,
            "account":{
                "id":1,
                "name":"Account Name",
                "account_type":"agency"
            }
        },
        "campaigns":[
            {
                "id":1,
                "name":"First campaign"
            },
            {
                "id":2,
                "name":"Second campaign"
            }
        ]
    },
    "message":"Campaigns retrieved successfully."
}

Get campaign details

GET https://api.smartxsp.io/campaigns/{campaign_id}

Retrieves campaign details.

Path Parameters

Name
Type
Description

campaign_id*

String

The numeric id of the campaign

Headers

Name
Type
Description

Authorization*

String

The Bearer token you get during login process.

{
    "success":true,
    "data":{
        "id":1,
        "name":"My first campagn",
        "state":"running",
        "account_id":2216,
        "owner_account_id":21,
        "product_id":1,
        "start_at":"2023-04-25T22:00:00.000000Z",
        "stop_at":"2023-05-12T21:59:00.000000Z",
        "budget":24000,
        "sell_price":"20.00000",
        "buy_price":"12.00000",
        "impressions":11397,
        "visible_impressions":7938,
        "clicks":57,
        "exposure_time":140122,
        "created_at":"2023-04-26T15:24:05.000000Z",
        "updated_at":"2023-05-02T12:37:06.000000Z",
        "deleted_at":null
    },
    "message":"Campaign retrieved successfully."
}

Create a new campaign

POST https://api.smartxsp.io/campaigns/

Retrieves campaign details.

Query Parameters

Name
Type
Description

account_id

Integer

The account associated to the campaign. If not provided it will be the user account.

name*

String

The campaign name

start_at*

Datetime

The start of the campaign, on GMT timezone using the format "Y-m-d H:i:s" (2023-01-31 12:15:00)

stop_at*

Datetime

The end of the campaign, on GMT timezone using the same format that start_at

budget*

Integer

Amount of impressions to serve

buy_price*

Decimal

Maximum CPM price to buy on programmatic network

sell_price

Decimal

Your sell CPM value

product_id*

Integer

Id of the main product

site_countries

Array

List of country id. Target sites that deal with a country.

geo_countries

Array

List of country id. Target user localized in a country.

geo_lists

Array

List of geoList id. Target user on a postal code level

packages

Array

List of package id. Target sites on a packaged sites list

sites

Array

List of site id. Target specific website by their id.

segments

Array

List of data segment id. Target user or content based on data segments.

contexts

Array

List of contextual segment id. Target content based on contextuel content.

Headers

Name
Type
Description

Authorization*

String

The Bearer token you get during login process.

{
    "success":true,
    "data":{
        "id":1,
        "name":"My first campagn",
        "state":"running",
        "account_id":2216,
        "owner_account_id":21,
        "product_id":1,
        "start_at":"2023-04-25T22:00:00.000000Z",
        "stop_at":"2023-05-12T21:59:00.000000Z",
        "budget":24000,
        "sell_price":"20.00000",
        "buy_price":"12.00000",
        "impressions":11397,
        "visible_impressions":7938,
        "clicks":57,
        "exposure_time":140122,
        "created_at":"2023-04-26T15:24:05.000000Z",
        "updated_at":"2023-05-02T12:37:06.000000Z",
        "deleted_at":null
    },
    "message":"Campaign retrieved successfully."
}

Get Campaign Report

GET https://api.smartxsp.io/campaigns{campaign_id}/report

Headers

Name
Type
Description

Authorization*

String

The Bearer token you get during login process.

Path Parameters

Name
Type
Description

campaign_id*

String

The numeric id of the campaign

Query Parameters

Name
Type
Description

account_id

Integer

The account associated to the campaign. If not provided it will be the user account.

account_code

String

The custom account code associated to the campaign instade of the account_id

start*

Datetime

The start of the reporting

stop*

Datetime

The end of the reporting

dim_date

Boolean

Activate date dimension. If it is set to false, we will cumulate

dim_site

Boolean

Activate site (domain and id) dimension

dim_creative

Boolean

Activate creative dimension

Response

{
    "success":true,
    "data":{
        "account_id":2216,
        "campaign_id":8760,
        "start":"2023-01-01",
        "stop":"2023-03-01",
        "report":[
            {
                 "date":"2023-02-01",
                 "site_id":"6",
                 "site_domain":"actu.fr",
                 "creative_id":33876,
                 "impressions":3409,
                 "vimpressions":3209,
                 "clicks":24,
                 "exposure":459872,
                 "video_0":4302,
                 "video_25":4103,
                 "video_50":3570,
                 "video_75":3104,
                 "video_100":2674
            },
            {
                 "date":"2023-02-01",
                 "site_id":"6",
                 "site_domain":"actu.fr",
                 "creative_id":33878,
                 "impressions":5409,
                 "vimpressions":5288,
                 "clicks":35,
                 "exposure":786999,
                 "video_0":8944,
                 "video_25":8698,
                 "video_50":8034,
                 "video_75":7800,
                 "video_100":6535
            }
       ]
    },
    "message":"Report generated successfully."
}
PreviousStarter GuideNextCreative

Last updated 2 months ago

Allows you to retrieve the list of campaigns according to the scope of the connected user as well as the input parameters. Please note that the list is limited to the last 1000 campaigns.

⚠️