Zahir Online API Documentation

Zahir Online API version 1.18.2.1.

Introduction

The Zahir Online API allows you to perform all the operations that you do with our web client. Zahir Online API is built using REST principles which ensures predictable URLs that makes writing applications easy. This API follows HTTP rules, enabling a wide range of HTTP clients which can be used to interact with the API.

Release Notes

1.18.2.6 : 28 February 2018

1.18.2.5 : 26 February 2018

1.18.2.4 : 25 February 2018

1.18.2.3 : 15 February 2018

1.18.2.2 : 12 February 2018

1.18.2.1 : 8 February 2018

Getting Started

To use our API you must satisfy these prerequistes

  1. URL
    You can use https://app.zahironline.com (Subscribe) or the URL you use to access Zahir Online in browser (On Premise).
  2. Slug
    Slug should be sent in with every API request to identify the company. You can use your subdomain (Subscribe) or the database name (On Premise) as a slug.
  3. An Authentication Token
    See Authentication to get an authentication token.

Example

GET https://app.zahironline.com/api/accounts
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "173ad3be-fe8c-48c6-9840-c5f087bb82fd",
        "code": 110099010,
        "name": "Petty Cash",
        "alias_name": "Petty Cash",
        "subclassification": {
            "id": "e66af54f-4a14-4870-b5bf-bef1ba895d8a",
            "code": 1100,
            "name": "Cash",
            "alias_name": "Cash"
        },
        "classification": {
            "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
            "code": 1,
            "name": "Asset",
            "alias_name": "Asset"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "IDR",
            "name": "Rupiah"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": 99,
            "name": "Head Quarter"
        },
        "is_cash": true,
        "is_active": true,
        "last_updated": "2018-02-03 21:16:11"
    },
    {...},
    {...},
    ...
]

Example
GET/api/accounts

URL : https://app.zahironline.com/api/accounts
Slug : example.zahironline.com
Authorization : Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU


Authentication

All Zahir Online API need to be Authenticated using an Authentication Token. You can obtain an Authentication Token with the following ways:

A. In your browser

Obtaining an Authentication Token in your browser is very simple.

  1. Login to your Zahir Online Account.
  2. Go to Auth Key menu (Settings > Auth Key)
    Setting Auth Key
  3. Add New
    Add New Authentication Token
  4. Fill in the note > Save
    Fill in the Note
  5. Choose the line > Edit
    Fill in the Note
  6. Copy generated Key
    Fill in the Note

B. Using OAuth 2.0

Coming Soon.

HTTP Methods

Zahir Online API uses appropriate HTTP verbs for every action.

HTTP GET

GET https://app.zahironline.com/api/resource
Responses200
Body
{
  "key": "value"
}

Retrieving all resources
GET/api/resource

With some endpoints you may need to retrieve a full list of resources. You can do this by simply using a HTTP GET with the resource name.
Successful responses return with a HTTP 200 status code. When retrieve multiple data, only summary data is returned. This is to keep the response more compact. We recommend all calls to any endpoints that have large result sets use paging.

Example : https://app.zahironline.com/api/accounts


GET https://app.zahironline.com/api/resource/id
Responses200
Body
{
  "key": "value"
}

Retrieving individual resources
GET/api/resource/id

To retrieve a specific resource you can append its id as identifier to the end of the URL.
Successful responses return with a HTTP 200 status code.

Example : https://app.zahironline.com/api/accounts/29fd3a20-160a-4278-aa02-8613ecda4792


GET https://app.zahironline.com/api/resource?page=value_page&per_page=value_per_page
Responses200
Body
{
  "key": "value"
}

Retrieving paginated resources
GET/api/resource?page=value_page&per_page=value_per_page

Zahir Online provides APIs to retrieve resources paginated to 25 items by default. To retrieve a specific page you can append a page parameter to the URL. You can also set the number of records that you want to receive in response using a per_page parameter.
Successful responses return with a HTTP 200 status code.

Example : https://app.zahironline.com/api/accounts?page=2&per_page=3


GET https://app.zahironline.com/api/resource?element[operator]=value
Responses200
Body
{
  "key": "value"
}

Supported operators
GET/api/resource?element[operator]=value

You can append the element that you want to search as parameter using supported parameters below :

  1. Equal
    All fields that do not contain special query parameters are compared directly for equality.
    Successful responses return with a HTTP 200 status code.

    Example : https://app.zahironline.com/api/accounts?code=110099010

  2. Not equal
    Find all records that do not equal ( $not ) the given property value.
    Successful responses return with a HTTP 200 status code.

    Example : https://app.zahironline.com/api/accounts?code[$not]=110099010

  3. Less than
    Find all records where the value is less ( $lt ) to a given value.
    Successful responses return with a HTTP 200 status code.

    Example : https://app.zahironline.com/api/accounts?code[$lt]=110099010

  4. Less and equal than
    Find all records where the value is less and equal ( $lte ) to a given value.
    Successful responses return with a HTTP 200 status code.

    Example : https://app.zahironline.com/api/accounts?code[$lte]=110099010

  5. Greater than
    Find all records where the value is greater ( $gt ) to a given value.
    Successful responses return with a HTTP 200 status code.

    Example : https://app.zahironline.com/api/accounts?code[$gt]=110099010

  6. Greater and equal than
    Find all records where the value is greater and equal ( $gte ) to a given value.
    Successful responses return with a HTTP 200 status code.

    Example : https://app.zahironline.com/api/accounts?code[$gte]=110099010

  7. Like
    Find all records that contains ( $like ) of the given criteria.
    Successful responses return with a HTTP 200 status code.

    Example : https://app.zahironline.com/api/accounts?code[$like]=110099010

GET https://app.zahironline.com/api/resource?element[subelement]=value
Responses200
Body
{
  "key": "value"
}

Subelement filtering
GET/api/resource?element[subelement]=value

You can append the sub element that you want to search as parameter.
Successful responses return with a HTTP 200 status code.

Example : https://app.zahironline.com/api/accounts?subclassification[code]=1100


GET https://app.zahironline.com/api/resource?search[element1,element2,element3.subelement]=value
Responses200
Body
{
  "key": "value"
}

Search for multiple element
GET/api/resource?search[element1,element2,element3.subelement]=value

You can append the sub element that you want to search as parameter.
Successful responses return with a HTTP 200 status code.

Example : https://app.zahironline.com/api/accounts?search[code,name,subclassification.name]=cash


GET https://app.zahironline.com/api/resource?sort[element.subelement]=ascending_or_descending
Responses200
Body
{
  "key": "value"
}

Retrieving an ordered resources
GET/api/resource?sort[element.subelement]=ascending_or_descending

To retrieve an ordered resources, you can append a sort parameter to the URL. It can contain a list of properties by which to sort mapped to the order ( 1 ascending, -1 descending).
Successful responses return with a HTTP 200 status code.

Example : https://app.zahironline.com/api/accounts?sort[subclassification.code]=-1


POST https://app.zahironline.com/api/resource
Responses200
Body
{
  "key": "value"
}

Create resource
POST/api/resource

To create a specific resource you simply using a HTTP POST with the resource name.
Successful responses return with a HTTP 201 status code.

Example : https://app.zahironline.com/api/accounts


PUT https://app.zahironline.com/api/resource/id
Responses200
Body
{
  "key": "value"
}

Update resource
PUT/api/resource/id

To update a specific resource you can append its id as identifier to the end of the URL.
Successful responses return with a HTTP 200 status code.

Example : https://app.zahironline.com/api/accounts/29fd3a20-160a-4278-aa02-8613ecda4792


DELETE https://app.zahironline.com/api/resource/id
Responses200
Body
{
  "key": "value"
}

Delete resource
DELETE/api/resource/id

To delete a specific resource you can append its id as identifier to the end of the URL.
Successful responses return with a HTTP 200 status code.

Example : https://app.zahironline.com/api/accounts/29fd3a20-160a-4278-aa02-8613ecda4792


Response Codes

HTTP Status Codes

Status Code Descriptions

2xx

Success

4xx

Bad request sent to server

5xx

Server side error
Status Code Descriptions

200

Success
The request was successfully completed.

201

Created
The request was a success and one or more resources have been created.

400

Bad request
The request cannot be performed. Usually because of malformed parameter or missing parameter.

401

Unauthorized (Invalid AuthToken)
Request was rejected because of invalid AuthToken.

403

Forbidden
The user does not have enough permission or possibly not an user of the respective organization to access the resource.

404

URL Not Found
The URL you’ve sent is wrong. It’s possible that the resource you’ve requested has been moved to another URL.

405

Method Not Allowed
The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.

406

Not Acceptable
The requested response type is not supported by the client.

429

Too many requests
Too many requests within a certain time frame. To know more about api call limits.

500

Server error

Data Stores

Accounts

GET https://app.zahironline.com/api/accounts
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "173ad3be-fe8c-48c6-9840-c5f087bb82fd",
        "code": 110099010,
        "name": "Petty Cash",
        "alias_name": "Petty Cash",
        "subclassification": {
            "id": "e66af54f-4a14-4870-b5bf-bef1ba895d8a",
            "code": 1100,
            "name": "Cash",
            "alias_name": "Cash"
        },
        "classification": {
            "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
            "code": 1,
            "name": "Asset",
            "alias_name": "Asset"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "IDR",
            "name": "Rupiah"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": 99,
            "name": "Head Quarter"
        },
        "is_cash": true,
        "is_active": true,
        "last_updated": "2018-02-03 21:16:11"
    },
    {...},
    {...},
    ...
]

Get Accounts
GET/api/accounts

Use this method to retrieve one or many accounts. See our HTTP GET documentation for complete queries method.

The following elements are returned in the accounts response :

Base elements

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.
alias_name Account alias name. String maximum 50 characters.
subclassification Subclasification of account. See elements for Account Subclassification.
classification Clasification of account. See elements for Account Classification.
currency Currency of account. See elements for Currency.
department Department of account. See elements for Department.
is_cash Boolean true to cash account.
is_active Boolean true to active account.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for subclassification

Element Description
id Unique code for identifier account subclassification. String 36 characters.
code Account subclassification code. Integer maximum 9 digits.
name Account subclassification name. String maximum 40 characters.
alias_name Account subclassification alias. String maximum 40 characters.

Elements for classification

Element Description
id Unique code for identifier account classification. String 36 characters.
code Account classification code. Integer maximum 9 digits.
name Account classification name. String maximum 40 characters.
alias_name Account classification alias. String maximum 40 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

POST https://app.zahironline.com/api/accounts
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Petty Cash",
  "subclassification": "e66af54f-4a14-4870-b5bf-bef1ba895d8a"
}
Responses201
Body
{
  "id": "173ad3be-fe8c-48c6-9840-c5f087bb82fd",
  "code": 110099010,
  "name": "Petty Cash",
  "alias_name": "Petty Cash",
  "subclassification": {
    "id": "e66af54f-4a14-4870-b5bf-bef1ba895d8a",
    "code": 1100,
    "name": "Cash",
    "alias_name": "Cash"
  },
  "classification": {
    "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
    "code": 1,
    "name": "Asset",
    "alias_name": "Asset"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "IDR",
    "name": "Rupiah"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": 99,
    "name": "Head Quarter"
  },
  "is_cash": true,
  "is_active": true,
  "last_updated": "2018-02-03 21:16:11"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": 110099010,
  "name": "Petty Cash",
  "alias_name": "Petty Cash",
  "subclassification": "e66af54f-4a14-4870-b5bf-bef1ba895d8a",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "is_cash": true,
  "is_active": true
}
Responses201
Body
{
  "id": "173ad3be-fe8c-48c6-9840-c5f087bb82fd",
  "code": 110099010,
  "name": "Petty Cash",
  "alias_name": "Petty Cash",
  "subclassification": {
    "id": "e66af54f-4a14-4870-b5bf-bef1ba895d8a",
    "code": 1100,
    "name": "Cash",
    "alias_name": "Cash"
  },
  "classification": {
    "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
    "code": 1,
    "name": "Asset",
    "alias_name": "Asset"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "IDR",
    "name": "Rupiah"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": 99,
    "name": "Head Quarter"
  },
  "is_cash": true,
  "is_active": true,
  "last_updated": "2018-02-03 21:16:11"
}

Create Accounts
POST/api/accounts

Use this method to create an account. See our HTTP POST documentation for complete queries method.

The following are elements for create an account :

Element Description
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters. Required.
alias_name Account alias name. String maximum 50 characters.
subclassification Unique code for identifier account subclassification data. String 36 characters. See Account Subclassifications to get an id. Required.
currency Unique code for identifier currency data. String 36 characters. See Currencies to get an id.
department Unique code for identifier department data. String 36 characters. See Departments to get an id.
is_cash Boolean true to cash account.
is_active Boolean true to active account.

PUT https://app.zahironline.com/api/accounts/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Petty Cash",
  "subclassification": "e66af54f-4a14-4870-b5bf-bef1ba895d8a"
}
Responses200
Body
{
  "id": "173ad3be-fe8c-48c6-9840-c5f087bb82fd",
  "code": 110099010,
  "name": "Petty Cash",
  "alias_name": "Petty Cash",
  "subclassification": {
    "id": "e66af54f-4a14-4870-b5bf-bef1ba895d8a",
    "code": 1100,
    "name": "Cash",
    "alias_name": "Cash"
  },
  "classification": {
    "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
    "code": 1,
    "name": "Asset",
    "alias_name": "Asset"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "IDR",
    "name": "Rupiah"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": 99,
    "name": "Head Quarter"
  },
  "is_cash": true,
  "is_active": true,
  "last_updated": "2018-02-03 21:16:11"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": 110099010,
  "name": "Petty Cash",
  "alias_name": "Petty Cash",
  "subclassification": "e66af54f-4a14-4870-b5bf-bef1ba895d8a",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "is_cash": true,
  "is_active": true
}
Responses200
Body
{
  "id": "173ad3be-fe8c-48c6-9840-c5f087bb82fd",
  "code": 110099010,
  "name": "Petty Cash",
  "alias_name": "Petty Cash",
  "subclassification": {
    "id": "e66af54f-4a14-4870-b5bf-bef1ba895d8a",
    "code": 1100,
    "name": "Cash",
    "alias_name": "Cash"
  },
  "classification": {
    "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
    "code": 1,
    "name": "Asset",
    "alias_name": "Asset"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "IDR",
    "name": "Rupiah"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": 99,
    "name": "Head Quarter"
  },
  "is_cash": true,
  "is_active": true,
  "last_updated": "2018-02-03 21:16:11"
}

Update Accounts
PUT/api/accounts/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update an account. See our HTTP PUT documentation for complete queries method.

The following are elements for update an account :

Element Description
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.
alias_name Account alias name. String maximum 50 characters.
subclassification Unique code for identifier account subclassification. String 36 characters. See Account Subclassifications to get an id.
currency Unique code for identifier currency. String 36 characters. See Currencies to get an id.
department Unique code for identifier department. String 36 characters. See Departments to get an id.
is_cash Boolean true to cash account.
is_active Boolean true to active account.

DELETE https://app.zahironline.com/api/accounts/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Accounts
DELETE/api/accounts/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete an account. See our HTTP DELETE documentation for complete queries method.


Account Subclassifications

GET https://app.zahironline.com/api/account_subclassifications
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {...},
    {
        "id": "7d31335a-dd05-4657-a4b1-c055872b67c8",
        "code": 1300,
        "name": "Accounts Receivables",
        "alias_name": "Accounts Receivables",
        "classification": {
            "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
            "code": 1,
            "name": "Asset",
            "alias_name": "Asset"
        },
        "cash_flow_type": {
            "id": 1,
            "name": "Operating Activities"
        },
        "next_account_number": "130099011",
        "last_updated": "2018-02-03 19:58:55"
    },
    {...},
    {...},
    ...
]

Get Account Subclassifications
GET/api/account_subclassifications

Use this method to retrieve one or many account subclassifications. See our HTTP GET documentation for complete queries method.

The following elements are returned in the account subclassifications response :

Base elements

Element Description
id Unique code for identifier account subclassification. String 36 characters.
code Account subclassification code. Integer maximum 9 digits.
name Account subclassification name. String maximum 40 characters.
alias_name Account subclassification alias name. String maximum 40 characters.
classification Classification of account subclassification. See elements for Account Classification.
cash_flow_type Cash flow type of account subclassification. See elements for Cash Flow Type.
next_account_number Next account number of account subclassification. Integer maximum 9 digits.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for classification

Element Description
id Unique code for identifier account subclassification data. String 36 characters.
code Account classification code. Integer 1 digit.
name Account classification name. String maximum 40 characters.
alias_name Account classification alias. String maximum 40 characters.

Elements for cash flow type

Element Description
id Unique code for identifier cash flow type. Integer 1 digit.
name Cash flow type name. String maximum 100 characters.


POST https://app.zahironline.com/api/account_subclassifications
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": 1300,
  "name": "Accounts Receivables",
  "classification": "b1f9dff0-6074-4cd8-9405-7210e801a476"
}
Responses201
Body
{
  "id": "7d31335a-dd05-4657-a4b1-c055872b67c8",
  "code": 1300,
  "name": "Accounts Receivables",
  "alias_name": "Accounts Receivables",
  "classification": {
    "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
    "code": 1,
    "name": "Asset",
    "alias_name": "Asset"
  },
  "cash_flow_type": {
    "id": 1,
    "name": "Operating Activities"
  },
  "next_account_number": "130099011",
  "last_updated": "2018-02-03 19:58:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": 1300,
  "name": "Accounts Receivables",
  "alias_name": "Accounts Receivables",
  "classification": "b1f9dff0-6074-4cd8-9405-7210e801a476",
  "cash_flow_type": 1
}
Responses201
Body
{
  "id": "7d31335a-dd05-4657-a4b1-c055872b67c8",
  "code": 1300,
  "name": "Accounts Receivables",
  "alias_name": "Accounts Receivables",
  "classification": {
    "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
    "code": 1,
    "name": "Asset",
    "alias_name": "Asset"
  },
  "cash_flow_type": {
    "id": 1,
    "name": "Operating Activities"
  },
  "next_account_number": "130099011",
  "last_updated": "2018-02-03 19:58:55"
}

Create Account Subclassifications
POST/api/account_subclassifications

Use this method to create an account subclassification. See our HTTP POST documentation for complete queries method.

The following are elements for create an account subclassification :

Element Description
code Account subclassification code. Integer maximum 9 digits.
name Account subclassification name. String maximum 40 characters. Required.
alias_name Account subclassification alias name. String maximum 40 characters.
classification Unique code for identifier account classification. String 36 characters. See Account Classifications to get an id. Required.
cash_flow_type Unique code for identifier cash flow type. Integer 1 digit.
0 : Undefined
1 : Operating Activities
2 : Investing Activities
3 : Financing Activities.

PUT https://app.zahironline.com/api/account_subclassifications/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": 1300,
  "name": "Accounts Receivables",
  "classification": "b1f9dff0-6074-4cd8-9405-7210e801a476"
}
Responses200
Body
{
  "id": "7d31335a-dd05-4657-a4b1-c055872b67c8",
  "code": 1300,
  "name": "Accounts Receivables",
  "alias_name": "Accounts Receivables",
  "classification": {
    "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
    "code": 1,
    "name": "Asset",
    "alias_name": "Asset"
  },
  "cash_flow_type": {
    "id": 1,
    "name": "Operating Activities"
  },
  "next_account_number": "130099011",
  "last_updated": "2018-02-03 19:58:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": 1300,
  "name": "Accounts Receivables",
  "alias_name": "Accounts Receivables",
  "classification": "b1f9dff0-6074-4cd8-9405-7210e801a476",
  "cash_flow_type": 1
}
Responses200
Body
{
  "id": "7d31335a-dd05-4657-a4b1-c055872b67c8",
  "code": 1300,
  "name": "Accounts Receivables",
  "alias_name": "Accounts Receivables",
  "classification": {
    "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
    "code": 1,
    "name": "Asset",
    "alias_name": "Asset"
  },
  "cash_flow_type": {
    "id": 1,
    "name": "Operating Activities"
  },
  "next_account_number": "130099011",
  "last_updated": "2018-02-03 19:58:55"
}

Update Account Subclassifications
PUT/api/account_subclassifications/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update an account subclassification. See our HTTP PUT documentation for complete queries method.

The following are elements for update an account subclassification :

Element Description
code Account subclassification code. Integer maximum 9 digits.
name Account subclassification name. String maximum 40 characters. Required.
alias_name Account subclassification alias name. String maximum 40 characters.
classification Unique code for identifier account classification. String 36 characters. See Account Classifications to get an id. Required.
cash_flow_type Unique code for identifier cash flow type. Integer 1 digit.
0 : Undefined
1 : Operating Activities
2 : Investing Activities
3 : Financing Activities.

DELETE https://app.zahironline.com/api/account_subclassifications/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Account Subclassifications
DELETE/api/account_subclassifications/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete an account subclassification. See our HTTP DELETE documentation for complete queries method.


Account Classifications

