Authentication

Getting started

The Notify API offers authentication bases on API keys.

Creating API keys

The first thing you need is a company profile. Each company profile has a Live API key and a Test API key (sandbox). While building and testing your integration, you should use the Test API key. Once you are ready to start processing real data, switch out your test key for the Live API key.

Of course it’s very important to keep any API keys secure. Do not ever share them. However, if a key leaks you can always regenerate it. Do not forget to apply new keys to your code. Until you do your integration will not work.

Authenticating an API call

The API key or token must be sent along with each API request, by providing it in the HTTP call’s Authorization header using the Bearer method. For example: a valid Authorization header is Bearer test_R7HQ9QpXgx8J32rW9X9UyXjgfNk6C7TQ2UD8M5rwf8vVnYxnSETvSuEC6SKFW8Ug.

In the example below we use a Test API key on the GET method of the invoices resource. This method fetches an invoice - in this case the invoice with the fictional invoice ID a0f0660d-6c8d-422b-8114-e363b260521e.

We always provide two API keys:

A Live API key, starting with live_ and a Test API key, starting with test_. You can find more information about testing in the Testing guide.

curl -X GET https://api.notify.cm/v2/invoices/a0f0660d-6c8d-422b-8114-e363b260521e \
    -H "Authorization: Bearer test_R7HQ9QpXgx8J32rW9X9UyXjgfNk6C7TQ2UD8M5rwf8vVnYxnSETvSuEC6SKFW8Ug"

The response will be JSON.

HTTP/1.1 200 OK
Content-Type: application/hal+json

{
        "resource": "invoice",
        "id": "a0f0660d-6c8d-422b-8114-e363b260521e",
        "status":"open",
        "invoiceNumber":"20210001",
        "invoiceDate":"21-01-2021",
        "invoiceDuedate":"21-02-2021",
        "invoiceTotal":"480.00",
        "invoiceBalance":"330.00",
        "document":"36cf1c0d-53fe-4c73-8a46-f9f40cd99b65.pdf",
        "customer": {
                "id":"36cf1c0d-53fe-4c73-8a46-f9f40cd99b65",
                "number":"10001",
                "name":"Creditpartners B.V."
        }     
}

Last updated

Was this helpful?