Skip to content

MoveCreditsToClient

Move message credits from a master account to a client account

// uses JQuery library
var postUrl =
'https://secure.smsgateway.ca/services/account.svc/' +
masterAccountKey +
'/MoveCreditsToClient/' +
clientAccountKey;
var body = JSON.stringify({
NumberOfCredits: numberOfCredits,
});
$.ajax({
url: postUrl,
method: 'POST',
contentType: 'application/json;charset=UTF-8',
data: body,
})
.done(function (response) {
alert(response);
})
.error(function (xhr, textStatus, errorThrown) {
alert(xhr.responseText);
});

HTTP Request

POST:

/services/account.svc/:masterAccountKey/MoveCreditsToClient/:clientAccountKey
ParameterDescriptionLocation
masterAccountKeyYour Parent Swift SMS Gateway account key (Credits moved FROM this account)URL
clientAccountKeyYour Child Swift SMS Gateway account key (Credits moved TO this account)URL
NumberOfCredits The number of credits to move from the MASTER to the CLIENT accountBODY

Returns

integer – The number of credits moved to the client account. Zero if there was an issue moving credits.