Complete CRUD operations for campaigns via GraphQL - create, update, delete, and manage Deals, Line Items, and Creatives
Campaign Operations
This guide provides complete CRUD (Create, Read, Update, Delete) operations for managing campaigns via the Ring DAS Management API. You'll learn how to work with the three-tier campaign hierarchy: Deals → Line Items → Creatives.
Campaign Hierarchy
Ring DAS campaigns follow a three-tier structure:
graph TB
A[Deal] --> B[Line Item 1]
A --> C[Line Item 2]
A --> D[Line Item 3]
B --> E[Creative A]
B --> F[Creative B]
C --> G[Creative C]
D --> H[Creative D]
D --> I[Creative E]
style A fill:#4CAF50
style B fill:#2196F3
style C fill:#2196F3
style D fill:#2196F3
style E fill:#FF9800
- Deal: A commercial agreement defining campaign terms, advertiser, budget, and timeline
- Line Item: Specific targeting, budget allocation, and delivery parameters within a deal
- Creative: The actual ad asset (image, video, rich media) associated with a line item
Campaign Structure: A Deal can have multiple Line Items (up to 1,000), and each Line Item can have multiple Creatives (up to 1,000).
Prerequisites
Before using campaign operations:
- Obtain an API key
- Know your Network ID
- Have advertiser account created (or create via API)
Base GraphQL Endpoint
All campaign operations use the Management API GraphQL endpoint:
POST https://api.ringdas.com/graphql
Include authentication in all requests:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonDeal Operations
Deals represent commercial agreements between publishers and advertisers.
List Deals
Retrieve all deals in your network:
query ListDeals($networkId: ID!, $filters: DealFilters, $pagination: Pagination) {
deals(networkId: $networkId, filters: $filters, pagination: $pagination) {
edges {
node {
id
name
advertiserId
advertiserName
status
budget {
amount
currency
spent
remaining
}
startDate
endDate
priority
createdAt
updatedAt
}
}
pageInfo {
hasNextPage
endCursor
totalCount
}
}
}Variables:
{
"networkId": "YOUR_NETWORK_ID",
"filters": {
"status": "ACTIVE",
"advertiserId": "optional-advertiser-id"
},
"pagination": {
"first": 50,
"after": null
}
}