Loading...
OpenAPI Directory | Cenit Admin
Go back

API v1.0.0 v1

Added: 01/02/2018
Updated at: 03/01/2019

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/1d39bbcddaf694d81100) or View Postman docs # Quickstart Visit [github](https://github.com/EmitKnowledge/Envoice) to view the quickstart tutorial.

# Tutorial for running the API in postman Click on ""Run in Postman"" button

![postman - tutorial - 1](/Assets/images/api/postman-tutorial/postman-tutorial-1.png) --- A new page will open. Click the ""Postman for windows"" to run postman as a desktop app. Make sure you have already [installed](https://www.getpostman.com/docs/postman/launching_postman/installation_and_updates) Postman.

![postman - tutorial - 2](/Assets/images/api/postman-tutorial/postman-tutorial-2.png) --- In chrome an alert might show up to set a default app for opening postman links. Click on ""Open Postman"".

![postman - tutorial - 3](/Assets/images/api/postman-tutorial/postman-tutorial-3.png) --- The OpenAPI specification will be imported in Postman as a new collection named ""Envoice api""

![postman - tutorial - 4](/Assets/images/api/postman-tutorial/postman-tutorial-4.png) --- When testing be sure to check and modify the environment variables to suit your api key and secret. The domain is set to envoice's endpoint so you don't really need to change that. \*Eye button in top right corner

![postman - tutorial - 5](/Assets/images/api/postman-tutorial/postman-tutorial-5.png)

![postman - tutorial - 6](/Assets/images/api/postman-tutorial/postman-tutorial-6.png) --- You don't need to change the values of the header parameters, because they will be replaced automatically when you send a request with real values from the environment configured in the previous step.

![postman - tutorial - 7](/Assets/images/api/postman-tutorial/postman-tutorial-7.png) --- Modify the example data to suit your needs and send a request.

![postman - tutorial - 8](/Assets/images/api/postman-tutorial/postman-tutorial-8.png)
# Webhooks Webhooks allow you to build or set up Envoice Apps which subscribe to invoice activities. When one of those events is triggered, we'll send a HTTP POST payload to the webhook's configured URL. Webhooks can be used to update an external invoice data storage. In order to use webhooks visit [this link](/account/settings#api-tab) and add upto 10 webhook urls that will return status `200` in order to signal that the webhook is working. All nonworking webhooks will be ignored after a certain period of time and several retry attempts. If after several attempts the webhook starts to work, we will send you all activities, both past and present, in chronological order. The payload of the webhook is in format: ``` { Signature: ""sha256 string"", Timestamp: ""YYYY-MM-DDTHH:mm:ss.FFFFFFFZ"", Activity: { Message: "string", Link: "share url", Type: int, InvoiceNumber: "string", InvoiceId: int, OrderNumber: "string", OrderId: int, Id: int, CreatedOn: "YYYY-MM-DDTHH:mm:ss.FFFFFFFZ" } } ```