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
- Payload
{- "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": {
- "first_name": "John",
- "last_name": "Doe",
- "phone": "202-555-0186",
- "country_code": "US",
- "city": "New York",
- "zip_code": "10001",
- "address_line_1": "2635 Simons Hollow Road",
- "state": "New York"
}, - "shipping_address": {
- "first_name": "James",
- "last_name": "Navarrete",
- "phone": "520-466-2640",
- "country_code": "US",
- "city": "Arizona City",
- "zip_code": "85223",
- "address_line_1": "2035 Parkway Drive",
- "state": "AZ"
}, - "items": [
- {
- "identifier": {
- "EPC": "32WE4335"
}
}, - {
- "identifier": {
- "EPC": "473UC75279"
}, - "price": {
- "amount": 15.4,
- "currency": "USD"
}, - "weight": {
- "amount": 350,
- "unit": "g"
}
}
]
}
Response samples
- 201
- 400
{- "tracking_code": "string",
- "label_url": "string",
- "tracking_url": "string",
- "commercial_invoice_url": "string",
- "offer": "string",
- "cost": {
- "price": 0,
- "currency": "str"
}, - "return_tracking_code": "string",
- "return_label_url": "string",
- "return_tracking_url": "string",
- "return_commercial_invoice_url": "string",
- "return_offer": "string",
- "return_cost": {
- "price": 0,
- "currency": "str"
}
}
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
- 200
- 400
- 404
- 409
{ }
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
- Payload
{- "sender_address": {
- "country_code": "US",
- "city": "New York",
- "zip_code": "10013",
- "address_line_1": "4139 Rosewood Lanesunt",
- "state": "New York"
}, - "shipping_address": {
- "country_code": "US",
- "city": "New York",
- "zip_code": "10001",
- "address_line_1": "2635 Simons Hollow Road",
- "state": "New York"
}, - "deliverables": [
- {
- "quantity": 1,
- "item": {
- "identifier": {
- "product_id": "123",
- "sku": "123"
}
}
}, - {
- "quantity": 1,
- "item": {
- "identifier": {
- "product_id": "123",
- "sku": "123"
}
}
}
], - "ready_by": "2018-03-04T10:29:05Z",
- "service_level": "sameday",
- "provider_rate": "deliv"
}
Response samples
- 201
- 400
[- {
- "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"
}, - "quote": {
- "price": 0,
- "currency": "str"
}
}
]