GET https://app.zahironline.com/api/account_classifications
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
        "code": 1,
        "name": "Asset",
        "alias_name": "Asset",
        "last_updated": "2018-02-03 19:58:54"
    },
    {
        "id": "513ff122-af00-4506-a9b8-eef35104be9c",
        "code": 2,
        "name": "Liabilities",
        "alias_name": "Liabilities",
        "last_updated": "2018-02-03 19:58:54"
    },
    {
        "id": "adfd14e0-e98d-4ee5-861b-918c021ee192",
        "code": 3,
        "name": "Equity",
        "alias_name": "Equity",
        "last_updated": "2018-02-03 19:58:54"
    },
    {...},
    {...},
    ...
]

Get Account Classifications
GET/api/account_classifications

Use this method to retrieve one or many account classifications. See our HTTP GET documentation for complete queries method.

The following elements are returned in the account classifications response :

Base elements

Element Description
id Unique code for identifier account classification. String 36 characters.
code Account classification code. Integer 1 digit.
name Account classification name. String maximum 50 characters.
alias_name Account classification alias name. String maximum 50 characters.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

PUT https://app.zahironline.com/api/account_classifications/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Asset",
  "alias_name": "Asset"
}
Responses200
Body
{
  "id": "b1f9dff0-6074-4cd8-9405-7210e801a476",
  "code": 1,
  "name": "Asset",
  "alias_name": "Asset",
  "last_updated": "2018-01-19 09:50:52"
}

Update Account Classifications
PUT/api/account_classifications/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update account classifications. See our HTTP PUT documentation for complete queries method.

The following are elements for update an account classifications :

Element Description
name Account classification name. String maximum 40 characters.
alias_name Account classification alias name. String maximum 40 characters.

Contacts

GET https://app.zahironline.com/api/contact
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "292f9559-70d8-4f59-a848-f9103683a9f3",
        "code": "CUST",
        "name": "General Customer",
        "currency": "USD",
        "address1": null,
        "address2": null,
        "city": null,
        "country": null,
        "postcode": null,
        "addressb1": null,
        "addressb2": null,
        "cityb": null,
        "countryb": null,
        "postcodeb": null,
        "telp1": null,
        "telp2": null,
        "fax": null,
        "email": null,
        "webpages": null,
        "contact": null,
        "note": null,
        "handphone": null,
        "position": null,
        "credit_limit": 0,
        "termtype": 0,
        "discountdays": 0,
        "duedays": 0,
        "earlydiscount": 0,
        "latecharge": 0,
        "homepage": null,
        "notes": null,
        "contact2": null,
        "contact3": null,
        "commission": null,
        "use_commission_table": false,
        "age": null,
        "sex": null,
        "edit_date": "2018-01-19 09:50:52",
        "type": {
            "code": 1,
            "name": "Customer"
        },
        "classification": {
            "id": "General",
            "name": ""
        },
        "group": {
            "id": "N/a",
            "name": "N/A"
        },
        "corps": {
            "name": "Company"
        },
        "image": {
            "uuid": null
        }
    },
    {...},
    {...},
    ...
]

Get Contacts
GET/api/contact

Use this method to retrieve one or many contacts. See our HTTP GET documentation for complete queries method.

The following elements are returned in the contacts response :

Base elements

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.
currency element is used for currency used, e.g. IDR or USD. String 3 characters.
address1 Contact address line 1. String maximum 100 characters.
address2 Contact address line 2. String maximum 100 characters.
city Contact city name. String maximum 25 characters.
country Contact country name. String maximum 80 characters.
postcode Contact postal code. String maximum 20 characters.
addressb1 Contact delivery address line 1, apply for customer type. String maximum 100 characters.
addressb2 Contact delivery address line 2, apply for customer type. String maximum 100 characters.
cityb Delivery city name, apply for customer type. String maximum 25 characters.
countryb Delivery country name, apply for customer type. String maximum 80 characters.
postcodeb Delivery postal code, apply for customer type. String maximum 20 characters.
telp1 Contact phone number 1. String maximum 25 characters.
telp2 Contact phone number 2. String maximum 25 characters.
fax Contact fax number. String maximum 30 characters.
email Contact email address. String maximum 60 characters.
webpages Contact tax identifier number. String maximum 60 characters.
contact Contact person name for customer type, vendor, and other. String maximum 25 characters.
note Contact notes. String maximum 255 characters.
handphone Contact mobile phone number. String maximum 30 characters.
position Position of customer type. String maximum 20 characters.
credit_limit Credit limit given to Customer or Vendor type. Number.
termtype Credit payment term type , default value is 0. Integer.
discountdays Discount day, for customer and vendor type. Integer.
duedays Due date period of credit transaction, for customer and vendor type. Integer.
earlydiscount Early discount, for customer and vendor type. Integer.
latecharge Credit transaction late charge. Integer.
homepage Contact Websites. String maximum 25 characters.
notes Contact note, default Null. String.
contact2 Contact person name of delivery address, for customer and vendor. String maximum 25 characters.
contact3 Contact person name 3. String maximum 25 characters.
commission Contact commission, Fill default 0.
use_commission_table Contact commission table. Fill default T.
age Contact age, fill default Null. String.
sex Contact sex, fill default Null. String.
edit_date Account edit date, automatically filled. Date format YYYY-MM-DD h:mm:ss.
type Type. See elements for type
classification Classifications. See elements for classification
group Group. See elements for group
corps Corps. See elements for corps
image Image. See elements for image

Elements for type

Element Description
code Type code. Integer.
name Type name. String.

Elements for classification

Element Description
id Unique code for identifier classification data.
name Classification name. String.

Elements for group

Element Description
id Unique code for identifier group data.
name Group name. String.

Elements for corps

Element Description
name Corps name. String.

Elements for image

Element Description
uuid Unique code for identifier image data.

POST https://app.zahironline.com/api/contact
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "CUST",
  "name": "General Customer"
}
Responses201
Body
{
  "id": "292f9559-70d8-4f59-a848-f9103683a9f3",
  "code": "CUST",
  "name": "General Customer",
  "currency": "USD",
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postcode": null,
  "addressb1": null,
  "addressb2": null,
  "cityb": null,
  "countryb": null,
  "postcodeb": null,
  "telp1": null,
  "telp2": null,
  "fax": null,
  "email": null,
  "webpages": null,
  "contact": null,
  "note": null,
  "handphone": null,
  "position": null,
  "credit_limit": 0,
  "termtype": 0,
  "discountdays": 0,
  "duedays": 0,
  "earlydiscount": 0,
  "latecharge": 0,
  "homepage": null,
  "notes": null,
  "contact2": null,
  "contact3": null,
  "commission": null,
  "use_commission_table": false,
  "age": null,
  "sex": null
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "CUST",
  "name": "General Customer",
  "currency": "USD",
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postcode": null,
  "addressb1": null,
  "addressb2": null,
  "cityb": null,
  "countryb": null,
  "postcodeb": null,
  "telp1": null,
  "telp2": null,
  "fax": null,
  "email": null,
  "webpages": null,
  "contact": null,
  "note": null,
  "handphone": null,
  "position": null,
  "credit_limit": 0,
  "termtype": 0,
  "discountdays": 0,
  "duedays": 0,
  "earlydiscount": 0,
  "latecharge": 0,
  "homepage": null,
  "notes": null,
  "contact2": null,
  "contact3": null,
  "commission": null,
  "use_commission_table": false,
  "age": null,
  "sex": null
}
Responses201
Body
{
  "id": "292f9559-70d8-4f59-a848-f9103683a9f3",
  "code": "CUST",
  "name": "General Customer",
  "currency": "USD",
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postcode": null,
  "addressb1": null,
  "addressb2": null,
  "cityb": null,
  "countryb": null,
  "postcodeb": null,
  "telp1": null,
  "telp2": null,
  "fax": null,
  "email": null,
  "webpages": null,
  "contact": null,
  "note": null,
  "handphone": null,
  "position": null,
  "credit_limit": 0,
  "termtype": 0,
  "discountdays": 0,
  "duedays": 0,
  "earlydiscount": 0,
  "latecharge": 0,
  "homepage": null,
  "notes": null,
  "contact2": null,
  "contact3": null,
  "commission": null,
  "use_commission_table": false,
  "age": null,
  "sex": null
}

Create Contacts
POST/api/contact

Use this method to create a contact. See our HTTP POST documentation for complete queries method.

The following are elements for create a contact :

Element Description
code Contact code. String maximum 25 characters. Required.
name Contact name. String maximum 100 characters. Required.
currency element is used for currency used, e.g. IDR or USD. String 3 characters. Required.
address1 Contact address line 1. String maximum 100 characters.
address2 Contact address line 2. String maximum 100 characters.
city Contact city name. String maximum 25 characters.
country Contact country name. String maximum 80 characters.
postcode Contact postal code. String maximum 20 characters.
addressb1 Contact delivery address line 1, apply for customer type. String maximum 100 characters.
addressb2 Contact delivery address line 2, apply for customer type. String maximum 100 characters.
cityb Delivery city name, apply for customer type. String maximum 25 characters.
countryb Delivery country name, apply for customer type. String maximum 80 characters.
postcodeb Delivery postal code, apply for customer type. String maximum 20 characters.
telp1 Contact phone number 1. String maximum 25 characters.
telp2 Contact phone number 2. String maximum 25 characters.
fax Contact fax number. String maximum 30 characters.
email Contact email address. String maximum 60 characters.
webpages Contact tax identifier number. String maximum 60 characters.
contact Contact person name for customer type, vendor, and other. String maximum 25 characters.
note Contact notes. String maximum 255 characters.
handphone Contact mobile phone number. String maximum 30 characters.
position Position of customer type. String maximum 20 characters.
credit_limit Credit limit given to Customer or Vendor type. Number.
termtype Credit payment term type , default value is 0. Integer.
discountdays Discount day, for customer and vendor type. Integer.
duedays Due date period of credit transaction, for customer and vendor type. Integer.
earlydiscount Early discount, for customer and vendor type. Integer.
latecharge Credit transaction late charge. Integer.
homepage Contact Websites. String maximum 25 characters.
notes Contact note, default Null. String.
contact2 Contact person name of delivery address, for customer and vendor. String maximum 25 characters.
contact3 Contact person name 3. String maximum 25 characters.
commission Contact commission, Fill default 0.
use_commission_table Contact commission table. Fill default T.
age Contact age, fill default Null. String.
sex Contact sex, fill default Null. String.

PUT https://app.zahironline.com/api/contact/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "CUST",
  "name": "General Customer"
}
Responses200
Body
{
  "id": "292f9559-70d8-4f59-a848-f9103683a9f3",
  "code": "CUST",
  "name": "General Customer",
  "currency": "USD",
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postcode": null,
  "addressb1": null,
  "addressb2": null,
  "cityb": null,
  "countryb": null,
  "postcodeb": null,
  "telp1": null,
  "telp2": null,
  "fax": null,
  "email": null,
  "webpages": null,
  "contact": null,
  "note": null,
  "handphone": null,
  "position": null,
  "credit_limit": 0,
  "termtype": 0,
  "discountdays": 0,
  "duedays": 0,
  "earlydiscount": 0,
  "latecharge": 0,
  "homepage": null,
  "notes": null,
  "contact2": null,
  "contact3": null,
  "commission": null,
  "use_commission_table": false,
  "age": null,
  "sex": null
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "CUST",
  "name": "General Customer",
  "currency": "USD",
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postcode": null,
  "addressb1": null,
  "addressb2": null,
  "cityb": null,
  "countryb": null,
  "postcodeb": null,
  "telp1": null,
  "telp2": null,
  "fax": null,
  "email": null,
  "webpages": null,
  "contact": null,
  "note": null,
  "handphone": null,
  "position": null,
  "credit_limit": 0,
  "termtype": 0,
  "discountdays": 0,
  "duedays": 0,
  "earlydiscount": 0,
  "latecharge": 0,
  "homepage": null,
  "notes": null,
  "contact2": null,
  "contact3": null,
  "commission": null,
  "use_commission_table": false,
  "age": null,
  "sex": null
}
Responses200
Body
{
  "id": "292f9559-70d8-4f59-a848-f9103683a9f3",
  "code": "CUST",
  "name": "General Customer",
  "currency": "USD",
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postcode": null,
  "addressb1": null,
  "addressb2": null,
  "cityb": null,
  "countryb": null,
  "postcodeb": null,
  "telp1": null,
  "telp2": null,
  "fax": null,
  "email": null,
  "webpages": null,
  "contact": null,
  "note": null,
  "handphone": null,
  "position": null,
  "credit_limit": 0,
  "termtype": 0,
  "discountdays": 0,
  "duedays": 0,
  "earlydiscount": 0,
  "latecharge": 0,
  "homepage": null,
  "notes": null,
  "contact2": null,
  "contact3": null,
  "commission": null,
  "use_commission_table": false,
  "age": null,
  "sex": null
}

Update Contacts
PUT/api/contact/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a contact. See our HTTP PUT documentation for complete queries method.

The following are elements for update a contact :

Element Description
code Contact code. String maximum 25 characters. Required.
name Contact name. String maximum 100 characters. Required.
currency element is used for currency used, e.g. IDR or USD. String 3 characters. Required.
address1 Contact address line 1. String maximum 100 characters.
address2 Contact address line 2. String maximum 100 characters.
city Contact city name. String maximum 25 characters.
country Contact country name. String maximum 80 characters.
postcode Contact postal code. String maximum 20 characters.
addressb1 Contact delivery address line 1, apply for customer type. String maximum 100 characters.
addressb2 Contact delivery address line 2, apply for customer type. String maximum 100 characters.
cityb Delivery city name, apply for customer type. String maximum 25 characters.
countryb Delivery country name, apply for customer type. String maximum 80 characters.
postcodeb Delivery postal code, apply for customer type. String maximum 20 characters.
telp1 Contact phone number 1. String maximum 25 characters.
telp2 Contact phone number 2. String maximum 25 characters.
fax Contact fax number. String maximum 30 characters.
email Contact email address. String maximum 60 characters.
webpages Contact tax identifier number. String maximum 60 characters.
contact Contact person name for customer type, vendor, and other. String maximum 25 characters.
note Contact notes. String maximum 255 characters.
handphone Contact mobile phone number. String maximum 30 characters.
position Position of customer type. String maximum 20 characters.
credit_limit Credit limit given to Customer or Vendor type. Number.
termtype Credit payment term type , default value is 0. Integer.
discountdays Discount day, for customer and vendor type. Integer.
duedays Due date period of credit transaction, for customer and vendor type. Integer.
earlydiscount Early discount, for customer and vendor type. Integer.
latecharge Credit transaction late charge. Integer.
homepage Contact Websites. String maximum 25 characters.
notes Contact note, default Null. String.
contact2 Contact person name of delivery address, for customer and vendor. String maximum 25 characters.
contact3 Contact person name 3. String maximum 25 characters.
commission Contact commission, Fill default 0.
use_commission_table Contact commission table. Fill default T.
age Contact age, fill default Null. String.
sex Contact sex, fill default Null. String.

DELETE https://app.zahironline.com/api/contact/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Contacts
DELETE/api/contact/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a contact. See our HTTP DELETE documentation for complete queries method.


Products

GET https://app.zahironline.com/api/products
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "3dff4b90-93b2-4d2f-ba22-d45b41774ecb",
        "code": "A-001",
        "name": "Product A",
        "category": {
            "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
            "name": "Product Category A"
        },
        "alias_code": "",
        "alias_name": "",
        "unit_cost": 1000,
        "unit_price": 1500,
        "unit": {
            "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
            "code": "Pcs",
            "name": "pieces"
        },
        "purchase_tax": {
            "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
            "code": ".",
            "name": "No Tax",
            "percentage": 0
        },
        "sales_tax": {
            "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
            "code": ".",
            "name": "No Tax",
            "percentage": 0
        },
        "length": 1,
        "width": 1,
        "height": 1,
        "weight": 1,
        "note": "",
        "main_supplier": null,
        "is_tracked_as_inventory": true,
        "is_purchased": true,
        "is_sold": true,
        "inventory_account": {
            "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
            "code": 140099010,
            "name": "Inventory Product Category"
        },
        "cogs_account": {
            "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
            "code": 510099010,
            "name": "Cost of Goods Sold Product Category"
        },
        "sales_account": {
            "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
            "code": 410099010,
            "name": "Sales Product Category"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "quantity_on_hand": 100,
        "unit_cogs": 1000,
        "total_cogs": 100000,
        "is_active": true,
        "last_updated": "2018-01-25 09:30:45"
    },
    {...},
    {...},
    ...
]

Get Products
GET/api/products

Use this method to retrieve one or many products. See our HTTP GET documentation for complete queries method.

The following elements are returned in the products response :

Base elements

Element Description
id Unique code for identifier product. String 36 characters.
code Product code. Integer maximum 100 characters.
name Product name. String maximum 250 characters.
category Category of product. See elements for Category.
alias_code Product alias code. String maximum 100 characters.
alias_name Product alias name. String maximum 250 characters.
unit_cost Product unit cost. Number.
unit_price Product unit price. Number.
unit Unit of product. See elements for Unit.
purchase_tax Tax when purchase the product. See elements for Purchase Tax.
sales_tax Tax when sale the product. See elements for Sales Tax.
length Length of product. Number.
width Width of product. Number.
height Height of product. Number.
weight Weight of product. Number.
note Note of product. String maximum 255 characters.
main_supplier Main supplier of product. See elements for Main Supplier.
is_tracked_as_inventory Boolean true to product that are tracked as inventory.
is_purchased Boolean true to product that are available on purchase transactions.
is_sold Boolean true to product that are available on sales transactions.
inventory_account Inventory asset account of product. See elements for Inventory Account.
cogs_account Cost of goods sold account of product. See elements for COGS Account.
sales_account Sales account of product. See elements for Sales Account.
department Department of product. See elements for Department.
quantity_on_hand Quantity on hand of product. Number.
unit_cogs Unit cogs of product. Number.
total_cogs Total cogs of product. Number.
is_active Boolean true to active product.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for category

Element Description
id Unique code for identifier product category. String 36 characters.
name category name. String maximum 50 characters.

Elements for unit

Element Description
id Unique code for identifier unit. String 36 characters.
code Unit code. String maximum 15 characters.
name Unit name. String maximum 25 characters.

Elements for purchase_tax

Element Description
id Unique code for identifier tax. String 36 characters.
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters.
percentage Tax percentage / rate. Number.

Elements for sales_tax

Element Description
id Unique code for identifier tax. String 36 characters.
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters.
percentage Tax percentage / rate. Number.

Elements for inventory_account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for cogs_account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for sales_account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

