SCALIX help

← All tools

lads_get_campaign_budget

LinkedIn Ads read low risk

Part of the LinkedIn Campaign Manager Agent.

What it does

Returns the budget configuration for one campaign: dailyBudget and/or totalBudget (each {amount as decimal string, currencyCode}), plus costType, unitCost (bid), pacingStrategy, and optimizationTargetType for context. Convenience read derived from the campaign GET, focused on money fields. Use to confirm current spend caps and bid before a budget change, or to compute remaining budget vs spend (pair with adAnalytics costInLocalCurrency/costInUsd, which are returned as STRINGS). Accuracy notes: amounts are DECIMAL STRINGS in account currency — NOT micros (do not ÷1e6); the most restrictive of account/group/campaign budgets governs serving; a campaign may have only daily, only total, or both.

When to use it

During a full account audit, start with lads_audit_account — it defines the checks, benchmarks, and severity rules this tool's data feeds.

Inputs

NameTypeRequiredDescription
account_idstringyesNumeric ad account ID (digits only).
campaign_idstringyesNumeric campaign ID (digits only).

Safeguards

Policy

Strict per-account isolation: read budgets only for campaigns under the bearer's authorized account; budget figures are for the authorizing client's reporting/billing only.

Reminder

Budgets are decimal strings in account currency (not micros); read only within the authorized account.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDCampaign/account not found or out of scope (404).Verify IDs.no
PERMISSION_DENIEDMissing r_ads/rw_ads or no role (403).Confirm scope/role.no
TOKEN_REVOKEDToken expired/revoked (401).needs_reauth — refresh once and retry; else reconnect.yes
RESOURCE_EXHAUSTEDRate/quota limit (429).Backoff 5/10/20s cap 60s.yes
PLATFORM_UNAVAILABLELinkedIn 5xx.Retry with backoff.yes

Edge cases

  • Campaign may have only dailyBudget, only totalBudget, or both — report exactly what is set.
  • Budget amounts are decimal strings; do NOT divide by 1e6 (LinkedIn is not micros).
  • Effective cap is the most restrictive of account/group/campaign budgets — note when the group budget is lower.
  • unitCost may be 0 when optimizationTargetType is auto (MAX_*) — clarify it's auto-bid, not a missing bid.
  • Currency may differ from billed currency (e.g., BRL shown, USD billed) — surface caveat.
  • Expired token -> refresh + retry once.