Back to Home

API Documentation

Reference documentation for the CMYCash Asset Registration API

POSTRegister Asset
/api/assets

Request Body

{
  "name": "1oz Gold Bar",
  "type": "Gold Bar | Coin | Jewelry | Other",
  "description": "Optional description",
  "issuer": "Pilot",
  "image_url": "https://example.com/image.jpg"
}

Response

{
  "success": true,
  "asset": {
    "id": "uuid",
    "uid": "CMYC-XXXX-XXXX",
    "name": "1oz Gold Bar",
    "type": "Gold Bar",
    "description": "Optional description",
    "issuer": "Pilot",
    "image_url": "https://example.com/image.jpg",
    "verification_level": "Public",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
  }
}
GETGet Asset by UID
/api/assets/[uid]

URL Parameters

uid: string - The unique identifier of the asset (e.g., CMYC-XXXX-XXXX)

Response

{
  "success": true,
  "asset": {
    "id": "uuid",
    "uid": "CMYC-XXXX-XXXX",
    "name": "1oz Gold Bar",
    "type": "Gold Bar",
    "description": "Optional description",
    "issuer": "Pilot",
    "image_url": "https://example.com/image.jpg",
    "verification_level": "Public",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
  }
}
Asset Types
Valid values for the type field
  • Gold Bar- Gold bars and bullion
  • Coin- Precious metal coins
  • Jewelry- Jewelry and ornaments
  • Other- Other valuable assets
Error Responses
Common error response format
{
  "success": false,
  "error": "Error message describing what went wrong"
}
Built with v0