Document

Get Documents

GET https://open-api.zortout.com/v4/Document/GetDocuments

Get list of documents.

Query Parameters

Name
Type
Description

page

Int

Page (Default = 1)

limit

Int

Limit per page (Max = 200)

createdafter

String

Created Date After .....

(yyyy-MM-dd)

createdbefore

String

Created Date Before ..... (yyyy-MM-dd)

searchnumber

String

Document Number or Reference Number

documenttype

Int

Document Type 1 – Receipt 2 – Tax Invoice 3 – Invoice 4 – Quotation 5 – Withholding Tax If documenttype is not defined or equals 0, the system will show all documents.

idtype

Int

Related Transaction Type

1 – Order/Purchase Order 2 – Income/Expense 3 – Quotation If idtype is not defined or equals 0, the system will show all.

Headers

Name
Type
Description

storename*

String

Store Name

apikey*

String

API Key

apisecret*

String

API Secret

idlist

String

List Of Related Transaction ID

Ex. “123,124,125“ This will be active when idtype is defined and not equals 0. So this will be related on "idtype".

Parameter
Type
Description/Example

res

Response

Response Code 200- Success

list

Document (Array)

Document List (Array)

count

Int

Total document number by filter

Document (Array)
Type
Description/Example

id

Int

Document ID

header

String

Document Header

documentnumber

String

Document Number

referenceid

Int

Reference ID of Document

referencetype

Int

Reference Type of Document

0 - Undefined

1 – Order 2 – Purchase Order

3 – Return Order 4 – Return Purchase Order 5 – Other Income

6 – Other Expense

referencenumber

String

Reference Number

linkurl

String

Document Url

documentdate

Date

Document Date

documentdateString

String

Document Date (yyyy-MM-dd)

createdatetime

Datetime

Created Datetime

createdatetimeString

String

Created Datetime Text (yyyy-MM-dd HH:mm)

detail

Detail

Document Detail

Detail
Type
Description/Example

order

Order

Order

purchase

PurchaseOrder

Purchase Order

returnOrder

ReturnOrder

Return Order

returnPurchaseOrder

ReturnPurchaseOrder

Return Purchase Order

income

Income

Income

expense

Expense

Expense

quotation

Quotation

Quotation

Get Documents of Order

GET https://open-api.zortout.com/v4/Document/GetDocumentOrders

Get list of documents in order.

Query Parameters

Name
Type
Description

id*

Int

Order ID

documenttype

Int

Document Type 1 – Receipt 2 – Tax Invoice 3 – Invoice If documenttype is not defined or equals 0, the system will show all documents.

Headers

Name
Type
Description

storename*

String

Store Name

apikey*

String

API Key

apisecret*

String

API Secret

Parameter
Type
Description/Example

res

Response

Response Code 200- Success

list

Document (Array)

Document List (Array)

count

Int

Total document number by filter

Document (Array)
Type
Description/Example

id

Int

Document ID

header

String

Document Header

documentnumber

String

Document Number

referenceid

Int

Reference ID of Document

referencetype

Int

Reference Type of Document

0 - Undefined

1 – Order 2 – Purchase Order

3 – Return Order 4 – Return Purchase Order 5 – Other Income

6 – Other Expense

referencenumber

String

Reference Number

linkurl

String

Document Url

documentdate

Date

Document Date

documentdateString

String

Document Date (yyyy-MM-dd)

createdatetime

Datetime

Created Datetime

createdatetimeString

String

Created Datetime Text (yyyy-MM-dd HH:mm)

detail

Detail

Document Detail

Detail
Type
Description/Example

order

Order

Order

purchase

PurchaseOrder

Purchase Order

returnOrder

ReturnOrder

Return Order

returnPurchaseOrder

ReturnPurchaseOrder

Return Purchase Order

income

Income

Income

expense

Expense

Expense

quotation

Quotation

Quotation

Add Document of Order

POST https://open-api.zortout.com/v4/Document/AddDocumentOrder

Add document in order.

Query Parameters

Name
Type
Description

id*

Int

Order ID

useexist

Int

If this value = 1, the system will return existing documents.

Headers

Name
Type
Description

storename*

String

Store Name

apikey*

String

API Key

apisecret*

String

API Secret

Parameter
Type
Description/Example

resCode

String

Response Code 200- Success

resDesc

String

Response Description

Last updated