Add member to a group

This PUT operation adds as well as updates a member of a group by passing first the group’s ID then the memberId into the URL along with a JSON payload defining how much of the data quota of the group is to be shared with the member. If successful, you receive an HTTP response code of 201 and a JSON response outlining the information passed in the JSON request payload.

The percentage of quota shared is expressed as an integer between 0 and 10000000. So for example, 5% is 5/100 * 10000000 which equals 500000 which would be what you specify in the payload. When sharing with a group, the specified shared quota is the amount given to each member in the group. So, if you specify 10% of 1GB (100MB), each member gets this amount.
See HTTP response codes for other response codes.

PUT /sqs/api/groups/<id>/members/<memberId> + JSON request payload


HEADER INFO

authorisation: HTTP Basic Auth

tenant: <tenantName>

content-type: application/JSON

accept: application/JSON

permissions: SQS_GROUP_CREATE_UPDATE_PERMISSION

URL parameters

Parameter Description

id

The auto-assigned identifier that was given to the group upon creation.

memberId

A unique identifier for the member.

JSON request payload

You must pass the memberId in the JSON payload as well as the URL plus the quota.

{
   "memberId":"678678",
   "quota":123456
}

SQS members data type descriptions

Field Type Description

memberId

string

The unique ID for the member. This is typically the MSISDN of the subscriber.

The subscriber’s MSISDN in international format.

quota

integer

The quota amount shared with the specified group member. This can be an exact amount or most often, a percentage of the donor plan.

Quota can be volume of data, time, or credit. This is all determined by the unitMeteringType in the donor plan definition.


JSON response

The JSON response includes the information passed in the JSON payload as confirmation.

{
   "memberId":"678678",
   "quota":123456
}

HTTP response codes

Code Description

201/204

success!

If you receive a 204 code, you will not see a JSON response.

207

Multistatus response

Check out HTTP statuses for more details.
This is not applicable to all operations.

400

malformed request

401

unauthorised; bad username or password

403

forbidden; user does not have appropriate privileges

404

group member not found

409

conflict with target resource

This often occurs if the item already exists, such as a plan, group, or name.
This is not applicable to all operations.

412

failed validation; this typically means that a property was not set or a value is out of range.

example
HTTP 412
{
  "errors" : [
        {
          "field" : "name",
          "description" : "name is mandatory"
        }
    ]
}

422

failed processing (after passing validation).

example
HTTP 422
{
    "message": "Subscriber max plan count exceeded",
    "errorCode": 1
}
Example 1. SQS response codes
  • 0 = no error

  • 1 = undefined general error

  • 2 = group owner/name pair is not unique

  • 3 = group owner cannot be a member

  • 4 = total member quota exceeds 100%

  • 5 = group does not exist

  • 6 = maximum group size exceeded

  • 7 = the donor does not exist

  • 8 = the shareable plan does not exist

  • 9 = the shareable plan is not a recurring plan

  • 10 = charging group owner unsupported

  • 11 = the recurring donation for this plan already exists

  • 12 = the recipient does not exist

  • 13 = the donor plan max recipient limit was exceeded

  • 14 = subscriber not found

500

internal error

503

request rejected due to overload