{"swaggerDoc":{"swagger":"2.0","info":{"description":"This is the documentation of the Inbox Service.","version":"1.0.0","title":"Inbox Service","license":{"name":"Copyright © 2012-24 by Hildebrand Technology Limited"}},"host":"api.glowmarkt.com","basePath":"/api/v0-1/inbox","tags":[{"name":"message","description":"The messages a customer has received in their inbox"}],"schemes":["http"],"paths":{"/message":{"get":{"tags":["message"],"summary":"Find all messages of a user for an application","description":"Returns all inbox messages of an application","operationId":"getMessage","produces":["application/json"],"security":[{"userToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"status":{"type":"string","example":"OK"},"MoreMessagesAvailable":{"type":"boolean","example":false},"Messages":{"type":"array","items":{"$ref":"#/definitions/MessageListing"}}}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["message"],"summary":"Add a message to a customer's inbox","description":"Add a message to a customer's inbox. This call can be used from external services. Hildebrand offers an automatic process for that adds inbox messages. (includes building and saving templates etc). See Notification System.","operationId":"addMessage","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"AddMessageReq","description":"The message content to be added to inbox.","schema":{"$ref":"#/definitions/AddMessageReq"}}],"security":[{"appKeys":[],"userId":[]},{"orgAppKeys":[],"applicationId":[],"userId":[]},{"devUserToken":[],"applicationId":[],"userId":[]}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/message/{messageId}":{"get":{"tags":["message"],"summary":"read a message","description":"Returns a single message. Change the message readStatus to Read.","operationId":"getMessagebyId","produces":["application/json"],"parameters":[{"name":"messageId","in":"path","description":"ID of message that is being queried","required":true,"type":"string"}],"security":[{"userToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Message"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"404":{"description":"Not Found","schema":{"$ref":""}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/message/status":{"get":{"tags":["message"],"summary":"get the status of a customer's inbox","operationId":"getInboxStatus","produces":["application/json"],"security":[{"userToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/InboxStatus"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"404":{"description":"Not Found","schema":{"$ref":""}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/message/delete":{"post":{"tags":["message"],"summary":"Add a message to a customer's inbox","description":"Add a message to a customer's inbox. This call can be used from external services. Hildebrand offers an automatic process for that adds inbox messages. (includes building and saving templates etc). See Notification System.","operationId":"deleteMessages","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"DeleteMessagesReq","description":"An array of all the messages to be deleted","schema":{"type":"object","properties":{"MessageIds":{"type":"array","items":{"type":"string","example":"efe84ff4-4435-4d2f-a20c-274595ab8cd4"}}}}}],"security":[{"appKeys":[],"userId":[]},{"orgAppKeys":[],"applicationId":[],"userId":[]},{"devUserToken":[],"applicationId":[],"userId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteMessageSuccess"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}}},"securityDefinitions":{"orgAppKeys":{"type":"basic"},"appKeys":{"type":"basic"},"devUserToken":{"type":"apiKey","name":"token","in":"header"},"userToken":{"type":"apiKey","name":"token","in":"header"},"userId":{"type":"apiKey","name":"userId","in":"header"},"applicationId":{"type":"apiKey","name":"applicationId","in":"header"}},"definitions":{"Message":{"type":"object","properties":{"MessageId":{"type":"string","example":"efe84ff4-4435-4d2f-a20c-274595ab8cd4"},"Timestamp":{"type":"number","example":1516730832},"ReadStatus":{"type":"string","enum":["Read","Unread"],"example":"Unread"},"veid":{"type":"string","example":"4o24u23r-4435-4d2f-0283c-274595ab8cd4"},"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"Priority":{"type":"string","enum":["Low","High"],"example":"Low"},"Title":{"type":"string","example":"Save Energy"},"Body":{"type":"string","example":"Switch off appliances in standby mode"},"Data":{"type":"object","properties":{"body":{"type":"string","example":"Set up a energy saving goal"},"message":{"type":"string","example":"Save Energy"},"Button1":{"type":"object","properties":{"Text":{"type":"string","example":"Set a goal"},"Action":{"type":"string","example":"SetGoal"}}},"Button2":{"type":"object","properties":{"Text":{"type":"string","example":"No thanks"},"Action":{"type":"string","example":"CloseMessage"}}}}}},"xml":{"name":"Message"}},"MessageListing":{"type":"object","properties":{"MessageId":{"type":"string","example":"efe84ff4-4435-4d2f-a20c-274595ab8cd4"},"Timestamp":{"type":"number","example":1516730832},"ReadStatus":{"type":"string","enum":["Read","Unread"],"example":"Unread"},"veid":{"type":"string","example":"4o24u23r-4435-4d2f-0283c-274595ab8cd4"},"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"Priority":{"type":"string","enum":["Low","High"],"example":"Low"},"Title":{"type":"string","example":"Save Energy"},"TruncatedBody":{"type":"string","example":"Switch off appliances in standby mode"}},"xml":{"name":"MessageListing"}},"AddMessageReq":{"type":"object","properties":{"Priority":{"type":"string","enum":["Low","High"],"example":"Low"},"Title":{"type":"string","example":"Save Energy"},"TruncatedBody":{"type":"string","example":"Switch off appliances in standby mode"},"Body":{"type":"string","example":"
Switch off appliances in standby mode "}},"required":["Title","TruncatedBody","Body"],"xml":{"name":"MessageListing"}},"InboxStatus":{"type":"object","properties":{"status":{"type":"string","enum":["OK","error"],"example":"OK"},"TotalCount":{"type":"number","description":"The total number of messages in a customer's inbox","example":10},"UnreadCount":{"type":"number","description":"The total number of unread messages in a customer's inbox","example":1},"DashboardMessage":{"$ref":"#/definitions/MessageListing"}},"required":["Title","TruncatedBody","Body"],"xml":{"name":"MessageListing"}},"DeleteMessageSuccess":{"type":"object","properties":{"status":{"type":"string","example":"OK"},"Deleted":{"type":"number","example":1}}},"Error":{"type":"object","properties":{"error":{"type":"string"}},"xml":{"name":"Error"}},"AccessDeniedError":{"type":"object","properties":{"error":{"type":"string","example":"Access denied"}}},"InternalServerError":{"type":"object","properties":{"error":{"type":"string","example":"An error has occurred"}}},"IncorrectElementsError":{"type":"object","properties":{"error":{"type":"string","example":"incorrect elements"}}},"MissingElementsError":{"type":"object","properties":{"error":{"type":"string","example":"missing elements"}}},"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}},"externalDocs":{"description":"Find out more about Glowmarkt","url":"https://glowmarkt.com/"}},"customOptions":{}}