Bond API v0.2 (0.2)

Download OpenAPI specification:Download

Introduction

BOND, the post-purchase company, is changing the game of last-mile delivery experience.

Bond’s tech-driven network of nano distribution centers (NDCs) enables brands to provide fast, convenient, and friendly deliveries. With in-city storage, same-day delivery, next day scheduled delivery and scheduled returns, Bond offers D2C brands the most advanced and personalized last-mile solutions in the industry.

API Overview

Welcome to Bond’s core API Reference!

Current API Version is 0.2

The Bond platform offers a post-purchase and last-mile delivery solution that integrates directly into your current flow and systems. Our API configures and manipulates Bond features and capabilities to seamlessly fit your business order needs. To use our API, make sure to set up your Bond account by contacting your Bond Account Manager or Bond Support, and checking that the prerequisite features are enabled for your account. Most user actions within Bond API can be performed programmatically using the REST API

Common Use Cases:

  • Create a new order
    • Update existing order
    • Get ordering list
    • Get single order data
    • Webhooks
    • Scheduling

Authentication

Api Key

In order to use Bond API, each request must be authenticated with an API key.
The API key should be sent with each request in the header section with the header X-BOND-KEY

Security Scheme Type API Key
Header parameter name: X-BOND-KEY

Order

Our automatic ordering function makes fulfillment as easy as pie! Whether it be for order delivery, service fulfillment, or package return requests.
Each order should be set for a single customer, delivery address, and delivery date. Updating orders is just as simple and can be done as often as necessary to communicate exact delivery needs.

Order's Lifecycle

Each order will have an assigned status to reflect its position in the delivery lifecycle:

  • Pending: all newly created orders.
  • Ready to be delivered:
    • Orders that arrived to the Bond site already packed
    • Pick&Pack orders packaged by Bond that are ready for delivery
  • On the way: Bond is on the way to the customer.
  • Servicing: Bond has made it to the customer for handover.
  • Done: Order is complete and the customer has their package.
  • Canceled: Rejected or canceled orders.

Order Types

When creating an order, an order “type” should always be set. The type will initiate the workflow (aka process):

  • PackDeliver- Use this when you wish to initiate an order (with 1 or more SKUs). We will pick&pack the order at our Bond site.
  • Deliver- Use this when you wish to initiate an order that has already been packed (with 1 or more SKUs). Arrives at Bond site ready for delivery.
  • Reject - Use this when you wish to initiate a reject package workflow or a return.

Create new order

Create a new order to be delivered with Bond

Authorizations:
Request Body schema: application/json
type
required
string (OrderType)
Enum: "PACK-DELIVER" "DELIVER" "REJECT"

The order type

brandOrderId
string

The order Id given by the brand

creationDate
string <date-time>

The order's creation date and time (in ISO8601 format).
If not given, the date time will be now.

requestedDeliveryDate
string <date-time>
readinessDate
string <date-time>
customer
required
object

The order's customer contact

reciever
object

The recipient of the order.
if not given, the contact will be the same as the customer's contact details.

packages
Array of objects

The brand's package ids which will be deliveded by Bond.
If a PACK-DELIVER type order is selected, the packages will be ignored.

items
Array of objects (Item)

The order items. if packed order type is selected, the items will be ignored.

notes
string

Responses

200

New order details

400

Invalid request

401

Request is missing an api key

403

Request is forbidden with current credentials

