#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/{uid} Get a specific transaction
{
"Uid": "3dd1a2d0-1a3a-4954-b9e9-195c856f45f6",
"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": "126c2f11-cee3-4dab-a793-90f21d84ad0a"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "126c2f11-cee3-4dab-a793-90f21d84ad0a"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "126c2f11-cee3-4dab-a793-90f21d84ad0a"
}
]
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
[
"37685adb-affa-4a18-bcfd-5365452c143b",
"974c393d-c654-4dc2-a257-df157832b405",
"0fce745d-96eb-40ef-9907-4d646c23fec4"
]
[
{
"Uid": "71199d6f-f91a-406c-8e21-1bf0f7e079a3",
"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": "70756a49-79a7-474e-9d23-89230333aadd",
"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
[
"9f3ce827-7e7c-49f7-8435-6a4fb0700d27",
"df2cbb7c-13c1-4832-ac8d-5a85e0be88b7",
"dacb0a6d-89a3-42a5-b022-f40e065a64de"
]
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "0ecbb0b3-d993-4789-aa36-e70eb77f226e"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "9a1a1b9f-f318-4483-aba1-2d4b204c7f26"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "9a1a1b9f-f318-4483-aba1-2d4b204c7f26"
}
]
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.c28abf14-d148-4b48-b95c-48cf84c75ccf"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.2c7c81e4-e112-4640-bec1-8b5218619881"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.e565309d-7ffb-4188-b0c6-00bd47b3c4f5"
}
]
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.d5217320-4649-4f5d-b8fe-6090e898f5d0"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.b06c20c2-62d7-473a-98eb-c3671ba3cfdb"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.9217f98b-28c2-4d16-b96b-7776fe93b4eb"
}
]
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
{
"TotalPages": 1,
"Page": 1,
"Transactions": [
{
"Uid": "283a892a-459e-44b6-b996-d18406503b38",
"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": "a08ce635-22ed-499e-ba97-653c73597b0a",
"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 |