Note that only active branches are returned.

Please refer to the Branch Field Table for the meaning of each individual field.

LIST (GET /branches.xml)


Example: Listing of branches

Retrieve list of branches. If you have more than 50 branches, you can use the page and per_page parameter.

curl -u 4acc660ce98b9d38d7fea10705aa1ebd7d836fe0:X \ 
-H "Accept: application/xml" \
-H "Content-Type: application/xml" \ "https://test_account.imonggo.com/api/branches.xml"

Sample Result:

<?xml version="1.0" encoding="UTF-8"?>
<branches type="array">
<branch>
...
</branch>
<branch>
....
</branch>
...
</branches>

Sample result (if contents is empty):

<branches/>

Return Codes:

CODE/STATUS

CONDITION

200 OK

if successful

GET (GET /branch/{id}.xml)


Retrieve information on single branch. Replace {id} with the branch id.

Example:

curl -u 4acc660ce98b9d38d7fea10705aa1ebd7d836fe0:X \ 
-H "Accept: application/xml" \
-H "Content-Type: application/xml" \

"https://test_account.imonggo.com/api/branches/11.xml"

Sample result:
<?xml version="1.0" encoding="UTF-8"?>
<branch>
<city></city>
<country>US</country>
<id>9</id>
<name>Branch 2</name>
<site_type nil="true"></site_type>
<state>AL</state> <street></street>
<subscription_type>1</subscription_type>
<tin></tin>
<zipcode>1</zipcode>
<utc_created_at>2011-04-23T11:34:45Z</utc_created_at>
<utc_updated_at>2011-04-23T11:34:45Z</utc_updated_at>
</branch>

Return Codes:

CODE/STATUS

CONDITION

200 OK

if successful

404 Not Found

if no branch matches the id

Parameters for LIST (GET /branches.xml) ##


Page Filters

Page filters are used in LIST to limit the branches to be retrieved. You can combined page filter with date filters (before, after, from and to).

  • page: default of 1 (eg. page=1)

  • per_page: any number between 1 to 100 (e.g. per_page=10)

Date Filters

Date filtered are used in LIST command to filter the results using date. Given date format is in "YYYY-MM-DDTHH:MM:SSZ" specified in UTC time.

  • before: updated date < given date

  • after: updated date > given date

  • from: updated date >= give date

  • to: updated date <= give date

Inquiry

  • q=count - returns a number of branches

  • q=last_updated_at - returns the last updated date for your branch database

Did this answer your question?