Skip to main content

Shipping Provider Webhooks (v0)

Download OpenAPI specification:Download

Manage deliveries or shipments in the NewStore platform using these webhooks.

To learn how NewStore integrates with a shipping provider, see the guide.

Shipments

Represents the shipment(s) created once an order with delivery is being placed. Depending on the provider, a shipment is generally pre-booked (also called a delivery promise), then booked, and finally tracked.

As an integrator, implement the methods of this resource to integrate a shipping provider such as UPS with NewStore Cloud.

The integration of a shipment provider also uses the Shipping offers resource. For more information about the integration, see Integrating a shipping provider.

Note: The validity of a shipping offer token can vary based on the shipping provider and shipping offer. For in-store pickup orders, a shipping offer token does not expire.

Book shipment

Books a shipment based on an offer received by the provider.

Request Body schema: application/json
offer
string non-empty

The serialized value used to identify the Option to be booked directly. It is the same value as returned from /shipping_offers endpoint. Your implementation must be able to use this value as it is, handling any decoding or parsing if necessary.

rate
required
string <= 256 characters

Identifier of the rate, examples are 'FEDEX_GROUND' or 'DHL_WUNSCHZEIT'.

carrier_code
required
string <= 256 characters

Identifier of the shipping carrier, examples are 'FEDEX' or 'DELIV'.

external_order_id
required
string non-empty

External identifier of the order to be shipped.

booking_method
required
string
Enum: "only_shipping" "only_return" "shipping_and_return"

Type of shipments to book.

required
object

Address of the sender.

required
object

Address of the consumer.

object

Specifications of the package.

required
Array of objects

List of the identifiers of the products contained in the package.

demand_location_id
string <= 256 characters

Represents the location where the order was placed, examples are 'DC01' or 'US01'.

fulfillment_node_id
string <= 256 characters

Represents the location from where the order will be shipped, examples are 'DC02' or 'US02'.

object

Responses

Request samples

Content type
application/json
{
  • "rate": "FEDEX_GROUND",
  • "demand_location_id": "US01",
  • "fulfillment_node_id": "US02",
  • "carrier_code": "FEDEX",
  • "external_order_id": "981475723",
  • "booking_method": "shipping_and_return",
  • "sender_address": {
    },
  • "shipping_address": {
    },
  • "items": [
    ]
}

Response samples

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

Cancel shipment

Cancels a shipment. Canceling a shipment is only possible before it reaches the in_transit status.

To retrieve the status of the shipment, use the List shipments method.

path Parameters
tracking_code
required
string

The tracking code for the delivery/shipment that needs to be cancelled. The tracking code is provided by the shipping provider to NewStore Omnichannel Cloud when a shipment is booked.

Responses

Response samples

Content type
application/json
{ }

Shipping offers

Represents the shipping offers presented to the customer during the checkout step, for example Standard delivery or Next-day delivery.

As an integrator, implement the methods of this resource to integrate a shipping provider with NewStore Omnichannel Cloud.

The integration of a shipment provider also uses the Shipments resource. For more information about the integration, see Integrating a shipping provider.

Note: The validity of a shipping offer token can vary based on the shipping provider and shipping offer. For in-store pickup orders, a shipping offer token does not expire.

Request shipping offers

Requests shipping offers, including quotes and delivery windows.

IMPLEMENTATION NOTE: both service_level and provider_rate are supposed to be of the same value as requested. Although it is permitted to set different values, NewStore does not apply any filtering at the moment. To guarantee that your integration will always be able to generate options in the future, please make sure to set those values according to the requested parameters.

Request Body schema: application/json
object

used only for international shipments (ex: different sender/shipping country code, military address...)

required
object

Address of the sender.

required
object

Address of the consumer.

required
Array of objects non-empty

List containing information about the products to be shipped.

fulfillment_node_id
string

Unique ID representing the pickup location of the shipment.

ready_by
required
string <date-time>

Estimate of the time when the package becomes ready for delivery. Use this property's value to filter shipping offers from the provider to select manageable delivery time slots.

provider_rate
required
string <= 256 characters

Identifier of the rate, examples are 'FEDEX_GROUND' or 'DHL_WUNSCHZEIT'.

service_level
required
string <= 256 characters

Identifier of the service level, examples are 'SAME DAY' or 'EXPRESS'.

Responses

Request samples

Content type
application/json
{
  • "sender_address": {
    },
  • "shipping_address": {
    },
  • "deliverables": [
    ],
  • "ready_by": "2018-03-04T10:29:05Z",
  • "service_level": "sameday",
  • "provider_rate": "deliv"
}

Response samples

Content type
application/json
[
  • {
    }
]