cURL
curl --request GET \
--url https://test-api.shodai.network/v0/agreements/{id}/state \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://test-api.shodai.network/v0/agreements/{id}/state', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"status": "Deployed",
"state": "AWAITING_PAYMENT"
},
"meta": {
"apiVersion": "v0",
"requestId": "req_123"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}Using Agreements
Get agreement state
Returns the current state of an agreement. For deployed agreements, interpret the state against the authored agreement lifecycle.
GET
/
v0
/
agreements
/
{id}
/
state
cURL
curl --request GET \
--url https://test-api.shodai.network/v0/agreements/{id}/state \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://test-api.shodai.network/v0/agreements/{id}/state', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"status": "Deployed",
"state": "AWAITING_PAYMENT"
},
"meta": {
"apiVersion": "v0",
"requestId": "req_123"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing API credential",
"requestId": "<string>",
"details": "<unknown>"
}
}
Use the current state together with the authored agreement lifecycle before choosing an input to submit.
Authorizations
ApiKeyAuthOAuthBearerAuth
Canonical API-key credential. Send X-API-Key: cns_pk_..., or Authorization: Bearer cns_pk_... only as an API-key compatibility alias.
Path Parameters
Agreement ID or deployed agreement address.
Was this page helpful?
⌘I