Share quota with a group
This POST
operation shares plan quota from a donor plan with a group specified in the payload. You must first have created a group and added members in order to share with the group as this operation is simply executing the sharing and not allocating the quota. If successful, you receive an HTTP response code of 200
and a JSON
containing those recipients who received the shared quota.
See HTTP response codes for other response codes. |
POST /sqs/api/donations
+ JSON request payload
HEADER INFO
authorisation: HTTP Basic Auth
tenant: <tenantName>
content-type: application/JSON
accept: application/JSON
permissions: SQS_DONATION_PERMISSION
JSON request payload
This example shares quota from the donorPlanId
456
with the group By5li9cbFR53VLv6fh6z
.
See SQS donations data type descriptions for more details on data types. |
{
"donorPlanId" : 456,
"groupId" : "By5li9cbFR53VLv6fh6z"
}
SQS donations data type descriptions
Field | Type | Description | ||
---|---|---|---|---|
|
string |
The auto-assigned ID given to a donation upon creation. |
||
|
string |
The MSISDN of the donor subscriber.
|
||
|
integer |
The ID of the donor’s shareable plan. |
||
|
string |
Specifies the quota type. This is
|
||
|
array |
An array that lists recipients of the donation. Recipients will have a |
||
|
string |
The unique ID for the recipient. This is typically the MSISDN.
|
||
|
integer |
The quota being shared with the recipient. |
||
|
string |
The unique ID of the group. Group IDs are auto-assigned upon creation. |
JSON response
The JSON response lists the recipients who received that data with no errors in processing.
If there are any errors in processing, you get an HTTP response code of 207 (if any of the recipient return an error).
|
{
"errorCode" : 0,
"recipients" : [
{
"errorCode" : 0,
"recipientId" : "67867867"
},
{
"errorCode" : 0,
"recipientId" : "456546"
}
]
}
HTTP response codes
Code | Description | ||||
---|---|---|---|---|---|
|
success! |
||||
|
Multistatus response
|
||||
|
malformed request |
||||
|
unauthorised; bad username or password |
||||
|
forbidden; user does not have appropriate privileges |
||||
|
donor plan ID 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 |