# 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": "cc567763-026d-4543-be9b-dc48d926e4d3",
"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": "59ef2d8f-97f9-4b35-925b-267f32bace84"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "59ef2d8f-97f9-4b35-925b-267f32bace84"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "59ef2d8f-97f9-4b35-925b-267f32bace84"
}
]
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
[
"5bb0c28a-8beb-495d-aedc-03ae1dad35ef",
"78dbcda7-f724-47df-ba95-d1215fbedbbe",
"07b07c00-1912-4579-8372-337dad9029ae"
]
[
{
"Uid": "397a1a90-61b3-4f97-9222-0f668ec3cab3",
"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": "36c03c86-c918-4852-8a67-d363b9492a8d",
"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
[
"fdae6965-f7ac-4a25-9820-a4def3b4e712",
"b58f291c-ec0b-48f6-be73-bb85578bd643",
"9b4e8882-6625-401a-a894-ca53fdcc8643"
]
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "1f013a1a-1501-44bf-a2cd-6442b9906892"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "f2a1a8be-1d72-4041-a552-f37b38cd434b"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "f2a1a8be-1d72-4041-a552-f37b38cd434b"
}
]
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.ecbced70-807d-45ff-b501-27d4f2b93b30"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.7ca255fb-79c0-4fff-81b7-43769793a0b3"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.7da3e0fa-356c-4aac-93d6-0712d3253573"
}
]
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.0b7fcec3-2567-4562-b8b8-956be22ed7e7"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.07cea52a-4877-4f71-8dba-18cc77ec3acd"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.56b6420a-51c8-4ec2-9e8c-0c1e1492e86a"
}
]
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": "8919aaea-2883-4c65-bfc6-c038a8f848b0",
"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": "7568f860-f598-47ee-98e4-7e8364de7f77",
"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 |