{
  "openapi": "3.0.1",
  "info": {
    "title": "NotificationsApi",
    "description": "Publi24 Media NotificationsApi",
    "contact": {
      "name": "Publi24 Media"
    },
    "version": "1.0"
  },
  "paths": {
    "/api/Notification/GetList": {
      "get": {
        "tags": [
          "Notification"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pushNotificationGroup",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/EnumPushNotificationGroup"
            }
          },
          {
            "name": "pushNotificationCategory",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/EnumPushNotificationCategory"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "hideRead",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Notification/MarkRead": {
      "post": {
        "tags": [
          "Notification"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Notification/MarkUnread": {
      "post": {
        "tags": [
          "Notification"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Notification/GetUnreadCount": {
      "get": {
        "tags": [
          "Notification"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Notification/DeleteNotifications": {
      "post": {
        "tags": [
          "Notification"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/NotificationCampaign/GetPushNotificationCampaign": {
      "get": {
        "tags": [
          "NotificationCampaign"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/NotificationCampaign/GetScheduledPushNotificationCampaignList": {
      "get": {
        "tags": [
          "NotificationCampaign"
        ],
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/NotificationCampaign/GetPushNotificationCampaignList": {
      "get": {
        "tags": [
          "NotificationCampaign"
        ],
        "parameters": [
          {
            "name": "dateFrom",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignStatus",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/EnumPushNotificationCampaignStatus"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/NotificationCampaign/GetPushNotificationCampaignStatistics": {
      "get": {
        "tags": [
          "NotificationCampaign"
        ],
        "parameters": [
          {
            "name": "dateFrom",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/NotificationCampaign/SavePushNotificationCampaign": {
      "post": {
        "tags": [
          "NotificationCampaign"
        ],
        "parameters": [
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushNotificationCampaignModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PushNotificationCampaignModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PushNotificationCampaignModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/NotificationCampaign/SetPushNotificationCampaignStatus": {
      "post": {
        "tags": [
          "NotificationCampaign"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/EnumPushNotificationCampaignStatus"
            }
          },
          {
            "name": "x-api-version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "type": "string",
              "default": "1.0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "EnumPushNotificationCampaignStatus": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "format": "int32"
      },
      "EnumPushNotificationCategory": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38,
          39,
          40
        ],
        "type": "integer",
        "format": "int32"
      },
      "EnumPushNotificationDevice": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "format": "int32"
      },
      "EnumPushNotificationGroup": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "format": "int32"
      },
      "EnumPushNotificationProvider": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "PushNotificationCampaignModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "campaignName": {
            "type": "string",
            "nullable": true
          },
          "tag": {
            "type": "string",
            "nullable": true
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "pushNotificationGroup": {
            "$ref": "#/components/schemas/EnumPushNotificationGroup"
          },
          "pushNotificationCategory": {
            "$ref": "#/components/schemas/EnumPushNotificationCategory"
          },
          "webUrl": {
            "type": "string",
            "nullable": true
          },
          "locationPath": {
            "type": "string",
            "nullable": true
          },
          "ttl": {
            "type": "integer",
            "format": "int64"
          },
          "campaignStatus": {
            "$ref": "#/components/schemas/EnumPushNotificationCampaignStatus"
          },
          "doneUtcDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "utcCreated": {
            "type": "string",
            "format": "date-time"
          },
          "tenantName": {
            "type": "string",
            "nullable": true
          },
          "device": {
            "$ref": "#/components/schemas/EnumPushNotificationDevice"
          },
          "provider": {
            "$ref": "#/components/schemas/EnumPushNotificationProvider"
          },
          "userEmailFilteredCount": {
            "type": "integer",
            "format": "int32"
          },
          "userEmailSentCount": {
            "type": "integer",
            "format": "int32"
          },
          "userDeviceSentCount": {
            "type": "integer",
            "format": "int32"
          },
          "isScheduled": {
            "type": "boolean"
          },
          "scheduledDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "applyUserFilters": {
            "type": "boolean"
          },
          "isUserUploadedList": {
            "type": "boolean"
          },
          "userEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "userListUrl": {
            "type": "string",
            "nullable": true
          },
          "mainCategoryId": {
            "type": "integer",
            "format": "int32"
          },
          "mainCategoryIdActiveAdsOnly": {
            "type": "boolean"
          },
          "articlesCreatedFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "articlesCreatedTo": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}