feat: add get-campaigns docs (#351)
This commit is contained in:
@@ -1707,6 +1707,92 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/v1/campaigns": {
|
"/v1/campaigns": {
|
||||||
|
"get": {
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"schema": { "type": "string", "default": "1", "example": "1" },
|
||||||
|
"required": false,
|
||||||
|
"name": "page",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Page number for pagination (default: 1)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"DRAFT",
|
||||||
|
"SCHEDULED",
|
||||||
|
"IN_PROGRESS",
|
||||||
|
"PAUSED",
|
||||||
|
"COMPLETED",
|
||||||
|
"CANCELLED"
|
||||||
|
],
|
||||||
|
"example": "DRAFT"
|
||||||
|
},
|
||||||
|
"required": false,
|
||||||
|
"name": "status",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter campaigns by status"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"schema": { "type": "string", "example": "newsletter" },
|
||||||
|
"required": false,
|
||||||
|
"name": "search",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Search campaigns by name or subject"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Get list of campaigns",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"campaigns": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": { "type": "string" },
|
||||||
|
"name": { "type": "string" },
|
||||||
|
"from": { "type": "string" },
|
||||||
|
"subject": { "type": "string" },
|
||||||
|
"createdAt": { "type": "string", "format": "date-time" },
|
||||||
|
"updatedAt": { "type": "string", "format": "date-time" },
|
||||||
|
"status": { "type": "string" },
|
||||||
|
"scheduledAt": { "type": "string", "nullable": true, "format": "date-time" },
|
||||||
|
"total": { "type": "integer" },
|
||||||
|
"sent": { "type": "integer" },
|
||||||
|
"delivered": { "type": "integer" },
|
||||||
|
"unsubscribed": { "type": "integer" }
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"from",
|
||||||
|
"subject",
|
||||||
|
"createdAt",
|
||||||
|
"updatedAt",
|
||||||
|
"status",
|
||||||
|
"scheduledAt",
|
||||||
|
"total",
|
||||||
|
"sent",
|
||||||
|
"delivered",
|
||||||
|
"unsubscribed"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"totalPage": { "type": "integer" }
|
||||||
|
},
|
||||||
|
"required": ["campaigns", "totalPage"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user