This endpoint allows you to retrieve an Asset.
All assets have the following fields along with the additional fields that are specific to its category. Assets which don't have a category are experimental and the model may change.
- Money Model
Money assets, being backed by real currency, are the most flexible asset types. Money is accepted for most payment requests, can be sent in arbitrary amounts and does not expire.
Money assets have the following attributes along with the base asset fields.
periodenumexperimentalThe period after which thebalancewill be reset. This field is only available on the quartz asset type.
- Token Modelexperimental
Tokens are assets which can only be spent in full. Every token is associated with a collection, which defines the branding and general rules for the tokens, such as active duration.
Tokens have the following attributes along with the base asset fields.
collectionIdstringThe token collection that will govern the branding and redemption rules for the token.
- Ledger Modelexperimental
A ledger is a single asset that maintains a balance of multiple tokens belonging to an account. All tokens in a ledger come from a specific collection. Multiple tokens can be spent or sent at once from the ledger.
Ledgers have the following attributes along with the base asset fields.
tokenValuemonetaryThe value of each token in the ledger. Taken from themaxValueproperty on the token collection.
errorstringThe name of the HTTP status. AlwaysBad Request.messageenumThe error code, or for a 400 a description of what's wrong with the request.Bad RequestThe request is malformed or missing required fields. The message says what's wrong, egamount is required. See 400 Malformed Request.
statusCodeintegerThe HTTP status code. Always400.
errorstringThe name of the HTTP status. AlwaysUnauthorized.messageenumThe error code, or for a 400 a description of what's wrong with the request.Missing authenticationAPI key or JWT is missing, expired or invalid. See Auth.
statusCodeintegerThe HTTP status code. Always401.
errorstringThe name of the HTTP status. AlwaysForbidden.messageenumThe error code, or for a 400 a description of what's wrong with the request.ForbiddenThe resource doesn't exist, or your user or API key doesn't have permission to access it. See 403 Forbidden.
statusCodeintegerThe HTTP status code. Always403.
errorstringThe name of the HTTP status. AlwaysNot Found.messageenumThe error code, or for a 400 a description of what's wrong with the request.Not FoundThe route doesn't exist. Check the URL and HTTP method against the examples. See 404 Route Not Found.
statusCodeintegerThe HTTP status code. Always404.
errorstringThe name of the HTTP status. AlwaysToo Many Requests.messageenumThe error code, or for a 400 a description of what's wrong with the request.RATE_LIMIT_EXCEEDEDCentrapay API rate limits have been exceeded. See Rate Limits.
statusCodeintegerThe HTTP status code. Always429.
errorstringThe name of the HTTP status. AlwaysInternal Server Error.messageenumThe error code, or for a 400 a description of what's wrong with the request.An internal server error occurredSomething went wrong on our end. Retrying should solve the issue. See 5xx Server Error.
statusCodeintegerThe HTTP status code. Always500.
curl -X GET https://service.centrapay.com/api/assets/L75M3L56N2PtBSt8g7uXLU \-H 'x-api-key: <TOKEN>'{ "accountId": "9aFdxZNbqmFhzJFqozreqesEeaoh2f", "activeFrom": "2024-04-23T22:11:56.924Z", "category": "token", "collectionId": "c_4Hq8WmZ2rTn6YbPkD9xVfL", "collectionType": "product", "createdAt": "2024-04-23T22:11:57.158Z", "description": "Centrapay Token", "expiresAt": "2024-05-07T22:11:56.924Z", "id": "L75M3L56N2PtBSt8g7uXLU", "img": "http://www.centrapay.com/path/to/img.png", "issuer": "Centraperk", "issuerImg": "https://static.centrapay.com/assets/brands/centraperk/logo.png", "issuerWebsite": "www.centrapay.com", "liveness": "main", "mediaUploadId": "P9picAvVyA7c7d1GMytWG7", "status": "active", "type": "centrapay.token.main"}{ "error": "Bad Request", "message": "amount is required", "statusCode": 400}{ "error": "Unauthorized", "message": "Missing authentication", "statusCode": 401}{ "error": "Forbidden", "message": "Forbidden", "statusCode": 403}{ "error": "Not Found", "message": "Not Found", "statusCode": 404}{ "error": "Too Many Requests", "message": "RATE_LIMIT_EXCEEDED", "statusCode": 429}{ "error": "Internal Server Error", "message": "An internal server error occurred", "statusCode": 500}