{ "swagger" : "2.0", "info" : { "version" : "1.0.0", "title" : "test-application" }, "host" : "localhost:8080", "basePath" : "/test-application/rest", "tags" : [{ "name" : "events" } ], "schemes" : ["http"], "paths" : { "/events/single" : { "post" : { "tags" : ["events"], "summary" : "Post a Notification Event", "description" : "", "operationId" : "processEvent", "consumes" : ["application/json"], "produces" : ["application/json"], "parameters" : [{ "in" : "body", "name" : "body", "description" : "Notification Event to post.", "required" : true, "schema" : { "$ref" : "#/definitions/NotificationEventDTO" } } ], "responses" : { "200" : { "description" : "OK" }, "400" : { "description" : "Failed to consume Notification Event." } } } } }, "definitions" : { "NetworkDto" : { "type" : "object", "properties" : { "networkId" : { "type" : "integer", "format" : "int64" }, "customerId" : { "type" : "integer", "format" : "int32" }, "name" : { "type" : "string" }, "contentServiceRef" : { "type" : "string" }, "merakiValidator" : { "type" : "string" }, "merakiSecret" : { "type" : "string" }, "sites" : { "type" : "array", "items" : { "$ref" : "#/definitions/SiteDto" } }, "version" : { "type" : "integer", "format" : "int64" }, "enabled" : { "type" : "boolean", "default" : false }, "portal" : { "$ref" : "#/definitions/PortalDto" } } }, "ContentServiceDTO" : { "type" : "object", "properties" : { "id" : { "type" : "integer", "format" : "int32" }, "reference" : { "type" : "string" } } }, "ServiceEventDataDTO" : { "allOf" : [{ "$ref" : "#/definitions/NotificationEventDTO" }, { "type" : "object", "properties" : { "eventName" : { "type" : "string" }, "service" : { "$ref" : "#/definitions/ServiceDTO" }, "message" : { "$ref" : "#/definitions/MessageDTO" }, "details" : { "type" : "string" } } } ] }, "NotificationEventDTO" : { "type" : "object", "required" : ["type", "version"], "discriminator" : "type", "properties" : { "version" : { "type" : "integer", "format" : "int64" }, "type" : { "type" : "string", "description" : "the discriminator field." } } }, "ServiceDTO" : { "type" : "object", "properties" : { "id" : { "type" : "integer", "format" : "int64" }, "name" : { "type" : "string" }, "reference" : { "type" : "string" } } }, "SubscriptionEventDataDTO" : { "allOf" : [{ "$ref" : "#/definitions/NotificationEventDTO" }, { "type" : "object", "properties" : { "tagsAdded" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "tagsRemoved" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "tagsInvalid" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "subscription" : { "$ref" : "#/definitions/SubscriptionDTO" } } } ] }, "NetworkIdEventDataDTO" : { "allOf" : [{ "$ref" : "#/definitions/NotificationEventDTO" }, { "type" : "object", "properties" : { "networkId" : { "type" : "integer", "format" : "int64" } } } ] }, "MessageDTO" : { "type" : "object", "properties" : { "id" : { "type" : "integer", "format" : "int64" }, "msgClass" : { "type" : "string" }, "from" : { "$ref" : "#/definitions/FromDTO" }, "to" : { "type" : "string" }, "content" : { "type" : "string" }, "date" : { "type" : "string", "format" : "date-time" }, "transactionId" : { "type" : "integer", "format" : "int64" }, "conversationId" : { "type" : "integer", "format" : "int64" }, "shortCodePrefix" : { "type" : "string" }, "servicePrefix" : { "type" : "string" } } }, "NetworkEventDataDTO" : { "allOf" : [{ "$ref" : "#/definitions/NotificationEventDTO" }, { "type" : "object", "properties" : { "network" : { "$ref" : "#/definitions/NetworkDto" } } } ] }, "PortalDto" : { "type" : "object", "properties" : { "id" : { "type" : "integer", "format" : "int64" }, "name" : { "type" : "string" }, "customerId" : { "type" : "integer", "format" : "int32" }, "version" : { "type" : "integer", "format" : "int32" }, "htmlOffersLarge" : { "type" : "string" }, "htmlOffersSmall" : { "type" : "string" }, "css" : { "type" : "string" }, "htmlRegistration" : { "type" : "string" }, "companyName" : { "type" : "string" } } }, "SitePointDto" : { "type" : "object", "properties" : { "sitePointId" : { "type" : "integer", "format" : "int64" }, "enabled" : { "type" : "boolean", "default" : false }, "name" : { "type" : "string" }, "macAddress" : { "type" : "string" }, "latitude" : { "type" : "number" }, "longitude" : { "type" : "number" }, "version" : { "type" : "integer", "format" : "int32" } } }, "SiteDto" : { "type" : "object", "properties" : { "siteId" : { "type" : "integer", "format" : "int64" }, "enabled" : { "type" : "boolean", "default" : false }, "name" : { "type" : "string" }, "sitePoints" : { "type" : "array", "items" : { "$ref" : "#/definitions/SitePointDto" } }, "version" : { "type" : "integer", "format" : "int32" }, "portal" : { "$ref" : "#/definitions/PortalDto" } } }, "SubscriptionDTO" : { "type" : "object", "properties" : { "id" : { "type" : "integer", "format" : "int64" }, "phone" : { "type" : "string" }, "carrierCode" : { "type" : "string" }, "reference" : { "type" : "string" }, "state" : { "type" : "string", "enum" : ["OPT_IN_PENDING", "RENEWAL_PENDING", "ACTIVE", "CANCELED", "ENDED"] }, "startDate" : { "type" : "string", "format" : "date-time" }, "endDate" : { "type" : "string", "format" : "date-time" }, "nextAnniversaryDate" : { "type" : "string", "format" : "date-time" }, "cancelType" : { "type" : "string", "enum" : ["USER", "CARRIER", "SYSTEM", "SUBSCRIBER", "NO_RESPONSE", "API", "BLOCKED", "SUPERSEDED"] }, "cancelReason" : { "type" : "string" }, "tags" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "affiliateCode" : { "type" : "string" }, "origin" : { "type" : "string", "enum" : ["SMS", "MMS", "API", "UI", "UNKNOWN", "SYSTEM"] }, "locale" : { "type" : "string" }, "contentService" : { "$ref" : "#/definitions/ContentServiceDTO" }, "subscriptionCode" : { "type" : "string" }, "recipientId" : { "type" : "integer", "format" : "int64" } } }, "FromDTO" : { "type" : "object", "properties" : { "phone" : { "type" : "string" }, "carrier" : { "type" : "string" } } } } }