Skip to main content
All CollectionsIntegrations and Add-Ons
Getting Started With our API and Webhooks
Getting Started With our API and Webhooks

Integrate ConsignCloud with other services

Seth Thoburn avatar
Written by Seth Thoburn
Updated over a year ago

Our API and webhooks allow developers to integrate ConsignCloud with other services. This guide will just show you how to get started with the ConsignCloud API, full documentation is available here. Note that this guide assumes that the reader has some experience writing code and interacting with APIs.

To use the developer features, open the menu and navigate to Settings » Apps and enable the "API & Webhooks" app. Then open up the settings.

Generate an API Key

From the "API & Webhooks" settings, press "Add API Key." You can name it anything, the name helps to identify the key in the future. Once you generate your api key, copy it to somewhere secure. You can also reference it any time in the future by pressing the edit button on the API key in the table.

Make Your First Request

Let's get a list of accounts from the API. To do this, we will need to send HTTPS requests, I will be using curl but this can be done with any HTTPS client. For these examples, replace "examplekey" with the key you generated in the first step.

To list accounts from ConsignCloud, we must make an authenticated request to https://api.consigncloud.com/api/v1/accounts. That request can be made with curl by putting the following command in your terminal:

curl -X GET \
"https://api.consigncloud.com/api/v1/accounts" \
-H "Authorization: Bearer examplekey"

The authorization header contains your API key which shows ConsignCloud that you have access to the requested resource. You will receive a response something like this:

{
"data": [
{
"balance": 0,
"company": "Taylor, Taylor and Williamson",
"created": "2022-06-27T00:18:32.154Z",
"email": "imatthews@example.net",
"email_notifications_enabled": false,
"first_name": "Destiny",
"id": "01a9eaa5-8d08-4917-a578-0a27bc5ca275",
"last_name": "Morris",
"number": "000137"
},
...
{
"balance": 0,
"company": "Miller-Garcia",
"created": "2022-05-03T01:13:32.154Z",
"email": "shannon57@example.org",
"email_notifications_enabled": true,
"first_name": "Mikayla",
"id": "0e7e17a2-7ee4-4cb3-8f72-9f4c5f3995dc",
"last_name": "Navarro",
"number": "000046"
}
],
"next_cursor": "eyJpZCI6ICIwZTdlMTdhMi03ZWU0LTRjYjMtOGY3Mi05ZjRjNWYzOTk1ZGMifQ=="
}

There should be ten accounts if you have that many accounts in your system, but I've truncated the response for brevity.

Fetching the Next Page

Let's request the next ten accounts by putting the returned cursor in the cursor parameter on the next request:

curl -X GET \
"https://api.consigncloud.com/api/v1/accounts?cursor=eyJpZCI6ICIwZTdlMTdhMi03ZWU0LTRjYjMtOGY3Mi05ZjRjNWYzOTk1ZGMifQ==" \
-H "Authorization: Bearer examplekey"

We'll get a response with the next ten accounts:

{
"data": [
{
"balance": 0,
"company": "Bates, Terry and Richardson",
"created": "2022-06-15T00:18:32.154Z",
"email": "heather53@example.net",
"email_notifications_enabled": true,
"first_name": "Janice",
"id": "1030ccb5-7d86-4ba7-8d26-2993715b916a",
"last_name": "Mcguire",
"number": "000115"
},
...
{
"balance": 0,
"company": "Martin-Smith",
"created": "2022-05-20T03:23:32.154Z",
"email": "tammy26@example.com",
"email_notifications_enabled": false,
"first_name": "Gary",
"id": "1d206cd3-9c80-4fe8-a0e4-391c4fb19454",
"last_name": "Gaines",
"number": "000079"
}
],
"next_cursor": "eyJpZCI6ICIxZDIwNmNkMy05YzgwLTRmZTgtYTBlNC0zOTFjNGZiMTk0NTQifQ=="
}

If there are no more results, a null cursor will be returned.

Conclusion

You should have successfully made your first request! If you ran in to any problems, please contact us from the chat box in ConsignCloud or send us an email at team@consigncloud.com.

Be sure to check out our API documentation to see the full range of functionality available!

Did this answer your question?