Responses

Successful responses

Successful response is represented as JSON with response code 200. In many cases, when needed and possible, response will also include details of fulfilled requests (like added document id, transaction id or customer id).

Response to the successful request is usually something like this:

{
  "CustomerId":"665f01a4-357a-4a6b-a565-2f17e6e1da13",
  "InvoiceId":"5f91033c-9d0f-416e-a079-d3c892b8c317",
  "InvoiceNo":"1121",
  "RefNo":"11219"
} 

Unsuccessful responses

response.statusCoderesponse.statusMessageresponse.bodyDescription
400Bad RequestAPI Id is wrong – make sure you haven’t copied spaces.
400Bad RequestDescription of an errorThere’s an error in your payload. Fix that payload.
401Unauthorizedapi-wronglicenseThis company’s creator did not have PRO or PREMIUM license
200Ok Stacktrace ASP.NET stacktrace. That happens when you’re trying to send payload that makes no sense. For example invoice without rows

From february 8, the new outout format for our program API

The previous output is a string containing json.
Example send sales invoice:

Status code:  200  —  OK
Headers:  application/json; charset=utf-8
Body:  {“CustomerId”:”29fecd2e-ed07-4a1d-93f8-e6c24372f7d6″,”InvoiceId”:”b6948bbc-79be-49ce-b92c-d17cd8c76001″,”InvoiceNo”:”KALA00009″,”RefNo”:null,”NewCustomer”:null}

The new output is an object (json):
Example send sales invoice:

Status code:  200  —  OK
Headers:  application/json; charset=utf-8
Body:  {
CustomerId: ‘4feba750-4184-42f1-a278-1ed738b6cddd’,
InvoiceId: ‘432aedaa-0998-46e0-9ecc-266134d11705’,
InvoiceNo: ‘KALA00009’,
RefNo: null,
NewCustomer: null
}

The date format in the new output is: YYYY-mm-DDTHH:mm:ss
Please make changes to your API applications that work with MeritAktiva.