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
A transaction represents a single unit of work in the system, in which one or more entities have been created, updated or deleted
Unique id of the transaction
Description of the type of transaction
Username of the user who performed the transaction
The timestamp when the transaction was started
The timestamp when the transaction was committed
GET /v1/transactions/{uid} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
OK
{
"Uid": "bddab982-3c9f-4ef1-9167-7bec25746414",
"TransactionType": "Product update",
"Username": "support@struct.com",
"StartTimestamp": "2021-10-20T12:56:27.2450000+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.3010000+02:00"
}OK
A transaction represents a single unit of work in the system, in which one or more entities have been created, updated or deleted
Unique id of the transaction
Description of the type of transaction
Username of the user who performed the transaction
The timestamp when the transaction was started
The timestamp when the transaction was committed
POST /v1/transactions/batch HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 118
[
"40464510-a518-4d86-b716-1dbdf7061fc2",
"861360c4-82e4-4ec3-906c-200517c6dfc7",
"9e3555f6-17ac-4ecd-b4de-82b6179192c0"
]OK
[
{
"Uid": "cecf926f-9d55-497e-8fde-f656dd9b647d",
"TransactionType": "Product update",
"Username": "support@struct.com",
"StartTimestamp": "2021-10-20T12:56:27.2450000+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.3010000+02:00"
},
{
"Uid": "1b7d54de-d0ae-45bf-8608-b86099d38944",
"TransactionType": "Variant update",
"Username": "support@struct.com",
"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
Represents a result from a transaction search
The total number of transactions contained in the search result
The current page which results are returned for
GET /v1/transactions/search HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
OK
{
"TotalCount": 2,
"Page": 1,
"Transactions": [
{
"Uid": "fe275653-2211-43be-8024-3cc35cd629e2",
"TransactionType": "Product update",
"Username": "support@struct.com",
"StartTimestamp": "2021-10-20T12:56:27.2450000+02:00",
"CommitTimestamp": "2021-10-20T12:56:27.3010000+02:00"
},
{
"Uid": "6dd966a3-c4b4-48d6-81e4-a382d33744e1",
"TransactionType": "Variant update",
"Username": "support@struct.com",
"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
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": "a47053eb-f06a-4028-9669-d961a914634b",
"NewValue": null
},
"ItemRevisionChange": [
{
"RevisionNo": 2,
"RevisionValue": "Test2",
"ValueBefore": "Test1",
"Timestamp": "2021-10-20T12:56:27.2450000+02:00",
"Username": "Struct",
"TransactionType": "Product update",
"TransactionUid": "6143737d-c00e-4b64-994a-f8fb181e6de7",
"NewValue": null
},
{
"RevisionNo": 1,
"RevisionValue": "Test1",
"ValueBefore": null,
"Timestamp": "2021-10-19T10:27:23.0750000+02:00",
"Username": "Struct",
"TransactionType": "Product creation",
"TransactionUid": "064e64bc-9e6a-487f-9559-a768fcad73b9",
"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
Represents information on an entity that is changed in a specific transaction
Type of entity
The unique id of the entity
The revision number assigned to the entity in this transaction
Unique id of the transaction
GET /v1/transactions/{uid}/changedentities HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
OK
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "8caa7d75-f6f7-4bc1-be4a-fe7279ed585e"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "8caa7d75-f6f7-4bc1-be4a-fe7279ed585e"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "8caa7d75-f6f7-4bc1-be4a-fe7279ed585e"
}
]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
Represents information on an entity that is changed in a specific transaction
Type of entity
The unique id of the entity
The revision number assigned to the entity in this transaction
Unique id of the transaction
POST /v1/transactions/batch/changedentities HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 118
[
"65a1215c-8b89-4e4b-9211-f6261fe2bec6",
"035765e0-aa78-413b-bad7-97387e63afff",
"a9f2390e-9060-46e3-84d3-73c72038cae9"
]OK
[
{
"EntityType": "Product",
"EntityId": "3021",
"RevisionNo": 2,
"TransactionUid": "04b1f170-3ad7-4297-9798-b002780d268b"
},
{
"EntityType": "Product",
"EntityId": "265",
"RevisionNo": 7,
"TransactionUid": "b2621bb6-3d0a-454f-b52e-c8741278f9c0"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"TransactionUid": "b2621bb6-3d0a-454f-b52e-c8741278f9c0"
}
]Type of entity (Can be Product, Variant, Category or GlobalListValue)
Id of entity
Revision to get changes for
OK
Represents a change made to an entity in a specific revision
Type of entity
The unique id of the entity
The revision number assigned to the entity in this transaction
Reference to the type of data change that was made for this entity in this revision
GET /v1/transactions/changes/{entityType}/{entityId}/{revisionNo} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
OK
[
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.4c394e86-045a-4b1c-80f8-d7f55b9e78f3"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.87bef6b5-a6f9-4ce2-857c-3f1455cf12b9"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.8b169763-b113-48dd-a89f-e4db040f139c"
}
]Model for requesting revision changes
Type of entity
Unique id of entity
Revision number
OK
Represents a change made to an entity in a specific revision
Type of entity
The unique id of the entity
The revision number assigned to the entity in this transaction
Reference to the type of data change that was made for this entity in this revision
POST /v1/transactions/changes/batch HTTP/1.1
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.b99ba0f7-bc9f-4b9c-9719-0f5ce5d15e10"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.e4cc4e79-2d46-4b6e-bb2a-95bb1cb0a07e"
},
{
"EntityType": "Product",
"EntityId": "27601",
"RevisionNo": 1,
"DataType": "system.attribute.47af17b2-37db-433b-8a93-8ee3f2f1d9ac"
}
]Last updated