# 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.

## GET /v1/transactions/{uid}

> Get a specific transaction

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Transactions","description":"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."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Transaction.TransactionModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of the transaction","format":"uuid"},"TransactionType":{"type":"string","description":"Description of the type of transaction","nullable":true},"Username":{"type":"string","description":"Username of the user who performed the transaction","nullable":true},"StartTimestamp":{"type":"string","description":"The timestamp when the transaction was started","format":"date-time"},"CommitTimestamp":{"type":"string","description":"The timestamp when the transaction was committed","format":"date-time"}},"additionalProperties":false,"description":"A transaction represents a single unit of work in the system, in which one or more entities have been created, updated or deleted"}}},"paths":{"/v1/transactions/{uid}":{"get":{"tags":["Transactions"],"summary":"Get a specific transaction","parameters":[{"name":"uid","in":"path","description":"Unique id of transaction","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.TransactionModel"}}}}}}}}}
```

## POST /v1/transactions/batch

> Get a batch of transactions

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Transactions","description":"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."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Transaction.TransactionModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of the transaction","format":"uuid"},"TransactionType":{"type":"string","description":"Description of the type of transaction","nullable":true},"Username":{"type":"string","description":"Username of the user who performed the transaction","nullable":true},"StartTimestamp":{"type":"string","description":"The timestamp when the transaction was started","format":"date-time"},"CommitTimestamp":{"type":"string","description":"The timestamp when the transaction was committed","format":"date-time"}},"additionalProperties":false,"description":"A transaction represents a single unit of work in the system, in which one or more entities have been created, updated or deleted"}}},"paths":{"/v1/transactions/batch":{"post":{"tags":["Transactions"],"summary":"Get a batch of transactions","requestBody":{"description":"uids of transactions to return","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.TransactionModel"}}}}}}}}}
```

## GET /v1/transactions/search

> Search transactions. Returns paged result set with a page size of 1000

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Transactions","description":"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."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Transaction.TransactionSearchResult":{"type":"object","properties":{"TotalCount":{"type":"integer","description":"The total number of transactions contained in the search result","format":"int32"},"Page":{"type":"integer","description":"The current page which results are returned for","format":"int32"},"Transactions":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.TransactionModel"},"description":"Transactions for the current page of the search result","nullable":true}},"additionalProperties":false,"description":"Represents a result from a transaction search"},"Struct.App.Api.Models.Transaction.TransactionModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of the transaction","format":"uuid"},"TransactionType":{"type":"string","description":"Description of the type of transaction","nullable":true},"Username":{"type":"string","description":"Username of the user who performed the transaction","nullable":true},"StartTimestamp":{"type":"string","description":"The timestamp when the transaction was started","format":"date-time"},"CommitTimestamp":{"type":"string","description":"The timestamp when the transaction was committed","format":"date-time"}},"additionalProperties":false,"description":"A transaction represents a single unit of work in the system, in which one or more entities have been created, updated or deleted"}}},"paths":{"/v1/transactions/search":{"get":{"tags":["Transactions"],"summary":"Search transactions. Returns paged result set with a page size of 1000","parameters":[{"name":"page","in":"query","description":"Page to return results for (1 is first page)","schema":{"type":"integer","format":"int32","default":1}},{"name":"fromTimestamp","in":"query","description":"Query transactions committed after this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"toTimestamp","in":"query","description":"Query transactions committed before this timestamp","schema":{"type":"string","format":"date-time"}},{"name":"username","in":"query","description":"Query transactions made by this username","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.TransactionSearchResult"}}}}}}}}}
```

## GET /v1/transactions/{entityType}/{entityId}/revisiondata

> Get an entity's changes

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Transactions","description":"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."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Transaction.ItemRevisionHistory":{"type":"object","properties":{"FieldName":{"type":"string","nullable":true},"LastChange":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.ItemRevisionChange"},"ItemRevisionChange":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.ItemRevisionChange"},"nullable":true}},"additionalProperties":false},"Struct.App.Api.Models.Transaction.ItemRevisionChange":{"type":"object","properties":{"RevisionNo":{"type":"integer","format":"int32"},"RevisionValue":{"type":"string","nullable":true},"ValueBefore":{"type":"string","nullable":true},"Timestamp":{"type":"string","format":"date-time"},"Username":{"type":"string","nullable":true},"TransactionType":{"type":"string","nullable":true},"TransactionUid":{"type":"string","format":"uuid"},"NewValue":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/v1/transactions/{entityType}/{entityId}/revisiondata":{"get":{"tags":["Transactions"],"summary":"Get an entity's changes","parameters":[{"name":"entityType","in":"path","description":"Type of entity (Can be Product, Variant, Category or GlobalListValue)","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","description":"Id of entity","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.ItemRevisionHistory"}}}}}}}}}}
```

