Transactions
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.
Unique id of transaction
OK
GET /v1/transactions/{uid} HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
OK
{
"Uid": "00ad9a27-e777-44ef-9f7f-aee4036642b6",
"TransactionType": "Product update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-20T12:56:27.2450000+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.3010000+02:00"
}OK
POST /v1/transactions/batch HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 118
[
"18db7617-cbd9-47ac-914a-1f1440a5afb3",
"6a8717cb-d99d-42f7-95bc-5b440ad65e25",
"699e8207-7d70-4e7f-98ad-dc8672dfebfb"
]OK
[
{
"Uid": "4439cd08-ac7e-4f2a-abe3-38d567006b47",
"TransactionType": "Product update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-20T12:56:27.2450000+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.3010000+02:00"
},
{
"Uid": "97abf974-e159-403b-90fc-5d4e4bd495c6",
"TransactionType": "Variant update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-19T10:27:23.0750000+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.3220000+02:00"
}
]Page to return results for (1 is first page)
1Query transactions committed after this timestamp
Query transactions committed before this timestamp
Query transactions made by this username
OK
GET /v1/transactions/search HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
OK
{
"TotalCount": 2,
"Page": 1,
"Transactions": [
{
"Uid": "6ad83963-2086-4811-84f9-0b4cee1c0ed2",
"TransactionType": "Product update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-20T12:56:27.2450000+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.3010000+02:00"
},
{
"Uid": "7203fbae-f0ed-448d-895f-a46e0b1a78b0",
"TransactionType": "Variant update",
"Username": "[email protected]",
"StartTimestamp": "2021-10-19T10:27:23.0750000+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.3220000+02:00"
}
]
}Type of entity (Can be Product, Variant, Category or GlobalListValue)
Id of entity
OK
GET /v1/transactions/{entityType}/{entityId}/revisiondata HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
OK
[
{
"FieldName": "Name (Danish)",
"LastChange": {
"RevisionNo": 2,
"RevisionValue": "Test2",
"ValueBefore": "Test1",
"Timestamp": "2021-10-20T12:56:27.2450000+02:00",
"Username": "Struct",
"TransactionType": "Product update",
"TransactionUid": "df6003d5-fa59-4c0c-b2e5-0b4180efc262",
"NewValue": null
},
"ItemRevisionChange": [
{
"RevisionNo": 2,
"RevisionValue": "Test2",
"ValueBefore": "Test1",
"Timestamp": "2021-10-20T12:56:27.2450000+02:00",
"Username": "Struct",
"TransactionType": "Product update",
"TransactionUid": "8a75ddd5-617c-4e64-8e86-b435d37d1b52",
"NewValue": null
},
{
"RevisionNo": 1,
"RevisionValue": "Test1",
"ValueBefore": null,
"Timestamp": "2021-10-19T10:27:23.0750000+02:00",
"Username": "Struct",
"TransactionType": "Product creation",
"TransactionUid": "f12dade6-639c-46f4-85bb-e54cc18f01b4",
"NewValue": null
}
]
}
]Unique id of transaction to get changes for
Comma separated list of entity types to return (valid entity types are Category, Product, Variant, GlobalListValue)
OK
GET /v1/transactions/{uid}/changedentities HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
OK
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "3bd1c747-bf8e-4d0c-b24d-f0148e2aadd6"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "3bd1c747-bf8e-4d0c-b24d-f0148e2aadd6"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "3bd1c747-bf8e-4d0c-b24d-f0148e2aadd6"
}
]A maximum of 5000 transactions can be fetched at a time
Comma separated list of entity types to return (valid entity types are Category, Product, Variant, GlobalListValue)
OK
POST /v1/transactions/batch/changedentities HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 118
[
"652283b7-4955-40fd-82df-ea35b22fadf3",
"3813a7e5-8dc5-48fc-9d74-e439afca70b6",
"cc4dcfae-5e49-4af0-9d0b-7a3f2a8c421b"
]OK
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "d06c8d58-1bae-48ec-91a5-6269cd4862c4"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "8ecad278-ff37-4ebb-a2e5-221615ed12b1"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "8ecad278-ff37-4ebb-a2e5-221615ed12b1"
}
]Type of entity (Can be Product, Variant, Category or GlobalListValue)
Id of entity
Revision to get changes for
OK
GET /v1/transactions/changes/{entityType}/{entityId}/{revisionNo} HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
OK
[
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.e5edb8ec-3d7d-4d3f-92a4-888d8434cedf"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.8cb780ff-2b1a-4120-ad66-9d9aa17448c3"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.5d2b0c74-4384-4990-88f7-19088039bbbb"
}
]Model for requesting revision changes
Type of entity
Unique id of entity
Revision number
OK
POST /v1/transactions/changes/batch HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 177
[
{
"EntityType": "Product",
"EntityId": "3022",
"RevisionNo": 2
},
{
"EntityType": "Product",
"EntityId": "3022",
"RevisionNo": 3
},
{
"EntityType": "Variant",
"EntityId": "105633",
"RevisionNo": 1
}
]OK
[
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.cc6019b9-d09a-4417-bd1d-db7133ab3edc"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.623a5316-a1d9-4345-8a62-07da66e1a3a9"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.92221003-abda-40a6-9bef-9e5b0b75efbc"
}
]Last updated