POST https://app.zahironline.com/api/products
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "A-001",
  "name": "Product A",
  "category": "ab37040b-6bde-b240-8410-ed40d090fb9f"
}
Responses201
Body
{
  "id": "3dff4b90-93b2-4d2f-ba22-d45b41774ecb",
  "code": "A-001",
  "name": "Product A",
  "category": {
    "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
    "name": "Product Category A"
  },
  "alias_code": "",
  "alias_name": "",
  "unit_cost": 1000,
  "unit_price": 1500,
  "unit": {
    "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
    "code": "Pcs",
    "name": "pieces"
  },
  "purchase_tax": {
    "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
    "code": ".",
    "name": "No Tax",
    "percentage": 0
  },
  "sales_tax": {
    "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
    "code": ".",
    "name": "No Tax",
    "percentage": 0
  },
  "length": 1,
  "width": 1,
  "height": 1,
  "weight": 1,
  "note": "",
  "main_supplier": null,
  "is_tracked_as_inventory": true,
  "is_purchased": true,
  "is_sold": true,
  "inventory_account": {
    "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
    "code": 140099010,
    "name": "Inventory Product Category"
  },
  "cogs_account": {
    "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
    "code": 510099010,
    "name": "Cost of Goods Sold Product Category"
  },
  "sales_account": {
    "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
    "code": 410099010,
    "name": "Sales Product Category"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "quantity_on_hand": 100,
  "unit_cogs": 1000,
  "total_cogs": 100000,
  "is_active": true,
  "last_updated": "2018-01-25 09:30:45"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "A-001",
  "name": "Product A",
  "category": "ab37040b-6bde-b240-8410-ed40d090fb9f",
  "alias_code": "",
  "alias_name": "",
  "unit_cost": 1000,
  "unit_price": 1500,
  "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
  "purchase_tax": "941327c4-4903-e340-b3df-57f36ef99a5d",
  "sales_tax": "941327c4-4903-e340-b3df-57f36ef99a5d",
  "length": 1,
  "width": 1,
  "height": 1,
  "weight": 1,
  "note": "",
  "main_supplier": null,
  "is_tracked_as_inventory": true,
  "is_purchased": true,
  "is_sold": true,
  "inventory_account": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
  "cogs_account": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
  "sales_account": "f2b03f23-49b0-42d0-b426-f59dcce18182",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "is_active": true
}
Responses201
Body
{
  "id": "3dff4b90-93b2-4d2f-ba22-d45b41774ecb",
  "code": "A-001",
  "name": "Product A",
  "category": {
    "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
    "name": "Product Category A"
  },
  "alias_code": "",
  "alias_name": "",
  "unit_cost": 1000,
  "unit_price": 1500,
  "unit": {
    "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
    "code": "Pcs",
    "name": "pieces"
  },
  "purchase_tax": {
    "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
    "code": ".",
    "name": "No Tax",
    "percentage": 0
  },
  "sales_tax": {
    "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
    "code": ".",
    "name": "No Tax",
    "percentage": 0
  },
  "length": 1,
  "width": 1,
  "height": 1,
  "weight": 1,
  "note": "",
  "main_supplier": null,
  "is_tracked_as_inventory": true,
  "is_purchased": true,
  "is_sold": true,
  "inventory_account": {
    "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
    "code": 140099010,
    "name": "Inventory Product Category"
  },
  "cogs_account": {
    "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
    "code": 510099010,
    "name": "Cost of Goods Sold Product Category"
  },
  "sales_account": {
    "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
    "code": 410099010,
    "name": "Sales Product Category"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "quantity_on_hand": 100,
  "unit_cogs": 1000,
  "total_cogs": 100000,
  "is_active": true,
  "last_updated": "2018-01-25 09:30:45"
}

Create Products
POST/api/products

Use this method to create a product. See our HTTP POST documentation for complete queries method.

The following are elements for create a product :

Element Description
code Product code. Integer maximum 100 characters. Required.
name Product name. String maximum 250 characters. Required.
category Category of product. Unique code for identifier product category. String 36 characters. See Product Categories to get an id. Required.
alias_code Product alias code. String maximum 100 characters.
alias_name Product alias name. String maximum 250 characters.
unit_cost Product unit cost. Number.
unit_price Product unit price. Number.
unit Unit of product. Unique code for identifier unit. String 36 characters. See Units to get an id.
purchase_tax Tax when purchase the product. Unique code for identifier tax. String 36 characters. See Taxes to get an id.
sales_tax Tax when sale the product. Unique code for identifier tax. String 36 characters. See Taxes to get an id.
length Length of product. Number.
width Width of product. Number.
height Height of product. Number.
weight Weight of product. Number.
note Note of product. String maximum 255 characters.
main_supplier Main supplier of product. Unique code for identifier contact. String 36 characters. See Contacts to get an id.
is_tracked_as_inventory Boolean true to product that are tracked as inventory.
is_purchased Boolean true to product that are available on purchase transactions.
is_sold Boolean true to product that are available on sales transactions.
inventory_account Inventory asset account of product. Unique code for identifier account. String 36 characters. See Accounts to get an id.
cogs_account Cost of goods sold account of product. Unique code for identifier account. String 36 characters. See Accounts to get an id.
sales_account Sales account of product. Unique code for identifier account. String 36 characters. See Accounts to get an id.
department Unique code for identifier department. String 36 characters. See Department to get an id.
is_active Boolean true to active product.


PUT https://app.zahironline.com/api/products/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "A-001",
  "name": "Product A",
  "category": "ab37040b-6bde-b240-8410-ed40d090fb9f"
}
Responses200
Body
{
  "id": "3dff4b90-93b2-4d2f-ba22-d45b41774ecb",
  "code": "A-001",
  "name": "Product A",
  "category": {
    "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
    "name": "Product Category A"
  },
  "alias_code": "",
  "alias_name": "",
  "unit_cost": 1000,
  "unit_price": 1500,
  "unit": {
    "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
    "code": "Pcs",
    "name": "pieces"
  },
  "purchase_tax": {
    "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
    "code": ".",
    "name": "No Tax",
    "percentage": 0
  },
  "sales_tax": {
    "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
    "code": ".",
    "name": "No Tax",
    "percentage": 0
  },
  "length": 1,
  "width": 1,
  "height": 1,
  "weight": 1,
  "note": "",
  "main_supplier": null,
  "is_tracked_as_inventory": true,
  "is_purchased": true,
  "is_sold": true,
  "inventory_account": {
    "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
    "code": 140099010,
    "name": "Inventory Product Category"
  },
  "cogs_account": {
    "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
    "code": 510099010,
    "name": "Cost of Goods Sold Product Category"
  },
  "sales_account": {
    "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
    "code": 410099010,
    "name": "Sales Product Category"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "quantity_on_hand": 100,
  "unit_cogs": 1000,
  "total_cogs": 100000,
  "is_active": true,
  "last_updated": "2018-01-25 09:30:45"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "A-001",
  "name": "Product A",
  "category": "ab37040b-6bde-b240-8410-ed40d090fb9f",
  "alias_code": "",
  "alias_name": "",
  "unit_cost": 1000,
  "unit_price": 1500,
  "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
  "purchase_tax": "941327c4-4903-e340-b3df-57f36ef99a5d",
  "sales_tax": "941327c4-4903-e340-b3df-57f36ef99a5d",
  "length": 1,
  "width": 1,
  "height": 1,
  "weight": 1,
  "note": "",
  "main_supplier": null,
  "is_tracked_as_inventory": true,
  "is_purchased": true,
  "is_sold": true,
  "inventory_account": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
  "cogs_account": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
  "sales_account": "f2b03f23-49b0-42d0-b426-f59dcce18182",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "is_active": true
}
Responses200
Body
{
  "id": "3dff4b90-93b2-4d2f-ba22-d45b41774ecb",
  "code": "A-001",
  "name": "Product A",
  "category": {
    "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
    "name": "Product Category A"
  },
  "alias_code": "",
  "alias_name": "",
  "unit_cost": 1000,
  "unit_price": 1500,
  "unit": {
    "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
    "code": "Pcs",
    "name": "pieces"
  },
  "purchase_tax": {
    "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
    "code": ".",
    "name": "No Tax",
    "percentage": 0
  },
  "sales_tax": {
    "id": "941327c4-4903-e340-b3df-57f36ef99a5d",
    "code": ".",
    "name": "No Tax",
    "percentage": 0
  },
  "length": 1,
  "width": 1,
  "height": 1,
  "weight": 1,
  "note": "",
  "main_supplier": null,
  "is_tracked_as_inventory": true,
  "is_purchased": true,
  "is_sold": true,
  "inventory_account": {
    "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
    "code": 140099010,
    "name": "Inventory Product Category"
  },
  "cogs_account": {
    "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
    "code": 510099010,
    "name": "Cost of Goods Sold Product Category"
  },
  "sales_account": {
    "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
    "code": 410099010,
    "name": "Sales Product Category"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "quantity_on_hand": 100,
  "unit_cogs": 1000,
  "total_cogs": 100000,
  "is_active": true,
  "last_updated": "2018-01-25 09:30:45"
}

Update Products
PUT/api/products/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a product. See our HTTP PUT documentation for complete queries method.

The following are elements for update a product :

Element Description
code Product code. Integer maximum 100 characters.
name Product name. String maximum 250 characters.
category Category of product. Unique code for identifier product category. String 36 characters. See Product Categories to get an id.
alias_code Product alias code. String maximum 100 characters.
alias_name Product alias name. String maximum 250 characters.
unit_cost Product unit cost. Number.
unit_price Product unit price. Number.
unit Unit of product. Unique code for identifier unit. String 36 characters. See Units to get an id.
purchase_tax Tax when purchase the product. Unique code for identifier tax. String 36 characters. See Taxes to get an id.
sales_tax Tax when sale the product. Unique code for identifier tax. String 36 characters. See Taxes to get an id.
length Length of product. Number.
width Width of product. Number.
height Height of product. Number.
weight Weight of product. Number.
note Note of product. String maximum 255 characters.
main_supplier Main supplier of product. Unique code for identifier contact. String 36 characters. See Contacts to get an id.
is_tracked_as_inventory Boolean true to product that are tracked as inventory.
is_purchased Boolean true to product that are available on purchase transactions.
is_sold Boolean true to product that are available on sales transactions.
inventory_account Inventory asset account of product. Unique code for identifier account. String 36 characters. See Accounts to get an id.
cogs_account Cost of goods sold account of product. Unique code for identifier account. String 36 characters. See Accounts to get an id.
sales_account Sales account of product. Unique code for identifier account. String 36 characters. See Accounts to get an id.
department Unique code for identifier department. String 36 characters. See Department to get an id.
is_active Boolean true to active product.


DELETE https://app.zahironline.com/api/products/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Products
DELETE/api/products/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a product. See our HTTP DELETE documentation for complete queries method.


Product Categories

GET https://app.zahironline.com/api/product_categories
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
        "name": "Product A",
        "is_tracked_as_inventory": true,
        "is_purchasable": true,
        "is_salable": true,
        "inventory_account": {
            "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
            "code": 140099010,
            "name": "Inventory # 1"
        },
        "cogs_account": {
            "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
            "code": 510099010,
            "name": "Cost of Goods Sold # 1"
        },
        "sales_account": {
            "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
            "code": 410099010,
            "name": "Sales # 1"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "last_updated": "2018-01-19 09:50:52"
    },
    {...},
    {...},
    ...
]

Get Product Categories
GET/api/product_categories

Use this method to retrieve one or many accounts. See our HTTP GET documentation for complete queries method.

The following elements are returned in the accounts response :

Base elements

Element Description
id Unique code for identifier product. String 36 characters.
name Product category name. String maximum 50 characters.
is_tracked_as_inventory Boolean true to category product that are tracked as inventory.
is_purchasable Boolean true to category product that are available on purchase transactions.
is_salable Boolean true to category product that are available on sales transactions.
inventory_account Inventory asset account of product category. See elements for Inventory Account.
cogs_account Cost of goods sold account of product category. See elements for COGS Account.
sales_account Sales account of product category. See elements for Sales Account.
department Department of product category. See elements for Department.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for inventory_account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for cogs_account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for sales_account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

POST https://app.zahironline.com/api/product_categories
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Product A"
}
Responses201
Body
{
  "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
  "name": "Product A",
  "is_tracked_as_inventory": true,
  "is_purchasable": true,
  "is_salable": true,
  "inventory_account": {
    "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
    "code": 140099010,
    "name": "Inventory # 1"
  },
  "cogs_account": {
    "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
    "code": 510099010,
    "name": "Cost of Goods Sold # 1"
  },
  "sales_account": {
    "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
    "code": 410099010,
    "name": "Sales # 1"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "last_updated": "2018-01-19 09:50:52"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Product A",
  "is_tracked_as_inventory": true,
  "is_purchasable": true,
  "is_salable": true,
  "inventory_account": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
  "cogs_account": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
  "sales_account": "f2b03f23-49b0-42d0-b426-f59dcce18182",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73"
}
Responses201
Body
{
  "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
  "name": "Product A",
  "is_tracked_as_inventory": true,
  "is_purchasable": true,
  "is_salable": true,
  "inventory_account": {
    "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
    "code": 140099010,
    "name": "Inventory # 1"
  },
  "cogs_account": {
    "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
    "code": 510099010,
    "name": "Cost of Goods Sold # 1"
  },
  "sales_account": {
    "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
    "code": 410099010,
    "name": "Sales # 1"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "last_updated": "2018-01-19 09:50:52"
}

Create Product Categories
POST/api/product_categories

Use this method to create a product category. See our HTTP POST documentation for complete queries method.

The following are elements for create a product category :

Element Description
name Product category name. String maximum 50 characters. Required.
is_tracked_as_inventory Boolean true to category product that are tracked as inventory.
is_purchasable Boolean true to category product that are available on purchase transactions.
is_salable Boolean true to category product that are available on sales transactions.
inventory_account Inventory asset account of product category. Unique code for identifier account. String 36 characters. See Accounts to get an id.
cogs_account Cost of goods sold account of product category. Unique code for identifier account. String 36 characters. See Accounts to get an id.
sales_account Sales account of product category. Unique code for identifier account. String 36 characters. See Accounts to get an id.
department Department of product category. Unique code for identifier department. String 36 characters. See Department to get an id.
is_create_account Boolean true to create account of category product automaticaly.

PUT https://app.zahironline.com/api/product_categories/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Product A"
}
Responses200
Body
{
  "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
  "name": "Product A",
  "is_tracked_as_inventory": true,
  "is_purchasable": true,
  "is_salable": true,
  "inventory_account": {
    "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
    "code": 140099010,
    "name": "Inventory # 1"
  },
  "cogs_account": {
    "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
    "code": 510099010,
    "name": "Cost of Goods Sold # 1"
  },
  "sales_account": {
    "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
    "code": 410099010,
    "name": "Sales # 1"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "last_updated": "2018-01-19 09:50:52"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Product A",
  "is_tracked_as_inventory": true,
  "is_purchasable": true,
  "is_salable": true,
  "inventory_account": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
  "cogs_account": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
  "sales_account": "f2b03f23-49b0-42d0-b426-f59dcce18182",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73"
}
Responses200
Body
{
  "id": "ab37040b-6bde-b240-8410-ed40d090fb9f",
  "name": "Product A",
  "is_tracked_as_inventory": true,
  "is_purchasable": true,
  "is_salable": true,
  "inventory_account": {
    "id": "dc70be0e-5939-4c1b-b4c7-8fcc2510ba22",
    "code": 140099010,
    "name": "Inventory # 1"
  },
  "cogs_account": {
    "id": "622bde87-beeb-4cdc-bb53-9b3b426b3876",
    "code": 510099010,
    "name": "Cost of Goods Sold # 1"
  },
  "sales_account": {
    "id": "f2b03f23-49b0-42d0-b426-f59dcce18182",
    "code": 410099010,
    "name": "Sales # 1"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "last_updated": "2018-01-19 09:50:52"
}

Update Product Categories
PUT/api/product_categories/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a product category. See our HTTP PUT documentation for complete queries method.

The following are elements for update a product category :

Element Description
name Product category name. String maximum 50 characters.
is_tracked_as_inventory Boolean true to category product that are tracked as inventory.
is_purchasable Boolean true to category product that are available on purchase transactions.
is_salable Boolean true to category product that are available on sales transactions.
inventory_account Inventory asset account of product category. Unique code for identifier account. String 36 characters. See Accounts to get an id.
cogs_account Cost of goods sold account of product category. Unique code for identifier account. String 36 characters. See Accounts to get an id.
sales_account Sales account of product category. Unique code for identifier account. String 36 characters. See Accounts to get an id.
department Department of product category. Unique code for identifier department. String 36 characters. See Department to get an id.
is_create_account Boolean true to create account of category product automaticaly.

DELETE https://app.zahironline.com/api/product_categories/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Product Categories
DELETE/api/product_categories/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a product category. See our HTTP DELETE documentation for complete queries method.


Units

GET https://app.zahironline.com/api/units
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces",
        "description": "Smallest Unit",
        "is_base": true,
        "last_updated": "2016-07-25 22:59:10"
    },
    {...},
    {...},
    ...
]

Get Units
GET/api/units

Use this method to retrieve one or many units. See our HTTP GET documentation for complete queries method.

The following elements are returned in the units response :

Element Description
id Unique code for identifier unit. String 36 characters.
code Unit code. String maximum 15 characters.
name Unit name. String maximum 25 characters.
description Unit alias name. String maximum 255 characters.
is_base Boolean true to base unit.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.


POST https://app.zahironline.com/api/units
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "pieces"
}
Responses201
Body
{
  "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
  "code": "Pcs",
  "name": "pieces",
  "description": "Smallest Unit",
  "is_base": true,
  "last_updated": "2016-07-25 22:59:10"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "Pcs",
  "name": "pieces",
  "description": "Smallest Unit",
  "is_base": true
}
Responses201
Body
{
  "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
  "code": "Pcs",
  "name": "pieces",
  "description": "Smallest Unit",
  "is_base": true,
  "last_updated": "2016-07-25 22:59:10"
}

Create Units
POST/api/units

Use this method to create a unit. See our HTTP POST documentation for complete queries method.

The following are elements for create a unit :

Element Description
code Unit code. String maximum 15 characters.
name Unit name. String maximum 25 characters. Required.
description Unit alias name. String maximum 255 characters.
is_base Boolean true to base unit.


PUT https://app.zahironline.com/api/units/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "pieces"
}
Responses200
Body
{
  "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
  "code": "Pcs",
  "name": "pieces",
  "description": "Smallest Unit",
  "is_base": true,
  "last_updated": "2016-07-25 22:59:10"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "Pcs",
  "name": "pieces",
  "description": "Smallest Unit",
  "is_base": true
}
Responses200
Body
{
  "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
  "code": "Pcs",
  "name": "pieces",
  "description": "Smallest Unit",
  "is_base": true,
  "last_updated": "2016-07-25 22:59:10"
}

Update Units
PUT/api/units/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a unit. See our HTTP PUT documentation for complete queries method.

The following are elements for update a unit :

Element Description
code Unit code. String maximum 15 characters.
name Unit name. String maximum 25 characters.
description Unit alias name. String maximum 255 characters.
is_base Boolean true to base unit.


DELETE https://app.zahironline.com/api/units/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Units
DELETE/api/units/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a unit. See our HTTP DELETE documentation for complete queries method.


Taxes

GET https://app.zahironline.com/api/taxes
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "68b606dd-d4e1-7341-a17f-d3caafbd386a",
        "code": "VAT",
        "name": "Value Added Tax",
        "percentage": 10,
        "purchase_tax_account": {
            "id": "34e2f35f-af92-4665-889e-3a2c020043ff",
            "code": 152099211,
            "name": "Tax Payable # VAT"
        },
        "sale_tax_account": {
            "id": "85b3c3da-aa58-42e4-9ccc-fe9e1a8da999",
            "code": 230099011,
            "name": "Prepaid Tax # VAT"
        },
        "last_updated": "2018-01-19 09:50:52"
    },
    {...},
    {...},
    ...
]

Get Taxes
GET/api/taxes

Use this method to retrieve one or many taxes. See our HTTP GET documentation for complete queries method.

The following elements are returned in the taxes response :

Base elements

Element Description
id Unique code for identifier tax. String 36 characters.
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters.
percentage Tax percentage. Number.
purchase_tax_account Account of tax when purchase. See elements for purchase Tax Account.
sale_tax_account Account of tax when sales. See elements for Sale Tax Account.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for purchase_tax_account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for sales_tax_account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.


POST https://app.zahironline.com/api/taxes
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Value Added Tax"
}
Responses201
Body
{
  "id": "68b606dd-d4e1-7341-a17f-d3caafbd386a",
  "code": "VAT",
  "name": "Value Added Tax",
  "percentage": 10,
  "purchase_tax_account": {
    "id": "34e2f35f-af92-4665-889e-3a2c020043ff",
    "code": 152099211,
    "name": "Tax Payable # VAT"
  },
  "sale_tax_account": {
    "id": "85b3c3da-aa58-42e4-9ccc-fe9e1a8da999",
    "code": 230099011,
    "name": "Prepaid Tax # VAT"
  },
  "last_updated": "2018-01-19 09:50:52"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "VAT",
  "name": "Value Added Tax",
  "percentage": 10,
  "purchase_tax_account": "34e2f35f-af92-4665-889e-3a2c020043ff",
  "sale_tax_account": "85b3c3da-aa58-42e4-9ccc-fe9e1a8da999"
}
Responses201
Body
{
  "id": "68b606dd-d4e1-7341-a17f-d3caafbd386a",
  "code": "VAT",
  "name": "Value Added Tax",
  "percentage": 10,
  "purchase_tax_account": {
    "id": "34e2f35f-af92-4665-889e-3a2c020043ff",
    "code": 152099211,
    "name": "Tax Payable # VAT"
  },
  "sale_tax_account": {
    "id": "85b3c3da-aa58-42e4-9ccc-fe9e1a8da999",
    "code": 230099011,
    "name": "Prepaid Tax # VAT"
  },
  "last_updated": "2018-01-19 09:50:52"
}

Create Taxes
POST/api/taxes

Use this method to create a tax. See our HTTP POST documentation for complete queries method.

The following are elements for create a tax :

Element Description
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters. Required.
percentage Tax percentage. Number.
purchase_tax_account Account of tax when purchase. Unique code for identifier account. String 36 characters. See Accounts to get an id.
sale_tax_account Account of tax when sales. Unique code for identifier account. String 36 characters. See Accounts to get an id.

PUT https://app.zahironline.com/api/taxes/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Value Added Tax"
}
Responses200
Body
{
  "id": "68b606dd-d4e1-7341-a17f-d3caafbd386a",
  "code": "VAT",
  "name": "Value Added Tax",
  "percentage": 10,
  "purchase_tax_account": {
    "id": "34e2f35f-af92-4665-889e-3a2c020043ff",
    "code": 152099211,
    "name": "Tax Payable # VAT"
  },
  "sale_tax_account": {
    "id": "85b3c3da-aa58-42e4-9ccc-fe9e1a8da999",
    "code": 230099011,
    "name": "Prepaid Tax # VAT"
  },
  "last_updated": "2018-01-19 09:50:52"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "VAT",
  "name": "Value Added Tax",
  "percentage": 10,
  "purchase_tax_account": "34e2f35f-af92-4665-889e-3a2c020043ff",
  "sale_tax_account": "85b3c3da-aa58-42e4-9ccc-fe9e1a8da999"
}
Responses200
Body
{
  "id": "68b606dd-d4e1-7341-a17f-d3caafbd386a",
  "code": "VAT",
  "name": "Value Added Tax",
  "percentage": 10,
  "purchase_tax_account": {
    "id": "34e2f35f-af92-4665-889e-3a2c020043ff",
    "code": 152099211,
    "name": "Tax Payable # VAT"
  },
  "sale_tax_account": {
    "id": "85b3c3da-aa58-42e4-9ccc-fe9e1a8da999",
    "code": 230099011,
    "name": "Prepaid Tax # VAT"
  },
  "last_updated": "2018-01-19 09:50:52"
}

