Create New Shipment
Creating a new shipment requires you making a post request to the shipment endpoint ensure to pass the required header parameters and body parameters to get the appropriate response
Sample Payload to request shipment
Create New Shipment
https://live.sendbox.co/shipping/shipments
This creates a new shipment
Headers
Name
Type
Description
Authorization
String
Authorization-key
Content-type
String
application/json
Body Parameters
Name
Type
Description
origin
Object
senders details
destination
Object
recipient details
weight
Float
weight of package
items
Array
An array of objects that contain:
- name [String]
- weight [Float]
- item_type_code [String optional]
- hts_code [String optional]
- description [String]
- quantity [Integer]
- value [Float]
incoming_option
String
set to either pickup or dropoff
pickup_date
Date
date in ISO format
total_value
Float
value of shipment
package_type
String
package type
channel_code
String
channel the request is being made from; in this case set it to api
service_code
String
can be set to either international, nation-wide, and local.
region
String
region the shipment is being shipped from.
custom_options
String
custom options
callback_url
String
a webhook url to get the tracking update.
hts_code
String
pass in the item code to match it's description.
Payload Explained
While some of the payloads are self explained, lets go over some of them that seem a bit confusing.
channel_code
This tells us where the request came from this case it's form the api.
Items
This is an array of objects. It includes the name of what you are shipping, weight, item_type_code, package_size_code, a value which is the total price of the item(s) you are shipping, and quantity of your shipment. An example of an items payload will look like this
Callback_url
This should be a webhook url which you will pass with your other request shipment payloads. Sendbox will post tracking updates to this url from pending, processing and completed.
Fund your staging account
To stimulate a successful request on your staging account you have to fund your staging account by making a post to add_money endpoint
Check your staging account balance
You can simply do this by doing a get to the staging payment profile
https://sandbox.staging.sendbox.co/payments/profile
Stimulate webhooks events
You can stimulate webhook events for tracking status on staging by sending tracking code to move_tracking endpoint
https://sandbox.staging.sendbox.co/shipping/move_tracking
Last updated