> For the complete documentation index, see [llms.txt](https://developers-v3.zortout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-v3.zortout.com/api-reference/contact.md).

# Contact

## Get Contacts

<mark style="color:blue;">`GET`</mark> `https://api.zortout.com/api.aspx`

Get list of contacts.

#### Query Parameters

| Name                                      | Type   | Description                             |
| ----------------------------------------- | ------ | --------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | “GETCONTACTS”                           |
| version<mark style="color:red;">\*</mark> | String | 3                                       |
| keyword                                   | String | Keyword to search at least 3 characters |
| page                                      | Int    | Page (Default = 1)                      |
| limit                                     | Int    | Limit per page (Max = 2000)             |
| format                                    | String | json (Default), xml                     |

#### Headers

| Name                                        | Type   | Description                              |
| ------------------------------------------- | ------ | ---------------------------------------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name                               |
| apikey<mark style="color:red;">\*</mark>    | String | API Key                                  |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret                               |
| contactidlist                               | String | <p>Contact ID List <br>Ex. 1234,5678</p> |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

| Property (Array) | Type   | Description/Example |
| ---------------- | ------ | ------------------- |
| id               | Int    | Property ID         |
| name             | String | Property Name       |
| value            | String | Property Value      |

<table><thead><tr><th width="162.102472199407">Contact (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Contact ID</td></tr><tr><td>name</td><td>String</td><td>Contact Name</td></tr><tr><td>code</td><td>String</td><td>Contact Code</td></tr><tr><td>idnumber</td><td>String</td><td>Contact ID Number/Tax ID</td></tr><tr><td>phone</td><td>String</td><td>Contact Phone</td></tr><tr><td>email</td><td>String</td><td>Contact Email</td></tr><tr><td>address</td><td>String</td><td>Contact Address</td></tr><tr><td>branchname</td><td>String</td><td>Branch Name</td></tr><tr><td>branchno</td><td>String</td><td>Branch No</td></tr><tr><td>facebook</td><td>String</td><td>Facebook</td></tr><tr><td>line</td><td>String</td><td>LINE</td></tr><tr><td>instagram</td><td>String</td><td>Instagram</td></tr><tr><td>imagepath</td><td>String</td><td>Image Url</td></tr><tr><td>tag</td><td>String (Array)</td><td>Tag List (Array)</td></tr><tr><td>properties</td><td>Property (Array)</td><td>Custom Properties List</td></tr></tbody></table>

<table><thead><tr><th width="183.0455190308588">Parameter</th><th width="157.5770517201441">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>res</td><td>Response</td><td>Response Code <br>200- Success</td></tr><tr><td>list</td><td>Contact (Array)</td><td>Contact List (Array)</td></tr><tr><td>count</td><td>Int</td><td>Total contact number by filter</td></tr></tbody></table>

## Get Contact Detail

<mark style="color:blue;">`GET`</mark> `https://api.zortout.com/api.aspx`

Get contact detail

#### Query Parameters

| Name                                      | Type   | Description         |
| ----------------------------------------- | ------ | ------------------- |
| method<mark style="color:red;">\*</mark>  | String | “GETCONTACTDETAIL”  |
| version<mark style="color:red;">\*</mark> | String | 3                   |
| id<mark style="color:red;">\*</mark>      | Int    | Contact ID          |
| format                                    | String | json (Default), xml |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

| Property (Array) | Type   | Description/Example |
| ---------------- | ------ | ------------------- |
| id               | Int    | Property ID         |
| name             | String | Property Name       |
| value            | String | Property Value      |

<table><thead><tr><th>ShippingAddress (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>Shipping Name</td></tr><tr><td>address</td><td>String</td><td>Shipping Address</td></tr><tr><td>phone</td><td>String</td><td>Shipping Phone</td></tr><tr><td>email</td><td>String</td><td>Shipping Email</td></tr><tr><td>isMain</td><td>Boolean</td><td>Main Status</td></tr></tbody></table>

<table><thead><tr><th width="202.16370106761565">SubContact (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>Subcontact Name</td></tr><tr><td>position</td><td>String</td><td>Subcontact Position</td></tr><tr><td>phone</td><td>String</td><td>Subcontact Phone</td></tr><tr><td>mobile</td><td>String</td><td>Subcontact Mobile</td></tr><tr><td>email</td><td>String</td><td>Subcontact Email</td></tr><tr><td>isMain</td><td>Boolean</td><td>Main Status</td></tr></tbody></table>

<table><thead><tr><th width="150">Parameter</th><th>Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Contact ID</td></tr><tr><td>name</td><td>String</td><td>Contact Name</td></tr><tr><td>code</td><td>String</td><td>Contact Code</td></tr><tr><td>idnumber</td><td>String</td><td>Contact ID Number/Tax ID</td></tr><tr><td>phone</td><td>String</td><td>Contact Phone</td></tr><tr><td>email</td><td>String</td><td>Contact Email</td></tr><tr><td>address</td><td>String</td><td>Contact Address</td></tr><tr><td>branchname</td><td>String</td><td>Branch Name</td></tr><tr><td>branchno</td><td>String</td><td>Branch No</td></tr><tr><td>facebook</td><td>String</td><td>Facebook</td></tr><tr><td>line</td><td>String</td><td>LINE</td></tr><tr><td>instagram</td><td>String</td><td>Instagram</td></tr><tr><td>imagepath</td><td>String</td><td>Image Url</td></tr><tr><td>subContactList</td><td>SubContact (Array)</td><td>Subcontact List (Array)</td></tr><tr><td>shippingList</td><td>ShippingAddress (Array)</td><td>Shipping Address List (Array)</td></tr><tr><td>tag</td><td>String (Array)</td><td>Tag List (Array)</td></tr><tr><td>properties</td><td>Property (Array)</td><td>Custom Properties List</td></tr></tbody></table>

## Add Contact

<mark style="color:green;">`POST`</mark> `https://api.zortout.com/api.aspx`

Add contact.

#### Query Parameters

| Name                                      | Type   | Description         |
| ----------------------------------------- | ------ | ------------------- |
| method<mark style="color:red;">\*</mark>  | String | “ADDCONTACT”        |
| format                                    | String | json (Default), xml |
| version<mark style="color:red;">\*</mark> | String | 3                   |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

#### Request Body

| Name                                   | Type             | Description                                                                        |
| -------------------------------------- | ---------------- | ---------------------------------------------------------------------------------- |
| code<mark style="color:red;">\*</mark> | String           | Contact Code                                                                       |
| name<mark style="color:red;">\*</mark> | String           | Contact Name                                                                       |
| idnumber                               | String           | Contact ID Number/Tax ID                                                           |
| phone                                  | String           | Contact Phone                                                                      |
| email                                  | String           | Contact Email                                                                      |
| address                                | String           | Contact Address                                                                    |
| branchname                             | String           | Branch Name                                                                        |
| branchno                               | String           | Branch No                                                                          |
| facebook                               | String           | Facebook                                                                           |
| line                                   | String           | Line                                                                               |
| instagram                              | String           | Instagram                                                                          |
| ∟ value                                | String           | Property Value                                                                     |
| ∟ name                                 | String           | <p>Property Name Require if id = 0 or null</p><p>\*Must have either id or name</p> |
| ∟ id                                   | Int              | <p>Property ID</p><p>\*Must have either id or name</p>                             |
| properties                             | Property (Array) | Custom Properties List                                                             |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}

{% tab title="Ex. URL" %}
URL : <https://api.zortout.com/api.aspx?method=ADDCONTACT&version=3>
{% endtab %}

{% tab title="Ex. Request JSON" %}

```javascript
{
  "code": "C0001",
  "name": "Contact1",
  "idnumber": "123456789",
  "email": "testemail@zortout.com",
  "phone": "021234567"
}
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

<table><thead><tr><th width="245.48063250061637">Parameter</th><th width="153.33333333333331">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>resCode</td><td>String</td><td>Response Code <br>200- Succes</td></tr><tr><td>resDesc</td><td>String</td><td>Response Description</td></tr></tbody></table>

## Update Contact

<mark style="color:green;">`POST`</mark> `https://api.zortout.com/api.aspx`

Edit contact info

#### Query Parameters

| Name                                      | Type   | Description         |
| ----------------------------------------- | ------ | ------------------- |
| method<mark style="color:red;">\*</mark>  | String | “UPDATECONTACT”     |
| format                                    | String | json (Default), xml |
| version<mark style="color:red;">\*</mark> | String | 3                   |
| id<mark style="color:red;">\*</mark>      | Int    | Contact ID          |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |

#### Request Body

| Name                                   | Type   | Description              |
| -------------------------------------- | ------ | ------------------------ |
| idnumber                               | String | Contact ID Number/Tax ID |
| code<mark style="color:red;">\*</mark> | String | Contact Code             |
| facebook                               | String | Facebook                 |
| name                                   | String | Contact Name             |
| branchname                             | String | Branch Name              |
| line                                   | String | Line                     |
| address                                | String | Contact Address          |
| phone                                  | String | Contact Phone            |
| email                                  | String | Contact Email            |
| instagram                              | String | Instagram                |
| branchno                               | String | Branch No                |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}

{% tab title="Ex. URL" %}
URL <https://api.zortout.com/api.aspx?method=UPDATECONTACT&version=3>
{% endtab %}

{% tab title="Ex. Request JSON" %}

```javascript
{
  "code": "C0001",
  "name": "Contact1",
  "idnumber": "123456789",
  "email": "testemail@zortout.com",
  "phone": "021234567"
}
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

| Parameter | Type   | Description/Example                   |
| --------- | ------ | ------------------------------------- |
| resCode   | String | <p>Response Code <br>200- Success</p> |
| resDesc   | String | Response Description                  |
