BokaMera.API.Host

<back to all web services

SendEmailToCompany

The following routes are available for this service:
POST/messages/sendemailtocompanySend email to company with id or sitepathThis is used by the homepage to send emails to the company
SendEmailToCompany Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuid?NoThe company id, if empty you will need to provide the sitepath instead.
MessageTitlebodystringNoMessage Title.
MessageBodybodystringNoMessage Body.
NamebodystringNoMessage Sender Name.
EmailbodystringNoMessage Sender Email.
PhonebodystringNoMessage Sender Phone Number.
SitePathbodystringNoThe homeage sitepath.
MessageLogQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe message log id
BookingIdformint?NoThe booking id for the message (if connected to a booking).
ReceiverformstringNoThe message receiver. Either a email or a mobile phone number.
MessageTitleformstringNoMessage Title.
StorageUrlformstringNoMessage Storage Url.
MessageBodyformstringNoMessage Body.
CreatedformDateTimeNoWhen message was created.
ToSendDateformDateTimeNoWhen the message will be sent.
SentDateformDateTime?NoWhen the message was sent.
SentformboolNoIf Message is sent
MessageRetriesformintNoNumber of retries to send the message
SendMethodIdformintNoSend Method. 1 = Email, 2 = SMS

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /messages/sendemailtocompany HTTP/1.1 
Host: api.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","MessageTitle":"String","MessageBody":"String","Name":"String","Email":"String","Phone":"String","SitePath":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":0,"BookingId":0,"Receiver":"String","MessageTitle":"String","StorageUrl":"String","MessageBody":"String","SentDate":"0001-01-01T00:00:00","Sent":false,"MessageRetries":0,"SendMethodId":0}