POST api/v1/admin/accounts/{id}/transfers

This api allows you to give/take credits from/to sub account. For example, transaction from master account to account 3 levels below is not allowed (Has to be 1 level below). You can perform multiple transactions using one api call.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Account ID of the master account

globally unique identifier

Required

Body Parameters

Sub accounts and how many credits are being transferred/taken

Collection of SubAccountCreditsTransferRequest
NameDescriptionTypeAdditional information
Username

Username (email address) of the sub account

string

None.

AnyTimeBalance

Current blanace of the sub account

decimal number

None.

OffPeakBalance

Off Peak Balance of the sub account

decimal number

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "Username": "sample string 1",
    "AnyTimeBalance": 2.1,
    "OffPeakBalance": 3.1
  },
  {
    "Username": "sample string 1",
    "AnyTimeBalance": 2.1,
    "OffPeakBalance": 3.1
  }
]

application/xml, text/xml

Sample:
<ArrayOfSubAccountCreditsTransferRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SubAccountCreditsTransferRequest>
    <Username>sample string 1</Username>
    <AnyTimeBalance>2.1</AnyTimeBalance>
    <OffPeakBalance>3.1</OffPeakBalance>
  </SubAccountCreditsTransferRequest>
  <SubAccountCreditsTransferRequest>
    <Username>sample string 1</Username>
    <AnyTimeBalance>2.1</AnyTimeBalance>
    <OffPeakBalance>3.1</OffPeakBalance>
  </SubAccountCreditsTransferRequest>
</ArrayOfSubAccountCreditsTransferRequest>

Response Information

Resource Description

ResponseOfSubAccountCreditsTransferResponse
NameDescriptionTypeAdditional information
Error

Error

None.

ResponseData

ResponseDataOfSubAccountCreditsTransferResponse

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {
      "CurrentBalance": 1.1,
      "OffPeakBalance": 2.1
    }
  }
}

application/xml, text/xml

Sample:
<ResponseOfSubAccountCreditsTransferResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail>
      <CurrentBalance>1.1</CurrentBalance>
      <OffPeakBalance>2.1</OffPeakBalance>
    </Detail>
  </ResponseData>
</ResponseOfSubAccountCreditsTransferResponse>