Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions static/schemas/v1/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@
},
"media-buy": {
"description": "Media buy task request/response schemas",
"supporting-schemas": {
"package-request": {
"$ref": "/schemas/v1/media-buy/package-request.json",
"description": "Package configuration for media buy creation - used within create_media_buy request"
}
},
"tasks": {
"get-products": {
"request": {
Expand Down
41 changes: 1 addition & 40 deletions static/schemas/v1/media-buy/create-media-buy-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,7 @@
"type": "array",
"description": "Array of package configurations",
"items": {
"type": "object",
"properties": {
"buyer_ref": {
"type": "string",
"description": "Buyer's reference identifier for this package"
},
"products": {
"type": "array",
"description": "Array of product IDs to include in this package",
"items": {
"type": "string"
}
},
"format_ids": {
"type": "array",
"description": "Array of format IDs that will be used for this package - must be supported by all products",
"items": {
"type": "string",
"description": "Format ID referencing a format from list_creative_formats"
}
},
"budget": {
"$ref": "/schemas/v1/core/budget.json"
},
"targeting_overlay": {
"$ref": "/schemas/v1/core/targeting.json"
},
"creative_ids": {
"type": "array",
"description": "Creative IDs to assign to this package at creation time",
"items": {
"type": "string"
}
}
},
"anyOf": [
{"required": ["buyer_ref", "products", "format_ids"]},
{"required": ["buyer_ref", "products", "format_selection"]}
],
"additionalProperties": false
"$ref": "/schemas/v1/media-buy/package-request.json"
}
},
"promoted_offering": {
Expand Down
90 changes: 90 additions & 0 deletions static/schemas/v1/media-buy/package-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "/schemas/v1/media-buy/package-request.json",
"title": "Package Request",
"description": "Package configuration for media buy creation",
"oneOf": [
{
"type": "object",
"description": "Package with explicit format IDs",
"properties": {
"buyer_ref": {
"type": "string",
"description": "Buyer's reference identifier for this package"
},
"products": {
"type": "array",
"description": "Array of product IDs to include in this package",
"items": {
"type": "string"
}
},
"format_ids": {
"type": "array",
"description": "Array of format IDs that will be used for this package - must be supported by all products",
"items": {
"type": "string",
"description": "Format ID referencing a format from list_creative_formats"
}
},
"budget": {
"$ref": "/schemas/v1/core/budget.json"
},
"targeting_overlay": {
"$ref": "/schemas/v1/core/targeting.json"
},
"creative_ids": {
"type": "array",
"description": "Creative IDs to assign to this package at creation time",
"items": {
"type": "string"
}
}
},
"required": ["buyer_ref", "products", "format_ids"],
"not": {
"required": ["format_selection"]
},
"additionalProperties": false
},
{
"type": "object",
"description": "Package with dynamic format selection",
"properties": {
"buyer_ref": {
"type": "string",
"description": "Buyer's reference identifier for this package"
},
"products": {
"type": "array",
"description": "Array of product IDs to include in this package",
"items": {
"type": "string"
}
},
"format_selection": {
"type": "object",
"description": "Dynamic format selection criteria"
},
"budget": {
"$ref": "/schemas/v1/core/budget.json"
},
"targeting_overlay": {
"$ref": "/schemas/v1/core/targeting.json"
},
"creative_ids": {
"type": "array",
"description": "Creative IDs to assign to this package at creation time",
"items": {
"type": "string"
}
}
},
"required": ["buyer_ref", "products", "format_selection"],
"not": {
"required": ["format_ids"]
},
"additionalProperties": false
}
]
}
Loading