cURL
curl --request POST \
--url http://localhost:4100/v1/projects/{projectId}/gas-policies/{gasPolicyId}/children \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draftId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"authorization": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({draftId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', authorization: '<string>'})
};
fetch('http://localhost:4100/v1/projects/{projectId}/gas-policies/{gasPolicyId}/children', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mandateId": "<string>",
"parentMandateId": "<string>",
"rootMandateId": "<string>",
"gasPolicyId": "<string>",
"agent": "<string>",
"depth": 123,
"status": "pending",
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>",
"validFrom": 140737488355328,
"expiresAt": 140737488355328,
"creationTransactionHash": "<string>",
"sponsored": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}gas-policies
Post v1projects gas policies children
cURL
curl --request POST \
--url http://localhost:4100/v1/projects/{projectId}/gas-policies/{gasPolicyId}/children \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draftId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"authorization": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({draftId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', authorization: '<string>'})
};
fetch('http://localhost:4100/v1/projects/{projectId}/gas-policies/{gasPolicyId}/children', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mandateId": "<string>",
"parentMandateId": "<string>",
"rootMandateId": "<string>",
"gasPolicyId": "<string>",
"agent": "<string>",
"depth": 123,
"status": "pending",
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>",
"validFrom": 140737488355328,
"expiresAt": 140737488355328,
"creationTransactionHash": "<string>",
"sponsored": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Default Response
Pattern:
^0x[0-9a-fA-F]{64}$Pattern:
^0x[0-9a-fA-F]{64}$Pattern:
^0x[0-9a-fA-F]{64}$Pattern:
^0x[0-9a-fA-F]{64}$Pattern:
^0x[0-9a-fA-F]{40}$status
Option 1 · enum<string>Option 2 · enum<string>Option 3 · enum<string>Option 4 · enum<string>Option 5 · enum<string>Option 6 · enum<string>Option 7 · enum<string>
required
Available options:
pending Pattern:
^0x[0-9a-fA-F]{40}$Pattern:
^(0|[1-9][0-9]{0,77})$Pattern:
^(0|[1-9][0-9]{0,77})$Required range:
1 <= x <= 281474976710655Required range:
1 <= x <= 281474976710655Pattern:
^0x[0-9a-fA-F]{64}$