Update Taxes
PUT/api/taxes/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a tax. See our HTTP PUT documentation for complete queries method.

The following are elements for update a tax :

Element Description
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters.
percentage Tax percentage. Number.
purchase_tax_account Account of tax when purchase. Unique code for identifier account. String 36 characters. See Accounts to get an id.
sale_tax_account Account of tax when sales. Unique code for identifier account. String 36 characters. See Accounts to get an id.

DELETE https://app.zahironline.com/api/taxes/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Taxes
DELETE/api/taxes/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a tax. See our HTTP DELETE documentation for complete queries method.


Warehouses

GET https://app.zahironline.com/api/warehouses
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
        "code": "Head Quarter",
        "name": "Head Quarter",
        "note": null,
        "address1": null,
        "address2": null,
        "city": null,
        "country": null,
        "postal_code": null,
        "is_container": false,
        "container_dimension": 40,
        "department": null,
        "is_active": true,
        "last_updated": "2016-07-25 22:59:10"
    },
    {...},
    {...},
    ...
]

Get Warehouses
GET/api/warehouses

Use this method to retrieve one or many warehouses. See our HTTP GET documentation for complete queries method.

The following elements are returned in the warehouses response :

Base elements

Element Description
id Unique code for identifier warehouse. String 36 characters.
code Warehouse code. String maximum 15 characters.
name Warehouse name. String maximum 255 characters.
address_1 Address of warehouse line 1. String maximum 100 characters.
address_2 Address of warehouse line 2. String maximum 100 characters.
city City of warehouse. String maximum 25 characters.
country Country of warehouse. String maximum 80 characters.
postal_code Postal code of warehouse. String maximum 10 characters.
notes Note of warehouse. String maximum 255 characters.
is_container Boolean true to container warehouse.
container_dimension Dimension of container warehouse. Number.
is_active Boolean true to active warehouse.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.


POST https://app.zahironline.com/api/warehouses
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Head Quarter"
}
Responses201
Body
{
  "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "code": "Head Quarter",
  "name": "Head Quarter",
  "note": null,
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postal_code": null,
  "is_container": false,
  "container_dimension": 40,
  "department": null,
  "is_active": true,
  "last_updated": "2016-07-25 22:59:10"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "Head Quarter",
  "name": "Head Quarter",
  "note": null,
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postal_code": null,
  "is_container": false,
  "container_dimension": 40,
  "department": null,
  "is_active": true
}
Responses201
Body
{
  "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "code": "Head Quarter",
  "name": "Head Quarter",
  "note": null,
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postal_code": null,
  "is_container": false,
  "container_dimension": 40,
  "department": null,
  "is_active": true,
  "last_updated": "2016-07-25 22:59:10"
}

Create Warehouses
POST/api/warehouses

Use this method to create a warehouse. See our HTTP POST documentation for complete queries method.

The following are elements for create a warehouse :

Element Description
code Warehouse code. String maximum 15 characters.
name Warehouse name. String maximum 255 characters. Required.
address_1 Address of warehouse line 1. String maximum 100 characters.
address_2 Address of warehouse line 2. String maximum 100 characters.
city City of warehouse. String maximum 25 characters.
country Country of warehouse. String maximum 80 characters.
postal_code Postal code of warehouse. String maximum 10 characters.
notes Note of warehouse. String maximum 255 characters.
is_container Boolean true to container warehouse.
container_dimension Dimension of container warehouse. Number.
is_active Boolean true to active warehouse.


PUT https://app.zahironline.com/api/warehouses/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Head Quarter"
}
Responses200
Body
{
  "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "code": "Head Quarter",
  "name": "Head Quarter",
  "note": null,
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postal_code": null,
  "is_container": false,
  "container_dimension": 40,
  "department": null,
  "is_active": true,
  "last_updated": "2016-07-25 22:59:10"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "Head Quarter",
  "name": "Head Quarter",
  "note": null,
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postal_code": null,
  "is_container": false,
  "container_dimension": 40,
  "department": null,
  "is_active": true
}
Responses200
Body
{
  "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "code": "Head Quarter",
  "name": "Head Quarter",
  "note": null,
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "postal_code": null,
  "is_container": false,
  "container_dimension": 40,
  "department": null,
  "is_active": true,
  "last_updated": "2016-07-25 22:59:10"
}

Update Warehouses
PUT/api/warehouses/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a warehouse. See our HTTP PUT documentation for complete queries method.

The following are elements for update a warehouse :

Element Description
code Warehouse code. String maximum 15 characters.
name Warehouse name. String maximum 255 characters.
address_1 Address of warehouse line 1. String maximum 100 characters.
address_2 Address of warehouse line 2. String maximum 100 characters.
city City of warehouse. String maximum 25 characters.
country Country of warehouse. String maximum 80 characters.
postal_code Postal code of warehouse. String maximum 10 characters.
notes Note of warehouse. String maximum 255 characters.
is_container Boolean true to container warehouse.
container_dimension Dimension of container warehouse. Number.
is_active Boolean true to active warehouse.


DELETE https://app.zahironline.com/api/warehouses/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Warehouses
DELETE/api/warehouses/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a warehouse. See our HTTP DELETE documentation for complete queries method.


Departments

GET https://app.zahironline.com/api/departments
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "24c4b8ea-7f4c-48e9-9a4b-e3af267d7d15",
        "code": "1",
        "name": "Department A",
        "manager": {
            "id": "ca2b7a19-f48e-452d-89c9-f1537f15bb64",
            "code": "EMPL",
            "name": "General Employee"
        },
        "parent_department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "field": "field",
        "notes": "some notes",
        "last_updated": "2018-02-12 11:46:42"
    },
    {...},
    {...},
    ...
]

Get Departments
GET/api/departments

Use this method to retrieve one or many departments. See our HTTP GET documentation for complete queries method.

The following elements are returned in the departments response :

Base elements

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.
manager Manager of department. See elements for Manager.
parent_department Parent department. See elements for Parent Department.
field Department field. String maximum 35 characters.
notes Department notes. String maximum 255 characters.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for manager

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for parent_department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

POST https://app.zahironline.com/api/departments
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Department A"
}
Responses201
Body
{
  "id": "24c4b8ea-7f4c-48e9-9a4b-e3af267d7d15",
  "code": "1",
  "name": "Department A",
  "manager": {
    "id": "ca2b7a19-f48e-452d-89c9-f1537f15bb64",
    "code": "EMPL",
    "name": "General Employee"
  },
  "parent_department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "field": "field",
  "notes": "some notes",
  "last_updated": "2018-02-12 11:46:42"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
    "code": "1",
    "name": "Department A",
    "manager": "ca2b7a19-f48e-452d-89c9-f1537f15bb64",
    "parent_department": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "field": "field",
    "notes": "some notes"
},
Responses201
Body
{
  "id": "24c4b8ea-7f4c-48e9-9a4b-e3af267d7d15",
  "code": "1",
  "name": "Department A",
  "manager": {
    "id": "ca2b7a19-f48e-452d-89c9-f1537f15bb64",
    "code": "EMPL",
    "name": "General Employee"
  },
  "parent_department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "field": "field",
  "notes": "some notes",
  "last_updated": "2018-02-12 11:46:42"
}

Create Departments
POST/api/departments

Use this method to create a department. See our HTTP POST documentation for complete queries method.

The following are elements for create a department :

Element Description
code Department code. String maximum 15 characters. Required.
name Department name. String maximum 35 characters. Required.
manager Manager of department. Unique code for identifier contact data. String 36 characters. See Contact to get an id.
parent_department Parent department. Unique code for identifier department data. String 36 characters. See Departments to get an id.
field Department field. String maximum 35 characters.
notes Department note. String maximum 255 characters.

PUT https://app.zahironline.com/api/departments/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Department A"
}
Responses200
Body
{
  "id": "24c4b8ea-7f4c-48e9-9a4b-e3af267d7d15",
  "code": "1",
  "name": "Department A",
  "manager": {
    "id": "ca2b7a19-f48e-452d-89c9-f1537f15bb64",
    "code": "EMPL",
    "name": "General Employee"
  },
  "parent_department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "field": "field",
  "notes": "some notes",
  "last_updated": "2018-02-12 11:46:42"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
    "code": "1",
    "name": "Department A",
    "manager": "ca2b7a19-f48e-452d-89c9-f1537f15bb64",
    "parent_department": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "field": "field",
    "notes": "some notes"
},
Responses200
Body
{
  "id": "24c4b8ea-7f4c-48e9-9a4b-e3af267d7d15",
  "code": "1",
  "name": "Department A",
  "manager": {
    "id": "ca2b7a19-f48e-452d-89c9-f1537f15bb64",
    "code": "EMPL",
    "name": "General Employee"
  },
  "parent_department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "field": "field",
  "notes": "some notes",
  "last_updated": "2018-02-12 11:46:42"
}

Update Departments
PUT/api/departments/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a department. See our HTTP PUT documentation for complete queries method.

The following are elements for update a department :

Element Description
code Department code. String maximum 15 characters. Required.
name Department name. String maximum 35 characters. Required.
manager Manager of department. Unique code for identifier contact data. String 36 characters. See Contact to get an id.
parent_department Parent department. Unique code for identifier department data. String 36 characters. See Departments to get an id.
field Department field. String maximum 35 characters.
notes Department note. String maximum 255 characters.

DELETE https://app.zahironline.com/api/departments/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Departments
DELETE/api/departments/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a department. See our HTTP DELETE documentation for complete queries method.


Projects

GET https://app.zahironline.com/api/projects
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "ee2c4647-1a0a-4a06-8dea-838b38db8392",
        "code": "A-001",
        "name": "Project A",
        "description": "",
        "order_number": "",
        "order_date": "2018-01-30",
        "completion_due_date": "2018-02-06",
        "start_date": "2018-01-30",
        "end_date": null,
        "customer": null,
        "contact_person": "",
        "manager": null,
        "status": {
            "id": 1,
            "name": "Not Started",
            "note": null
        },
        "is_job_order": false,
        "is_use_phase": false,
        "percentage": null,
        "is_active": true,
        "last_updated": "2018-01-30 15:36:03"
    },
    {...},
    {...},
    ...
]

Get Projects
GET/api/projects

Use this method to retrieve one or many projects. See our HTTP GET documentation for complete queries method.

The following elements are returned in the projects response :

Base elements

Element Description
id Unique code for identifier project. String 36 characters.
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.
description Description of project. String maximum 255 characters.
order_number Order number of project. String maximum 35 characters.
order_date Order date of project. Date format YYYY-MM-DD.
completion_due_date Completion due date of project. Date format YYYY-MM-DD.
start_date Start date of project. Date format YYYY-MM-DD.
end_date End date of project. Date format YYYY-MM-DD.
customer Customer of project. See elements for Customer.
contact_person Contact person of project. String maximum 35 characters.
manager Manager of project. See elements for Manager.
status Status of project. See elements for Status.
is_job_order Boolean true to job order project.
is_use_phase Boolean true to use phase project.
percentage Percentage of project. Number.
is_active Boolean true to active project.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for customer

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for manager

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for status

Element Description
id Unique code for identifier status. Number maximum 9 digits.
name Status name. String maximum 35 characters.


POST https://app.zahironline.com/api/projects
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Project A"
}
Responses201
Body
{
  "id": "ee2c4647-1a0a-4a06-8dea-838b38db8392",
  "code": "A-001",
  "name": "Project A",
  "description": "",
  "order_number": "",
  "order_date": "2018-01-30",
  "completion_due_date": "2018-02-06",
  "start_date": "2018-01-30",
  "end_date": null,
  "customer": null,
  "contact_person": "",
  "manager": null,
  "status": {
    "id": 1,
    "name": "Not Started",
    "note": null
  },
  "is_job_order": false,
  "is_use_phase": false,
  "percentage": null,
  "is_active": true,
  "last_updated": "2018-01-30 15:36:03"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "A-001",
  "name": "Project A",
  "description": "",
  "order_number": "",
  "order_date": "2018-01-30",
  "completion_due_date": "2018-02-06",
  "start_date": "2018-01-30",
  "end_date": null,
  "customer": null,
  "contact_person": "",
  "manager": null,
  "status": 1,
  "is_job_order": false,
  "is_use_phase": false,
  "percentage": null,
  "is_active": true
}
Responses201
Body
{
  "id": "ee2c4647-1a0a-4a06-8dea-838b38db8392",
  "code": "A-001",
  "name": "Project A",
  "description": "",
  "order_number": "",
  "order_date": "2018-01-30",
  "completion_due_date": "2018-02-06",
  "start_date": "2018-01-30",
  "end_date": null,
  "customer": null,
  "contact_person": "",
  "manager": null,
  "status": {
    "id": 1,
    "name": "Not Started",
    "note": null
  },
  "is_job_order": false,
  "is_use_phase": false,
  "percentage": null,
  "is_active": true,
  "last_updated": "2018-01-30 15:36:03"
}

Create Projects
POST/api/projects

Use this method to create a project. See our HTTP POST documentation for complete queries method.

The following are elements for create a project :

Element Description
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters. Required.
description Description of project. String maximum 255 characters.
order_number Order number of project. String maximum 35 characters.
order_date Order date of project. Date format YYYY-MM-DD.
completion_due_date Completion due date of project. Date format YYYY-MM-DD.
start_date Start date of project. Date format YYYY-MM-DD.
end_date End date of project. Date format YYYY-MM-DD.
customer Customer of project. Unique code for identifier contact. String 36 characters. See Contacts to get an id.
contact_person Contact person of project. String maximum 35 characters.
manager Manager of project. Unique code for identifier contact. String 36 characters. See Contacts to get an id.
status Status of project. Unique code for identifier contact. String 36 characters. See Contacts to get an id.
is_job_order Boolean true to job order project.
is_use_phase Boolean true to use phase project.
percentage Percentage of project. Number.
is_active Boolean true to active project.

PUT https://app.zahironline.com/api/projects/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Project A"
}
Responses200
Body
{
  "id": "ee2c4647-1a0a-4a06-8dea-838b38db8392",
  "code": "A-001",
  "name": "Project A",
  "description": "",
  "order_number": "",
  "order_date": "2018-01-30",
  "completion_due_date": "2018-02-06",
  "start_date": "2018-01-30",
  "end_date": null,
  "customer": null,
  "contact_person": "",
  "manager": null,
  "status": {
    "id": 1,
    "name": "Not Started",
    "note": null
  },
  "is_job_order": false,
  "is_use_phase": false,
  "percentage": null,
  "is_active": true,
  "last_updated": "2018-01-30 15:36:03"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "A-001",
  "name": "Project A",
  "description": "",
  "order_number": "",
  "order_date": "2018-01-30",
  "completion_due_date": "2018-02-06",
  "start_date": "2018-01-30",
  "end_date": null,
  "customer": null,
  "contact_person": "",
  "manager": null,
  "status": 1,
  "is_job_order": false,
  "is_use_phase": false,
  "percentage": null,
  "is_active": true
}
Responses200
Body
{
  "id": "ee2c4647-1a0a-4a06-8dea-838b38db8392",
  "code": "A-001",
  "name": "Project A",
  "description": "",
  "order_number": "",
  "order_date": "2018-01-30",
  "completion_due_date": "2018-02-06",
  "start_date": "2018-01-30",
  "end_date": null,
  "customer": null,
  "contact_person": "",
  "manager": null,
  "status": {
    "id": 1,
    "name": "Not Started",
    "note": null
  },
  "is_job_order": false,
  "is_use_phase": false,
  "percentage": null,
  "is_active": true,
  "last_updated": "2018-01-30 15:36:03"
}

Update Projects
PUT/api/projects/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a project. See our HTTP PUT documentation for complete queries method.

The following are elements for update a project :

Element Description
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.
description Description of project. String maximum 255 characters.
order_number Order number of project. String maximum 35 characters.
order_date Order date of project. Date format YYYY-MM-DD.
completion_due_date Completion due date of project. Date format YYYY-MM-DD.
start_date Start date of project. Date format YYYY-MM-DD.
end_date End date of project. Date format YYYY-MM-DD.
customer Customer of project. Unique code for identifier contact. String 36 characters. See Contacts to get an id.
contact_person Contact person of project. String maximum 35 characters.
manager Manager of project. Unique code for identifier contact. String 36 characters. See Contacts to get an id.
status Status of project. Unique code for identifier contact. String 36 characters. See Contacts to get an id.
is_job_order Boolean true to job order project.
is_use_phase Boolean true to use phase project.
percentage Percentage of project. Number.
is_active Boolean true to active project.

DELETE https://app.zahironline.com/api/projects/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Projects
DELETE/api/projects/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a project. See our HTTP DELETE documentation for complete queries method.


Project Statuses

GET https://app.zahironline.com/api/project_statuses
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": 1,
        "name": "Not Started",
        "description": null,
        "last_updated": "2016-07-25 22:59:06"
    },
    {...},
    {...},
    ...
]

Get Project Statuses
GET/api/project_statuses

Use this method to retrieve one or many project statuses. See our HTTP GET documentation for complete queries method.

The following elements are returned in the project statuses response :

Base elements

Element Description
id Unique code for identifier project status. String 36 characters.
name project status name. String maximum 35 characters.
description project status description. String maximum 255 characters.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.


POST https://app.zahironline.com/api/project_statuses
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Not Started"
}
Responses201
Body
{
  "id": 1,
  "name": "Not Started",
  "description": null,
  "last_updated": "2016-07-25 22:59:06"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Not Started",
  "description": null
}
Responses201
Body
{
  "id": 1,
  "name": "Not Started",
  "description": null,
  "last_updated": "2016-07-25 22:59:06"
}

Create Project Statuses
POST/api/project_statuses

Use this method to create a project status. See our HTTP POST documentation for complete queries method.

The following are elements for create a project status :

Element Description
name Project status name. String maximum 35 characters. Required.
description Project status description. String maximum 255 characters.

PUT https://app.zahironline.com/api/project_statuses/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Not Started"
}
Responses200
Body
{
  "id": 1,
  "name": "Not Started",
  "description": null,
  "last_updated": "2016-07-25 22:59:06"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Not Started",
  "description": null
}
Responses200
Body
{
  "id": 1,
  "name": "Not Started",
  "description": null,
  "last_updated": "2016-07-25 22:59:06"
}

Update Project Statuses
PUT/api/project_statuses/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a project status. See our HTTP PUT documentation for complete queries method.

The following are elements for update a project status :

Element Description
name Project status name. String maximum 35 characters. Required.
description Project status description. String maximum 255 characters.

DELETE https://app.zahironline.com/api/project_statuses/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete Project Statuses
DELETE/api/project_statuses/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a project status. See our HTTP DELETE documentation for complete queries method.


Currencies

GET https://app.zahironline.com/api/currencies
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
        "code": "USD",
        "name": "Dollar",
        "symbol": "$",
        "is_base": true,
        "last_updated": "2018-01-19 09:50:52"
    },
    {...},
    {...},
    ...
]

Get Currencies
GET/api/currencies

Use this method to retrieve one or many currencies. See our HTTP GET documentation for complete queries method.

The following elements are returned in the currencies response :

Base elements

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String maximum 3 characters.
name Currency name. String maximum 25 characters.
symbol Currency symbol. String maximum 10 characters.
is_base Boolean true to base currency.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.


PUT https://app.zahironline.com/api/currencies/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "USD",
  "name": "Dollar",
  "symbol": "$"
}
Responses200
Body
{
  "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "code": "USD",
  "name": "Dollar",
  "symbol": "$",
  "is_base": true,
  "last_updated": "2018-01-19 09:50:52"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "USD",
  "name": "Dollar",
  "symbol": "$",
  "is_base": true
}
Responses200
Body
{
  "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "code": "USD",
  "name": "Dollar",
  "symbol": "$",
  "is_base": true,
  "last_updated": "2018-01-19 09:50:52"
}

Update Currencies
PUT/api/currencies/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a currency. See our HTTP PUT documentation for complete queries method.

The following are elements for update a currency :

Element Description
code Currency code. String maximum 3 characters.
name Currency name. String maximum 25 characters.
symbol Currency symbol. String maximum 10 characters.
is_base Boolean true to base currency.

POS Payment Methods

GET https://app.zahironline.com/api/pos_payment_methods
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "d5083dca-93ce-4d83-a7ae-0d4006cf86da",
        "code": "Cash",
        "name": "Cash Payment",
        "description": null,
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "account": {
            "id": "c586772c-6419-4d26-b8ed-2db19a7bace9",
            "code": 110099010,
            "name": "Kas Kecil"
        },
        "last_updated": "2018-05-24 14:31:58"
    },
    {...},
    {...},
    ...
]

Get POS Payment Methods
GET/api/pos_payment_methods

Use this method to retrieve one or many pos payment methods. See our HTTP GET documentation for complete queries method.

The following elements are returned in the pos payment methods response :

Base elements

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.
manager Manager of department. See elements for Manager.
parent_department Parent department. See elements for Parent Department.
field Department field. String maximum 35 characters.
notes Department notes. String maximum 255 characters.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for manager

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for parent_department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