## GET /v1/transactions/{uid}/changedentities

> Get entities changed in a specific transaction

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Transactions","description":"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."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Transaction.TransactionEntityModel":{"type":"object","properties":{"EntityType":{"type":"string","description":"Type of entity","nullable":true},"EntityId":{"type":"string","description":"The unique id of the entity","nullable":true},"RevisionNo":{"type":"integer","description":"The revision number assigned to the entity in this transaction","format":"int32"},"TransactionUid":{"type":"string","description":"Unique id of the transaction","format":"uuid"}},"additionalProperties":false,"description":"Represents information on an entity that is changed in a specific transaction"}}},"paths":{"/v1/transactions/{uid}/changedentities":{"get":{"tags":["Transactions"],"summary":"Get entities changed in a specific transaction","parameters":[{"name":"uid","in":"path","description":"Unique id of transaction to get changes for","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"entityTypes","in":"query","description":"Comma separated list of entity types to return (valid entity types are Category, Product, Variant, GlobalListValue)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.TransactionEntityModel"}}}}}}}}}
```

## Get entities changed in a batch of transactions

> A maximum of 5000 transactions can be fetched at a time

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Transactions","description":"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."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Transaction.TransactionEntityModel":{"type":"object","properties":{"EntityType":{"type":"string","description":"Type of entity","nullable":true},"EntityId":{"type":"string","description":"The unique id of the entity","nullable":true},"RevisionNo":{"type":"integer","description":"The revision number assigned to the entity in this transaction","format":"int32"},"TransactionUid":{"type":"string","description":"Unique id of the transaction","format":"uuid"}},"additionalProperties":false,"description":"Represents information on an entity that is changed in a specific transaction"}}},"paths":{"/v1/transactions/batch/changedentities":{"post":{"tags":["Transactions"],"summary":"Get entities changed in a batch of transactions","description":"A maximum of 5000 transactions can be fetched at a time","parameters":[{"name":"entityTypes","in":"query","description":"Comma separated list of entity types to return (valid entity types are Category, Product, Variant, GlobalListValue)","schema":{"type":"string"}}],"requestBody":{"description":"Unique ids of transactions to get changes for","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.TransactionEntityModel"}}}}}}}}}
```

## GET /v1/transactions/changes/{entityType}/{entityId}/{revisionNo}

> Get an entity's changes for in a specific revision

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Transactions","description":"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."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Transaction.EntityRevisionChangeModel":{"type":"object","properties":{"EntityType":{"type":"string","description":"Type of entity","nullable":true},"EntityId":{"type":"string","description":"The unique id of the entity","nullable":true},"RevisionNo":{"type":"integer","description":"The revision number assigned to the entity in this transaction","format":"int32"},"DataType":{"type":"string","description":"Reference to the type of data change that was made for this entity in this revision","nullable":true}},"additionalProperties":false,"description":"Represents a change made to an entity in a specific revision"}}},"paths":{"/v1/transactions/changes/{entityType}/{entityId}/{revisionNo}":{"get":{"tags":["Transactions"],"summary":"Get an entity's changes for in a specific revision","parameters":[{"name":"entityType","in":"path","description":"Type of entity (Can be Product, Variant, Category or GlobalListValue)","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","description":"Id of entity","required":true,"schema":{"type":"string"}},{"name":"revisionNo","in":"path","description":"Revision to get changes for","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.EntityRevisionChangeModel"}}}}}}}}}}
```

## POST /v1/transactions/changes/batch

> Get revision changes for a batch of entities

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Transactions","description":"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."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Transaction.EntityRevisionChangeRequestModel":{"type":"object","properties":{"EntityType":{"type":"string","description":"Type of entity","nullable":true},"EntityId":{"type":"string","description":"Unique id of entity","nullable":true},"RevisionNo":{"type":"integer","description":"Revision number","format":"int32"}},"additionalProperties":false,"description":"Model for requesting revision changes"},"Struct.App.Api.Models.Transaction.EntityRevisionChangeModel":{"type":"object","properties":{"EntityType":{"type":"string","description":"Type of entity","nullable":true},"EntityId":{"type":"string","description":"The unique id of the entity","nullable":true},"RevisionNo":{"type":"integer","description":"The revision number assigned to the entity in this transaction","format":"int32"},"DataType":{"type":"string","description":"Reference to the type of data change that was made for this entity in this revision","nullable":true}},"additionalProperties":false,"description":"Represents a change made to an entity in a specific revision"}}},"paths":{"/v1/transactions/changes/batch":{"post":{"tags":["Transactions"],"summary":"Get revision changes for a batch of entities","requestBody":{"description":"Entities and revisions to get changes for","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.EntityRevisionChangeRequestModel"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Transaction.EntityRevisionChangeModel"}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.struct.com/api-reference/endpoints/transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
