# Models

## The User object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"User":{"type":"object","properties":{"id":{"type":"string"},"walletAddress":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```

## The UserResponse object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"UserResponse":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","properties":{"isNewUser":{"type":"boolean"}}}]},"User":{"type":"object","properties":{"id":{"type":"string"},"walletAddress":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```

## The Category object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"Category":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}}}}}
```

## The Zone object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"Zone":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"geojson":{"type":"object"},"userId":{"type":"string","nullable":true},"isGlobal":{"type":"boolean"},"map3dType":{"type":"string","nullable":true},"map3dUrl":{"type":"string","nullable":true},"map3dConfig":{"type":"object","nullable":true},"previewImageUrl":{"type":"string","nullable":true},"area":{"type":"number","nullable":true},"blockchainSignature":{"type":"string","nullable":true},"blockchainTxUrl":{"type":"string","nullable":true},"blockchainSyncedAt":{"type":"string","format":"date-time","nullable":true},"blockchainSyncStatus":{"type":"string","enum":["not_synced","syncing","synced","failed"]},"categories":{"type":"array","items":{"type":"object","properties":{"category":{"$ref":"#/components/schemas/Category"}}}},"pins":{"type":"array","items":{"$ref":"#/components/schemas/Pin"}},"_count":{"type":"object","properties":{"pins":{"type":"integer"}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Category":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"Pin":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"geoPose":{"type":"object","description":"JSON object containing geographic position and orientation data"},"contentType":{"type":"string","enum":["APK","GLB","IMAGE","VIDEO","URL","LENS","GCP","AUDIO","USDZ","BIN"]},"contentUrl":{"type":"string"},"localizationData":{"type":"object","nullable":true,"description":"ARWorld localization data for iOS AR experiences","properties":{"trackingMode":{"type":"string","enum":["WORLD","GEO"],"description":"AR tracking mode for the pin"},"worldmapURL":{"type":"string","format":"uri","nullable":true,"description":"S3 URL of the ARWorld binary data"}}},"zoneId":{"type":"integer","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["public","private","friends"],"description":"Pin visibility setting"},"relocalizationPhotoUrl":{"type":"string","nullable":true,"description":"URL of the relocalization reference photo"},"scanInstructions":{"type":"string","nullable":true,"description":"Instructions for scanning/relocalizing"},"cameraPoseHint":{"type":"object","nullable":true,"description":"Camera pose hint for AR relocalization"},"blockchainSignature":{"type":"string","nullable":true},"blockchainTxUrl":{"type":"string","nullable":true},"blockchainSyncedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```

## The GeoPose object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"GeoPose":{"type":"object","required":["position","angles"],"properties":{"position":{"$ref":"#/components/schemas/Position"},"angles":{"$ref":"#/components/schemas/YprAngles"}}},"Position":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"number","description":"Latitude in decimal degrees"},"lon":{"type":"number","description":"Longitude in decimal degrees"},"h":{"type":"number","description":"Height/altitude in meters","default":0}}},"YprAngles":{"type":"object","required":["yaw","pitch","roll"],"properties":{"yaw":{"type":"number","description":"Yaw angle in degrees","default":0},"pitch":{"type":"number","description":"Pitch angle in degrees","default":0},"roll":{"type":"number","description":"Roll angle in degrees","default":0}}}}}}
```

## The Position object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"Position":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"number","description":"Latitude in decimal degrees"},"lon":{"type":"number","description":"Longitude in decimal degrees"},"h":{"type":"number","description":"Height/altitude in meters","default":0}}}}}}
```

## The YprAngles object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"YprAngles":{"type":"object","required":["yaw","pitch","roll"],"properties":{"yaw":{"type":"number","description":"Yaw angle in degrees","default":0},"pitch":{"type":"number","description":"Pitch angle in degrees","default":0},"roll":{"type":"number","description":"Roll angle in degrees","default":0}}}}}}
```

## The Pin object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"Pin":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"geoPose":{"type":"object","description":"JSON object containing geographic position and orientation data"},"contentType":{"type":"string","enum":["APK","GLB","IMAGE","VIDEO","URL","LENS","GCP","AUDIO","USDZ","BIN"]},"contentUrl":{"type":"string"},"localizationData":{"type":"object","nullable":true,"description":"ARWorld localization data for iOS AR experiences","properties":{"trackingMode":{"type":"string","enum":["WORLD","GEO"],"description":"AR tracking mode for the pin"},"worldmapURL":{"type":"string","format":"uri","nullable":true,"description":"S3 URL of the ARWorld binary data"}}},"zoneId":{"type":"integer","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["public","private","friends"],"description":"Pin visibility setting"},"relocalizationPhotoUrl":{"type":"string","nullable":true,"description":"URL of the relocalization reference photo"},"scanInstructions":{"type":"string","nullable":true,"description":"Instructions for scanning/relocalizing"},"cameraPoseHint":{"type":"object","nullable":true,"description":"Camera pose hint for AR relocalization"},"blockchainSignature":{"type":"string","nullable":true},"blockchainTxUrl":{"type":"string","nullable":true},"blockchainSyncedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```