POST https://app.zahironline.com/api/pos_payment_methods
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Cash",
  "account": "c586772c-6419-4d26-b8ed-2db19a7bace9"
}
Responses201
Body
{
  "id": "d5083dca-93ce-4d83-a7ae-0d4006cf86da",
  "code": "Cash",
  "name": "Cash Payment",
  "description": null,
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "account": {
    "id": "c586772c-6419-4d26-b8ed-2db19a7bace9",
    "code": 110099010,
    "name": "Kas Kecil"
  },
  "last_updated": "2018-05-24 14:31:58"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "Cash",
  "name": "Cash Payment",
  "description": null,
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "account": "c586772c-6419-4d26-b8ed-2db19a7bace9"
}
Responses201
Body
{
  "id": "d5083dca-93ce-4d83-a7ae-0d4006cf86da",
  "code": "Cash",
  "name": "Cash Payment",
  "description": null,
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "account": {
    "id": "c586772c-6419-4d26-b8ed-2db19a7bace9",
    "code": 110099010,
    "name": "Kas Kecil"
  },
  "last_updated": "2018-05-24 14:31:58"
}

Create POS Payment Methods
POST/api/pos_payment_methods

Use this method to create a pos payment method. See our HTTP POST documentation for complete queries method.

The following are elements for create a pos payment method :

Element Description
code Department code. String maximum 15 characters. Required.
name Department name. String maximum 35 characters. Required.
manager Manager of department. Unique code for identifier contact data. String 36 characters. See Contact to get an id.
parent_department Parent department. Unique code for identifier department data. String 36 characters. See Departments to get an id.
field Department field. String maximum 35 characters.
notes Department note. String maximum 255 characters.

PUT https://app.zahironline.com/api/pos_payment_methods/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "name": "Cash",
  "account": "c586772c-6419-4d26-b8ed-2db19a7bace9"
}
Responses200
Body
{
  "id": "d5083dca-93ce-4d83-a7ae-0d4006cf86da",
  "code": "Cash",
  "name": "Cash Payment",
  "description": null,
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "account": {
    "id": "c586772c-6419-4d26-b8ed-2db19a7bace9",
    "code": 110099010,
    "name": "Kas Kecil"
  },
  "last_updated": "2018-05-24 14:31:58"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "code": "Cash",
  "name": "Cash Payment",
  "description": null,
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "account": "c586772c-6419-4d26-b8ed-2db19a7bace9"
}
Responses200
Body
{
  "id": "d5083dca-93ce-4d83-a7ae-0d4006cf86da",
  "code": "Cash",
  "name": "Cash Payment",
  "description": null,
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "account": {
    "id": "c586772c-6419-4d26-b8ed-2db19a7bace9",
    "code": 110099010,
    "name": "Kas Kecil"
  },
  "last_updated": "2018-05-24 14:31:58"
}

Update POS Payment Methods
PUT/api/pos_payment_methods/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a pos payment method. See our HTTP PUT documentation for complete queries method.

The following are elements for update a pos payment method :

Element Description
code Department code. String maximum 15 characters. Required.
name Department name. String maximum 35 characters. Required.
manager Manager of department. Unique code for identifier contact data. String 36 characters. See Contact to get an id.
parent_department Parent department. Unique code for identifier department data. String 36 characters. See Departments to get an id.
field Department field. String maximum 35 characters.
notes Department note. String maximum 255 characters.

DELETE https://app.zahironline.com/api/pos_payment_methods/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Data has been deleted"
}

Delete POS Payment Methods
DELETE/api/pos_payment_methods/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a pos payment method. See our HTTP DELETE documentation for complete queries method.


Beginning Balances

Receivable Beginning Balances

GET https://app.zahironline.com/api/receivable_beginning_balances
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "03e95841-97ed-4eee-be5e-e79887f98210",
        "invoice_number": "SJ000001",
        "invoice_date": "2018-02-01",
        "description": "Sales, General Customer",
        "sales_order": {
            "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
            "number": "SO000001",
            "date": "2018-02-07"
        },
        "customer": {
            "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
            "code": "CUST",
            "name": "General Customer"
        },
        "salesman": {
            "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
            "code": "EMPL",
            "name": "General Employee"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
            "code": "A-001",
            "name": "Project A"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "USD",
            "name": "Dollar"
        },
        "exchange_rate": 1,
        "term_of_payment": {
            "due_days": 0,
            "due_date": "2018-02-01",
            "late_charge": 0,
            "discount_days": 0,
            "discount_date": "2018-02-01",
            "early_discount": 0
        },
        "document": {
            "number": null,
            "date": "2018-02-01"
        },
        "receivable": {
            "account": {
                "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
                "code": 130099010,
                "name": "Account Receivable"
            },
            "amount": 9900
        },
        "receivable_payment": 9900,
        "balance": 0,
        "last_updated": "2018-02-01 13:55:55"
    },
    {...},
    {...},
    ...
]

Get Receivable Beginning Balances
GET/api/receivable_beginning_balances

Use this method to retrieve one or many receivable beginning balances. See our HTTP GET documentation for complete queries method.

The following elements are returned in the receivable beginning balances response :

Base elements

Element Description
id Unique code for identifier receivable beginning balance. String 36 characters.
invoice_number Invoice number. String maximum 35 characters.
invoice_date Invoice date. Date format YYYY-MM-DD.
delivery_date Delivery date of receivable beginning balance. Date format YYYY-MM-DD.
description Description of receivable beginning balance. String maximum 75 characters.
sales_order Order of receivable beginning balance. See elements for Sales Order.
customer Customer of receivable beginning balance. See elements for Customer.
salesman Salesman of receivable beginning balance. See elements for Salesman.
department Department of receivable beginning balance. See elements for Department.
project Project of receivable beginning balance. See elements for Project.
currency Currency of receivable beginning balance. See elements for Currency.
term_of_payment Term of payment of receivable beginning balance. See elements for Term of Payment.
document Document of receivable beginning balance. See elements for Document.
receivable Account and amount of receivable beginning balance. See elements for Receivable.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for sales_order

Element Description
id Unique code for identifier sales order. String 36 characters.
code Order number. String maximum 35 characters.
name Order date. Date format YYYY-MM-DD.

Elements for customer

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for salesman

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

Elements for project

Element Description
id Unique code for identifier project. String 36 characters.
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for receivable

Element Description
account Receivable account. See elements for Receivable Account.
amount Receivable amount. Number.


POST https://app.zahironline.com/api/receivable_beginning_balances
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "receivable": {
    "amount": 3000
  }
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "description": "Sales, General Customer",
  "sales_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SO000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "receivable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "receivable_payment": 9900,
  "balance": 0,
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "description": "Sales, General Customer",
  "sales_order": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "salesman": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "receivable": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
    "amount": 3000
  }
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "description": "Sales, General Customer",
  "sales_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SO000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "receivable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "receivable_payment": 9900,
  "balance": 0,
  "last_updated": "2018-02-01 13:55:55"
}

Create Receivable Beginning Balances
POST/api/receivable_beginning_balances

Use this method to create a receivable beginning balance. See our HTTP POST documentation for complete queries method.

The following are elements for create a receivable beginning balance :

Element Description
invoice_number invoice number. String maximum 35 characters. Required
invoice_date invoice date. Date format YYYY-MM-DD. Required
description Description of receivable beginning balance. String maximum 75 characters.
sales_order Order of receivable beginning balance. Unique code for identifier sales order. See Sales order to get an id.
customer Customer of receivable beginning balance. Unique code for identifier contact data. See Customer to get an id. Required
salesman Salesman of receivable beginning balance. Unique code for identifier contact data. See Salesman to get an id.
department Department of receivable beginning balance. Unique code for identifier department data. See Department to get an id.
project Project of receivable beginning balance. Unique code for identifier project data. See Project to get an id.
currency Currency of receivable beginning balance. Unique code for identifier currency data. See Currency to get an id.
term_of_payment Term of payment of receivable beginning balance. See elements for Term of Payment.
document Document of receivable beginning balance. See elements for Document.
receivable Account and amount of receivable beginning balance. See elements for Receivable. Required

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for receivable

Element Description
account Receivable account. Unique code for identifier account data Receivable Account to get an id.
amount Receivable amount. Number. Required

PUT https://app.zahironline.com/api/receivable_beginning_balances/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "receivable": {
    "amount": 3000
  }
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "description": "Sales, General Customer",
  "sales_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SO000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "receivable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "receivable_payment": 9900,
  "balance": 0,
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "description": "Sales, General Customer",
  "sales_order": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "salesman": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "receivable": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
    "amount": 3000
  }
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "description": "Sales, General Customer",
  "sales_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SO000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "receivable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "receivable_payment": 9900,
  "balance": 0,
  "last_updated": "2018-02-01 13:55:55"
}

Update Receivable Beginning Balances
PUT/api/receivable_beginning_balances/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a receivable beginning balance. See our HTTP PUT documentation for complete queries method.

The following are elements for update a receivable beginning balance :

Element Description
invoice_number invoice number. String maximum 35 characters.
invoice_date invoice date. Date format YYYY-MM-DD.
description Description of receivable beginning balance. String maximum 75 characters.
sales_order Order of receivable beginning balance. Unique code for identifier sales order. See Sales order to get an id.
customer Customer of receivable beginning balance. Unique code for identifier contact data. See Customer to get an id.
salesman Salesman of receivable beginning balance. Unique code for identifier contact data. See Salesman to get an id.
department Department of receivable beginning balance. Unique code for identifier department data. See Department to get an id.
project Project of receivable beginning balance. Unique code for identifier project data. See Project to get an id.
currency Currency of receivable beginning balance. Unique code for identifier currency data. See Currency to get an id.
term_of_payment Term of payment of receivable beginning balance. See elements for Term of Payment.
document Document of receivable beginning balance. See elements for Document.
receivable Account and amount of receivable beginning balance. See elements for Receivable.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for receivable

Element Description
account Receivable account. Unique code for identifier account data Receivable Account to get an id.
amount Receivable amount.

DELETE https://app.zahironline.com/api/receivable_beginning_balances/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Transaction has been deleted"
}

Delete Receivable Beginning Balances
DELETE/api/receivable_beginning_balances/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a receivable beginning balance. See our HTTP DELETE documentation for complete queries method.


Payable Beginning Balances

GET https://app.zahironline.com/api/payable_beginning_balances
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "03e95841-97ed-4eee-be5e-e79887f98210",
        "invoice_number": "PJ000001",
        "invoice_date": "2018-02-01",
        "description": "Purchase, General Vendor",
        "purchase_order": {
            "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
            "number": "PO000001",
            "date": "2018-02-07"
        },
        "supplier": {
            "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
            "code": "VNDR",
            "name": "General Vendor"
        },
        "employee": {
            "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
            "code": "EMPL",
            "name": "General Employee"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
            "code": "A-001",
            "name": "Project A"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "USD",
            "name": "Dollar"
        },
        "exchange_rate": 1,
        "term_of_payment": {
            "due_days": 0,
            "due_date": "2018-02-01",
            "late_charge": 0,
            "discount_days": 0,
            "discount_date": "2018-02-01",
            "early_discount": 0
        },
        "document": {
            "number": null,
            "date": "2018-02-01"
        },
        "payable": {
            "account": {
                "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
                "code": 210099010,
                "name": "Account Payable"
            },
            "amount": 9900
        },
        "payable_payment": 9900,
        "balance": 0,
        "last_updated": "2018-02-01 13:55:55"
    },
    {...},
    {...},
    ...
]

Get Payable Beginning Balances
GET/api/payable_beginning_balances

Use this method to retrieve one or many payable beginning balances. See our HTTP GET documentation for complete queries method.

The following elements are returned in the payable beginning balances response :

Base elements

Element Description
id Unique code for identifier payable beginning balance. String 36 characters.
invoice_number Invoice number. String maximum 35 characters.
invoice_date Invoice date. Date format YYYY-MM-DD.
delivery_date Delivery date of payable beginning balance. Date format YYYY-MM-DD.
description Description of payable beginning balance. String maximum 75 characters.
purchase_order Order of payable beginning balance. See elements for Purchase Order.
supplier Supplier of payable beginning balance. See elements for Supplier.
employee Employee of payable beginning balance. See elements for Employee.
department Department of payable beginning balance. See elements for Department.
project Project of payable beginning balance. See elements for Project.
currency Currency of payable beginning balance. See elements for Currency.
term_of_payment Term of payment of payable beginning balance. See elements for Term of Payment.
document Document of payable beginning balance. See elements for Document.
payable Account and amount of payable beginning balance. See elements for payable.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for purchase_order

Element Description
id Unique code for identifier purchase order. String 36 characters.
code Order number. String maximum 35 characters.
name Order date. Date format YYYY-MM-DD.

Elements for supplier

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for employee

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

Elements for project

Element Description
id Unique code for identifier project. String 36 characters.
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for payable

Element Description
account payable account. See elements for payable Account.
amount payable amount. Number.


POST https://app.zahironline.com/api/payable_beginning_balances
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "PJ000001",
  "invoice_date": "2018-02-01",
  "supplier": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "payable": {
    "amount": 3000
  }
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "PJ000001",
  "invoice_date": "2018-02-01",
  "description": "Purchase, General Vendor",
  "purchase_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "PO000001",
    "date": "2018-02-07"
  },
  "supplier": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "VNDR",
    "name": "General Vendor"
  },
  "employee": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "payable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 210099010,
      "name": "Account Payable"
    },
    "amount": 9900
  },
  "payable_payment": 9900,
  "balance": 0,
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "description": "Beginning Balance, General Customer",
  "purchase_order": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
  "supplier": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "employee": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "payable": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
    "amount": 3000
  }
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "PJ000001",
  "invoice_date": "2018-02-01",
  "description": "Purchase, General Vendor",
  "purchase_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "PO000001",
    "date": "2018-02-07"
  },
  "supplier": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "VNDR",
    "name": "General Vendor"
  },
  "employee": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "payable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 210099010,
      "name": "Account Payable"
    },
    "amount": 9900
  },
  "payable_payment": 9900,
  "balance": 0,
  "last_updated": "2018-02-01 13:55:55"
}

Create Payable Beginning Balances
POST/api/payable_beginning_balances

Use this method to create a payable beginning balance. See our HTTP POST documentation for complete queries method.

The following are elements for create a payable beginning balance :

Element Description
invoice_number invoice number. String maximum 35 characters. Required
invoice_date invoice date. Date format YYYY-MM-DD. Required
description Description of payable beginning balance. String maximum 75 characters.
purchase_orders Order of payable beginning balance. Unique code for identifier purchase order. See Purchase order to get an id.
supplier Supplier of payable beginning balance. Unique code for identifier contact data. See Supplier to get an id. Required
employee Employee of payable beginning balance. Unique code for identifier contact data. See Employee to get an id.
department Department of payable beginning balance. Unique code for identifier department data. See Department to get an id.
project Project of payable beginning balance. Unique code for identifier project data. See Project to get an id.
currency Currency of payable beginning balance. Unique code for identifier currency data. See Currency to get an id.
term_of_payment Term of payment of payable beginning balance. See elements for Term of Payment.
document Document of payable beginning balance. See elements for Document.
payable Account and amount of payable beginning balance. See elements for payable. Required

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for payable

Element Description
account payable account. Unique code for identifier account data payable Account to get an id.
amount payable amount. Number. Required

PUT https://app.zahironline.com/api/payable_beginning_balances/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "PJ000001",
  "invoice_date": "2018-02-01",
  "supplier": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "payable": {
    "amount": 3000
  }
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "PJ000001",
  "invoice_date": "2018-02-01",
  "description": "Purchase, General Vendor",
  "purchase_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "PO000001",
    "date": "2018-02-07"
  },
  "supplier": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "VNDR",
    "name": "General Vendor"
  },
  "employee": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "payable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 210099010,
      "name": "Account Payable"
    },
    "amount": 9900
  },
  "payable_payment": 9900,
  "balance": 0,
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "description": "Beginning Balance, General Customer",
  "purchase_order": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
  "supplier": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "employee": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "payable": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
    "amount": 3000
  }
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "PJ000001",
  "invoice_date": "2018-02-01",
  "description": "Purchase, General Vendor",
  "purchase_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "PO000001",
    "date": "2018-02-07"
  },
  "supplier": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "VNDR",
    "name": "General Vendor"
  },
  "employee": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "payable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 210099010,
      "name": "Account Payable"
    },
    "amount": 9900
  },
  "payable_payment": 9900,
  "balance": 0,
  "last_updated": "2018-02-01 13:55:55"
}

Update Payable Beginning Balances
PUT/api/payable_beginning_balances/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a payable beginning balance. See our HTTP PUT documentation for complete queries method.

The following are elements for update a payable beginning balance :

Element Description
invoice_number invoice number. String maximum 35 characters.
invoice_date invoice date. Date format YYYY-MM-DD.
description Description of payable beginning balance. String maximum 75 characters.
purchase_orders Order of payable beginning balance. Unique code for identifier purchase order. See Purchase order to get an id.
supplier Supplier of payable beginning balance. Unique code for identifier contact data. See Supplier to get an id.
employee Employee of payable beginning balance. Unique code for identifier contact data. See Employee to get an id.
department Department of payable beginning balance. Unique code for identifier department data. See Department to get an id.
project Project of payable beginning balance. Unique code for identifier project data. See Project to get an id.
currency Currency of payable beginning balance. Unique code for identifier currency data. See Currency to get an id.
term_of_payment Term of payment of payable beginning balance. See elements for Term of Payment.
document Document of payable beginning balance. See elements for Document.
payable Account and amount of payable beginning balance. See elements for payable.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for payable

Element Description
account payable account. Unique code for identifier account data payable Account to get an id.
amount payable amount. Number.

DELETE https://app.zahironline.com/api/payable_beginning_balances/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Transaction has been deleted"
}

Delete Payable Beginning Balances
DELETE/api/payable_beginning_balances/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a payable beginning balance. See our HTTP DELETE documentation for complete queries method.


Account Beginning Balances

GET https://app.zahironline.com/api/account_beginning_balances
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "dc01ab3d-935b-4daf-8ef6-74232b491b2e",
            "code": "N/A",
            "name": "N/A"
        },
        "account": {
            "id": "2ef089c3-08ac-4c51-9759-60baad92b957",
            "code": 110099010,
            "name": "Petty Cash",
            "alias_name": "Petty Cash"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "IDR",
            "name": "Rupiah",
            "symbol": "Rp"
        },
        "exchange_rate": 1,
        "debit_origin": 1000,
        "credit_origin": 0,
        "debit": 1000,
        "credit": 0,
        "last_updated": null
    },
    {...},
    {...},
    ...
]

Get Account Beginning Balances
GET/api/account_beginning_balances

Use this method to retrieve account beginning balances. See our HTTP GET documentation for complete queries method.

The following elements are returned in the account beginning balances response :

Base elements

Element Description
department Department of account beginning balance. See elements for Department.
project Project of account beginning balance. See elements for Project.
account Account of account beginning balances. See elements for Account.
currency Currency of account beginning balance. See elements for Currency.
exchange_rate Exchange rate. Number.
debit_origin Debit amount on real currency. Number.
credit_origin Credit amount on real currency. Number.
debit Debit amount on base currency. Number.
credit Credit amount on base currency. Number.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

PUT https://app.zahironline.com/api/account_beginning_balances
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
[
  {
    "account": "2ef089c3-08ac-4c51-9759-60baad92b957",
    "debit_origin": 1000,
    "credit_origin": 0
  }
]
Responses200
Body
[
    {
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "dc01ab3d-935b-4daf-8ef6-74232b491b2e",
            "code": "N/A",
            "name": "N/A"
        },
        "account": {
            "id": "2ef089c3-08ac-4c51-9759-60baad92b957",
            "code": 110099010,
            "name": "Petty Cash",
            "alias_name": "Petty Cash"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "IDR",
            "name": "Rupiah",
            "symbol": "Rp"
        },
        "exchange_rate": 1,
        "debit_origin": 1000,
        "credit_origin": 0,
        "debit": 1000,
        "credit": 0,
        "last_updated": null
    },
    {...},
    {...},
    ...
]
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
[
  {
    "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "project": "dc01ab3d-935b-4daf-8ef6-74232b491b2e",
    "account": "2ef089c3-08ac-4c51-9759-60baad92b957",
    "exchange_rate": 1,
    "debit_origin": 1000,
    "credit_origin": 0,
    "debit": 1000,
    "credit": 0
  }
]
Responses200
Body
[
    {
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "dc01ab3d-935b-4daf-8ef6-74232b491b2e",
            "code": "N/A",
            "name": "N/A"
        },
        "account": {
            "id": "2ef089c3-08ac-4c51-9759-60baad92b957",
            "code": 110099010,
            "name": "Petty Cash",
            "alias_name": "Petty Cash"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "IDR",
            "name": "Rupiah",
            "symbol": "Rp"
        },
        "exchange_rate": 1,
        "debit_origin": 1000,
        "credit_origin": 0,
        "debit": 1000,
        "credit": 0,
        "last_updated": null
    },
    {...},
    {...},
    ...
]

Update Account Beginning Balances
PUT/api/account_beginning_balances

