Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add public response payloads for get asset and get asset transfers #797

Merged
merged 3 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions legacy/src/api/assets/asset-transfers.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,26 @@ The above example has $10 left on a $60 dollar giftcard at the time of transfer.
}
{% endjson %}

## Get an Asset Transfer Summary

{% reqspec %}
GET '/api/asset-transfers/{assetTransferId}/summary'
path_param 'assetTransferId', 'M7Kn2stAxNa6ri7h'
{% endreqspec %}

{% h4 Example response payload %}

{% json %}
{
"id": "M7Kn2stAxNa6ri7h",
"status": "created",
"assetId": "YGRo6TYYSxH3js7",
"message": "Happy birthday",
"senderName": "My Cafe",
"createdAt": "2020-05-01T12:30:00.000Z"
}
{% endjson %}

## Resolve claimable assets **EXPERIMENTAL**

When you send another centrapay user cash or assets, they're automatically assigned to them.
Expand Down
20 changes: 20 additions & 0 deletions legacy/src/api/assets/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,26 @@ Tokens have the following fields along with the base asset fields.
}
{% endjson %}

### Get Asset Summary

{% reqspec %}
GET '/api/assets/{assetId}/summary'
path_param 'assetId', 'L75M3L56N2PtBSt8g7uXLU'
{% endreqspec %}

{% h4 Example response payload %}

{% json %}
{
"id": "L75M3L56N2PtBSt8g7uXLU",
"issuer": "Centraperk Cafe",
"description": "Free Coffee",
"expiresAt": "2020-12-31T00:00:00.000Z",
"img": "https://static.centrapay.com/assets/brands/centraperk/cafe-token.png",
"liveness": "test"
}
{% endjson %}

### List Assets for Account

Returns a [paginated][] list of Assets for an account. This will not return archived assets.
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/__snapshots__/links.integration.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ exports[`the build should not break any links 1`] = `
"/api/asset-transfers#contents",
"/api/asset-transfers#create-an-asset-transfer",
"/api/asset-transfers#get-an-asset-transfer",
"/api/asset-transfers#get-an-asset-transfer-summary",
"/api/asset-transfers#list-asset-transfers-experimental",
"/api/asset-transfers#resolve-claimable-assets-experimental",
"/api/asset-transfers#top",
Expand All @@ -59,6 +60,7 @@ exports[`the build should not break any links 1`] = `
"/api/assets#assets",
"/api/assets#contents",
"/api/assets#get-asset",
"/api/assets#get-asset-summary",
"/api/assets#gift-cards",
"/api/assets#list-assets-for-account",
"/api/assets#listing-asset-transactions-experimental",
Expand Down