Deployment
Get Role Certificate
The role assignment record of a market as a PDF certificate with on-chain proof
GET
/
seller-financing
/
api
/
markets
/
{marketId}
/
role-audit
/
certificate
curl "https://api.trusset.org/seller-financing/api/markets/cmsg4x7k20003sf9q1d8v6b2e/role-audit/certificate" \
-H "X-API-Key: trusset_your_key_here" \
-o role-certificate.pdf
const res = await fetch(
`https://api.trusset.org/seller-financing/api/markets/${marketId}/role-audit/certificate`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
if (res.headers.get('content-type')?.includes('application/pdf')) {
const docRef = res.headers.get('x-document-ref');
const pdf = await res.arrayBuffer();
save(`seller-financing-role-assignments-${docRef}.pdf`, pdf);
} else {
const { error } = await res.json();
console.log(error.code, error.message);
}
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="seller-financing-role-assignments-SF-739AD00ECE63.pdf"
X-Document-Ref: SF-739AD00ECE63
X-Request-Id: 3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603
{
"success": false,
"data": null,
"error": {
"code": "MARKET_NOT_FOUND",
"message": "Market not found on this instance. A market is reached on the instance that deployed it, or on an instance one of whose verified wallets holds the operator or admin role on it."
},
"metadata": {
"timestamp": "2026-10-19T09:12:04.318Z",
"requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
"instanceId": "inst_abc123"
}
}
Seller Financing is in beta and runs on Ethereum Sepolia instances only for now (
DEVELOPMENT instances on Ethereum). A PRODUCTION instance, or one on another network, answers 503 SELLER_FINANCING_UNAVAILABLE. See Seller Financing.- The market. Its mode, the asset and payment tokens, the collateral agent named on every lock, the market identity register at deployment and now, the implementation the market runs now, and the factory that deployed it.
- The deployment transaction. Its hash, block, time, signer, and for a smart-account deployment the account and the wallet that submitted it, with an explorer link.
- The roles the deployment assigned, each with whether the account still holds it.
- The role holders when the certificate was generated, each checked on chain.
- Every change after deployment, oldest first: role grants and revocations with the wallet that made them, market identity register changes and implementation upgrades, each with its block and transaction. The certificate states the block range of the event log it read, and says so when the range stops short of the chain head.
- The parties holding no role: the factory and its owner, each checked for the admin and the operator role.
This endpoint does not return the JSON envelope on success. It responds with
Content-Type: application/pdf, a Content-Disposition: attachment header with the file name seller-financing-role-assignments-<docRef>.pdf, and X-Document-Ref carrying the docRef. Errors come back as the usual JSON envelope, so branch on the response content type rather than parsing unconditionally.docRef is derived from the chain, the market and the deployment transaction, so every certificate of a market carries the same reference. Two certificates of the same market can still differ in today’s holders and in the changes since: the Verification section names the block and the time each was checked at. “Generated by” names the requester: on an API key, api-key: followed by the key’s ID.
This endpoint draws on the budget of 10 requests per minute that writes use, not on the read budget. See Rate limits.
Path Parameters
string
required
The market’s record ID, as
id on List Markets, not its contract address.curl "https://api.trusset.org/seller-financing/api/markets/cmsg4x7k20003sf9q1d8v6b2e/role-audit/certificate" \
-H "X-API-Key: trusset_your_key_here" \
-o role-certificate.pdf
const res = await fetch(
`https://api.trusset.org/seller-financing/api/markets/${marketId}/role-audit/certificate`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
if (res.headers.get('content-type')?.includes('application/pdf')) {
const docRef = res.headers.get('x-document-ref');
const pdf = await res.arrayBuffer();
save(`seller-financing-role-assignments-${docRef}.pdf`, pdf);
} else {
const { error } = await res.json();
console.log(error.code, error.message);
}
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="seller-financing-role-assignments-SF-739AD00ECE63.pdf"
X-Document-Ref: SF-739AD00ECE63
X-Request-Id: 3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603
{
"success": false,
"data": null,
"error": {
"code": "MARKET_NOT_FOUND",
"message": "Market not found on this instance. A market is reached on the instance that deployed it, or on an instance one of whose verified wallets holds the operator or admin role on it."
},
"metadata": {
"timestamp": "2026-10-19T09:12:04.318Z",
"requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
"instanceId": "inst_abc123"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
MISSING_MARKET_ID | 400 | marketId is longer than 100 characters |
MARKET_NOT_FOUND | 404 | No market with this ID that your instance reaches on its network |
TX_NOT_FOUND | 404 | The deployment transaction could not be loaded from the chain |
RATE_LIMIT_EXCEEDED | 429 | The budget of 10 per minute is used up. Retry after Retry-After seconds |
CHAIN_UNAVAILABLE | 503 | The chain could not be read. Retry shortly |
SELLER_FINANCING_UNAVAILABLE | 503 | The instance is a PRODUCTION instance or not on Ethereum |
CERTIFICATE_FAILED | 500 | Unexpected failure. Retry, or contact support with the request ID |
⌘I
curl "https://api.trusset.org/seller-financing/api/markets/cmsg4x7k20003sf9q1d8v6b2e/role-audit/certificate" \
-H "X-API-Key: trusset_your_key_here" \
-o role-certificate.pdf
const res = await fetch(
`https://api.trusset.org/seller-financing/api/markets/${marketId}/role-audit/certificate`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
if (res.headers.get('content-type')?.includes('application/pdf')) {
const docRef = res.headers.get('x-document-ref');
const pdf = await res.arrayBuffer();
save(`seller-financing-role-assignments-${docRef}.pdf`, pdf);
} else {
const { error } = await res.json();
console.log(error.code, error.message);
}
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="seller-financing-role-assignments-SF-739AD00ECE63.pdf"
X-Document-Ref: SF-739AD00ECE63
X-Request-Id: 3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603
{
"success": false,
"data": null,
"error": {
"code": "MARKET_NOT_FOUND",
"message": "Market not found on this instance. A market is reached on the instance that deployed it, or on an instance one of whose verified wallets holds the operator or admin role on it."
},
"metadata": {
"timestamp": "2026-10-19T09:12:04.318Z",
"requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
"instanceId": "inst_abc123"
}
}