## The GCP object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"GCP":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"gcpType":{"type":"string","enum":["SINGLE","MULTIPLE"]},"altitude":{"type":"number","nullable":true},"aprilTagId":{"type":"integer","nullable":true,"minimum":0,"maximum":50},"gcpData":{"type":"string","nullable":true},"photoUrls":{"type":"array","items":{"type":"string"}},"zoneId":{"type":"integer","nullable":true},"pin":{"$ref":"#/components/schemas/Pin","nullable":true},"zone":{"type":"object","nullable":true,"properties":{"id":{"type":"integer"},"title":{"type":"string"}}},"uploadedFiles":{"type":"array","items":{"$ref":"#/components/schemas/UploadedFile"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Pin":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"geoPose":{"type":"object","description":"JSON object containing geographic position and orientation data"},"contentType":{"type":"string","enum":["APK","GLB","IMAGE","VIDEO","URL","LENS","GCP","AUDIO","USDZ","BIN"]},"contentUrl":{"type":"string"},"localizationData":{"type":"object","nullable":true,"description":"ARWorld localization data for iOS AR experiences","properties":{"trackingMode":{"type":"string","enum":["WORLD","GEO"],"description":"AR tracking mode for the pin"},"worldmapURL":{"type":"string","format":"uri","nullable":true,"description":"S3 URL of the ARWorld binary data"}}},"zoneId":{"type":"integer","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["public","private","friends"],"description":"Pin visibility setting"},"relocalizationPhotoUrl":{"type":"string","nullable":true,"description":"URL of the relocalization reference photo"},"scanInstructions":{"type":"string","nullable":true,"description":"Instructions for scanning/relocalizing"},"cameraPoseHint":{"type":"object","nullable":true,"description":"Camera pose hint for AR relocalization"},"blockchainSignature":{"type":"string","nullable":true},"blockchainTxUrl":{"type":"string","nullable":true},"blockchainSyncedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UploadedFile":{"type":"object","properties":{"id":{"type":"integer"},"fileName":{"type":"string"},"fileUrl":{"type":"string"},"fileSize":{"type":"integer","nullable":true},"mimeType":{"type":"string","nullable":true},"bucketPath":{"type":"string","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"uploadedAt":{"type":"string","format":"date-time"}}}}}}
```

## The GCPCreateRequest object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"GCPCreateRequest":{"type":"object","required":["title","gcpType","geoPose"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"gcpType":{"type":"string","enum":["SINGLE","MULTIPLE"]},"geoPose":{"$ref":"#/components/schemas/GeoPose"},"altitude":{"type":"number"},"aprilTagId":{"type":"integer","minimum":0,"maximum":50},"gcpData":{"type":"string"},"photoUrls":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":3},"uploadedFileIds":{"type":"array","items":{"type":"integer"}},"zoneId":{"type":"integer"}}},"GeoPose":{"type":"object","required":["position","angles"],"properties":{"position":{"$ref":"#/components/schemas/Position"},"angles":{"$ref":"#/components/schemas/YprAngles"}}},"Position":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"number","description":"Latitude in decimal degrees"},"lon":{"type":"number","description":"Longitude in decimal degrees"},"h":{"type":"number","description":"Height/altitude in meters","default":0}}},"YprAngles":{"type":"object","required":["yaw","pitch","roll"],"properties":{"yaw":{"type":"number","description":"Yaw angle in degrees","default":0},"pitch":{"type":"number","description":"Pitch angle in degrees","default":0},"roll":{"type":"number","description":"Roll angle in degrees","default":0}}}}}}
```