Use this method to update one or many account beginning balances. See our HTTP PUT documentation for complete queries method.

The following are elements for update one or many account beginning balances :

Element Description
department Department of account beginning balance. Unique code for identifier department data. String 36 characters. See Department.
project Project of account beginning balance. Unique code for identifier project data. String 36 characters. See Project.
account Account of account beginning balance. Unique code for identifier account data. String 36 characters. See Account. Required.
currency Currency of account beginning balance. Unique code for identifier currency data. String 36 characters. See Currency.
exchange_rate Exchange rate. Number.
debit_origin Debit amount on real currency. Number. Required.
credit_origin Credit amount on real currency. Number. Required.
debit Debit amount on base currency. Number.
credit Credit amount on base currency. Number.


Sales

Sales Quotations

GET https://app.zahironline.com/api/sales_quotation
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "03e95841-97ed-4eee-be5e-e79887f98210",
        "quotation_number": "SQ000001",
        "quotation_date": "2018-02-01",
        "validity_date": "2018-02-01",
        "is_finished": false,
        "description": "Sales, General Customer",
        "customer": {
            "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
            "code": "CUST",
            "name": "General Customer"
        },
        "salesman": {
            "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
            "code": "EMPL",
            "name": "General Employee"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
            "code": "A-001",
            "name": "Project A"
        },
        "warehouse": {
            "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
            "code": "Head Quarter",
            "name": "Head Quarter"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "USD",
            "name": "Dollar",
            "exchange_rate": 1
        },
        "is_cash": false,
        "term_of_payment": {
            "due_days": 0,
            "late_charge": 0,
            "discount_days": 0,
            "early_discount": 0
        },
        "document": {
            "number": null,
            "date": "2018-02-01"
        },
        "line_items": [
            {
                "id": 990000009,
                "product": {
                    "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
                    "code": "PA-001",
                    "name": "Product A"
                },
                "account": {
                    "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
                    "code": 410099010,
                    "name": "Sales zzz"
                },
                "description": null,
                "notes": null,
                "quantity": 10,
                "unit": {
                    "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
                    "code": "Pcs",
                    "name": "pieces"
                },
                "unit_price": 1000,
                "discount": 10,
                "tax": {
                    "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
                    "code": "VAT 10",
                    "name": "Value Added Tax 10%",
                    "percentage": 10,
                    "account": {
                        "id": "709ec79f-4f38-41be-8422-994f7d18737f",
                        "code": 230099011,
                        "name": "Tax Payable # VAT"
                    }
                },
                "department": {
                    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
                    "code": "99",
                    "name": "Head Quarter"
                },
                "project": {
                    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
                    "code": "A-001",
                    "name": "Project A"
                }
            }
        ],
        "others": {
            "account": {
                "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
                "code": 490099010,
                "name": "Other Revenues"
            },
            "amount": 0
        },
        "total": {
            "account": {
                "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
                "code": 130099010,
                "name": "Account Receivable"
            },
            "amount": 9900
        },
        "last_updated": "2018-02-01 13:55:55"
    },
    {...},
    {...},
    ...
]

Get Sales Quotations
GET/api/sales_quotation

Use this method to retrieve one or many sales quotations. See our HTTP GET documentation for complete queries method.

The following elements are returned in the sales quotations response :

Base elements

Element Description
id Unique code for identifier sales quotation. String 36 characters.
quotation_number Quotation number. String maximum 35 characters.
quotation_date Quotation date. Date format YYYY-MM-DD.
validity_date Validity date of sales quotation. Date format YYYY-MM-DD.
is_finished Boolean true to finished sales quotation.
description Description of sales quotation. String maximum 75 characters.
customer Customer of sales quotation. See elements for Customer.
salesman Salesman of sales quotation. See elements for Salesman.
department Department of sales quotation. See elements for Department.
project Project of sales quotation. See elements for Project.
warehouse Warehouse of sales quotation. See elements for Warehouse.
currency Currency of sales quotation. See elements for Currency.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales quotation. See elements for Term of Payment.
document Document of sales quotation. See elements for Document.
line_items Line items of sales quotation. See elements for Line Items.
others Others of sales quotation. See elements for Others.
total Total amount of sales quotation. See elements for Total.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for customer

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for salesman

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

Elements for project

Element Description
id Unique code for identifier project. String 36 characters.
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.

Elements for warehouse

Element Description
id Unique code for identifier warehouse. String 36 characters.
code Warehouse code. String maximum 15 characters.
name Warehouse name. String maximum 255 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. See elements for Product.
account Item sales account. See elements for Sales Account.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. See elements for Unit.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. See elements for Tax.
department Item department. See elements for Department.
project Item project. See elements for Project.

Elements for others

Element Description
account Others account. See elements for Others Account.
amount Others amount. Number.

Elements for total

Element Description
account Total account. See elements for Total Account.
amount Total amount. Number.

Elements for product

Element Description
id Unique code for identifier product. String 36 characters.
code Product code. String maximum 100 characters.
name Product name. String maximum 250 characters.

Elements for account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for unit

Element Description
id Unique code for identifier unit. String 36 characters.
code Unit code. String maximum 15 characters.
name Unit name. String maximum 25 characters.

Elements for tax

Element Description
id Unique code for identifier tax. String 36 characters.
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters.
percentage Tax rate (percentage). Number.
account Tax account. See elements for Tax Account.

POST https://app.zahironline.com/api/sales_quotation
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "quotation_date": "2018-02-01",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "quantity": 10,
      "unit_price": 1000
    }
  ]
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "quotation_number": "SQ000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "quotation_number": "SQ000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "salesman": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "warehouse": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "account": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
      "unit_price": 1000,
      "discount": 10,
      "tax": "66881eb0-319f-4466-bd37-c82ca38a3f03",
      "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
      "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b"
    }
  ],
  "others": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "total": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38"
  }
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "quotation_number": "SQ000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}

Create Sales Quotations
POST/api/sales_quotation

Use this method to create a sales quotation. See our HTTP POST documentation for complete queries method.

The following are elements for create a sales quotation :

Element Description
id Unique code for identifier sales quotation. String 36 characters.
quotation_number Quotation number. String maximum 35 characters.
quotation_date Quotation date. Date format YYYY-MM-DD.
validity_date Validity date of sales quotation. Date format YYYY-MM-DD.
is_finished Boolean true to finished sales quotation.
description Description of sales quotation. String maximum 75 characters.
customer Customer of sales quotation. Unique code for identifier contact data. See Customer to get an id.
salesman Salesman of sales quotation. Unique code for identifier contact data. See Salesman to get an id.
department Department of sales quotation. Unique code for identifier department data. See Department to get an id.
project Project of sales quotation. Unique code for identifier project data. See Project to get an id.
warehouse Warehouse of sales quotation. Unique code for identifier warehouse data. See Warehouse to get an id.
currency Currency of sales quotation. Unique code for identifier currency data. See Currency to get an id.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales quotation. See elements for Term of Payment.
document Document of sales quotation. See elements for Document.
line_items Line items of sales quotation. See elements for Line Items.
others Others of sales quotation. See elements for Others.
total Total amount of sales quotation. See elements for Total.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. Unique code for identifier product data Product to get an id.
account Item sales account. Unique code for identifier account data Sales Account to get an id.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. Unique code for identifier unit data Unit to get an id.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. Unique code for identifier tax data Tax to get an id.
department Item department. Unique code for identifier department data Department to get an id.
project Item project. Unique code for identifier project data Project to get an id.

Elements for others

Element Description
account Others account. Unique code for identifier account data Others Account to get an id.
amount Others amount. Number.

Elements for total

Element Description
account Total account. Unique code for identifier account data Total Account to get an id.
amount Total amount. Number.

PUT https://app.zahironline.com/api/sales_quotation/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "quotation_date": "2018-02-01",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "quantity": 10,
      "unit_price": 1000
    }
  ]
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "quotation_number": "SQ000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "quotation_number": "SQ000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "salesman": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "warehouse": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "account": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
      "unit_price": 1000,
      "discount": 10,
      "tax": "66881eb0-319f-4466-bd37-c82ca38a3f03",
      "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
      "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b"
    }
  ],
  "others": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "total": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38"
  }
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "quotation_number": "SQ000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}

Update Sales Quotations
PUT/api/sales_quotation/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a sales quotation. See our HTTP PUT documentation for complete queries method.

The following are elements for update a sales quotation :

Element Description
id Unique code for identifier sales quotation. String 36 characters.
quotation_number Quotation number. String maximum 35 characters.
quotation_date Quotation date. Date format YYYY-MM-DD.
validity_date Validity date of sales quotation. Date format YYYY-MM-DD.
is_finished Boolean true to finished sales quotation.
description Description of sales quotation. String maximum 75 characters.
customer Customer of sales quotation. Unique code for identifier contact data. See Customer to get an id.
salesman Salesman of sales quotation. Unique code for identifier contact data. See Salesman to get an id.
department Department of sales quotation. Unique code for identifier department data. See Department to get an id.
project Project of sales quotation. Unique code for identifier project data. See Project to get an id.
warehouse Warehouse of sales quotation. Unique code for identifier warehouse data. See Warehouse to get an id.
currency Currency of sales quotation. Unique code for identifier currency data. See Currency to get an id.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales quotation. See elements for Term of Payment.
document Document of sales quotation. See elements for Document.
line_items Line items of sales quotation. See elements for Line Items.
others Others of sales quotation. See elements for Others.
total Total amount of sales quotation. See elements for Total.
reason Reason for update transaction. String maximum 255 characters. Required.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. Unique code for identifier product data Product to get an id.
account Item sales account. Unique code for identifier account data Sales Account to get an id.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. Unique code for identifier unit data Unit to get an id.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. Unique code for identifier tax data Tax to get an id.
department Item department. Unique code for identifier department data Department to get an id.
project Item project. Unique code for identifier project data Project to get an id.

Elements for others

Element Description
account Others account. Unique code for identifier account data Others Account to get an id.
amount Others amount. Number.

Elements for total

Element Description
account Total account. Unique code for identifier account data Total Account to get an id.
amount Total amount. Number.

DELETE https://app.zahironline.com/api/sales_quotation/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Transaction has been deleted"
}

Delete Sales Quotations
DELETE/api/sales_quotation/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a sales quotation. See our HTTP DELETE documentation for complete queries method.


Sales Orders

GET https://app.zahironline.com/api/sales_order
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "03e95841-97ed-4eee-be5e-e79887f98210",
        "order_number": "SO000001",
        "order_date": "2018-02-01",
        "validity_date": "2018-02-01",
        "is_finished": false,
        "description": "Sales, General Customer",
        "sales_quotation": {
            "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
            "number": "SQ000001",
            "date": "2018-02-07"
        },
        "customer": {
            "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
            "code": "CUST",
            "name": "General Customer"
        },
        "salesman": {
            "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
            "code": "EMPL",
            "name": "General Employee"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
            "code": "A-001",
            "name": "Project A"
        },
        "warehouse": {
            "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
            "code": "Head Quarter",
            "name": "Head Quarter"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "USD",
            "name": "Dollar",
            "exchange_rate": 1
        },
        "is_cash": false,
        "term_of_payment": {
            "due_days": 0,
            "late_charge": 0,
            "discount_days": 0,
            "early_discount": 0
        },
        "document": {
            "number": null,
            "date": "2018-02-01"
        },
        "line_items": [
            {
                "id": 990000009,
                "product": {
                    "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
                    "code": "PA-001",
                    "name": "Product A"
                },
                "account": {
                    "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
                    "code": 410099010,
                    "name": "Sales zzz"
                },
                "description": null,
                "notes": null,
                "quantity": 10,
                "unit": {
                    "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
                    "code": "Pcs",
                    "name": "pieces"
                },
                "unit_price": 1000,
                "discount": 10,
                "tax": {
                    "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
                    "code": "VAT 10",
                    "name": "Value Added Tax 10%",
                    "percentage": 10,
                    "account": {
                        "id": "709ec79f-4f38-41be-8422-994f7d18737f",
                        "code": 230099011,
                        "name": "Tax Payable # VAT"
                    }
                },
                "department": {
                    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
                    "code": "99",
                    "name": "Head Quarter"
                },
                "project": {
                    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
                    "code": "A-001",
                    "name": "Project A"
                }
            }
        ],
        "others": {
            "account": {
                "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
                "code": 490099010,
                "name": "Other Revenues"
            },
            "amount": 0
        },
        "total": {
            "account": {
                "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
                "code": 130099010,
                "name": "Account Receivable"
            },
            "amount": 9900
        },
        "last_updated": "2018-02-01 13:55:55"
    },
    {...},
    {...},
    ...
]

Get Sales Orders
GET/api/sales_order

Use this method to retrieve one or many sales orders. See our HTTP GET documentation for complete queries method.

The following elements are returned in the sales orders response :

Base elements

Element Description
id Unique code for identifier sales order. String 36 characters.
order_number Order number. String maximum 35 characters.
order_date Order date. Date format YYYY-MM-DD.
validity_date Validity date of sales order. Date format YYYY-MM-DD.
is_finished Boolean true to finished sales order.
description Description of sales order. String maximum 75 characters.
sales_quotation Quotation of sales order. See elements for Sales Quotation.
customer Customer of sales order. See elements for Customer.
salesman Salesman of sales order. See elements for Salesman.
department Department of sales order. See elements for Department.
project Project of sales order. See elements for Project.
warehouse Warehouse of sales order. See elements for Warehouse.
currency Currency of sales order. See elements for Currency.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales order. See elements for Term of Payment.
document Document of sales order. See elements for Document.
line_items Line items of sales order. See elements for Line Items.
others Others of sales order. See elements for Others.
total Total amount of sales order. See elements for Total.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for sales_quotation

Element Description
id Unique code for identifier sales quotation. String 36 characters.
code Quotation number. String maximum 35 characters.
name Quotation date. Date format YYYY-MM-DD.

Elements for customer

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for salesman

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

Elements for project

Element Description
id Unique code for identifier project. String 36 characters.
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.

Elements for warehouse

Element Description
id Unique code for identifier warehouse. String 36 characters.
code Warehouse code. String maximum 15 characters.
name Warehouse name. String maximum 255 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. See elements for Product.
account Item sales account. See elements for Sales Account.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. See elements for Unit.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. See elements for Tax.
department Item department. See elements for Department.
project Item project. See elements for Project.

Elements for others

Element Description
account Others account. See elements for Others Account.
amount Others amount. Number.

Elements for total

Element Description
account Total account. See elements for Total Account.
amount Total amount. Number.

Elements for product

Element Description
id Unique code for identifier product. String 36 characters.
code Product code. String maximum 100 characters.
name Product name. String maximum 250 characters.

Elements for account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for unit

Element Description
id Unique code for identifier unit. String 36 characters.
code Unit code. String maximum 15 characters.
name Unit name. String maximum 25 characters.

Elements for tax

Element Description
id Unique code for identifier tax. String 36 characters.
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters.
percentage Tax rate (percentage). Number.
account Tax account. See elements for Tax Account.

POST https://app.zahironline.com/api/sales_order
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "order_date": "2018-02-01",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "quantity": 10,
      "unit_price": 1000
    }
  ]
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "order_number": "SO000001",
  "order_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "sales_quotation": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SQ000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "order_number": "SO000001",
  "order_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "sales_quotation": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "salesman": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "warehouse": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "account": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
      "unit_price": 1000,
      "discount": 10,
      "tax": "66881eb0-319f-4466-bd37-c82ca38a3f03",
      "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
      "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b"
    }
  ],
  "others": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "total": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38"
  }
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "order_number": "SO000001",
  "order_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "sales_quotation": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SQ000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}

Create Sales Orders
POST/api/sales_order

Use this method to create a sales order. See our HTTP POST documentation for complete queries method.

The following are elements for create a sales order :

Element Description
id Unique code for identifier sales order. String 36 characters.
order_number order number. String maximum 35 characters.
order_date order date. Date format YYYY-MM-DD.
validity_date Validity date of sales order. Date format YYYY-MM-DD.
is_finished Boolean true to finished sales order.
description Description of sales order. String maximum 75 characters.
sales_quotation Quotation of sales order. Unique code for identifier sales quotation. See Sales Quotation to get an id.
customer Customer of sales order. Unique code for identifier contact data. See Customer to get an id.
salesman Salesman of sales order. Unique code for identifier contact data. See Salesman to get an id.
department Department of sales order. Unique code for identifier department data. See Department to get an id.
project Project of sales order. Unique code for identifier project data. See Project to get an id.
warehouse Warehouse of sales order. Unique code for identifier warehouse data. See Warehouse to get an id.
currency Currency of sales order. Unique code for identifier currency data. See Currency to get an id.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales order. See elements for Term of Payment.
document Document of sales order. See elements for Document.
line_items Line items of sales order. See elements for Line Items.
others Others of sales order. See elements for Others.
total Total amount of sales order. See elements for Total.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. Unique code for identifier product data Product to get an id.
account Item sales account. Unique code for identifier account data Sales Account to get an id.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. Unique code for identifier unit data Unit to get an id.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. Unique code for identifier tax data Tax to get an id.
department Item department. Unique code for identifier department data Department to get an id.
project Item project. Unique code for identifier project data Project to get an id.

Elements for others

Element Description
account Others account. Unique code for identifier account data Others Account to get an id.
amount Others amount. Number.

Elements for total

Element Description
account Total account. Unique code for identifier account data Total Account to get an id.
amount Total amount. Number.

PUT https://app.zahironline.com/api/sales_order/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "order_date": "2018-02-01",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "quantity": 10,
      "unit_price": 1000
    }
  ]
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "order_number": "SO000001",
  "order_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "sales_quotation": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SQ000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "order_number": "SO000001",
  "order_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "sales_quotation": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "salesman": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "warehouse": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "account": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
      "unit_price": 1000,
      "discount": 10,
      "tax": "66881eb0-319f-4466-bd37-c82ca38a3f03",
      "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
      "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b"
    }
  ],
  "others": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "total": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38"
  }
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "order_number": "SO000001",
  "order_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Sales, General Customer",
  "sales_quotation": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SQ000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}

Update Sales Orders
PUT/api/sales_order/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a sales order. See our HTTP PUT documentation for complete queries method.

The following are elements for update a sales order :

Element Description
id Unique code for identifier sales order. String 36 characters.
order_number order number. String maximum 35 characters.
order_date order date. Date format YYYY-MM-DD.
validity_date Validity date of sales order. Date format YYYY-MM-DD.
is_finished Boolean true to finished sales order.
description Description of sales order. String maximum 75 characters.
sales_quotation Quotation of sales order. Unique code for identifier sales quotation. See Sales Quotation to get an id.
customer Customer of sales order. Unique code for identifier contact data. See Customer to get an id.
salesman Salesman of sales order. Unique code for identifier contact data. See Salesman to get an id.
department Department of sales order. Unique code for identifier department data. See Department to get an id.
project Project of sales order. Unique code for identifier project data. See Project to get an id.
warehouse Warehouse of sales order. Unique code for identifier warehouse data. See Warehouse to get an id.
currency Currency of sales order. Unique code for identifier currency data. See Currency to get an id.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales order. See elements for Term of Payment.
document Document of sales order. See elements for Document.
line_items Line items of sales order. See elements for Line Items.
others Others of sales order. See elements for Others.
total Total amount of sales order. See elements for Total.
reason Reason for update transaction. String maximum 255 characters. Required.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. Unique code for identifier product data Product to get an id.
account Item sales account. Unique code for identifier account data Sales Account to get an id.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. Unique code for identifier unit data Unit to get an id.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. Unique code for identifier tax data Tax to get an id.
department Item department. Unique code for identifier department data Department to get an id.
project Item project. Unique code for identifier project data Project to get an id.

Elements for others

Element Description
account Others account. Unique code for identifier account data Others Account to get an id.
amount Others amount. Number.

Elements for total

Element Description
account Total account. Unique code for identifier account data Total Account to get an id.
amount Total amount. Number.

DELETE https://app.zahironline.com/api/sales_order/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Transaction has been deleted"
}

Delete Sales Orders
DELETE/api/sales_order/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a sales order. See our HTTP DELETE documentation for complete queries method.


Sales Invoices

