What is the MessageLog endpoint for?
The MessageLog endpoint lets your integration post messages that appear in the Handyman Office log. You can use it to record:
- Error messages from your integration
- Data transfer events (imports, exports)
- Debug messages and status updates
These log entries are valuable for support staff and customers who need to evaluate the data flow within an integration.
How is a logging session structured?
The MessageLog endpoint accepts an array of messages. A complete logging session consists of:
-
Header record — one message with
sequence = 0. ThesessionIdused here must be the same for all subsequent messages in the session. -
n subsequent messages — each with
sequence → 0(typically incremented by 1). The sequence value is used to sort messages in the Handyman Office UI.
If you do not provide a sessionId, the API generates one and applies it to all elements in the array. To log additional messages to an existing session later, you must supply your own sessionId.
What format should sessionId use?
The sessionId can be any numeric decimal value. GSG Handyman uses the following format internally to generate a unique value:
-<yy><MM><dd>.<HH><mm><ss><fff> (fff = milliseconds)
Example: -221009.122455879
Example C# code: string sessionId = DateTime.Now.ToString("-yyMMdd.HHmmssfff"); return double.Parse(sessionId, CultureInfo.InvariantCulture);
What MessageID values are available?
The MessageID field controls the icon shown next to each message in the Handyman Office UI:
| Value | Name | Value | Name |
|---|---|---|---|
| 1 | ProgramError | 16 | Settings |
| 2 | Warning | 17 | Groups |
| 3 | OrderEvent | 18 | Dictionaries |
| 4 | Communication | 19 | CheckLists |
| 5 | DebugMessage | 20 | Printouts |
| 6 | SyncOk | 21 | ToBackoffice |
| 7 | Store | 22 | FromBackoffice |
| 8 | Database | 23 | Appointment |
| 9 | ProgramErrorInfo | 24 | ItemNumberType |
| 10 | Customer | 25 | TimerEvent |
| 11 | SalaryCode | 26 | Quote |
| 12 | ItemPackage | 27 | AutomaticCopy |
| 13 | Supplier | 28 | AutomaticEmail |
| 14 | PurchaseOrder | 29 | AutomaticPrint |
| 15 | Employee | 30 | PDFGenerated |
For session header records, the most common values are 21 (ToBackoffice / export) and 22 (FromBackoffice / import).