## The GCPUpdateRequest object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"GCPUpdateRequest":{"type":"object","required":["title","geoPose"],"properties":{"title":{"type":"string"},"description":{"type":"string","nullable":true},"geoPose":{"$ref":"#/components/schemas/GeoPose"},"altitude":{"type":"number","nullable":true},"aprilTagId":{"type":"integer","nullable":true,"minimum":0,"maximum":50},"photoUrls":{"type":"array","items":{"type":"string","format":"uri"}}}},"GeoPose":{"type":"object","required":["position","angles"],"properties":{"position":{"$ref":"#/components/schemas/Position"},"angles":{"$ref":"#/components/schemas/YprAngles"}}},"Position":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"number","description":"Latitude in decimal degrees"},"lon":{"type":"number","description":"Longitude in decimal degrees"},"h":{"type":"number","description":"Height/altitude in meters","default":0}}},"YprAngles":{"type":"object","required":["yaw","pitch","roll"],"properties":{"yaw":{"type":"number","description":"Yaw angle in degrees","default":0},"pitch":{"type":"number","description":"Pitch angle in degrees","default":0},"roll":{"type":"number","description":"Roll angle in degrees","default":0}}}}}}
```

## The UploadedFile object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"UploadedFile":{"type":"object","properties":{"id":{"type":"integer"},"fileName":{"type":"string"},"fileUrl":{"type":"string"},"fileSize":{"type":"integer","nullable":true},"mimeType":{"type":"string","nullable":true},"bucketPath":{"type":"string","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"uploadedAt":{"type":"string","format":"date-time"}}}}}}
```

## The CSVUpload object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"CSVUpload":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileUrl":{"type":"string"},"status":{"type":"string","enum":["PENDING","COMPLETED","FAILED"]},"errorMessage":{"type":"string","nullable":true},"rowCount":{"type":"integer","nullable":true},"processedRows":{"type":"integer","nullable":true},"userId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```

## The NearbyPin object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"NearbyPin":{"allOf":[{"$ref":"#/components/schemas/Pin"},{"type":"object","required":["distance"],"properties":{"distance":{"type":"number","description":"Distance from query point in meters"}}}]},"Pin":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"geoPose":{"type":"object","description":"JSON object containing geographic position and orientation data"},"contentType":{"type":"string","enum":["APK","GLB","IMAGE","VIDEO","URL","LENS","GCP","AUDIO","USDZ","BIN"]},"contentUrl":{"type":"string"},"localizationData":{"type":"object","nullable":true,"description":"ARWorld localization data for iOS AR experiences","properties":{"trackingMode":{"type":"string","enum":["WORLD","GEO"],"description":"AR tracking mode for the pin"},"worldmapURL":{"type":"string","format":"uri","nullable":true,"description":"S3 URL of the ARWorld binary data"}}},"zoneId":{"type":"integer","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["public","private","friends"],"description":"Pin visibility setting"},"relocalizationPhotoUrl":{"type":"string","nullable":true,"description":"URL of the relocalization reference photo"},"scanInstructions":{"type":"string","nullable":true,"description":"Instructions for scanning/relocalizing"},"cameraPoseHint":{"type":"object","nullable":true,"description":"Camera pose hint for AR relocalization"},"blockchainSignature":{"type":"string","nullable":true},"blockchainTxUrl":{"type":"string","nullable":true},"blockchainSyncedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```

## The NearbyPinList object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"NearbyPinList":{"type":"object","required":["pins"],"properties":{"pins":{"type":"array","items":{"$ref":"#/components/schemas/NearbyPin"},"description":"Array of pins sorted by distance from query point"}}},"NearbyPin":{"allOf":[{"$ref":"#/components/schemas/Pin"},{"type":"object","required":["distance"],"properties":{"distance":{"type":"number","description":"Distance from query point in meters"}}}]},"Pin":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"geoPose":{"type":"object","description":"JSON object containing geographic position and orientation data"},"contentType":{"type":"string","enum":["APK","GLB","IMAGE","VIDEO","URL","LENS","GCP","AUDIO","USDZ","BIN"]},"contentUrl":{"type":"string"},"localizationData":{"type":"object","nullable":true,"description":"ARWorld localization data for iOS AR experiences","properties":{"trackingMode":{"type":"string","enum":["WORLD","GEO"],"description":"AR tracking mode for the pin"},"worldmapURL":{"type":"string","format":"uri","nullable":true,"description":"S3 URL of the ARWorld binary data"}}},"zoneId":{"type":"integer","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["public","private","friends"],"description":"Pin visibility setting"},"relocalizationPhotoUrl":{"type":"string","nullable":true,"description":"URL of the relocalization reference photo"},"scanInstructions":{"type":"string","nullable":true,"description":"Instructions for scanning/relocalizing"},"cameraPoseHint":{"type":"object","nullable":true,"description":"Camera pose hint for AR relocalization"},"blockchainSignature":{"type":"string","nullable":true},"blockchainTxUrl":{"type":"string","nullable":true},"blockchainSyncedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```

