Bond GEO API v1.0 (1.0)

Download OpenAPI specification:Download

Introduction

Bond, the post-purchase company, is changing the game of the last-mile delivery industry. Bond’s tech-driven platform enables digitally-native brands full visibility and control during the Post-Purchase phase. Your technological swiss army knife to save up to 20% on operational costs and reach improved business KPIs. We’re building the first “post-purchase” platform to help brands uncover the data they need to create unforgettable customer experiences.

API Overview

Welcome to Bond’s GEO API Reference!

Current API Version is 1.0

Geo API let's you manage your sites, handle specific working hours and geographical restrictions.

Common Use Cases:

  • Get available time slots for making an order, with respect to the recipient address.
  • Validate selected time slot
  • Block an available slot in a time slot to balance peak hour load.

The site back office tool

Along the above Geo API, site managers are provided with a user friendly tool to control the day to day operations of the site.

Time slot settings of a site:

Coverage area view of a site:

Site management main screen:

Authentication

Api Key

In order to use Bond GEO API, each request must be authenticated with an API key bearer token. The API key should be sent with each request in the authorization header section with the prefix Bearer

Security Scheme Type API Key
Header parameter name: authorization

Pre Order

Before creating an order, you first have to go through these steps:

Pre Order's Lifecycle

  • Get matching site: Check if the order's destination is supported by your geo rules. Then, find the best matching site to fulfill the order. Best site allocation workflow is in accordance with your geo rules, inventory settings, current load etc.
  • Get site's time slots: Get site's available time slot. Used for scheduled deliveries.
  • Get site timezone: Get the site's local timezone for more complex time calculations.
  • Get site info: Get the site's name and details, to display in your app.

Get the matching site

Use this endpoint to check if an address is supported by your geo rules. if it is supported, the response will include the matched site for your order. In case there are multiple sites servicing this location - the best site with respect to current load of the sites in the area and inventory availability will be matched.

Authorizations:
query Parameters
role
string

A unique ID of geo subgroups. Used to apply different geo policy to diffrent groups in the same site

latitude
number

Part of the address' coordinates

longitude
number

Part of the address' coordinates

Responses

Response samples

Content type
application/json
{
  • "status": "ADDRESS_NOT_SUPPORTED",
  • "warning": "We are not currently delivering to this address.",
  • "site": "437fa207-cd7d-488d-b71e-a4663f6bd788",
  • "success_code": true
}

Get available times

Use this endpoint to get the list of available time slots for your site and geolocation rules. Customers will choose one slot from the list to complete the order. Slots are formatted in the timezone of the site, and it’s up to the application to adjust the time if needed.

Authorizations:
path Parameters
site_id
required
string <uuid>

The site's id

query Parameters
start-date
required
string <ISO-string(UTC)>

Show time slots availabe from this date forward

end-date
required
string <ISO-string(UTC)>

Show time slots availabe until this date.

ignore-time
boolean
Default: false

If true, filters result by date only and ignores the hour part of the date.

Responses

Response samples

Content type
application/json
{
  • "windows": [
    ],
  • "success_code": true
}

Get site's timezone

Use this to get the site's location PATH PARAMETERS

Authorizations:
path Parameters
site_id
required
string <uuid>

The site's id

Responses

Response samples

Content type
application/json
{
  • "dstOffset": 3600,
  • "rawOffset": -18000,
  • "timeZoneId": "America/New_York",
  • "timeZoneName": "Eastern Daylight Time"
}

Get site's info

Use this to get the site's name and details. This is usefull if you want to show extra details in your app/website.

Authorizations:
path Parameters
site_id
required
string <uuid>

The site's id

Responses

Response samples

Content type
application/json
{
  • "name": "West side 1",
  • "isactive": true,
  • "roles": [
    ],
  • "region": "USA",
  • "areas": [
    ],
  • "address": {
    },
  • "address_details": {
    }
}

Create Order

After a single time slot is picked, it needs to go through these steps:

Create Order's Lifecycle

  • Validate selected window: make sure the selected slot is indeed supported by your sites. This is an extra validation in the server side of user input to make sure it was not manipulated.
  • Increment order count: mark the order as completed. By incrementing the load counter, you can enforce the load on each time slot and manage the rush hours of the day.

Validate a time window

Use this in your server side to validate the data received by your client. This will prevent submitting unsupported time slot.

Authorizations:
path Parameters
site_id
required
string <uuid>

The site's id

query Parameters
role
required
string

A unique ID of geo subgroups. Used to apply different geo policy to diffrent groups in the same site.

latitude
number

Part of the address' coordinates

longitude
number

Part of the address' coordinates

date
required
string <ISO-string(UTC)>
window
required
Array of Array of strings (TimeslotWindowType)
Example: window=08:00,10:00

The selected timeslot

Responses

Response samples

Content type
application/json
{
  • "status": "INVALID_WINDOW",
  • "reason": "The order was rejected because the address is not supported.",
  • "site_id": "437fa207-cd7d-488d-b71e-a4663f6bd788"
}

Increment order's count

Mark order as placed , for enforcing the limits allowed in a single time slot.

Authorizations:
Request Body schema: application/json
siteId
string <uuid>

The site's unique id

date
string <date-time>

ISO string date

selectedWindow
Array of strings (TimeslotWindowType)

An array of start and end time hours and minutes, in 24 hour format

Responses

Request samples

Content type
application/json
{
  • "siteId": "437fa207-cd7d-488d-b71e-a4663f6bd788",
  • "date": "2020-12-15T10:40:27.396Z",
  • "selectedWindow": [
    ]
}

Response samples