Konnect API
Konnect exposes a set of REST API endpoints for you to integrate with, which you can explore using our OpenAPI Specification.
Before you start
Contact your account manager for an API key to get started with ByBox Konnect Partner API. All our REST API's are secured using the OAuth standard and accessed over HTTP for private and secure access.
Once your API key is generated, you'll receive:
- Client ID (e.g. my_bybox_client_id)
- Client Secret (e.g. XXXXXXXX-YYYY-ZZZZ-ABCDEFGHIJKL)
Environment | URI |
---|---|
Production | https://konnect-partnerapi.bybox.com/docs/index.html |
UAT | https://konnect-partnerapi-uat.bybox.com |
Step 1: Authentication
Perform the following HTTP request to receive an access token from our authentication endpoint:
When you make a request, it will return a JSON object containing your access token. The token will expire in a number of seconds. To authenticate, supply your access token with every request to our other endpoints.
URI | /Auth/core/connect/token |
---|---|
HTTP Method | POST |
Content-Type | x-www-form-urlencoded |
Request Body |
YML
|
Response |
YML
|
Step 2: Making your first request
Once you've received a valid access token you can use this by providing an authorisation header with your request to our API. For example, the following http request will return a list of all your locations:
URI | /Api/locations |
---|---|
HTTP Method | GET |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Response Code | OK (200) |
Response Body |
YML
|
Step 3: Workflow integration
Most of our partners follow one of the following workflows:
- Pick up and drop off
- Replenishing inventory
- Collecting from inventory
Pick up and drop off
This is best suited for partners who wish to deliver packages to a person for collection. There are 2 options:
- An allocated locker permanently assigned to a person.
- A locker allocated to a person until they collect a package.
Allocating a permanently assigned locker
This is achieved by assigning a locker to a user of your system using the following API endpoint:
URI | /Api/users/{identifier}/door/{doorIdentifier} |
---|---|
HTTP Method | POST |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Parameter | {identifier} is the identifier of the user. {doorIdentifier} is the identifier of the door to assign |
Response | HTTP 200 |
Configure "Notifications" on the locker in Konnect HQ to alert your engineer of deliveries arriving to their allocated locker. They will receive a push notification or email when their package has been delivered.
Temporary Access
Alternatively, you may wish to limit access to your delivery locker until a package is collected. In this scenario, once the package has been delivered you can assign the package to the person who will be collecting it. They will receive a push notification or email to collect their package.
To assign a package for collection you can use the following API endpoint:
URI | /Api/users/{userIdentifier}/packagecollectionassignments |
---|---|
HTTP Method | POST |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Parameter | {userIdentifier} is the identifier of the user to collect the package. |
Request Body |
YML
|
Response | HTTP 200 |
Replenishing inventory
Keeping stock data accurate is a critical part of Konnect. It includes the following parts:
- Stock Keeping Units (SKUs)
- Stock Locations: A location holding inventory stock
SKUs
Stock Keeping Unit is the type of part you wish to store in inventory. There are two types: serialised and non-serialised.
A serialised SKU is where each unit being stored has a unique identifier that can be used to track that particular part.
A non-serialised SKU has all its parts identified by the same tracking number.
To create a serialised SKU, use this endpoint:
URI | /Api/skus/ |
---|---|
HTTP Method | POST |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Request Body |
YML
|
Response | HTTP 200 |
Or to create a non-serialised SKU, use this endpoint:
URI | /Api/skus/nsi |
---|---|
HTTP Method | POST |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Request Body |
YML
|
Response | HTTP 200 |
In order for Konnect to know what inventory is inside your package, you will need to Pre-Advise before the package arrives at the locker. For a non-serialised SKU this will happen automatically when the specified barcode is scanned by the driver.
For a serialised SKU, you need to call the below endpoint:
URI | /Api/skus/{identifier}/preadvice |
---|---|
HTTP Method | POST |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Parameter | {identifier} is the identifier of the sku. |
Request Body |
YML
|
Response | HTTP 200 |
Once the carrier has made a delivery into your locker, create a Job Order for an engineer to move the part into an inventory locker. Once all the packages on the Job Order have been collected, the Job Order is complete and the engineer's access to the delivery locker will be revoked.
A Job Order can be created using the following endpoint:
URI | /Api/orders/job |
---|---|
HTTP Method | POST |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Parameter | {identifier} is the identifier of the SKU. |
Request Body |
YML
|
Response | HTTP 200 |
Notify Konnect about the upcoming delivery by Locker Access Terminal or Konnect One
Sometimes you may want a delivery made by a user without access to the Konnect App, either using Locker Access Terminal or Konnect One.
In this situation, you must notify Konnect of the upcoming delivery using the below endpoint. This will create an access code for your driver to use, matching the package with the tracking number.
Please note:
- Pre-Advice feature should be enabled for your client.
- Location must have a unique identifier assigned in order to use this call. You can do this either programmatically, or using Konnect HQ.
- Client, User and Delivery door should be enabled for the deliveries using Locker Access Terminal or Konnect One.
URI | /Api/goodsin | ||||||||
---|---|---|---|---|---|---|---|---|---|
HTTP Method | POST | ||||||||
Content-Type | application/json | ||||||||
Header | Authorization : "Bearer {access_token}" | ||||||||
Request Body |
YML
| ||||||||
Response | HTTP 200 |
Collecting from inventory
For an engineer to collect a part from inventory, they need an inventory order. Before we can create one of those we need to allocate lockers to store your inventory in. To do this we can assign a locker as a stock location by using the below endpoint:
URI | /Api/skus/{identifier}/doors |
---|---|
HTTP Method | POST |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Parameter | {identifier} is the identifier of the SKU. |
Request Body |
YML
|
Response | HTTP 200 |
Now that the SKU is allocated to the locker, we have the ability to check the stock level at that location before we place an order.
URI | /Api/locations/{locationIdentifier}/skus/{skuIdentifier}/summary |
---|---|
HTTP Method | GET |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Parameter | {locationIdentifier} is the identifier of the location. {skuIdentifier} is the identifier of the sku |
Response Code | OK (200) |
Response Body |
YML
|
As long as there is stock available in the locker you can now create an Inventory Order to be collected by your engineer.
URI | /Api/orders/{locationIdentifier}/skus/{skuIdentifier}/summary |
---|---|
HTTP Method | POST |
Content-Type | application/json |
Header | Authorization : "Bearer {access_token}" |
Response Code | OK (200) |
Response Body |
YML
|