#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": "55f6d088-8618-4c7c-abaa-b2036feb25a8",
"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": "1295b51b-db14-4d38-8ed0-c8e491579109"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "1295b51b-db14-4d38-8ed0-c8e491579109"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "1295b51b-db14-4d38-8ed0-c8e491579109"
}
]
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
[
"d33ec445-5d70-4095-b3ad-3d3666d25001",
"ed92b02b-e5d3-4ae8-8e46-e1b77a825def",
"22a428ec-d972-44db-b6a3-ddc2f080924f"
]
[
{
"Uid": "b7a19872-b503-4032-9f91-ea4b5c0b781a",
"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": "9f5785cd-e7f2-40ae-8594-ef642d7e7e1e",
"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
[
"2259807d-14c0-4de2-a177-3b2d7154381c",
"7fc615b8-3ac3-4ec8-bd93-d233b77e322d",
"b58fd0ac-ce4a-456b-beb2-1f1ed6db47b3"
]
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "7cbcde3b-7c46-4025-a148-417a525e9466"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "7bcff8fe-0c04-4f62-bdf2-7758bd582f4f"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "7bcff8fe-0c04-4f62-bdf2-7758bd582f4f"
}
]
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.6233dbcf-fa64-4e6a-abe1-f0935f23b3a8"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.ffd2c7f8-d337-4f01-ae52-548b521d0c99"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.03e92cc5-1650-4d92-8497-420867dec022"
}
]
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.1df82909-7e34-4d31-8b3f-fa17c2b031c9"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.6261f05f-a638-45df-b2d0-a3e3a0a15647"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.9b0969ae-911e-40f5-9d7a-abb77c95b6d3"
}
]
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": "df046132-1653-457b-9892-356e727d0030",
"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": "8361c9cb-a64e-49c1-9d4e-27d7348aabc5",
"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 |