Reject an action
curl --request POST \
--url https://api.anchorage-staging.com/v4/endorsements/actions/{actionId}/reject \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"keyId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"payloadHash": "<string>",
"signature": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v4/endorsements/actions/{actionId}/reject"
payload = {
"keyId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"payloadHash": "<string>",
"signature": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
keyId: '3486b413-93d3-4447-afce-2b9c9dc34a32',
payloadHash: '<string>',
signature: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v4/endorsements/actions/{actionId}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"resourceType": "ACCOUNT",
"resourceId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"subjectId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"actionType": "WITHDRAWAL",
"status": "PENDING",
"receivedEndorsements": [
{
"keyId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"approvalGroupId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"endorsedAt": "2019-01-02T12:34:56.000Z"
}
],
"submittedAt": "2019-01-02T12:34:56.000Z",
"expiresAt": "2019-01-02T12:34:56.000Z"
}
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Reject an action
Sign the canonical payload to reject the action. A single rejection moves the whole action’s
status to REJECTED — it doesn’t matter how many endorsements were already collected, or
whether more were still outstanding. Endorsements already recorded are not undone, they simply
stop mattering once the action is rejected.
As with /endorse, a rejection that arrives after the action has already resolved is a no-op: it
is not recorded, and the response carries the action as it stands.
POST
/
endorsements
/
actions
/
{actionId}
/
reject
Reject an action
curl --request POST \
--url https://api.anchorage-staging.com/v4/endorsements/actions/{actionId}/reject \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"keyId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"payloadHash": "<string>",
"signature": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v4/endorsements/actions/{actionId}/reject"
payload = {
"keyId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"payloadHash": "<string>",
"signature": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
keyId: '3486b413-93d3-4447-afce-2b9c9dc34a32',
payloadHash: '<string>',
signature: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v4/endorsements/actions/{actionId}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"resourceType": "ACCOUNT",
"resourceId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"subjectId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"actionType": "WITHDRAWAL",
"status": "PENDING",
"receivedEndorsements": [
{
"keyId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"approvalGroupId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"endorsedAt": "2019-01-02T12:34:56.000Z"
}
],
"submittedAt": "2019-01-02T12:34:56.000Z",
"expiresAt": "2019-01-02T12:34:56.000Z"
}
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Headers
Path Parameters
Body
application/json
Response
Rejection recorded, or the action returned unchanged if it had already resolved
Was this page helpful?