GET https://app.zahironline.com/api/sales_invoice
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "03e95841-97ed-4eee-be5e-e79887f98210",
        "invoice_number": "SJ000001",
        "invoice_date": "2018-02-01",
        "delivery_date": "2018-02-01",
        "is_posted": false,
        "description": "Sales, General Customer",
        "sales_order": {
            "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
            "number": "SO000001",
            "date": "2018-02-07"
        },
        "customer": {
            "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
            "code": "CUST",
            "name": "General Customer"
        },
        "salesman": {
            "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
            "code": "EMPL",
            "name": "General Employee"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
            "code": "A-001",
            "name": "Project A"
        },
        "warehouse": {
            "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
            "code": "Head Quarter",
            "name": "Head Quarter"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "USD",
            "name": "Dollar",
            "exchange_rate": 1
        },
        "is_cash": false,
        "term_of_payment": {
            "due_days": 0,
            "due_date": "2018-02-01",
            "late_charge": 0,
            "discount_days": 0,
            "discount_date": "2018-02-01",
            "early_discount": 0
        },
        "document": {
            "number": null,
            "date": "2018-02-01"
        },
        "line_items": [
            {
                "id": 990000009,
                "product": {
                    "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
                    "code": "PA-001",
                    "name": "Product A"
                },
                "account": {
                    "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
                    "code": 410099010,
                    "name": "Sales zzz"
                },
                "description": null,
                "notes": null,
                "quantity": 10,
                "unit": {
                    "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
                    "code": "Pcs",
                    "name": "pieces"
                },
                "unit_price": 1000,
                "discount": 10,
                "tax": {
                    "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
                    "code": "VAT 10",
                    "name": "Value Added Tax 10%",
                    "percentage": 10,
                    "account": {
                        "id": "709ec79f-4f38-41be-8422-994f7d18737f",
                        "code": 230099011,
                        "name": "Tax Payable # VAT"
                    }
                },
                "department": {
                    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
                    "code": "99",
                    "name": "Head Quarter"
                },
                "project": {
                    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
                    "code": "A-001",
                    "name": "Project A"
                }
            }
        ],
        "others": {
            "account": {
                "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
                "code": 490099010,
                "name": "Other Revenues"
            },
            "amount": 0
        },
        "total_amount": 9900,
        "cash": {
            "account": {
                "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
                "code": 120099010,
                "name": "Bank"
            },
            "amount": 0
        },
        "receivable": {
            "account": {
                "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
                "code": 130099010,
                "name": "Account Receivable"
            },
            "amount": 9900
        },
        "receivable_payment": 9900,
        "balance": 0,
        "is_outstanding": false,
        "last_updated": "2018-02-01 13:55:55"
    },
    {...},
    {...},
    ...
]

Get Sales Invoices
GET/api/sales_invoice

Use this method to retrieve one or many sales invoices. See our HTTP GET documentation for complete queries method.

The following elements are returned in the sales invoices response :

Base elements

Element Description
id Unique code for identifier sales invoice. String 36 characters.
invoice_number Invoice number. String maximum 35 characters.
invoice_date Invoice date. Date format YYYY-MM-DD.
delivery_date Delivery date of sales invoice. Date format YYYY-MM-DD.
is_posted Boolean false to draft sales invoice.
description Description of sales invoice. String maximum 75 characters.
sales_order Order of sales invoice. See elements for Sales Order.
customer Customer of sales invoice. See elements for Customer.
salesman Salesman of sales invoice. See elements for Salesman.
department Department of sales invoice. See elements for Department.
project Project of sales invoice. See elements for Project.
warehouse Warehouse of sales invoice. See elements for Warehouse.
currency Currency of sales invoice. See elements for Currency.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales invoice. See elements for Term of Payment.
document Document of sales invoice. See elements for Document.
line_items Line items of sales invoice. See elements for Line Items.
others Others of sales invoice. See elements for Others.
total Total amount of sales invoice. See elements for Total.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for sales_order

Element Description
id Unique code for identifier sales order. String 36 characters.
code Order number. String maximum 35 characters.
name Order date. Date format YYYY-MM-DD.

Elements for customer

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for salesman

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

Elements for project

Element Description
id Unique code for identifier project. String 36 characters.
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.

Elements for warehouse

Element Description
id Unique code for identifier warehouse. String 36 characters.
code Warehouse code. String maximum 15 characters.
name Warehouse name. String maximum 255 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. See elements for Product.
account Item sales account. See elements for Sales Account.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. See elements for Unit.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. See elements for Tax.
department Item department. See elements for Department.
project Item project. See elements for Project.

Elements for others

Element Description
account Others account. See elements for Others Account.
amount Others amount. Number.

Elements for total

Element Description
account Total account. See elements for Total Account.
amount Total amount. Number.

Elements for product

Element Description
id Unique code for identifier product. String 36 characters.
code Product code. String maximum 100 characters.
name Product name. String maximum 250 characters.

Elements for account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for unit

Element Description
id Unique code for identifier unit. String 36 characters.
code Unit code. String maximum 15 characters.
name Unit name. String maximum 25 characters.

Elements for tax

Element Description
id Unique code for identifier tax. String 36 characters.
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters.
percentage Tax rate (percentage). Number.
account Tax account. See elements for Tax Account.

POST https://app.zahironline.com/api/sales_invoice
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_date": "2018-02-01",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "quantity": 10,
      "unit_price": 1000
    }
  ]
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "is_posted": false,
  "description": "Sales, General Customer",
  "sales_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SO000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total_amount": 9900,
  "cash": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 120099010,
      "name": "Bank"
    },
    "amount": 0
  },
  "receivable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "receivable_payment": 9900,
  "balance": 0,
  "is_outstanding": false,
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "is_posted": false,
  "description": "Sales, General Customer",
  "sales_order": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "salesman": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "warehouse": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "account": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
      "unit_price": 1000,
      "discount": 10,
      "tax": "66881eb0-319f-4466-bd37-c82ca38a3f03",
      "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
      "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b"
    }
  ],
  "others": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "cash": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "receivable": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38"
  }
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "is_posted": false,
  "description": "Sales, General Customer",
  "sales_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SO000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total_amount": 9900,
  "cash": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 120099010,
      "name": "Bank"
    },
    "amount": 0
  },
  "receivable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "receivable_payment": 9900,
  "balance": 0,
  "is_outstanding": false,
  "last_updated": "2018-02-01 13:55:55"
}

Create Sales Invoices
POST/api/sales_invoice

Use this method to create a sales invoice. See our HTTP POST documentation for complete queries method.

The following are elements for create a sales invoice :

Element Description
invoice_number Invoice number. String maximum 35 characters.
invoice_date Invoice date. Date format YYYY-MM-DD.
delivery_date Delivery date of sales invoice. Date format YYYY-MM-DD.
is_posted Boolean false to draft sales invoice.
description Description of sales invoice. String maximum 75 characters.
sales_quotation Quotation of sales invoice. Unique code for identifier sales quotation. See Sales Quotation to get an id.
customer Customer of sales invoice. Unique code for identifier contact data. See Customer to get an id.
salesman Salesman of sales invoice. Unique code for identifier contact data. See Salesman to get an id.
department Department of sales invoice. Unique code for identifier department data. See Department to get an id.
project Project of sales invoice. Unique code for identifier project data. See Project to get an id.
warehouse Warehouse of sales invoice. Unique code for identifier warehouse data. See Warehouse to get an id.
currency Currency of sales invoice. Unique code for identifier currency data. See Currency to get an id.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales invoice. See elements for Term of Payment.
document Document of sales invoice. See elements for Document.
line_items Line items of sales invoice. See elements for Line Items.
others Others of sales invoice. See elements for Others.
cash Cash payment of sales invoice. See elements for Cash.
receivable Receivable of sales invoice. See elements for Receivable.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. Unique code for identifier product data Product to get an id.
account Item sales account. Unique code for identifier account data Sales Account to get an id.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. Unique code for identifier unit data Unit to get an id.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. Unique code for identifier tax data Tax to get an id.
department Item department. Unique code for identifier department data Department to get an id.
project Item project. Unique code for identifier project data Project to get an id.

Elements for others

Element Description
account Others account. Unique code for identifier account data Others Account to get an id.
amount Others amount. Number.

Elements for cash

Element Description
account Cash account. Unique code for identifier account data Cash Account to get an id.
amount Cash amount. Number.

Elements for receivable

Element Description
account Receivable account. Unique code for identifier account data Receivable Account to get an id.

PUT https://app.zahironline.com/api/sales_invoice/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_date": "2018-02-01",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "quantity": 10,
      "unit_price": 1000
    }
  ]
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "is_posted": false,
  "description": "Sales, General Customer",
  "sales_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SO000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total_amount": 9900,
  "cash": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 120099010,
      "name": "Bank"
    },
    "amount": 0
  },
  "receivable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "receivable_payment": 9900,
  "balance": 0,
  "is_outstanding": false,
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "is_posted": false,
  "description": "Sales, General Customer",
  "sales_order": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
  "customer": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "salesman": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "warehouse": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "account": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
      "unit_price": 1000,
      "discount": 10,
      "tax": "66881eb0-319f-4466-bd37-c82ca38a3f03",
      "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
      "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b"
    }
  ],
  "others": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "cash": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "receivable": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38"
  }
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "invoice_number": "SJ000001",
  "invoice_date": "2018-02-01",
  "delivery_date": "2018-02-01",
  "is_posted": false,
  "description": "Sales, General Customer",
  "sales_order": {
    "id": "178246f8-d33e-49cb-b61d-2ade5e8b8459",
    "number": "SO000001",
    "date": "2018-02-07"
  },
  "customer": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "CUST",
    "name": "General Customer"
  },
  "salesman": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "due_date": "2018-02-01",
    "late_charge": 0,
    "discount_days": 0,
    "discount_date": "2018-02-01",
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 410099010,
        "name": "Sales zzz"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total_amount": 9900,
  "cash": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 120099010,
      "name": "Bank"
    },
    "amount": 0
  },
  "receivable": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 130099010,
      "name": "Account Receivable"
    },
    "amount": 9900
  },
  "receivable_payment": 9900,
  "balance": 0,
  "is_outstanding": false,
  "last_updated": "2018-02-01 13:55:55"
}

Update Sales Invoices
PUT/api/sales_invoice/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update a sales invoice. See our HTTP PUT documentation for complete queries method.

The following are elements for update a sales invoice :

Element Description
invoice_number Invoice number. String maximum 35 characters.
invoice_date Invoice date. Date format YYYY-MM-DD.
delivery_date Delivery date of sales invoice. Date format YYYY-MM-DD.
is_posted Boolean false to draft sales invoice.
description Description of sales invoice. String maximum 75 characters.
sales_quotation Quotation of sales invoice. Unique code for identifier sales quotation. See Sales Quotation to get an id.
customer Customer of sales invoice. Unique code for identifier contact data. See Customer to get an id.
salesman Salesman of sales invoice. Unique code for identifier contact data. See Salesman to get an id.
department Department of sales invoice. Unique code for identifier department data. See Department to get an id.
project Project of sales invoice. Unique code for identifier project data. See Project to get an id.
warehouse Warehouse of sales invoice. Unique code for identifier warehouse data. See Warehouse to get an id.
currency Currency of sales invoice. Unique code for identifier currency data. See Currency to get an id.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of sales invoice. See elements for Term of Payment.
document Document of sales invoice. See elements for Document.
line_items Line items of sales invoice. See elements for Line Items.
others Others of sales invoice. See elements for Others.
cash Cash payment of sales invoice. See elements for Cash.
receivable Receivable of sales invoice. See elements for Receivable.
reason Reason for update transaction. String maximum 255 characters. Required.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. Unique code for identifier product data Product to get an id.
account Item sales account. Unique code for identifier account data Sales Account to get an id.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. Unique code for identifier unit data Unit to get an id.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. Unique code for identifier tax data Tax to get an id.
department Item department. Unique code for identifier department data Department to get an id.
project Item project. Unique code for identifier project data Project to get an id.

Elements for others

Element Description
account Others account. Unique code for identifier account data Others Account to get an id.
amount Others amount. Number.

Elements for cash

Element Description
account Cash account. Unique code for identifier account data Cash Account to get an id.
amount Cash amount. Number.

Elements for receivable

Element Description
account Receivable account. Unique code for identifier account data Receivable Account to get an id.

DELETE https://app.zahironline.com/api/sales_invoice/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Transaction has been deleted"
}

Delete Sales Invoices
DELETE/api/sales_invoice/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a sales invoice. See our HTTP DELETE documentation for complete queries method.


Receivable Payments

GET https://app.zahironline.com/api/receivable_payments
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "3d0350d3-3436-49b8-b6de-332e86b83e08",
        "reference_number": "CR000001",
        "transaction_date": "2018-02-08",
        "description": "Customer Payment, General Customer",
        "customer": {
            "id": "7bffa6cc-6010-4de0-82b9-f93271007294",
            "code": "CUST",
            "name": "General Customer"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "USD",
            "name": "Dollar"
        },
        "exchange_rate": 1,
        "is_reconciled": false,
        "is_post_dated_cheque": false,
        "post_dated_cheque": {
            "number": null,
            "due_date": null,
            "bank_account": null,
            "bank_name": null
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "6fdfbd89-d546-4fda-8b01-678f055a3901",
            "code": "A-001",
            "name": "Project A"
        },
        "document": {
            "number": null,
            "date": "2018-02-08"
        },
        "line_items": [
            {
                "invoice": {
                    "id": "a83923dd-4709-49af-ae29-4802521fb9a4",
                    "number": "SJ000009",
                    "date": "2018-02-08",
                    "currency": {
                        "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
                        "code": "USD",
                        "name": "Dollar"
                    },
                    "receivable": {
                        "account": {
                            "id": "4758dfde-4f78-48cf-85ad-93dcbd5106eb",
                            "code": 130099010,
                            "name": "Account Receivable"
                        },
                        "amount": 2200
                    }
                },
                "exchange_rate": 1,
                "discount": 0,
                "amount": 2200,
                "notes": null
            }
        ],
        "others": [
            {
                "account": {
                    "id": "287f21b4-35bf-43ee-8f71-10511c2f2041",
                    "code": 490099010,
                    "name": "Other Revenues"
                },
                "amount": 0
            }
        ],
        "cash": {
            "account": {
                "id": "74386425-4b27-4cc5-bf26-ec372efc54a0",
                "code": 120099010,
                "name": "Bank"
            },
            "amount": 2200
        },
        "last_updated": "2018-02-08 09:02:21"
    },
    {...},
    {...},
    ...
]

Get Receivable Payments
GET/api/receivable_payments

Use this method to retrieve one or many receivable payments. See our HTTP GET documentation for complete queries method.

The following elements are returned in the receivable payments response :

Base elements

Element Description
id Unique code for identifier receivable payment. String 36 characters.
reference_number Reference number or receivable payment. String maximum 35 characters.
transaction_date Transaction date. Date format YYYY-MM-DD.
description Description of receivable payment. String maximum 75 characters.
customer Customer of receivable payment. See elements for Customer.
department Department of receivable payment. See elements for Department.
project Project of receivable payment. See elements for Project.
currency Currency of receivable payment. See elements for Currency.
is_post_dated_cheque Boolean true to post dated cheque transaction.
post_dated_cheque Detail of post-dated cheque. See elements for Post-dated cheque.
document Document of receivable payment. See elements for Document.
line_items Line items of receivable payment. See elements for Line Items.
others Others of receivable payment. See elements for Others.
cash Total payment. See elements for Cash.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for customer

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

Elements for project

Element Description
id Unique code for identifier project. String 36 characters.
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

Elements for post_dated_cheque

Element Description
number Due days. String maximum 15 characters.
due_date Late charge. Date format YYYY-MM-DD.
bank_account Discount days. String maximum 15 characters.
bank_name Early discount. String maximum 35 characters.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
invoice Item invoice. See elements for Invoice.
exchange_rate Item exchange rate. Number.
discount Item discount. Number.
amount Item amount. Number.
notes Item notes. String maximum 255 characters.

Elements for others

Element Description
account Others account. See elements for Others Account.
amount Others amount. Number.

Elements for cash

Element Description
account Cash account. See elements for Cash Account.
amount Cash amount. Number.

Elements for invoice

Element Description
id Unique code for identifier sales invoice. String 36 characters.
number Invoice number. String maximum 35 characters.
date Invoice date. Date format YYYY-MM-DD.
currency Currency of invoice. See elements for Currency.
receivable Balance of invoice. See elements for Receivable.

