Skip to content

Log a custom action

POST
/api/activity-logs
curl --request POST \
--url https://api.usegro.co/api/activity-logs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "loggable_type": "order", "loggable_id": "example", "action": "example", "description": "example", "metadata": {} }'

Append a custom activity log entry to a subscription or order. The loggable_id must reference a record (subscription or order) owned by the authenticated account. The action must be prefixed with integration_ (e.g. integration_shipment_dispatched) so custom entries are distinguishable from system-generated actions.

Media typeapplication/json
object
loggable_type
required
string
Allowed values: order subscription
loggable_id
required
string
action
required
string
>= 1 characters <= 255 characters
description
string
<= 2000 characters
metadata
object
key
additional properties
any
Media typeapplication/json
object
id
string format: uuid
loggable_type
string
Allowed values: order subscription
loggable_id
string format: uuid
action
string
description
string
nullable
metadata
object
key
additional properties
any
actor_type
string
nullable
actor_name
string
nullable
created_at
string format: date-time

Example

{
"loggable_type": "order"
}