Bid Upload

Upload Bids

With this API you can upload a batch of bids, similar to the CSV upload. The same hierarchy, rules, and limitations apply.

curl -X POST -H 'X-API-KEY: {api key}' 'https://api.justtrack.io/management/v0/bids/upload' \
-d '[{"campaign": {"id": 1234}, "country": "DE", "optimalBidUsd": 0.01, "delete": false}]'

This API doesn't check for duplicate bids. justtrack will apply each uploaded bid one after the other.

Request

[
    {
        "adSetId": integer,
        "campaign": {
            "id": integer
        },
        "country": string,
        "sourceId": string,
        "optimalBidUsd": float,
        "delete": boolean
    }
]
NameTypeDescription

adSetId

int

justtrack internal ad set id Optional: set to null when not needed

campaign.id

int

justtrack internal campaign id

country

string

ISO 3166-1 alpha-2 code of your country, e.g. "DE"

sourceId

string

Identifier provided by ad network to target specific source app. Optional: set to null when not needed

optimalBidUsd

float

The target bid value, in USD

delete

boolean

Whether this operation is delete or not Optional: default is false

Response

Success: HTTP 204

{}

Invalid Request: HTTP 400

{
    "error": string
    "bidsValidation": [
        {
            "adSetId": integer
            "campaign": {
                "id": integer,
                "name": string
            },
            "country": {
                "id": integer,
                "name": string,
                "iso2": string
            },
            "delta": {
                "changePercentage": float,
                "newValue": float,
                "oldValue": float
            },
            "network": {
                "id": integer,
                "name": string
            },
            "sourceId": string,
            "status": string,
            "message": string
        }
    ]
}

For each bid failing validation an entry to bidsValidation is added, detailing its dimensions, the value change and the reason why it was rejected. Possible reasons include:

  • ad set bidding is not enabled for this network

  • ad set not found

  • bidding is not enabled for this network

  • campaign bidding is not enabled for this network

  • countries of the campaign does not contain the bid's specified country

  • campaign has wrong optimization type for bidding

  • missing credentials

  • missing campaign attributes

  • missing client network vendor attributes

  • missing network vendor attributes

  • source id bidding is not enabled

  • source id bid requires ad set to be set

  • can not delete campaign bid

  • can not delete non-existent bid

  • bid value is below minimum

  • given decimal precision is not supported for this network

Error: HTTP 500

{
    "err": string
}

Last updated