Set User to support an Organisation
PUT/v1/users/:id/organisation
For Donations created through the Create A Donation API, A User can be set to donate to a particular Organisation by default using this API. If a Donation is made with a userId, the Donation will be associated with the Organisation the User is supporting at the time of Donation. If the userId is omitted or the User has not been set to donate to an Organisation by default then the organisationId must be included in the body.
Request
Path Parameters
id stringrequired
Id of the User.
- application/json
Body
organisationId stringrequired
Organisation id to support.
Responses
- 200
- 400
- 401
Successfully set User to support an Organisation
- application/json
- Schema
- Example (from schema)
Schema
data object
userId string
organisationId string
timestamp date-time
object string
{
"data": {
"userId": "string",
"organisationId": "string",
"timestamp": "2020-10-13T17:46:54.000Z"
},
"object": "UserOrganisation"
}
Bad request
- application/json
- Schema
- Example (from schema)
- BadRequest
- IncorrectParams
Schema
error object
code string
title string
message string
reasons string[]nullable
{
"error": {
"code": "string",
"title": "string",
"message": "string",
"reasons": [
"string"
]
}
}
400 Bad Request
{
"error": {
"code": "bad_request",
"title": "Bad request",
"message": "Something is wrong with your request, please check any parameters and try again"
}
}
400 Incorrect Parameters
{
"error": {
"code": "bad_request",
"title": "Bad request",
"message": "One or more of the inputs were invalid",
"reasons": [
"pageSize must be greater than or equal to 0"
]
}
}
Unauthorized
Loading...