# Transactions
#Available from v.3.7.0 Every change in is recorded in a transaction. Use the transaction endpoints to get information on transactions and changes to entities within each of these.
GET /transactions/{entityType}/{entityId}/revisiondata Get an entity's changes
[
{
"FieldName": "Name (Danish)",
"LastChange": {
"RevisionNo": 2,
"RevisionValue": "Test2",
"ValueBefore": "Test1",
"Timestamp": "2021-10-20T12:56:27.245+02:00",
"Username": "Struct",
"TransactionType": "Product update"
},
"ItemRevisionChange": [
{
"RevisionNo": 2,
"RevisionValue": "Test2",
"ValueBefore": "Test1",
"Timestamp": "2021-10-20T12:56:27.245+02:00",
"Username": "Struct",
"TransactionType": "Product update"
},
{
"RevisionNo": 1,
"RevisionValue": "Test1",
"Timestamp": "2021-10-19T10:27:23.075+02:00",
"Username": "Struct",
"TransactionType": "Product creation"
}
]
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
entityType | path | string |
Type of entity (Can be Product, Variant, Category or GlobalListValue) |
entityId | path | string |
Id of entity |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
FieldName | string | |
LastChange | object : ItemRevisionChange | |
ItemRevisionChange | array : ItemRevisionChange |
Property name | Data type | Description |
---|---|---|
RevisionNo | integer | |
RevisionValue | string | |
ValueBefore | string | |
Timestamp | string | |
Username | string | |
TransactionType | string |
GET /transactions/{uid} Get a specific transaction
{
"Uid": "02d99ac6-5635-4b12-9a00-e521c37ac4ab",
"TransactionType": "Product update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-20T12:56:27.245+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.301+02:00"
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
uid | path | string |
Unique id of transaction |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of the transaction |
TransactionType | string |
Description of the type of transaction |
Username | string |
Username of the user who performed the transaction |
StartTimestamp | string |
The timestamp when the transaction was started |
CommitTimestamp | string |
The timestamp when the transaction was committed |
GET /transactions/{uid}/changedentities Get entities changed in a specific transaction
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "a5e4362c-c04d-49b2-ab63-617e5f130195"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "a5e4362c-c04d-49b2-ab63-617e5f130195"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "a5e4362c-c04d-49b2-ab63-617e5f130195"
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
uid | path | string |
Unique id of transaction to get changes for |
entityTypes | query | string |
Comma separated list of entity types to return (valid entity types are Category, Product, Variant, GlobalListValue) |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
EntityType | string |
Type of entity |
EntityId | string |
The unique id of the entity |
RevisionNo | integer |
The revision number assigned to the entity in this transaction |
TransactionUid | string |
Unique id of the transaction |
POST /transactions/batch Get a batch of transactions
[
"de75524e-8337-4331-b3a6-5e668bd667d1",
"57f7a8fb-50e0-47da-98de-4b45e9cfe11b",
"102fffba-2875-4f1b-bbed-446a56e40a08"
]
[
{
"Uid": "8ae802c1-ceba-4df1-9bf2-c3b089c0bf2f",
"TransactionType": "Product update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-20T12:56:27.245+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.301+02:00"
},
{
"Uid": "f507ba21-207e-4909-80b6-8a5da50c06aa",
"TransactionType": "Variant update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-19T10:27:23.075+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.322+02:00"
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
uids | body | array : string |
uids of transactions to return |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of the transaction |
TransactionType | string |
Description of the type of transaction |
Username | string |
Username of the user who performed the transaction |
StartTimestamp | string |
The timestamp when the transaction was started |
CommitTimestamp | string |
The timestamp when the transaction was committed |
POST /transactions/batch/changedentities Get entities changed in a batch of transactions
A maximum of 5000 transactions can be fetched at a time
[
"9704a39b-1c48-4a56-b0af-3e7ce936a1a6",
"341831f0-c850-4f24-b3ce-d4508de5b28c",
"de2df7f9-86ba-4bfb-9005-3735ef01f1ab"
]
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "13be1df3-5f0c-4d59-8457-0ac6a0b8586b"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "63c10371-ddff-43a1-9708-f8b367ca11df"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "63c10371-ddff-43a1-9708-f8b367ca11df"
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
uids | body | array : string |
Unique ids of transactions to get changes for |
entityTypes | query | string |
Comma separated list of entity types to return (valid entity types are Category, Product, Variant, GlobalListValue) |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
EntityType | string |
Type of entity |
EntityId | string |
The unique id of the entity |
RevisionNo | integer |
The revision number assigned to the entity in this transaction |
TransactionUid | string |
Unique id of the transaction |
GET /transactions/changes/{entityType}/{entityId}/{revisionNo} Get an entity's changes for in a specific revision
[
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.54b8655e-7194-4098-b901-ef2cc38fa65a"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.ab05bb56-c0da-4e73-aab5-178c765f7458"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.69b44225-2b92-408d-b6a0-42e4cf9b9604"
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
entityType | path | string |
Type of entity (Can be Product, Variant, Category or GlobalListValue) |
entityId | path | string |
Id of entity |
revisionNo | path | integer |
Revision to get changes for |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
EntityType | string |
Type of entity |
EntityId | string |
The unique id of the entity |
RevisionNo | integer |
The revision number assigned to the entity in this transaction |
DataType | string |
Reference to the type of data change that was made for this entity in this revision |
POST /transactions/changes/batch Get revision changes for a batch of entities
[
{
"EntityType": "Product",
"EntityId": "3022",
"RevisionNo": 2
},
{
"EntityType": "Product",
"EntityId": "3022",
"RevisionNo": 3
},
{
"EntityType": "Variant",
"EntityId": "105633",
"RevisionNo": 1
}
]
[
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.4e0b7792-ef35-4a85-8df1-22cbd5211c39"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.a242638e-22d8-4916-a1fe-f8091a87552c"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.e2a391c6-a210-4cb6-b7f1-2a0f2e8608d5"
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
requests | body | array : EntityRevisionChangeRequestModel |
Entities and revisions to get changes for |
Property name | Data type | Description |
---|---|---|
EntityType | string |
Type of entity |
EntityId | string |
Unique id of entity |
RevisionNo | integer |
Revision number |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
EntityType | string |
Type of entity |
EntityId | string |
The unique id of the entity |
RevisionNo | integer |
The revision number assigned to the entity in this transaction |
DataType | string |
Reference to the type of data change that was made for this entity in this revision |
GET /transactions/search Search transactions. Returns paged result set with a page size of 1000
{
"TotalCount": 1,
"Page": 1,
"Transactions": [
{
"Uid": "67cb8d0b-05ae-4707-95fd-5351d1cc1336",
"TransactionType": "Product update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-20T12:56:27.245+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.301+02:00"
},
{
"Uid": "b22fc730-dd24-46da-a953-f0621b4ba135",
"TransactionType": "Variant update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-19T10:27:23.075+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.322+02:00"
}
]
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
page | query | integer |
Page to return results for (1 is first page) |
fromTimestamp | query | string |
Query transactions committed after this timestamp |
toTimestamp | query | string |
Query transactions committed before this timestamp |
username | query | string |
Query transactions made by this username |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of the transaction |
TransactionType | string |
Description of the type of transaction |
Username | string |
Username of the user who performed the transaction |
StartTimestamp | string |
The timestamp when the transaction was started |
CommitTimestamp | string |
The timestamp when the transaction was committed |