Skip to main content

EasyPost Adapter (1.0.0)

Download OpenAPI specification:Download

EasyPost adapter is an implementation of the NewStore Shipping options webhook that allows you to use EasyPost as a shipping provider. As an integrator, implement the methods of this resource to integrate multiple shipping providers through the EasyPost adapter with NewStore Omnichannel Cloud. Use the EasyPost adapter to offer shipping options and delivery booking requests from NewStore Omnichannel Cloud, through the EasyPost shipment API.

Get Easypost shipping configuration

Retrieves the shipping configuration of the retailer that is integrated with the EasyPost adapter.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "easypost_api_key": "string",
  • "base_customization_url": "string",
  • "ignore_customization_failure_on_booking": true,
  • "newstore_username": "string",
  • "newstore_password": "string",
  • "newstore_url": "string",
  • "shipment_creation_options": {
    },
  • "carrier_accounts": {
    }
}

Create or update Easypost shipping configuration

Creates or updates the shipping configuration of the retailer that is integrated with the EasyPost adapter. Any current data in the existing configuration is overwritten using this request.

            A few notes on this configuration:

            * When an account has a large number of carrier accounts, please do associate a Fulfillment Node to a Carrier Account. Not doing so will result in long response time, waste of resources, extra easypost charges and possibly order injection issues.
            * Once the easypost API Key has been set, it is forbidden to change it. This is to prevent options that were already generated to become completely invalid in case the api key isn't from the same account. If you really need to change this key, please open a case in the NewStore Support Portal and we will discuss the best way to do that.
            
Authorizations:
None
Request Body schema: application/json
easypost_api_key
required
string

The API key provided by EasyPost.

base_customization_url
string

The customization webhook URL to customize the data used to create the shipment.

ignore_customization_failure_on_booking
boolean

If set to true, the EasyPost adapter books a shipment with non-customized data if the call to the "base customization URL" fails. If set to false, the shipment is not booked if the call to the "base customization URL" fails. The value of the flag does not affect the processing of shipping options for the shipment.

newstore_username
string

The username provided by NewStore.

newstore_password
string

the password provided by NewStore.

newstore_url
string
object

The name of the shipping carrier in lowercase.

object

The name of the shipping carrier in lowercase.

Responses

Request samples

Content type
application/json
{
  • "easypost_api_key": "<your tenant EasyPost API key>",
  • "base_customization_url": "http://example.com/customization/",
  • "ignore_customization_failure_on_booking": true,
  • "newstore_username": "user@newstore.com",
  • "newstore_password": "password",
  • "shipment_creation_options": {
    },
  • "carrier_accounts": {
    }
}

Response samples

Content type
application/json
{
  • "easypost_api_key": "string",
  • "base_customization_url": "string",
  • "ignore_customization_failure_on_booking": true,
  • "newstore_username": "string",
  • "newstore_password": "string",
  • "newstore_url": "string",
  • "shipment_creation_options": {
    },
  • "carrier_accounts": {
    }
}

Delete Easypost shipping configuration

Deletes the shipping configuration of the retailer that is integrated with the EasyPost adapter.

Authorizations:
None

Responses

Response samples

Content type
application/problem+json
{
  • "error": "string",
  • "message": "string"
}

EasyPost Webhook Endpoint to update a delivery tracking

This endpoint is a webhook that can be set in EasyPost to update delivery tracking. This in turn calls NewStore's Delivery Set Shipment Status endpoint.

Request Body schema: application/json
description
required
string
required
object (EasyPostWebHookUpdateResult)

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "result": {
    }
}

Response samples

Content type
application/json
"assigned"

Create shipping option

Creates a shipment in EasyPost and returns related rates as possible shipping options for NewStore to use.

Request Body schema: application/json
ready_by
required
string <date-time>
required
object (PartialAddress)
required
object (Address)
provider_rate
required
string
service_level
required
string
required
Array of objects (Deliverable) non-empty
fulfillment_node_id
string
object (CustomsShipmentInfo)

Responses

Request samples

Content type
application/json
{
  • "ready_by": "2019-08-24T14:15:22Z",
  • "shipping_address": {
    },
  • "sender_address": {
    },
  • "provider_rate": "string",
  • "service_level": "string",
  • "deliverables": [
    ],
  • "fulfillment_node_id": "string",
  • "customs_info": {
    }
}

Response samples

Content type
application/json
[
  • {
    }
]

Book shipment

Books the shipment created in EasyPost using the Create shipping option method, with the specified shipping option.

Request Body schema: application/json
rate
required
string
required
Array of objects (ItemWithCustomsInfo) non-empty
booking_method
required
any
required
object (Address)
required
object (Address)
object (PackageOptions)
fulfillment_node_id
string
demand_location_id
string
external_order_id
required
string
object (CustomsShipmentInfo)

Responses

Request samples

Content type
application/json
{
  • "rate": "string",
  • "items": [
    ],
  • "booking_method": null,
  • "sender_address": {
    },
  • "shipping_address": {
    },
  • "package_option": {
    },
  • "fulfillment_node_id": "string",
  • "demand_location_id": "string",
  • "external_order_id": "string",
  • "customs_info": {
    }
}

Response samples

Content type
application/json
{
  • "cost": {
    },
  • "offer": "string",
  • "label_url": "string",
  • "tracking_code": "string",
  • "tracking_url": "string",
  • "commercial_invoice_url": "string",
  • "return_offer": "string",
  • "return_cost": {
    },
  • "return_label_url": "string",
  • "return_tracking_code": "string",
  • "return_tracking_url": "string",
  • "return_commercial_invoice_url": "string"
}

Create Manifest (also named ScanForm)

Regroupe multiple shipments under a single Manifest in order to simplify handover to carrier.

Request Body schema: application/json
offers
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "offers": [
    ]
}

Response samples

Content type
application/json
{
  • "document_url": "string",
  • "id": "string"
}

Cancel shipment

Cancels a booked shipment using the tracking code.

Responses