Create a recurring donation
This POST
operation creates a recurring donation by passing the donorPlanId and groupId in a JSON
payload. If successful, you receive an HTTP response code of 201
and a JSON
response outlining the information passed in the JSON request payload along with an auto-created id
.
This operation configures a donation to be executed upon plan renewal, but does not actually donate anything at the time of the request. |
Only 1 recurring donation is allowed per donor plan and donor id. The donorId is set to the group owner automatically.
|
See HTTP response codes for other response codes. |
POST /sqs/api/recurringDonations
+ JSON payload
HEADER INFO
authorisation: HTTP Basic Auth
tenant: <tenantName>
content-type: application/JSON
accept: application/JSON
permissions: SQS_RECURRING_DONATION_CREATE_UPDATE_PERMISSION
JSON request payload
You pass the donorPlanId
and groupId
in the JSON
payload.
The owner ID|name pair must be unique as an owner cannot have two groups with the same name. |
{
"donorPlanId" : 123,
"groupId" : "ASDS"
}
JSON response
The JSON
response includes the information passed in the JSON payload with an auto-assigned id
.
See recurring donation data type descriptions for more details on the fields in the JSON request and response. |
{
"id" : "E5B412",
"donorPlanId" : 123,
"groupId" : "ASDS",
"donorId" : "4564563",
"planName" : "SharePlan",
"created": "2019-08-07T15:01:58.000+0000",
"updated": "2019-08-07T15:01:58.000+0000"
}
SQS recurring donations data type descriptions
Field | Type | Description | ||
---|---|---|---|---|
|
string |
The auto-assigned ID given to the recurring donation upon creation. |
||
|
string |
The MSISDN of the donor subscriber.
|
||
|
integer |
The ID of the donor’s shareable plan. |
||
|
string |
The unique ID of the group. Group IDs are auto-assigned upon creation. |
||
|
string |
The date and time at which the group was created.
|
||
|
string |
The date and time at which the group was updated.
|
HTTP response codes
Code | Description | ||||
---|---|---|---|---|---|
|
success!
|
||||
|
Multistatus response
|
||||
|
malformed request |
||||
|
unauthorised; bad username or password |
||||
|
forbidden; user does not have appropriate privileges |
||||
|
recurring donation not found |
||||
|
conflict with target resource
|
||||
|
failed validation; this typically means that a property was not set or a value is out of range. example
|
||||
|
failed processing (after passing validation). example
Example 1. SQS response codes
|
||||
|
internal error |
||||
|
request rejected due to overload |