POST https://app.zahironline.com/api/receivable_payments
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "transaction_date": "2018-02-08",
  "customer": "7bffa6cc-6010-4de0-82b9-f93271007294",
  "line_items": [
    {
      "invoice": "a83923dd-4709-49af-ae29-4802521fb9a4",
      "amount": 2200
    }
  ],
  "cash": {
    "account": "74386425-4b27-4cc5-bf26-ec372efc54a0"
  }
}
Responses201
Body
{
  "id": "3d0350d3-3436-49b8-b6de-332e86b83e08",
  "reference_number": "CR000001",
  "transaction_date": "2018-02-08",
  "description": "Customer Payment, General Customer",
  "customer": {
    "id": "7bffa6cc-6010-4de0-82b9-f93271007294",
    "code": "CUST",
    "name": "General Customer"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "is_reconciled": false,
  "is_post_dated_cheque": false,
  "post_dated_cheque": {
    "number": null,
    "due_date": null,
    "bank_account": null,
    "bank_name": null
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "6fdfbd89-d546-4fda-8b01-678f055a3901",
    "code": "A-001",
    "name": "Project A"
  },
  "document": {
    "number": null,
    "date": "2018-02-08"
  },
  "line_items": [
    {
      "invoice": {
        "id": "a83923dd-4709-49af-ae29-4802521fb9a4",
        "number": "SJ000009",
        "date": "2018-02-08",
        "currency": {
          "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
          "code": "USD",
          "name": "Dollar"
        },
        "receivable": {
          "account": {
            "id": "4758dfde-4f78-48cf-85ad-93dcbd5106eb",
            "code": 130099010,
            "name": "Account Receivable"
          },
          "amount": 2200
        }
      },
      "exchange_rate": 1,
      "discount": 0,
      "amount": 2200,
      "notes": null
    }
  ],
  "others": [
    {
      "account": {
        "id": "287f21b4-35bf-43ee-8f71-10511c2f2041",
        "code": 490099010,
        "name": "Other Revenues"
      },
      "amount": 0
    }
  ],
  "cash": {
    "account": {
      "id": "74386425-4b27-4cc5-bf26-ec372efc54a0",
      "code": 120099010,
      "name": "Bank"
    },
    "amount": 2200
  },
  "last_updated": "2018-02-08 09:02:21"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "reference_number": "CR000001",
  "transaction_date": "2018-02-08",
  "description": "Customer Payment, General Customer",
  "customer": "7bffa6cc-6010-4de0-82b9-f93271007294",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_post_dated_cheque": false,
  "post_dated_cheque": {
    "number": null,
    "due_date": null,
    "bank_account": null,
    "bank_name": null
  },
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "6fdfbd89-d546-4fda-8b01-678f055a3901",
  "document": {
    "number": null,
    "date": "2018-02-08"
  },
  "line_items": [
    {
      "invoice": "a83923dd-4709-49af-ae29-4802521fb9a4",
      "exchange_rate": 1,
      "discount": 0,
      "amount": 2200,
      "notes": null
    }
  ],
  "others": [
    {
      "account": "287f21b4-35bf-43ee-8f71-10511c2f2041",
      "amount": 0
    }
  ],
  "cash": {
    "account": "74386425-4b27-4cc5-bf26-ec372efc54a0"
  }
}
Responses201
Body
{
  "id": "3d0350d3-3436-49b8-b6de-332e86b83e08",
  "reference_number": "CR000001",
  "transaction_date": "2018-02-08",
  "description": "Customer Payment, General Customer",
  "customer": {
    "id": "7bffa6cc-6010-4de0-82b9-f93271007294",
    "code": "CUST",
    "name": "General Customer"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "is_reconciled": false,
  "is_post_dated_cheque": false,
  "post_dated_cheque": {
    "number": null,
    "due_date": null,
    "bank_account": null,
    "bank_name": null
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "6fdfbd89-d546-4fda-8b01-678f055a3901",
    "code": "A-001",
    "name": "Project A"
  },
  "document": {
    "number": null,
    "date": "2018-02-08"
  },
  "line_items": [
    {
      "invoice": {
        "id": "a83923dd-4709-49af-ae29-4802521fb9a4",
        "number": "SJ000009",
        "date": "2018-02-08",
        "currency": {
          "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
          "code": "USD",
          "name": "Dollar"
        },
        "receivable": {
          "account": {
            "id": "4758dfde-4f78-48cf-85ad-93dcbd5106eb",
            "code": 130099010,
            "name": "Account Receivable"
          },
          "amount": 2200
        }
      },
      "exchange_rate": 1,
      "discount": 0,
      "amount": 2200,
      "notes": null
    }
  ],
  "others": [
    {
      "account": {
        "id": "287f21b4-35bf-43ee-8f71-10511c2f2041",
        "code": 490099010,
        "name": "Other Revenues"
      },
      "amount": 0
    }
  ],
  "cash": {
    "account": {
      "id": "74386425-4b27-4cc5-bf26-ec372efc54a0",
      "code": 120099010,
      "name": "Bank"
    },
    "amount": 2200
  },
  "last_updated": "2018-02-08 09:02:21"
}

Create Receivable Payments
POST/api/receivable_payments

Use this method to create a receivable payment. See our HTTP POST documentation for complete queries method.

The following are elements for create a receivable payment :

Element Description
reference_number Reference number or receivable payment. String maximum 35 characters.
transaction_date Transaction date. Date format YYYY-MM-DD. Required.
description Description of receivable payment. String maximum 75 characters.
customer Customer of receivable payment. Unique code for identifier contact data. String 36 characters. See Contact. Required.
department Department of receivable payment. Unique code for identifier department data. String 36 characters. See Department.
project Project of receivable payment. Unique code for identifier project data. String 36 characters. See Project.
currency Currency of receivable payment. Unique code for identifier currency data. String 36 characters. See Currency.
is_post_dated_cheque Boolean true to post dated cheque transaction.
post_dated_cheque Detail of post-dated cheque. See elements for Post-dated cheque.
document Document of receivable payment. See elements for Document.
line_items Line items of receivable payment. See elements for Line Items. Required.
others Others of receivable payment. See elements for Others.
cash Total payment. See elements for Cash. Required.

Elements for post_dated_cheque

Element Description
number Due days. String maximum 15 characters.
due_date Late charge. Date format YYYY-MM-DD.
bank_account Discount days. String maximum 15 characters.
bank_name Early discount. String maximum 35 characters.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
invoice Item invoice. Unique code for identifier sales invoice. String 36 characters. See Sales Invoice. Required.
exchange_rate Item exchange rate. Number.
discount Item discount. Number.
amount Item amount. Number. Required.
notes Item notes. String maximum 255 characters.

Elements for others

Element Description
account Others account. Unique code for identifier account data. String 36 characters. See Others Account.
amount Others amount. Number.

Elements for cash

Element Description
account Cash account. Unique code for identifier account data. String 36 characters. See Cash Account.
amount Cash amount. Number.

PUT https://app.zahironline.com/api/receivable_payments/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "transaction_date": "2018-02-08",
  "customer": "7bffa6cc-6010-4de0-82b9-f93271007294",
  "line_items": [
    {
      "invoice": "a83923dd-4709-49af-ae29-4802521fb9a4",
      "amount": 2200
    }
  ],
  "cash": {
    "account": "74386425-4b27-4cc5-bf26-ec372efc54a0"
  }
}
Responses200
Body
{
  "id": "3d0350d3-3436-49b8-b6de-332e86b83e08",
  "reference_number": "CR000001",
  "transaction_date": "2018-02-08",
  "description": "Customer Payment, General Customer",
  "customer": {
    "id": "7bffa6cc-6010-4de0-82b9-f93271007294",
    "code": "CUST",
    "name": "General Customer"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "is_reconciled": false,
  "is_post_dated_cheque": false,
  "post_dated_cheque": {
    "number": null,
    "due_date": null,
    "bank_account": null,
    "bank_name": null
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "6fdfbd89-d546-4fda-8b01-678f055a3901",
    "code": "A-001",
    "name": "Project A"
  },
  "document": {
    "number": null,
    "date": "2018-02-08"
  },
  "line_items": [
    {
      "invoice": {
        "id": "a83923dd-4709-49af-ae29-4802521fb9a4",
        "number": "SJ000009",
        "date": "2018-02-08",
        "currency": {
          "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
          "code": "USD",
          "name": "Dollar"
        },
        "receivable": {
          "account": {
            "id": "4758dfde-4f78-48cf-85ad-93dcbd5106eb",
            "code": 130099010,
            "name": "Account Receivable"
          },
          "amount": 2200
        }
      },
      "exchange_rate": 1,
      "discount": 0,
      "amount": 2200,
      "notes": null
    }
  ],
  "others": [
    {
      "account": {
        "id": "287f21b4-35bf-43ee-8f71-10511c2f2041",
        "code": 490099010,
        "name": "Other Revenues"
      },
      "amount": 0
    }
  ],
  "cash": {
    "account": {
      "id": "74386425-4b27-4cc5-bf26-ec372efc54a0",
      "code": 120099010,
      "name": "Bank"
    },
    "amount": 2200
  },
  "last_updated": "2018-02-08 09:02:21"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "reference_number": "CR000001",
  "transaction_date": "2018-02-08",
  "description": "Customer Payment, General Customer",
  "customer": "7bffa6cc-6010-4de0-82b9-f93271007294",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_post_dated_cheque": false,
  "post_dated_cheque": {
    "number": null,
    "due_date": null,
    "bank_account": null,
    "bank_name": null
  },
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "6fdfbd89-d546-4fda-8b01-678f055a3901",
  "document": {
    "number": null,
    "date": "2018-02-08"
  },
  "line_items": [
    {
      "invoice": "a83923dd-4709-49af-ae29-4802521fb9a4",
      "exchange_rate": 1,
      "discount": 0,
      "amount": 2200,
      "notes": null
    }
  ],
  "others": [
    {
      "account": "287f21b4-35bf-43ee-8f71-10511c2f2041",
      "amount": 0
    }
  ],
  "cash": {
    "account": "74386425-4b27-4cc5-bf26-ec372efc54a0"
  }
}
Responses200
Body
{
  "id": "3d0350d3-3436-49b8-b6de-332e86b83e08",
  "reference_number": "CR000001",
  "transaction_date": "2018-02-08",
  "description": "Customer Payment, General Customer",
  "customer": {
    "id": "7bffa6cc-6010-4de0-82b9-f93271007294",
    "code": "CUST",
    "name": "General Customer"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar"
  },
  "exchange_rate": 1,
  "is_reconciled": false,
  "is_post_dated_cheque": false,
  "post_dated_cheque": {
    "number": null,
    "due_date": null,
    "bank_account": null,
    "bank_name": null
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "6fdfbd89-d546-4fda-8b01-678f055a3901",
    "code": "A-001",
    "name": "Project A"
  },
  "document": {
    "number": null,
    "date": "2018-02-08"
  },
  "line_items": [
    {
      "invoice": {
        "id": "a83923dd-4709-49af-ae29-4802521fb9a4",
        "number": "SJ000009",
        "date": "2018-02-08",
        "currency": {
          "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
          "code": "USD",
          "name": "Dollar"
        },
        "receivable": {
          "account": {
            "id": "4758dfde-4f78-48cf-85ad-93dcbd5106eb",
            "code": 130099010,
            "name": "Account Receivable"
          },
          "amount": 2200
        }
      },
      "exchange_rate": 1,
      "discount": 0,
      "amount": 2200,
      "notes": null
    }
  ],
  "others": [
    {
      "account": {
        "id": "287f21b4-35bf-43ee-8f71-10511c2f2041",
        "code": 490099010,
        "name": "Other Revenues"
      },
      "amount": 0
    }
  ],
  "cash": {
    "account": {
      "id": "74386425-4b27-4cc5-bf26-ec372efc54a0",
      "code": 120099010,
      "name": "Bank"
    },
    "amount": 2200
  },
  "last_updated": "2018-02-08 09:02:21"
}

Update Receivable Payments
PUT/api/receivable_payments/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to update receivable payment. See our HTTP PUT documentation for complete queries method.

The following are elements for update receivable payment :

Element Description
reference_number Reference number or receivable payment. String maximum 35 characters.
transaction_date Transaction date. Date format YYYY-MM-DD.
description Description of receivable payment. String maximum 75 characters.
customer Customer of receivable payment. Unique code for identifier contact data. String 36 characters. See Contact.
department Department of receivable payment. Unique code for identifier department data. String 36 characters. See Department.
project Project of receivable payment. Unique code for identifier project data. String 36 characters. See Project.
currency Currency of receivable payment. Unique code for identifier currency data. String 36 characters. See Currency.
is_post_dated_cheque Boolean true to post dated cheque transaction.
post_dated_cheque Detail of post-dated cheque. See elements for Post-dated cheque.
document Document of receivable payment. See elements for Document.
line_items Line items of receivable payment. See elements for Line Items.
others Others of receivable payment. See elements for Others.
cash Total payment. See elements for Cash.
reason Reason for update transaction. String maximum 255 characters. Required.

Elements for post_dated_cheque

Element Description
number Due days. String maximum 15 characters.
due_date Late charge. Date format YYYY-MM-DD.
bank_account Discount days. String maximum 15 characters.
bank_name Early discount. String maximum 35 characters.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
invoice Item invoice. Unique code for identifier sales invoice. String 36 characters. See Sales Invoice.
exchange_rate Item exchange rate. Number.
discount Item discount. Number.
amount Item amount. Number.
notes Item notes. String maximum 255 characters.

Elements for others

Element Description
account Others account. Unique code for identifier account data. String 36 characters. See Others Account.
amount Others amount. Number.

Elements for cash

Element Description
account Cash account. Unique code for identifier account data. String 36 characters. See Cash Account.
amount Cash amount. Number.

DELETE https://app.zahironline.com/api/receivable_payments/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
{
  "code": 200,
  "message": "Transaction has been deleted"
}

Delete Receivable Payments
DELETE/api/receivable_payments/f6ef049d-642d-4f63-a20f-36c8179d86b3

Use this method to delete a receivable payment. See our HTTP DELETE documentation for complete queries method.


Purchases

Quotation Requests

GET https://app.zahironline.com/api/quotation_requests
RequestsExample
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Responses200
Body
[
    {
        "id": "03e95841-97ed-4eee-be5e-e79887f98210",
        "quotation_number": "QR000001",
        "quotation_date": "2018-02-01",
        "validity_date": "2018-02-01",
        "is_finished": false,
        "description": "Quotation request, General Supplier",
        "supplier": {
            "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
            "code": "VNDR",
            "name": "General Supplier"
        },
        "employee": {
            "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
            "code": "EMPL",
            "name": "General Employee"
        },
        "department": {
            "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
            "code": "99",
            "name": "Head Quarter"
        },
        "project": {
            "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
            "code": "A-001",
            "name": "Project A"
        },
        "warehouse": {
            "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
            "code": "Head Quarter",
            "name": "Head Quarter"
        },
        "currency": {
            "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
            "code": "USD",
            "name": "Dollar",
            "exchange_rate": 1
        },
        "is_cash": false,
        "term_of_payment": {
            "due_days": 0,
            "late_charge": 0,
            "discount_days": 0,
            "early_discount": 0
        },
        "document": {
            "number": null,
            "date": "2018-02-01"
        },
        "line_items": [
            {
                "id": 990000009,
                "product": {
                    "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
                    "code": "PA-001",
                    "name": "Product A"
                },
                "account": {
                    "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
                    "code": 140099010,
                    "name": "Inventory Product A"
                },
                "description": null,
                "notes": null,
                "quantity": 10,
                "unit": {
                    "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
                    "code": "Pcs",
                    "name": "pieces"
                },
                "unit_price": 1000,
                "discount": 10,
                "tax": {
                    "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
                    "code": "VAT 10",
                    "name": "Value Added Tax 10%",
                    "percentage": 10,
                    "account": {
                        "id": "709ec79f-4f38-41be-8422-994f7d18737f",
                        "code": 230099011,
                        "name": "Tax Payable # VAT"
                    }
                },
                "department": {
                    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
                    "code": "99",
                    "name": "Head Quarter"
                },
                "project": {
                    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
                    "code": "A-001",
                    "name": "Project A",
                    "phase": null,
                    "cost": null
                }
            }
        ],
        "others": {
            "account": {
                "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
                "code": 490099010,
                "name": "Other Revenues"
            },
            "amount": 0
        },
        "total": {
            "account": {
                "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
                "code": 210099010,
                "name": "Account Payable"
            },
            "amount": 9900
        },
        "last_updated": "2018-02-01 13:55:55"
    },
    {...},
    {...},
    ...
]

Get Quotations Requests
GET/api/quotation_requests

Use this method to retrieve one or many quotation requests. See our HTTP GET documentation for complete queries method.

The following elements are returned in the quotation requests response :

Base elements

Element Description
id Unique code for identifier quotation request. String 36 characters.
quotation_number Quotation number. String maximum 35 characters.
quotation_date Quotation date. Date format YYYY-MM-DD.
validity_date Validity date of quotation request. Date format YYYY-MM-DD.
is_finished Boolean true to finished quotation request.
description Description of quotation request. String maximum 75 characters.
supplier Supplier of quotation request. See elements for Supplier.
employee Employee of quotation request. See elements for Employee.
department Department of quotation request. See elements for Department.
project Project of quotation request. See elements for Project.
warehouse Warehouse of quotation request. See elements for Warehouse.
currency Currency of quotation request. See elements for Currency.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of quotation request. See elements for Term of Payment.
document Document of quotation request. See elements for Document.
line_items Line items of quotation request. See elements for Line Items.
others Others of quotation request. See elements for Others.
total Total amount of quotation request. See elements for Total.
last_updated Last updated / modified time. Date Time format YYYY-MM-DD hh:mm:ss.

Elements for supplier

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for employee

Element Description
id Unique code for identifier contact. String 36 characters.
code Contact code. String maximum 25 characters.
name Contact name. String maximum 100 characters.

Elements for department

Element Description
id Unique code for identifier department. String 36 characters.
code Department code. String maximum 15 characters.
name Department name. String maximum 35 characters.

Elements for project

Element Description
id Unique code for identifier project. String 36 characters.
code Project code. String maximum 25 characters.
name Project name. String maximum 50 characters.

Elements for warehouse

Element Description
id Unique code for identifier warehouse. String 36 characters.
code Warehouse code. String maximum 15 characters.
name Warehouse name. String maximum 255 characters.

Elements for currency

Element Description
id Unique code for identifier currency. String 36 characters.
code Currency code. String 3 characters.
name Currency name. String maximum 25 characters.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. See elements for Product.
account Item purchase account. See elements for Purchase Account.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. See elements for Unit.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. See elements for Tax.
department Item department. See elements for Department.
project Item project. See elements for Project.

Elements for others

Element Description
account Others account. See elements for Others Account.
amount Others amount. Number.

Elements for total

Element Description
account Total account. See elements for Total Account.
amount Total amount. Number.

Elements for product

Element Description
id Unique code for identifier product. String 36 characters.
code Product code. String maximum 100 characters.
name Product name. String maximum 250 characters.

Elements for account

Element Description
id Unique code for identifier account. String 36 characters.
code Account code. Integer maximum 9 digits.
name Account name. String maximum 50 characters.

Elements for unit

Element Description
id Unique code for identifier unit. String 36 characters.
code Unit code. String maximum 15 characters.
name Unit name. String maximum 25 characters.

Elements for tax

Element Description
id Unique code for identifier tax. String 36 characters.
code Tax code. String maximum 10 characters.
name Tax name. String maximum 55 characters.
percentage Tax rate (percentage). Number.
account Tax account. See elements for Tax Account.

POST https://app.zahironline.com/api/quotation_requests
RequestsRequiredComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "quotation_date": "2018-02-01",
  "supplier": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "quantity": 10,
      "unit_price": 1000
    }
  ]
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "quotation_number": "QR000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Quotation request, General Supplier",
  "supplier": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "VNDR",
    "name": "General Supplier"
  },
  "employee": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 140099010,
        "name": "Inventory Product A"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 210099010,
      "name": "Account Payable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "quotation_number": "QR000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Quotation request, General Supplier",
  "supplier": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "employee": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
  "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
  "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
  "warehouse": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
  "currency": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "account": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
      "unit_price": 1000,
      "discount": 10,
      "tax": "66881eb0-319f-4466-bd37-c82ca38a3f03",
      "department": "9a55d668-b419-774a-ac8e-6a702630eb73",
      "project": "b3c97711-f46b-46f3-a4c7-f30026bff73b"
    }
  ],
  "others": {
    "account": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
    "amount": 0
  },
  "total": {
    "account": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38"
  }
}
Responses201
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "quotation_number": "QR000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Quotation request, General Supplier",
  "supplier": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "VNDR",
    "name": "General Supplier"
  },
  "employee": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 140099010,
        "name": "Inventory Product A"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount": 10,
      "tax": {
        "id": "66881eb0-319f-4466-bd37-c82ca38a3f03",
        "code": "VAT 10",
        "name": "Value Added Tax 10%",
        "percentage": 10,
        "account": {
          "id": "709ec79f-4f38-41be-8422-994f7d18737f",
          "code": 230099011,
          "name": "Tax Payable # VAT"
        }
      },
      "department": {
        "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
        "code": "99",
        "name": "Head Quarter"
      },
      "project": {
        "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
        "code": "A-001",
        "name": "Project A"
      }
    }
  ],
  "others": {
    "account": {
      "id": "b2d21627-3c49-4676-8bac-b981fd3bf1a2",
      "code": 490099010,
      "name": "Other Revenues"
    },
    "amount": 0
  },
  "total": {
    "account": {
      "id": "3cc063fa-a7b3-4f18-9556-e95d67fb2e38",
      "code": 210099010,
      "name": "Account Payable"
    },
    "amount": 9900
  },
  "last_updated": "2018-02-01 13:55:55"
}

Create Quotations Requests
POST/api/quotation_requests

Use this method to create a quotation request. See our HTTP POST documentation for complete queries method.

The following are elements for create a quotation request :

Element Description
id Unique code for identifier quotation request. String 36 characters.
quotation_number Quotation number. String maximum 35 characters.
quotation_date Quotation date. Date format YYYY-MM-DD.
validity_date Validity date of quotation request. Date format YYYY-MM-DD.
is_finished Boolean true to finished quotation request.
description Description of quotation request. String maximum 75 characters.
supplier Supplier of quotation request. Unique code for identifier contact data. See Supplier to get an id.
employee Employee of quotation request. Unique code for identifier contact data. See Employee to get an id.
department Department of quotation request. Unique code for identifier department data. See Department to get an id.
project Project of quotation request. Unique code for identifier project data. See Project to get an id.
warehouse Warehouse of quotation request. Unique code for identifier warehouse data. See Warehouse to get an id.
currency Currency of quotation request. Unique code for identifier currency data. See Currency to get an id.
is_cash Boolean true to cash transaction.
term_of_payment Term of payment of quotation request. See elements for Term of Payment.
document Document of quotation request. See elements for Document.
line_items Line items of quotation request. See elements for Line Items.
others Others of quotation request. See elements for Others.
total Total amount of quotation request. See elements for Total.

Elements for term_of_payment

Element Description
due_days Due days. Integer.
late_charge Late charge. Number.
discount_days Discount days. Integer.
early_discount Early discount. Number.

Elements for document

Element Description
number Document number. String maximum 25 characters.
date Document date. Date format YYYY-MM-DD.

Elements for line_items

Element Description
id Unique code for identifier line item. String 36 characters.
product Item product. Unique code for identifier product data Product to get an id.
account Item sales account. Unique code for identifier account data Sales Account to get an id.
description Item description. String maximum 255 characters.
notes Item notes. String maximum 255 characters.
quantity Item quantity. Number.
unit Item unit. Unique code for identifier unit data Unit to get an id.
unit_price Item unit price. Number.
discount Item discount. Number.
tax Item tax. Unique code for identifier tax data Tax to get an id.
department Item department. Unique code for identifier department data Department to get an id.
project Item project. Unique code for identifier project data Project to get an id.

Elements for others

Element Description
account Others account. Unique code for identifier account data Others Account to get an id.
amount Others amount. Number.

Elements for total

Element Description
account Total account. Unique code for identifier account data Total Account to get an id.
amount Total amount. Number.

PUT https://app.zahironline.com/api/quotation_requests/f6ef049d-642d-4f63-a20f-36c8179d86b3
RequestsExampleComplete
Headers
Slug: example.zahironline.com
Authorization: Bearer xqVjYbKwd6JERiaUMPM1hWqH1RUUPBlfcb40Y6NU
Body
{
  "quotation_date": "2018-02-01",
  "supplier": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
  "line_items": [
    {
      "product": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
      "quantity": 10,
      "unit_price": 1000
    }
  ]
}
Responses200
Body
{
  "id": "03e95841-97ed-4eee-be5e-e79887f98210",
  "quotation_number": "QR000001",
  "quotation_date": "2018-02-01",
  "validity_date": "2018-02-01",
  "is_finished": false,
  "description": "Quotation request, General Supplier",
  "supplier": {
    "id": "dd90c015-7ac4-423f-be75-cfc9caa3b171",
    "code": "VNDR",
    "name": "General Supplier"
  },
  "employee": {
    "id": "1c221b1b-4ab1-462d-ab3b-edc56d7def57",
    "code": "EMPL",
    "name": "General Employee"
  },
  "department": {
    "id": "9a55d668-b419-774a-ac8e-6a702630eb73",
    "code": "99",
    "name": "Head Quarter"
  },
  "project": {
    "id": "b3c97711-f46b-46f3-a4c7-f30026bff73b",
    "code": "A-001",
    "name": "Project A"
  },
  "warehouse": {
    "id": "a84109b7-4e96-3442-b3f3-72fd5cd25d44",
    "code": "Head Quarter",
    "name": "Head Quarter"
  },
  "currency": {
    "id": "0769703c-0eab-8e4d-a27f-fa685f3bee5e",
    "code": "USD",
    "name": "Dollar",
    "exchange_rate": 1
  },
  "is_cash": false,
  "term_of_payment": {
    "due_days": 0,
    "late_charge": 0,
    "discount_days": 0,
    "early_discount": 0
  },
  "document": {
    "number": null,
    "date": "2018-02-01"
  },
  "line_items": [
    {
      "id": 990000009,
      "product": {
        "id": "f5a1ed56-fd15-48fd-8811-6979f00c9ff2",
        "code": "PA-001",
        "name": "Product A"
      },
      "account": {
        "id": "f29b7e2f-a2cd-4582-acf5-81e1c4623d72",
        "code": 140099010,
        "name": "Inventory Product A"
      },
      "description": null,
      "notes": null,
      "quantity": 10,
      "unit": {
        "id": "a6a8f999-c170-0c4b-a487-3bf2889df5a1",
        "code": "Pcs",
        "name": "pieces"
      },
      "unit_price": 1000,
      "discount":