Skip to main content

API Introduction

Request Overview

All requests use HTTP POST method and go to a URL that looks like:

https://edahab.net/api/api/{APIEndpoint}?hash=generatedHash

The Content-Type HTTP header should be set to “application/json”.

Where the (APIEndpoint) is the name of the specific endpoint (e.g., CheckInvoiceStatus). For example, to access the CheckInvoiceStatus endpoint, the URL will look like this:

https://edahab.net/api/api/{CheckInvoiceStatus}?hash=generatedHash

Generated Hash

The hash query string parameter should be followed by the request as a query string parameter. To generate the hash, you need to follow these steps:

  1. Take the body of the HTTP POST request
  2. Add the provided API Secret to the end of the body
  3. Convert it to SHA256 and convert the hashed message to hexadecimal format

For example, assuming the provided API Secret is secretapikey and the HTTP POST body contains the following:

{
"apiKey": "123",
"invoiceId": "ABC"
}

The generated hash will be: e31f35b1b8e354de379d250f5d87c421a6bb738441d199e8ed23dddbd8cd07e4

HTTP POST body
"apiKey": "123", "invoiceId": "ABC"
Secret
secretapikey
Text To Be Hashed
{"apiKey": "123", "invoiceId": "ABC"}secretapikey
SHA-256 HASH
e31f35b1b8e354de379d250f5d87c421a6bb738441d199e8ed23dddbd8cd07e4