Message-ID: <1001140906.15759.1614958018833.JavaMail.confluence@wiki> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_15758_840994660.1614958018833" ------=_Part_15758_840994660.1614958018833 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Transfer credits from the source/master account to the target/sub accoun= t.
The following POST parameters should be used in a POST request.
You can use either:
Parameter | Value |
---|---|
quantity | The number of credits to transfer from the so= urce account to the target account. Must be a positive integer. |
ta= rget | Th= e account number of the account to transfer the credits to. |
username | The username of the source/master account, fo= r authentication. Not required if you use HTTP Basic Authentication instead= . |
password | The password of the source/master account, fo= r authentication. Not required if you use HTTP Basic Authentication instead= . |
Your account number can be found in the web interface
https://messagebox.textmarketer.co.uk
On page footer.
OR you can use (diference highlighted in grey/blue):
Parameter | Value |
---|---|
quantity | The number of credits to transfer from the so= urce account to the target account. Must be a positive integer. |
target_username | The username of the account to transfer the cre= dits to. |
target_password | The password of the account to transfer the cre= dits to. |
username | The username of the source/master account, fo= r authentication. Not required if you use HTTP Basic Authentication instead= . |
password | The password of the source/master account, fo= r authentication. Not required if you use HTTP Basic Authentication instead= . |
Example successful response body XML:
<?xml version=3D"1.0" encoding=3D"ISO-8859-1"?&= gt; <!DOCTYPE response PUBLIC "-//textmarketer.co.uk//DTD Web Services REST 1.6//EN" "http://api.textmarketer.co.uk/services/rest/DTD/credits_post.dtd"= ;> <response processed_date=3D"2011-04-14T11:16:06+01:00"> <source_credits_before>442</source_credits_before> <source_credits_after>441</source_credits_after> <target_credits_before>121</target_credits_before> <target_credits_after>122</target_credits_after> </response>=20
Response meanings:
XML tag/attribute | Meaning |
---|---|
source_credits_before | The number of credits on the source account b= efore the transfer was made. |
source_credits_after | The number of credits on the source account a= fter the transfer was made. |
target_credits_before | The number of credits on the target account b= efore the transfer was made. |
target_credits_after | The number of credits on the target account a= fter the transfer was made. |
Specific errors:
Code | Meaning |
---|---|
0 | There are insufcient credits available to tra= nsfer the specified quantity, or the specified quantity is not a positive n= umber |
1 | The target account number specified is not a = valid number or username/password combination does not refer to any known a= ccount |
Example error response body XML:
<?xml version=3D"1.0" encoding=3D"ISO-8859-1"?&= gt; <!DOCTYPE response PUBLIC "-//textmarketer.co.uk//DTD Web Services REST 1.6//EN" "http://api.textmarketer.co.uk/services/rest/DTD/errors.dtd"> <response processed_date=3D"2011-04-14T11:33:56+01:00"> <errors> =09<error code=3D"0">Invalid number of credits specified: -= 1</error> =09<error code=3D"1">Invalid destination account number<= /error> </errors> </response>=20
DTD for credits POST:
<?xml version=3D"1.0" encoding=3D"UTF-8"?> <!-- =09PUBLIC ID : -//textmarketer.co.uk//DTD Web Services REST 1.6//EN =09SYSTEM ID : http://api.textmarketer.co.uk/services/rest/DTD/credits_pos= t.dtd --> <!ELEMENT response (source_credits_before, source_credits_after,=20 target_credits_before, target_credits_after)> <!ATTLIST response =09 processed_date CDATA #REQUIRED > <!ELEMENT source_credits_before (#PCDATA)> <!ELEMENT source_credits_after (#PCDATA)> <!ELEMENT target_credits_before (#PCDATA)> <!ELEMENT target_credits_after (#PCDATA)>=20