## The Map object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"Map":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"isPublic":{"type":"boolean"},"coverImage":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"userId":{"type":"string"},"pins":{"type":"array","items":{"type":"object","properties":{"pin":{"$ref":"#/components/schemas/Pin"},"order":{"type":"integer"}}}},"_count":{"type":"object","properties":{"visits":{"type":"integer"}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}}},"Pin":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"geoPose":{"type":"object","description":"JSON object containing geographic position and orientation data"},"contentType":{"type":"string","enum":["APK","GLB","IMAGE","VIDEO","URL","LENS","GCP","AUDIO","USDZ","BIN"]},"contentUrl":{"type":"string"},"localizationData":{"type":"object","nullable":true,"description":"ARWorld localization data for iOS AR experiences","properties":{"trackingMode":{"type":"string","enum":["WORLD","GEO"],"description":"AR tracking mode for the pin"},"worldmapURL":{"type":"string","format":"uri","nullable":true,"description":"S3 URL of the ARWorld binary data"}}},"zoneId":{"type":"integer","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["public","private","friends"],"description":"Pin visibility setting"},"relocalizationPhotoUrl":{"type":"string","nullable":true,"description":"URL of the relocalization reference photo"},"scanInstructions":{"type":"string","nullable":true,"description":"Instructions for scanning/relocalizing"},"cameraPoseHint":{"type":"object","nullable":true,"description":"Camera pose hint for AR relocalization"},"blockchainSignature":{"type":"string","nullable":true},"blockchainTxUrl":{"type":"string","nullable":true},"blockchainSyncedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```

## The MapPin object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"MapPin":{"type":"object","properties":{"mapId":{"type":"integer"},"pinId":{"type":"integer"},"order":{"type":"integer"}}}}}}
```

## The MapShare object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"MapShare":{"type":"object","properties":{"id":{"type":"integer"},"mapId":{"type":"integer"},"userId":{"type":"string"},"canEdit":{"type":"boolean"},"sharedAt":{"type":"string","format":"date-time"}}}}}}
```

## The MapProgress object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"MapProgress":{"type":"object","properties":{"mapId":{"type":"integer"},"mapTitle":{"type":"string"},"totalPins":{"type":"integer"},"visitedPins":{"type":"integer"},"completionPercentage":{"type":"number"},"visitedPinIds":{"type":"array","items":{"type":"integer"}},"pins":{"type":"array","items":{"type":"object","properties":{"pinId":{"type":"integer"},"order":{"type":"integer"},"title":{"type":"string"},"visited":{"type":"boolean"},"visitedAt":{"type":"string","format":"date-time","nullable":true}}}}}}}}}
```

## The Error object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"object"}}}}}}
```

## The FileUploadResult object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"FileUploadResult":{"type":"object","description":"Result of a successful file upload","properties":{"status":{"type":"string","enum":["success"],"description":"Upload status"},"message":{"type":"string","description":"Success message"},"url":{"type":"string","format":"uri","description":"S3 URL of the uploaded file"},"fileId":{"type":"integer","description":"Database ID of the uploaded file record"},"fileName":{"type":"string","description":"Original filename"},"fileSize":{"type":"integer","nullable":true,"description":"File size in bytes"},"mimeType":{"type":"string","nullable":true,"description":"MIME type of the file"},"arWorldUrl":{"type":"string","format":"uri","nullable":true,"description":"S3 URL for AR World files (.bin), null for other file types"}}}}}}
```

## The LocalizationData object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"LocalizationData":{"type":"object","description":"ARWorld localization data for iOS AR experiences","properties":{"trackingMode":{"type":"string","enum":["WORLD","GEO"],"description":"AR tracking mode for the pin"},"worldmapURL":{"type":"string","format":"uri","nullable":true,"description":"S3 URL of the ARWorld binary data"},"localizationPhotoURL":{"type":"string","format":"uri","nullable":true,"description":"URL of the photo used for re-localization"}}}}}}
```