post /orders
/orders

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "PACK-DELIVER",
  • "brandOrderId": "ACME-1212",
  • "creationDate": "2020-02-10T08:00:00Z",
  • "requestedDeliveryDate": "2020-02-11T12:30:00Z",
  • "readinessDate": "2020-02-11T10:00:00Z",
  • "customer":
    {
    },
  • "reciever":
    {
    },
  • "packages":
    [
    ],
  • "items":
    [
    ],
  • "notes": "Make sure it's fresh"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "BOuQ84HaQZ",
  • "brandOrderId": "ACME-1212",
  • "status": "DONE",
  • "type": "PACK-DELIVER",
  • "site": "EV",
  • "location": "Customer",
  • "creationDate": "2020-02-10T08:00:00Z",
  • "requestedDeliveryDate": "2020-02-11",
  • "requestedDeliveryWindow":
    {
    },
  • "readinessDate": "2020-02-11T10:00:00Z",
  • "expectedArrivalDate": "2020-02-11T12:30:00Z",
  • "actualArrivalDate": "2020-02-11T12:32:10Z",
  • "customer":
    {
    },
  • "reciever":
    {
    },
  • "packages":
    [
    ],
  • "items":
    [
    ],
  • "notes": "Make sure it's fresh"
}

List orders

List and filter orders

Authorizations:
query Parameters
status
Array of strings (OrderStatus)
Items Enum: "PENDING" "READY_FOR_DELIVERY" "ON_THE_WAY" "SERVICING" "DONE" "CANCELLED"
Example: status=DONE

filter by order status

type
Array of strings (OrderType)
Items Enum: "PACK-DELIVER" "DELIVER" "REJECT"
Example: type=PACK-DELIVER

filter by order type

creation_start
string <date-time>

range start of the creation date

creation_end
string <date-time>

range end of the creation date

requested_delivery_start
string <date-time>

range start of the requested delivery date

requested_delivery_end
string <date-time>

range end of the requested delivery date

page
number
Default: 1

items page

per_page
number [ 1 .. 200 ]
Default: 50

number of items to show in each page (between 1-200).

Responses

200

Success Response

400

Invalid request

401

Request is missing an api key

403

Request is forbidden with current credentials

get /orders
/orders

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Update order

Update an existing order

Authorizations:
path Parameters
prefix
required
string
Enum: "bond" "brand" "bond-package" "brand-package"

order id type:

  • bond - retrieve order by it's Bond Id
  • external - retrieve order by it's Brand Id
  • bond-package - retrieve order by one of it's package Bond Ids
  • bond-package - retrieve order by one of it's package Brand Ids
id
required
string
Request Body schema: application/json
status
string
Value: "CANCELLED"

Change the current status of the order.
Can't change to CANCELLED if order is already DONE

requestedDeliveryDate
string <date-time>
requestedDeliveryWindow
object
readinessDate
string <date-time>
customer
object

The order's customer contact details

reciever
object

The recipient of the order. if not given, the details will be copied from the customer attribute

packages
Array of objects

The brand package ids which will be deliveded by Bond.
if unpacked order type is selected, the ids will be ignored.
If the order is already ON_THE_WAY, this can't be changed.

items
Array of objects (Item)

The order items. if packed order type is selected, the items will be ignored.
If the order is already ON_THE_WAY, this can't be changed.

notes
string

Notes left by the customer when placing the order.

Responses

200

New order details

401

Request is missing an api key

403

Request is forbidden with current credentials

404

Order not found

patch /orders/{prefix}-{id}
/orders/{prefix}-{id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "CANCELLED",
  • "requestedDeliveryDate": "2020-02-11T12:30:00Z",
  • "requestedDeliveryWindow":
    {
    },
  • "readinessDate": "2020-02-11T10:00:00Z",
  • "customer":
    {
    },
  • "reciever":
    {
    },
  • "packages":
    [
    ],
  • "items":
    [
    ],
  • "notes": "Make sure it's fresh"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "BOuQ84HaQZ",
  • "brandOrderId": "ACME-1212",
  • "status": "DONE",
  • "type": "PACK-DELIVER",
  • "site": "EV",
  • "location": "Customer",
  • "creationDate": "2020-02-10T08:00:00Z",
  • "requestedDeliveryDate": "2020-02-11",
  • "requestedDeliveryWindow":
    {
    },
  • "readinessDate": "2020-02-11T10:00:00Z",
  • "expectedArrivalDate": "2020-02-11T12:30:00Z",
  • "actualArrivalDate": "2020-02-11T12:32:10Z",
  • "customer":
    {
    },
  • "reciever":
    {
    },
  • "packages":
    [