Planfix API contact.getGroupList: Difference between revisions
From Planfix
								
												
				|  (Created page with "The request to get the list of contact groups looks like this: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="contact.getGroupList">     <account></account>     <sid></sid>     <signature></signature> </request> </source> {| class="wikitable" style="margin-top: 1em; width:100% " !width="150"|Name !!width="200"| Type !!width="50%"| Value !! Note |- |account|| string ||  the account on which the request is made с ||  |- |sid || string(32) ||se...") |  (→Go To) | ||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 13: | Line 13: | ||
| |account|| string ||  the account on which the request is made с ||   | |account|| string ||  the account on which the request is made с ||   | ||
| |- | |- | ||
| |sid || string(32) ||session key || issued as a result of  | |sid || string(32) ||session key || issued as a result of [[Planfix API: Authentication|authentication]] | ||
| |- | |- | ||
| |signature|| string(32) || packet signature || | |signature|| string(32) || packet signature || | ||
| Line 37: | Line 37: | ||
| </source> | </source> | ||
| {| class="wikitable" style="margin-top: 1em; width:100% " | {| class="wikitable" style="margin-top: 1em; width:100% " | ||
| !width="150"| | !width="150"|Name !!width="200"| Type !!width="50%"| Value !! Note | ||
| |- | |- | ||
| |'''contactGroups''' ||int ||list of groups || | |'''contactGroups''' ||int ||list of groups || | ||
| |- | |- | ||
| |'''contactGroups''' count ||int || number of groups in the list || | |'''contactGroups'''  count ||int || number of groups in the list || | ||
| |- | |- | ||
| |'''contactGroups''' totalCount ||int ||total number of groups in the list || | |'''contactGroups''' totalCount ||int ||total number of groups in the list || | ||
| Line 64: | Line 64: | ||
| == Go To == | == Go To == | ||
| *[[Planfix API:Contacts]] | *[[Planfix API:Contacts]] | ||
| *[[Error codes]] | *[[Error codes XML API v1|Error codes]] | ||
| *[[List of functions]] | *[[List of functions]] | ||
Latest revision as of 09:24, 6 March 2024
The request to get the list of contact groups looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<request method="contact.getGroupList">
    <account></account>
    <sid></sid>
    <signature></signature>
</request>| Name | Type | Value | Note | 
|---|---|---|---|
| account | string | the account on which the request is made с | |
| sid | string(32) | session key | issued as a result of authentication | 
| signature | string(32) | packet signature | 
Response when the request is successfully executed:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
    <contactGroups count="count" totalCount="totalCount">
        <group>
            <id></id>
            <name></name>
        </group>
        <group>
            <id></id>
            <name></name>
        </group>
        <!-- ... -->
    </contactGroups >
</response>| Name | Type | Value | Note | 
|---|---|---|---|
| contactGroups | int | list of groups | |
| contactGroups count | int | number of groups in the list | |
| contactGroups totalCount | int | total number of groups in the list | |
| group | group | ||
| group.id | int | group identifier | |
| group.name | string | group name | 
Otherwise, a response with an error will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>