## The BlockchainSyncRequest object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"BlockchainSyncRequest":{"type":"object","required":["entityType","entityId"],"properties":{"entityType":{"type":"string","enum":["Zone","Pin","Gcp","File"],"description":"Type of entity to sync to blockchain"},"entityId":{"type":"integer","minimum":1,"description":"ID of the entity to sync"},"network":{"type":"string","enum":["devnet","mainnet","testnet"],"description":"Solana network to use (defaults to devnet if not specified)"}}}}}}
```

## The BlockchainSyncResponse object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"BlockchainSyncResponse":{"oneOf":[{"type":"object","title":"Success Response","required":["success","metadata","network"],"properties":{"success":{"type":"boolean","const":true,"description":"Transaction was prepared successfully"},"metadata":{"type":"object","description":"Spatial metadata object containing entity information for blockchain","properties":{"entityType":{"type":"string","enum":["Zone","Pin","Gcp","File"]},"entityId":{"type":"integer"},"title":{"type":"string"},"geojson":{"type":"object","description":"GeoJSON object containing geographic data"},"geoPose":{"type":"object","description":"GeoPose object containing position and orientation data"}},"additionalProperties":true},"transactionData":{"type":"object","description":"Transaction data for client to sign and send","additionalProperties":true},"network":{"type":"string","enum":["devnet","mainnet","testnet"],"description":"Solana network used for the transaction"}}},{"type":"object","title":"Error Response","required":["error"],"properties":{"error":{"type":"string","description":"Error message"},"details":{"type":"array","description":"Validation error details (only present on validation errors)","items":{"type":"object"}}}}]}}}}
```

## The BlockchainConfirmRequest object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"BlockchainConfirmRequest":{"type":"object","required":["entityType","entityId","signature"],"properties":{"entityType":{"type":"string","enum":["Zone","Pin","Gcp","File"],"description":"Type of entity that was synced"},"entityId":{"type":"integer","minimum":1,"description":"ID of the entity that was synced"},"signature":{"type":"string","minLength":1,"description":"Transaction signature from Solana blockchain"},"network":{"type":"string","enum":["devnet","mainnet","testnet"],"description":"Solana network used for the transaction"},"blockHeight":{"type":"integer","minimum":1,"description":"Block height at which the transaction was confirmed (optional)"}}}}}}
```

## The BlockchainConfirmResponse object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"BlockchainConfirmResponse":{"oneOf":[{"type":"object","title":"Success Response","required":["success","signature","explorerUrl"],"properties":{"success":{"type":"boolean","const":true,"description":"Transaction was confirmed successfully"},"signature":{"type":"string","description":"Transaction signature"},"explorerUrl":{"type":"string","format":"uri","description":"URL to view the transaction on Solana Explorer"}}},{"type":"object","title":"Error Response","required":["error"],"properties":{"error":{"type":"string","description":"Error message"},"details":{"type":"array","description":"Validation error details (only present on validation errors)","items":{"type":"object"}}}}]}}}}
```

## The BlockchainTransaction object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"BlockchainTransaction":{"type":"object","properties":{"id":{"type":"integer","description":"Transaction record ID"},"entityType":{"type":"string","enum":["Zone","Pin","Gcp","File"],"description":"Type of entity"},"entityId":{"type":"integer","description":"ID of the entity"},"signature":{"type":"string","description":"Transaction signature"},"network":{"type":"string","enum":["devnet","mainnet","testnet"],"description":"Solana network"},"status":{"type":"string","enum":["pending","confirmed","failed"],"description":"Transaction status"},"blockHeight":{"type":"integer","nullable":true,"description":"Block height at which transaction was confirmed"},"createdAt":{"type":"string","format":"date-time","description":"When the transaction was created"}}}}}}
```

## The ZoneBlockchainStatus object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"ZoneBlockchainStatus":{"type":"object","properties":{"id":{"type":"integer","description":"Zone ID"},"blockchainSignature":{"type":"string","nullable":true,"description":"Blockchain transaction signature"},"blockchainTxUrl":{"type":"string","nullable":true,"format":"uri","description":"URL to view transaction on Solana Explorer"},"blockchainSyncedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the zone was synced to blockchain"},"blockchainSyncStatus":{"type":"string","enum":["not_synced","syncing","synced","failed"],"description":"Current blockchain sync status"}}}}}}
```

## The PinBlockchainStatus object

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"components":{"schemas":{"PinBlockchainStatus":{"type":"object","properties":{"id":{"type":"integer","description":"Pin ID"},"blockchainSignature":{"type":"string","nullable":true,"description":"Blockchain transaction signature"},"blockchainTxUrl":{"type":"string","nullable":true,"format":"uri","description":"URL to view transaction on Solana Explorer"},"blockchainSyncedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the pin was synced to blockchain"}}}}}}
```
