Record an activity item against a journal entry. Integrations can use this to relay how an entry was processed in an external accounting system - for example that a sync started, succeeded, or failed. The recorded activity surfaces on the entry's activity feed and drives its sync status.
Supply a stable activity_id to make retries idempotent: recording the same activity_id again has no further effect.
The system recording the activity - typically the integration relaying the result (e.g. "e-conomic", "tripletex").
What the activity represents. The set of accepted types grows over time as more kinds of activity are supported.
A client-supplied idempotency key for the activity. Recording the same activity_id again has no further effect. Generated by the server when omitted.
How a failed sync classifies, so it can be rendered in the reader's language and acted on without parsing detail. detail still carries what the accounting provider itself said about the posting; this says what kind of failure it was. Omitted when the integration has nothing to classify - a successful sync, or an activity recorded before the field existed - so fall back to detail when it is absent.
| Value | What the customer does |
|---|---|
CONFIGURATION_INCOMPLETE | finish setting the integration up |
CONFIGURATION_INVALID | correct a specific mapping, named in detail |
CONNECTION_REJECTED | reconnect the integration |
ACCESS_DENIED | reauthorize the integration to widen its grant |
SALES_DOCUMENT_MISSING | make the correction in the provider by hand |
FINANCIAL_YEAR_MISSING | open a period covering the posting date |
PROVIDER_REJECTED | act on the provider's own message in detail |
UNKNOWN | retry, and contact support if it persists |
The set grows over time; treat an unrecognised value as UNKNOWN.
A labelled link to the record this activity refers to in the external system - for example the voucher created by a successful sync.
curl -i -X POST \
'https://api.understory.io/v1/accounting-journal-entries/{journalEntryId}/activities' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"activity_id": "string",
"source": "string",
"type": "SYNC_STARTED",
"detail": "string",
"detail_code": "CONFIGURATION_INCOMPLETE",
"external_reference": {
"label": "string",
"url": "http://example.com"
},
"occurred_at": "2019-08-24T14:15:22Z"
}'The activity was recorded.
The system that recorded the activity - typically the accounting integration relaying the result (e.g. "e-conomic", "tripletex").
What the activity represents. The set of types grows over time, so treat unrecognised values as UNKNOWN. UNKNOWN is returned when the upstream value does not match a known type; treat as a signal to re-fetch or surface for manual review.
Human-readable detail about the activity - for example the error message of a failed sync. Omitted when there is nothing to add.
How a failed sync classifies, so it can be rendered in the reader's language and acted on without parsing detail. detail still carries what the accounting provider itself said about the posting; this says what kind of failure it was. Omitted when the integration has nothing to classify - a successful sync, or an activity recorded before the field existed - so fall back to detail when it is absent.
| Value | What the customer does |
|---|---|
CONFIGURATION_INCOMPLETE | finish setting the integration up |
CONFIGURATION_INVALID | correct a specific mapping, named in detail |
CONNECTION_REJECTED | reconnect the integration |
ACCESS_DENIED | reauthorize the integration to widen its grant |
SALES_DOCUMENT_MISSING | make the correction in the provider by hand |
FINANCIAL_YEAR_MISSING | open a period covering the posting date |
PROVIDER_REJECTED | act on the provider's own message in detail |
UNKNOWN | retry, and contact support if it persists |
The set grows over time; treat an unrecognised value as UNKNOWN.
{ "id": "string", "source": "string", "type": "SYNC_STARTED", "detail": "string", "detail_code": "CONFIGURATION_INCOMPLETE", "external_reference": { "label": "string", "url": "http://example.com" }, "occurred_at": "2019-08-24T14:15:22Z", "recorded_at": "2019-08-24T14:15:22Z" }