State Transition Logs
State change history and audit trail
Returns a paginated list of state transition logs with comprehensive filtering options.
This endpoint provides audit trail information for all state changes in the system. Logs are automatically created whenever an object (Package, TransferOrder, etc.) transitions from one state to another.
Note: This is a read-only resource. Logs cannot be created, updated, or deleted via the API.
JWT-based authentication required for all endpoints.
Include the token in the Authorization header:
Authorization: Bearer <token>
Response format (json, xml, etc.)
jsonPossible values: Page number for pagination
1Number of items per page
10Sort results by field. Prefix with '-' for descending order.
Available sort fields:
idor-idcreated_dateor-created_datemodified_dateor-modified_date
-idExample: -created_dateFilter by old state ID
1Filter by new state ID
2Filter by old state name (exact match)
WaitingFilter by new state name (exact match)
PreparingFilter by old state enum values (comma-separated list)
100,150Filter by new state enum values (comma-separated list)
200,300Filter by related object ID
123Filter by content type ID
45Filter logs created after this date
2025-12-01T00:00:00ZFilter logs created on or after this date
2025-12-01T00:00:00ZFilter logs created before this date
2025-12-31T23:59:59ZFilter logs created on or before this date
2025-12-31T23:59:59ZFilter logs modified after this date
2025-12-01T00:00:00ZFilter logs modified on or after this date
2025-12-01T00:00:00ZFilter logs modified before this date
2025-12-31T23:59:59ZFilter logs modified on or before this date
2025-12-31T23:59:59ZFilter by ID greater than
1000Filter by ID greater than or equal to
1000Filter by ID less than
5000Filter by ID less than or equal to
5000Successful operation
Total number of state transition logs
1250URL to the next page of results
/api/v1/oms/state-transition-logs/?page=2URL to the previous page of results
Bad request - invalid filter parameters
Unauthorized - authentication required
Forbidden - insufficient permissions
GET /api/v1/oms/state-transition-logs/ HTTP/1.1
Host: domain.akinon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1250,
"next": "/api/v1/oms/state-transition-logs/?page=2",
"previous": null,
"results": [
{
"id": 5432,
"old_state": {
"id": 1,
"name": "Waiting",
"enum_value": "100",
"enum_class": "PackageStatus"
},
"new_state": {
"id": 2,
"name": "Preparing",
"enum_value": "200",
"enum_class": "PackageStatus"
},
"user": {
"pk": 10,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"username": "johndoe"
},
"attributes": {
"command": {
"slug": "PKG_STATE_TRANSITION",
"transition_id": 50
},
"remote_user_pk": 789
},
"created_date": "2025-12-22T10:30:00.123456Z",
"object_id": 123,
"content_type": 45
}
]
}Retrieve a specific state transition log entry by its ID.
Returns detailed information about a single state change including the old state, new state, user who triggered the change, and additional metadata in the attributes field.
JWT-based authentication required for all endpoints.
Include the token in the Authorization header:
Authorization: Bearer <token>
Unique identifier of the state transition log
5432Response format (json, xml, etc.)
jsonPossible values: State transition log details
Represents a state transition log entry with complete nested relationship data.
This schema includes full details of the old state, new state, and user who triggered the transition. The attributes field contains additional metadata about the transition.
Unique identifier for the log entry
5432Additional metadata about the state transition.
Common fields:
command.slug: The command that triggered the transition (e.g., "PKG_STATE_TRANSITION")command.transition_id: The ID of the state transition rule usedremote_user_pk: The ID of the user in a remote systemremote_user_mail: The email of the user in a remote system
{"command":{"slug":"PKG_STATE_TRANSITION","transition_id":50},"remote_user_pk":789,"remote_user_mail":"user@example.com"}When the transition occurred
2025-12-22T10:30:00.123456ZID of the object that transitioned (Package, TransferOrder, etc.)
123Content type ID identifying the type of object that transitioned
45Unauthorized - authentication required
Forbidden - insufficient permissions
State transition log not found
GET /api/v1/oms/state-transition-logs/{id}/ HTTP/1.1
Host: domain.akinon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 5432,
"old_state": {
"id": 1,
"name": "Waiting",
"enum_value": "100",
"enum_class": "PackageStatus"
},
"new_state": {
"id": 2,
"name": "Preparing",
"enum_value": "200",
"enum_class": "PackageStatus"
},
"user": {
"pk": 10,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"username": "johndoe"
},
"attributes": {
"command": {
"slug": "PKG_STATE_TRANSITION",
"transition_id": 50
},
"remote_user_pk": 789,
"remote_user_mail": "user@example.com"
},
"created_date": "2025-12-22T10:30:00.123456Z",
"object_id": 123,
"content_type": 45
}Returns a list of state transition logs with minimal information without nested serializers.
This endpoint is useful for lightweight data retrieval when nested relationship data is not needed. Foreign key fields return only IDs instead of full nested objects, reducing response payload size.
Note: This endpoint does not use pagination by default.
JWT-based authentication required for all endpoints.
Include the token in the Authorization header:
Authorization: Bearer <token>
Response format (json, xml, etc.)
jsonPossible values: Sort results by field. Prefix with '-' for descending order.
Available sort fields:
idor-idcreated_dateor-created_datemodified_dateor-modified_date
-idExample: -created_dateFilter by old state ID
1Filter by new state ID
2Filter by related object ID
123Filter by content type ID
45Filter logs created on or after this date
2025-12-01T00:00:00ZFilter logs created on or before this date
2025-12-31T23:59:59ZSuccessful operation
Simplified state transition log entry without nested relationship data. Foreign key fields return only IDs for lightweight data retrieval.
Unique identifier for the log entry
5432When the transition occurred
2025-12-22T10:30:00.123456ZWhen the log entry was last modified
2025-12-22T10:30:00.123456ZID of the old state
1ID of the new state
2Content type ID
45ID of the object that transitioned
123ID of the user who triggered the transition
10Additional metadata about the transition
{"command":{"slug":"PKG_STATE_TRANSITION","transition_id":50}}Bad request - invalid filter parameters
Unauthorized - authentication required
Forbidden - insufficient permissions
GET /api/v1/oms/state-transition-logs/simple/ HTTP/1.1
Host: domain.akinon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"id": 5432,
"created_date": "2025-12-22T10:30:00.123456Z",
"modified_date": "2025-12-22T10:30:00.123456Z",
"old_state": 1,
"new_state": 2,
"content_type": 45,
"object_id": 123,
"user": 10,
"attributes": {
"command": {
"slug": "PKG_STATE_TRANSITION",
"transition_id": 50
}
}
},
{
"id": 5433,
"created_date": "2025-12-22T11:15:00.654321Z",
"modified_date": "2025-12-22T11:15:00.654321Z",
"old_state": 15,
"new_state": 16,
"content_type": 52,
"object_id": 456,
"user": 25,
"attributes": {
"command": {
"slug": "TRANSFER_STATE_TRANSITION",
"transition_id": 75
}
}
}
]Last updated
Was this helpful?

