Turn down a gift offered to the authenticated user, so it stops appearing in their account state. Deliberately appview-side only: nothing is written to the recipient's repository and the giver is never told, because a gift is an unsolicited message and being able to refuse one must not expose the refusal. The book never left the giver's hands, so refusing only hides the offer — there is nothing to hand back.
Input
application/jsongift
stringat-uri
Required
The org.passingreads.book.event carrying the #gift being turned down. It must name the authenticated user as its recipient.
Output
application/jsonrejectedAt
stringdatetime
Required
An RFC 3339 formatted timestamp.
Errors
GiftNotFound
No indexed gift at that URI names the authenticated user as its recipient. Also the answer when a gift exists but was offered to somebody else, so the endpoint can't be used to probe for gifts. ProfileNotFound
The authenticated DID has no PassingReads profile indexed by the appview. Try It
Requests are sent directly from your browser. Some servers may block requests due to CORS.
View raw schema
{
"description": "Turn down a gift offered to the authenticated user, so it stops appearing in their account state. Deliberately appview-side only: nothing is written to the recipient's repository and the giver is never told, because a gift is an unsolicited message and being able to refuse one must not expose the refusal. The book never left the giver's hands, so refusing only hides the offer — there is nothing to hand back.",
"errors": [
{
"description": "No indexed gift at that URI names the authenticated user as its recipient. Also the answer when a gift exists but was offered to somebody else, so the endpoint can't be used to probe for gifts.",
"name": "GiftNotFound"
},
{
"description": "The authenticated DID has no PassingReads profile indexed by the appview.",
"name": "ProfileNotFound"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"gift": {
"description": "The org.passingreads.book.event carrying the #gift being turned down. It must name the authenticated user as its recipient.",
"format": "at-uri",
"type": "string"
}
},
"required": [
"gift"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"rejectedAt": {
"format": "datetime",
"type": "string"
}
},
"required": [
"rejectedAt"
],
"type": "object"
}
},
"type": "procedure"
}