Back to top
 
 
 

Sample Responses

BSS API supports two formats as the response to an API call. The default response is JSON. To request a specific format, the API call can be appended with a suffix, currently only .json and .xml which will return JSON and XML respectively.

Customization of date format is also supported and this can be done by setting the date format from the Administration > Configuration > Portal > Server page.

Sample JSON response:

Request URL:

http://10.102.153.50:8080/portal/api/accounts?expand=owner&q=retail&page=1&pagesize=5&sort=name&order=asc&_=<timestamp>&apiKey=<apikey>&signature=<generatedSignatureUsingSecretKey> or http://10.102.153. 50:8080/portal/api/accounts.json?expand=owner&q=retail&page=1&pagesize=5&sort=name&order=asc&_=<timestamp>&apiKey=<apikey>&signature=<generatedSignatureUsingSecretKey>

Response:

{     "accounts":[        {           "uuid":"6477e245-db16-4863-9b2f-aef2cb984d21",           "name":"abhai@retail",           "accountId":"AA000011",           "state":"ACTIVE",           "sourceChannel":{              "uuid":"0ed2ca51-2421-4df7-971e-70d7a2d3321d",              "name":"channel",              "code":"channel",              "description":"channel"           },           "accountType":{              "name":"RETAIL",              "displayName":"Retail",              "description":"Retail customer type. Credit card will be charged automatically when payments are due."           },           "spendLimit":1000,           "initialDeposit":0,           "spendBudget":0,           "owner":{              "firstName":"Abhai",              "email":"k.abhai@citrix.com",              "lastName":"Kumar",              "phone":"91-9379682039",              "username":"abhai@retail",              "uuid":"3651d8ba-ffdd-46ec-88ae-22b70ff0c204",              "address":{                 "city":"sbc",                 "country":"IN",                 "postalCode":"560075",                 "state":"KAR"              },              "apiKey":"XUyCQVb7S_WOGsDiEBG1wqNKyCqJmk6e97ZnOycU8-8HEaJjqqztEdZOpXF2cb1EOzZ-Vr1423iNajNJYV2gXA",              "countryCode":"91",              "gravatarUrl":null,              "profile":{                 "name":"Master User",                 "description":"Master user"              },              "enabled":true,              "secretKey":"3FRXeqBtzu61aoGEVDPxyK4T1MXAE8dwJxb8TwX7qld8BccrKgfwlqFOTFy9iLTyM-ZTDntXtDHaeNr8t6uO0w",              "spendBudget":0,              "title":null,              "timeZone":"GMT"           },           "address":{              "city":"sbc",              "country":"IN",              "postalCode":"560075",              "state":"KAR"           },           "secondaryAddress":null,           "currency":{              "currencyCode":"USD",              "currencyName":"US Dollar"           },           "memo":null,           "trialAccount":null,           "tenantExtraInformation":{              "anniversaryDate":"24 Apr 2013 12:00:00 UTC",              "nextInvoiceDate":null,              "discountPercent":"0.0000"           },           "deposit":null,           "remoteAddress":"10.252.240.188",           "removed":null,           "removedBy":null,           "imagePath":null,           "faviconPath":null,           "usernameSuffix":null,           "users":[              {                 "firstName":"Abhai",                 "lastName":"Kumar",                 "username":"abhai@retail",                 "uuid":"3651d8ba-ffdd-46ec-88ae-22b70ff0c204"              },              {                 "firstName":"Normal",                 "lastName":"Kumar",                 "username":"retail@normal",                 "uuid":"a2856513-b3bd-4034-b9a2-5bc4fe74164d"              },              {                 "firstName":"Power",                 "lastName":"Kumar",                 "username":"retail@power",                 "uuid":"48f123c4-4ece-425f-a320-73f212262fca"              },              {                 "firstName":"Billing",                 "lastName":"Kumar",                 "username":"retail@billing",                 "uuid":"b4c0a44e-3060-4e5c-b290-3ea37329ae3a"              }           ]        },        { "accountId":"AA000001",           "state":"ACTIVE",           "sourceChannel":{              "uuid":"0ed2ca51-2421-4df7-971e-70d7a2d3321d",              "name":"channel",              "code":"channel",              "description":"channel"           },           "accountType":{              "name":"RETAIL",              "displayName":"Retail",              "description":"Retail customer type. Credit card will be charged automatically when payments are due."           },           "spendLimit":1000,           "initialDeposit":0,           "spendBudget":0,           "owner":{              "firstName":"Retail",              "email":"d.aditya@citrix.com",              "lastName":"Account",              "phone":"91-9886319282",              "username":"Retail",              "uuid":"0f1a4222-7d96-4d7e-946a-6cfb05e57200",              "address":{                 "city":"Bangalore",                 "country":"IN",                 "postalCode":"560001",                 "state":"KAR"              },              "apiKey":"retailapi123",              "countryCode":"91",              "gravatarUrl":null,              "profile":{                 "name":"Master User",                 "description":"Master user"              },              "enabled":true,              "secretKey":"retailsecret123",              "spendBudget":0,              "title":null,              "timeZone":"GMT"           },           "address":{              "city":"Bangalore",              "country":"IN",              "postalCode":"560001",              "state":"KAR"           },           "secondaryAddress":null,           "currency":{              "currencyCode":"USD",              "currencyName":"US Dollar"           },           "memo":null,           "trialAccount":null,           "tenantExtraInformation":{              "anniversaryDate":"17 Apr 2013 12:00:00 UTC",              "nextInvoiceDate":null,              "discountPercent":"0.0000"           },           "deposit":null,           "remoteAddress":"10.252.249.72",           "removed":null,           "removedBy":null,           "imagePath":null,           "faviconPath":null,           "usernameSuffix":null,           "users":[              {                 "firstName":"Retail",                 "lastName":"Account",                 "username":"Retail",                 "uuid":"0f1a4222-7d96-4d7e-946a-6cfb05e57200"              }           ]        },{"..."},{"..."},{"..."},         ]  }  

