Response

Responses will be in the JSON format.

Node Name

Description

code

Zakya error code. This will be zero for a success response and non-zero in case of an error.

message

Message for the invoked API.

resource name

Comprises the invoked API’s Data.

Request ExampleCopy
curl https://api.zakya.com/v1/invoices/7000000079426?authtoken=ba46xxxxxxxxxxxxxxxxxxxxxxxxoec5&organization_id=10234695
-H 'Accept: application/pdf'
Request ExampleCopy
curl https://api.zakya.com/v1/invoices/7000000079426?accept=pdf \
'&authtoken=ba46xxxxxxxxxxxxxxxxxxxxxxxxoec5' \
'&organization_id=10234695'

Other Formats

Certain APIs also support csv and pdf formats. The required response format needs to be specified in the respective request’s Accept header or accept query parameter.

Response StructureCopy
The response structure for the Zakya API follows the below format.

{
    "code" : 0,
    "message" : "success",
    "invoice" : {
        "invoice_id" : "..."
    }
}

Date

All timestamps are returned in the ISO 8601 format - YYYY-MM-DDThh:mm:ssTZD.

Example: 2016-06-11T17:38:06-0700

Response ExampleCopy
HTTP/1.1 200 OK Content-Disposition: attachment; filename="INV-384.pdf" Content-Type: application/pdf;charset=UTF-8