/api/client/log1
Write a customer-related entry to the shop event log. The entry is attached to a customer record and shows up in the customer's activity log (also visible to the backend).
Change Note: dedicated endpoint using POJO pattern, replaces exec1.jsp dispatch; documents the cid parameter
Parameters
| Name | Description | Type |
|---|---|---|
| cid | the customer this log entry belongs to; only honored for admin sessions - for regular sessions the authenticated customer is always used | int |
| msg | the log message (max 240 chars, longer messages are cut) | string |
| par | optional parameter; free use, naming the source is recommended | string |
| dt | optional timestamp of the event (iso8601); defaults to now | datetime |
| a | optional log action id instead of the default 2015 (admin sessions only): the code of an event from system/eventtypes | int |
| oo-rf | optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml | String |
| oo-auth | optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized. | int |
Error Responses
| HTTP Status | Error Code | Description |
|---|---|---|
| 403 | error | no authenticated session |
| 400 | parameter_error | msg or par contain suspicious content (script, SQL, or URL) and were rejected, or a is not a log action id |
Response Types
| Type | Version | Description |
|---|---|---|
| LogResult | 1 | Result of writing a log entry to the shop event log (Log table). |
OpenAPI
See log1.yaml