Sample XML response:

Request URL:

http://10.102.153.50:8080/portal/api/accounts.xml?expand=owner&q=retail&page=1&pagesize=5&sort=name&order=asc&_=<timestamp>&apiKey=<apikey>&signature=<generatedSignatureUsingSecretKey>

Response:

<?xml version="1.0"?>  -<root>  -<accounts>  -<account>  <uuid>6477e245-db16-4863-9b2f-aef2cb984d21</uuid>  <name>abhai@retail</name>  <accountId>AA000011</accountId>  <state>ACTIVE</state>  -<sourceChannel>  <uuid>0ed2ca51-2421-4df7-971e-70d7a2d3321d</uuid>  <name>channel</name>  <code>channel</code>  <description>channel</description>  </sourceChannel>  -<accountType>  <name>RETAIL</name>  <displayName>Retail</displayName>  <description>Retail customer type. Credit card will be charged  automatically when payments are due.</description>  </accountType>  <spendLimit>1000.0000</spendLimit>  <initialDeposit>0.0000</initialDeposit>  <spendBudget>0.0000</spendBudget>  -<owner>  <firstName>Abhai</firstName>  <email/>  <lastName>Kumar</lastName>  <phone>91-9379682039</phone>  <username>abhai@retail</username>  <uuid>3651d8ba-ffdd-46ec-88ae-22b70ff0c204</uuid>  -<address>  <city>sbc</city>  <country>IN</country>  <postalCode>560075</postalCode>  <state>KAR</state>  </address>  <apiKey>XUyCQVb7S_WOGsDiEBG1wqNKyCqJmk6e97ZnOycU8-  8HEaJjqqztEdZOpXF2cb1EOzZ-  Vr1423iNajNJYV2gXA</apiKey>  <countryCode/>  <gravatarUrl/>  -<profile>  <name>Master User</name>  <description>Master user</description>  </profile>  <enabled>true</enabled>  <secretKey>3FRXeqBtzu61aoGEVDPxyK4T1MXAE8dwJxb8TwX7ql  d8BccrKgfwlqFOTFy9iLTyM-ZTDntXtDHaeNr8t6uO0w</secretKey>  <spendBudget>0.0000</spendBudget>  <title/>  <timeZone>GMT</timeZone>  </owner>  -<address>  <city>sbc</city>  <country>IN</country>  <postalCode>560075</postalCode>  <state>KAR</state>  </address>  <secondaryAddress/>  -<currency>  <currencyCode>USD</currencyCode>  <currencyName>US Dollar</currencyName>  </currency>  <memo/>  <trialAccount/>  -<tenantExtraInformation>  <anniversaryDate>24 Apr 2013 12:00:00 UTC</anniversaryDate>  <nextInvoiceDate/>  <discountPercent>0.0000</discountPercent>  </tenantExtraInformation>  <deposit/>  <remoteAddress>10.252.240.188</remoteAddress>  <removed/>  <removedBy/>  <imagePath/>  <faviconPath/>  <usernameSuffix/>  -<users>  -<user>  <firstName>Abhai</firstName>  <lastName>Kumar</lastName>  <username>abhai@retail</username>  <uuid>3651d8ba-ffdd-46ec-88ae-22b70ff0c204</uuid>  </user>  -<user>  <firstName>Normal</firstName>  <lastName>Kumar</lastName>  <username>retail@normal</username>  <uuid>a2856513-b3bd-4034-b9a2-bc4fe74164d</uuid>  </user>  -<user>  <firstName>Power</firstName>  <lastName>Kumar</lastName>  <username>retail@power</username>  <uuid>48f123c4-4ece-425f-a320-73f212262fca</uuid>  </user>  -<user>  <firstName>Billing</firstName>  <lastName>Kumar</lastName>  <username>retail@billing</username>  <uuid>b4c0a44e-3060-4e5c-b290-3ea37329ae3a</uuid>  </user>  </users>  </account>  +<account>  +<account>  +<account>  </accounts>  </root>  
 

Comments