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:
Responses
Response samples
- 200
- 403
- default
{- "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": {
- "fedex": {
- "easypost_option_key": "easypost_option_value: see https://docs.easypost.com/docs/shipments/options#options-object"
}
}, - "carrier_accounts": {
- "fedex": {
- "newstore_fulfillment_node_id": "ca_xxxxxx: easypost carrier account id"
}
}
}
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:
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
- Payload
{- "easypost_api_key": "EKxxxxxx-your-tenant-easypost-API-Key",
- "ignore_customization_failure_on_booking": true,
- "newstore_username": "user@newstore.com",
- "newstore_password": "password",
- "shipment_creation_options": {
- "ups": {
- "by_drone": true
}, - "fedex": {
- "label_format": "PDF",
- "delivery_confirmation": "SIGNATURE"
}
}, - "carrier_accounts": {
- "ups": {
- "US01": "ca_us_01",
- "US02": "ca_us_02"
}, - "fedex": {
- "US01": "ca_us_02",
- "US02": "ca_us_03"
}
}
}
Response samples
- 200
- 400
- 403
- default
{- "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": {
- "fedex": {
- "easypost_option_key": "easypost_option_value: see https://docs.easypost.com/docs/shipments/options#options-object"
}
}, - "carrier_accounts": {
- "fedex": {
- "newstore_fulfillment_node_id": "ca_xxxxxx: easypost carrier account id"
}
}
}
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
- Payload
{- "description": "string",
- "result": {
- "tracking_code": "string",
- "status": null,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Response samples
- 200
"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
- Payload
{- "ready_by": "2019-08-24T14:15:22Z",
- "shipping_address": {
- "zip_code": "string",
- "country_code": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "company": "string",
- "city": "string",
- "state": "string",
- "phone": "string"
}, - "sender_address": {
- "zip_code": "string",
- "country_code": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "company": "string",
- "city": "string",
- "state": "string",
- "phone": "string"
}, - "provider_rate": "string",
- "service_level": "string",
- "deliverables": [
- {
- "quantity": 0,
- "item": {
- "price": {
- "amount": 0,
- "currency": "string"
}, - "weight": {
- "amount": 0,
- "unit": null
}, - "dimensions": {
- "unit": null,
- "width": 0,
- "height": 0,
- "length": 0
}, - "identifier": { },
- "customs_info": {
- "description": "string",
- "hs_number": "string",
- "origin_country": "string"
}
}
}
], - "fulfillment_node_id": "string",
- "customs_info": {
- "customs_signer": "string"
}
}
Response samples
- 200
[- {
- "offer": "string",
- "provider_rate": "string",
- "service_level": "string",
- "delivery_estimate": {
- "starts_at": "2019-08-24T14:15:22Z",
- "ends_at": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "guaranteed": true
}, - "quote": {
- "price": 0,
- "currency": "string"
}
}
]
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
- Payload
{- "rate": "string",
- "items": [
- {
- "price": {
- "amount": 0,
- "currency": "string"
}, - "weight": {
- "amount": 0,
- "unit": null
}, - "dimensions": {
- "unit": null,
- "width": 0,
- "height": 0,
- "length": 0
}, - "identifier": { },
- "customs_info": {
- "description": "string",
- "hs_number": "string",
- "origin_country": "string"
}
}
], - "booking_method": null,
- "sender_address": {
- "zip_code": "string",
- "country_code": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "company": "string",
- "city": "string",
- "state": "string",
- "phone": "string"
}, - "shipping_address": {
- "zip_code": "string",
- "country_code": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "company": "string",
- "city": "string",
- "state": "string",
- "phone": "string"
}, - "package_option": {
- "weight": {
- "amount": 0,
- "unit": null
}, - "dimensions": {
- "unit": null,
- "width": 0,
- "height": 0,
- "length": 0
}
}, - "fulfillment_node_id": "string",
- "demand_location_id": "string",
- "external_order_id": "string",
- "customs_info": {
- "customs_signer": "string"
}
}
Response samples
- 200
{- "cost": {
- "currency": "string",
- "amount": 0
}, - "offer": "string",
- "label_url": "string",
- "tracking_code": "string",
- "tracking_url": "string",
- "commercial_invoice_url": "string",
- "return_offer": "string",
- "return_cost": {
- "currency": "string",
- "amount": 0
}, - "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
- Payload
{- "offers": [
- "string"
]
}
Response samples
- 200
{- "document_url": "string",
- "id": "string"
}