API
HQ APIAd campaigns

Update an ad campaign

Updates an ad campaign. Response-only fields (spend, starts_at) are rejected with 400. schedule.starts_at is accepted while the campaign has not gone live and refused with 409 after. Illegal status transitions return 409.

POST/v1/hq/ad_campaigns/{ad_campaign_id}
AuthorizationBearer <token>

The Noona HQ API uses Bearer token for authentication.

Endpoints that return generic information that does not contain sensitive data do not require authentication. Endpoints that require authentication are specifically marked in the documentation.

Authorization: Bearer your-token

In: header

Path Parameters

ad_campaign_id*string

Query Parameters

select?array<string>
expand?array<string>

Request Body

application/json

name?string
budget?

Budget amounts are denominated in the company's own currency, which is why no currency is accepted here: an ad event charge is priced in the company currency, and a budget in any other currency could never be compared against the spend accumulated against it.

targeting?
schedule?
promotables?
status?string
Value in"active" | "paused" | "ended"

Response Body

application/json

curl -X POST "https://api.noona.is/v1/hq/ad_campaigns/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "company": "string",
  "name": "string",
  "status": "pending_review",
  "budget": {
    "daily": {
      "amount": 10000,
      "currency": "ISK"
    },
    "total": {
      "amount": 10000,
      "currency": "ISK"
    }
  },
  "schedule": {
    "starts_at": "2019-08-24T14:15:22Z",
    "ends_at": "2019-08-24T14:15:22Z",
    "duration_days": 1
  },
  "targeting": {
    "location": {
      "google_place_id": "string",
      "address": {
        "city": "string",
        "postalCode": "string",
        "street": "string",
        "region": "string",
        "locality": "string",
        "country": "string"
      },
      "formatted_address": "string",
      "lat_lng": {
        "lat": 0.1,
        "lng": 0.1
      },
      "country": {
        "short_name": "IS",
        "long_name": "Iceland"
      },
      "time_zone": "Atlantic/Reykjavik"
    },
    "radius": 0
  },
  "promotables": [
    {
      "type": "ad",
      "ad": "string"
    }
  ],
  "spend": {
    "total": {
      "amount": 10000,
      "currency": "ISK"
    },
    "today": {
      "amount": 10000,
      "currency": "ISK"
    },
    "today_date": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "starts_at": "2019-08-24T14:15:22Z"
}
Empty
Empty
Empty
Empty
Empty
Empty