# Campaign Transactions

Campaign transaction operations

## Get campaign transactions

> Retrieve transactions for a campaign

```json
{"openapi":"3.0.3","info":{"title":"Decentraland Referral Service API","version":"1.0.0"},"tags":[{"name":"Campaign Transactions","description":"Campaign transaction operations"}],"servers":[{"url":"https://rewards.decentraland.org","description":"Production server"},{"url":"https://rewards.decentraland.zone","description":"Development server"},{"url":"http://localhost:8000","description":"Local Development server"}],"security":[],"paths":{"/api/campaigns/{campaign_id}/transactions":{"get":{"tags":["Campaign Transactions"],"summary":"Get campaign transactions","description":"Retrieve transactions for a campaign","parameters":[{"name":"campaign_id","in":"path","required":true,"description":"Campaign ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Campaign transactions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","required":["id","campaign_id","campaign_address","chain_id","collection_address","nonce","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid","description":"Transaction ID"},"campaign_id":{"type":"string","format":"uuid","description":"Campaign ID"},"campaign_address":{"type":"string","format":"address","description":"Campaign wallet address"},"chain_id":{"type":"string","enum":["1","3","4","5","42","137","80001","80002","11155111"],"description":"Blockchain chain ID"},"collection_address":{"type":"string","format":"address","description":"Collection contract address"},"nonce":{"type":"number","description":"Transaction nonce"},"transaction_hash":{"type":"string","nullable":true,"description":"Blockchain transaction hash"},"status":{"type":"string","enum":["pending","successful","failed","cancelled"],"description":"Transaction status"},"error_code":{"type":"string","nullable":true,"description":"Error code if transaction failed"},"error_message":{"type":"string","nullable":true,"description":"Error message if transaction failed"},"created_at":{"type":"string","format":"date-time","description":"Transaction creation time"},"updated_at":{"type":"string","format":"date-time","description":"Transaction last update time"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}}}}}}}
```

## Get campaign transaction

> Retrieve a specific campaign transaction

```json
{"openapi":"3.0.3","info":{"title":"Decentraland Referral Service API","version":"1.0.0"},"tags":[{"name":"Campaign Transactions","description":"Campaign transaction operations"}],"servers":[{"url":"https://rewards.decentraland.org","description":"Production server"},{"url":"https://rewards.decentraland.zone","description":"Development server"},{"url":"http://localhost:8000","description":"Local Development server"}],"security":[],"paths":{"/api/campaigns/{campaign_id}/transactions/{transaction_id}":{"get":{"tags":["Campaign Transactions"],"summary":"Get campaign transaction","description":"Retrieve a specific campaign transaction","parameters":[{"name":"campaign_id","in":"path","required":true,"description":"Campaign ID","schema":{"type":"string","format":"uuid"}},{"name":"transaction_id","in":"path","required":true,"description":"Transaction ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Campaign transaction","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"object","required":["id","campaign_id","campaign_address","chain_id","collection_address","nonce","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid","description":"Transaction ID"},"campaign_id":{"type":"string","format":"uuid","description":"Campaign ID"},"campaign_address":{"type":"string","format":"address","description":"Campaign wallet address"},"chain_id":{"type":"string","enum":["1","3","4","5","42","137","80001","80002","11155111"],"description":"Blockchain chain ID"},"collection_address":{"type":"string","format":"address","description":"Collection contract address"},"nonce":{"type":"number","description":"Transaction nonce"},"transaction_hash":{"type":"string","nullable":true,"description":"Blockchain transaction hash"},"status":{"type":"string","enum":["pending","successful","failed","cancelled"],"description":"Transaction status"},"error_code":{"type":"string","nullable":true,"description":"Error code if transaction failed"},"error_message":{"type":"string","nullable":true,"description":"Error message if transaction failed"},"created_at":{"type":"string","format":"date-time","description":"Transaction creation time"},"updated_at":{"type":"string","format":"date-time","description":"Transaction last update time"}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}}}}}}}
```

## Get campaign transaction rewards

> Retrieve rewards associated with a campaign transaction

```json
{"openapi":"3.0.3","info":{"title":"Decentraland Referral Service API","version":"1.0.0"},"tags":[{"name":"Campaign Transactions","description":"Campaign transaction operations"}],"servers":[{"url":"https://rewards.decentraland.org","description":"Production server"},{"url":"https://rewards.decentraland.zone","description":"Development server"},{"url":"http://localhost:8000","description":"Local Development server"}],"security":[],"paths":{"/api/campaigns/{campaign_id}/transactions/{transaction_id}/rewards":{"get":{"tags":["Campaign Transactions"],"summary":"Get campaign transaction rewards","description":"Retrieve rewards associated with a campaign transaction","parameters":[{"name":"campaign_id","in":"path","required":true,"description":"Campaign ID","schema":{"type":"string","format":"uuid"}},{"name":"transaction_id","in":"path","required":true,"description":"Transaction ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Campaign transaction rewards","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","required":["id","campaign_id","user","status","chain_id","target","value","token","airdrop_type","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid","description":"Reward ID"},"campaign_id":{"type":"string","format":"uuid","description":"Campaign ID"},"campaign_key":{"type":"string","format":"uuid","nullable":true,"description":"Campaign Key ID"},"user":{"type":"string","format":"address","nullable":true,"description":"User address assigned to this reward"},"status":{"type":"string","enum":["unassigned","pending","assigned","sending","success","rejected","confirmed","available","claimed","successful","failed"],"description":"Reward delivery status"},"chain_id":{"type":"string","enum":["1","3","4","5","42","137","80001","80002","11155111"],"description":"Blockchain chain ID"},"transaction_hash":{"type":"string","nullable":true,"description":"Hash of the transaction in which the reward was sent"},"block_number":{"type":"integer","nullable":true,"description":"Block number of the transaction"},"airdrop_type":{"type":"string","enum":["None","ERC20Transfer","ERC721Mint","ERC721Transfer","ERC721Kitty","CollectionV2IssueToken"],"description":"Delivery strategy for the reward"},"target":{"type":"string","format":"address","description":"Target contract for the reward"},"value":{"type":"string","description":"Value in the contract for the reward"},"priority":{"type":"number","description":"Assignment priority for the reward"},"group":{"type":"string","nullable":true,"description":"Assignment group for the reward"},"token":{"type":"string","description":"Human-readable name for the reward"},"image":{"type":"string","format":"uri","nullable":true,"description":"Image that visually represents this reward"},"rarity":{"type":"string","enum":["common","uncommon","rare","epic","legendary","mythic","unique"],"description":"Item rarity"},"category":{"type":"string","enum":["eyebrows","eyes","facial_hair","hair","mouth","upper_body","lower_body","feet","earring","eyewear","hat","helmet","mask","tiara","top_head","dance","stunt","greeting","fun","poses","reactions","horror","miscellaneous"],"description":"Item category"},"from_referral":{"type":"string","format":"address","nullable":true,"description":"Address of the user who referred this reward"},"payload":{"type":"string","nullable":true,"description":"Transaction payload (L1 only)"},"signature":{"type":"string","nullable":true,"description":"Transaction signature (L1 only)"},"expires_at":{"type":"string","format":"date-time","nullable":true,"description":"Reward expiration time (L1 only)"},"created_at":{"type":"string","format":"date-time","description":"The time the reward was created"},"updated_at":{"type":"string","format":"date-time","description":"The time the reward was last updated"},"assigned_at":{"type":"string","format":"date-time","nullable":true,"description":"The time the reward was assigned"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","description":"Whether the request was successful"},"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"},"data":{"type":"object","description":"Additional error data"}}}}}}}}}}}
```
