Skip to content

Commit

Permalink
Add /v2/campaign without worrying about duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
vkurup committed Nov 6, 2023
1 parent 9b87dfa commit bc792fb
Show file tree
Hide file tree
Showing 10 changed files with 769 additions and 307 deletions.
22 changes: 21 additions & 1 deletion management/campaign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@ tags:
- name: campaign
description: Manage Campaigns
paths:
/v2/campaign:
post:
tags:
- campaign
description: Create Nested Campaign
operationId: createNested
security:
- ApiKeyAuth: []
requestBody:
content:
application/json:
schema:
$ref: './schemas/campaign.yaml#/schemas/NestedCampaignInput'
responses:
200:
description: Nested Campaign Created
content:
application/json:
schema:
$ref: './schemas/campaign.yaml#/schemas/NestedCampaignOutput'
/v1/campaign:
post:
tags:
Expand Down Expand Up @@ -235,4 +255,4 @@ paths:
$ref: './schemas/campaign.yaml#/schemas/CampaignList'
components:
securitySchemes:
$ref: './components/security-schemes.yaml#/components/securitySchemes'
$ref: './components/security-schemes.yaml#/components/securitySchemes'
65 changes: 2 additions & 63 deletions management/creative.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,68 +21,7 @@ paths:
content:
application/json:
schema:
type: object
required:
- AdvertiserId
- AdTypeId
- IsActive
properties:
AdvertiserId:
type: integer
format: int32
AdTypeId:
type: integer
format: int32
IsActive:
type: boolean
default: false
Title:
type: string
nullable: true
ImageName:
type: string
nullable: true
Body:
type: string
nullable: true
Url:
type: string
nullable: true
format: url
Alt:
type: string
nullable: true
IsDeleted:
type: boolean
nullable: true
IsHTMLJS:
type: boolean
nullable: true
ScriptBody:
type: string
nullable: true
Metadata:
type: string
nullable: true
ImageLink:
type: string
nullable: true
SaveEmptyCreative:
type: boolean
nullable: true
IsNoTrack:
type: boolean
nullable: true
IsNetworkAd:
type: boolean
nullable: true
TemplateId:
type: integer
format: int32
nullable: true
TemplateValues:
type: string
nullable: true
$ref: './schemas/creative.yaml#/schemas/CreativeInput'
responses:
200:
description: Creative Created
Expand Down Expand Up @@ -313,4 +252,4 @@ paths:
$ref: './schemas/creative.yaml#/schemas/CreativeList'
components:
securitySchemes:
$ref: './components/security-schemes.yaml#/components/securitySchemes'
$ref: './components/security-schemes.yaml#/components/securitySchemes'
238 changes: 1 addition & 237 deletions management/flight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -436,243 +436,7 @@ paths:
content:
application/json:
schema:
type: object
required:
- Name
- StartDateISO
- CampaignId
- PriorityId
- GoalType
- Impressions
- IsActive
properties:
Name:
type: string
StartDateISO:
type: string
format: date-time
CampaignId:
type: integer
format: int32
PriorityId:
type: integer
format: int32
GoalType:
type: integer
format: int32
enum: [1, 2, 3, 7, 8, 9, 10]
Impressions:
type: integer
format: int32
IsActive:
type: boolean
default: false
EndDateISO:
type: string
format: date-time
nullable: true
IsDeleted:
type: boolean
nullable: true
RateType:
type: integer
format: int32
enum: [1, 2, 3, 4, 5, 6]
nullable: true
Price:
type: number
format: float
nullable: true
CapType:
type: integer
format: int32
enum: [1, 2, 3, 4]
nullable: true
DailyCapAmount:
type: integer
format: int32
nullable: true
DailyCapAmountDecimal:
type: number
format: float
nullable: true
LifetimeCapAmount:
type: integer
format: int32
nullable: true
LifetimeCapAmountDecimal:
type: number
format: float
nullable: true
Keywords:
type: string
nullable: true
CustomTargeting:
type: string
nullable: true
CustomFieldsJSON:
type: string
nullable: true
IsFreqCap:
type: boolean
nullable: true
FreqCap:
type: integer
format: int32
nullable: true
FreqCapDuration:
type: integer
format: int32
nullable: true
FreqCapType:
type: integer
format: int32
nullable: true
enum: [1, 2, 3]
DontAffectParentFreqCap:
type: boolean
nullable: true
IsCompanion:
type: boolean
nullable: true
isNoDuplicates:
type: boolean
nullable: true
DuplicateMode:
type: integer
format: int32
nullable: true
enum: [1, 2, 3, 4]
DeliveryStatus:
type: integer
format: int32
nullable: true
enum: [1, 2, 3, 4, 5]
IsTrackingConversions:
type: boolean
nullable: true
CanPassback:
type: boolean
nullable: true
PassbackSortOrder:
type: integer
format: int32
nullable: true
IsECPMOptimized:
type: boolean
nullable: true
ECPMOptimizePeriod:
type: integer
format: int32
minimum: 1
maximum: 90
nullable: true
ECPMMultiplier:
type: number
format: float
nullable: true
FloorECPM:
type: number
format: float
nullable: true
CeilingECPM:
type: number
format: float
nullable: true
DefaultECPM:
type: number
format: float
nullable: true
ECPMBurnInImpressions:
type: integer
format: int32
nullable: true
EffectiveCPMOverride:
type: number
format: float
nullable: true
DatePartingStartTimeISO:
type: string
format: date-time
nullable: true
DatePartingEndTimeISO:
type: string
format: date-time
nullable: true
IsSunday:
type: boolean
nullable: true
IsMonday:
type: boolean
nullable: true
IsTuesday:
type: boolean
nullable: true
IsWednesday:
type: boolean
nullable: true
IsThursday:
type: boolean
nullable: true
IsFriday:
type: boolean
nullable: true
IsSaturday:
type: boolean
nullable: true
IsArchived:
type: boolean
nullable: true
RequireStrictLocation:
type: boolean
nullable: true
TimeZone:
type: string
nullable: true
IsTargetingOptimization:
type: boolean
nullable: true
deprecated: true
TargetingOptimizationType:
type: integer
format: int32
nullable: true
deprecated: true
TargetingOptimizationTargetType:
type: integer
format: int32
nullable: true
deprecated: true
TargetingOptimizationTarget:
type: number
format: float
nullable: true
deprecated: true
TargetOptimizationBurnIn:
type: integer
format: int32
nullable: true
deprecated: true
TargetingOptimizationCanMiss:
type: boolean
nullable: true
deprecated: true
AttributionClick:
type: object
nullable: true
required:
- MatchType
- LookbackWindow
AttributionView:
type: object
nullable: true
required:
- MatchType
- LookbackWindow
TargetROAS:
type: number
format: float
nullable: true
$ref: './schemas/flight.yaml#/schemas/FlightInput'
responses:
200:
description: Flight Created
Expand Down
20 changes: 20 additions & 0 deletions management/openapi-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,26 @@ paths:
application/json:
schema:
$ref: './schemas/advertiser.yaml#/schemas/TrackingPixel'
/v2/campaign:
post:
tags:
- campaigns
description: Create Nested Campaign
operationId: createNestedCampaign
security:
- ApiKeyAuth: []
requestBody:
content:
application/json:
schema:
$ref: './schemas/campaign.yaml#/schemas/NestedCampaignInput'
responses:
200:
description: Nested Campaign Created
content:
application/json:
schema:
$ref: './schemas/campaign.yaml#/schemas/NestedCampaignOutput'
/v1/campaign:
post:
tags:
Expand Down
Loading

0 comments on commit bc792fb

Please sign in to comment.