ItsfoundPostage.Api.Http (itsfound_postage v0.1.0) View Source
Link to this section Summary
Functions
Add Credit
Confirm and buy labels
Create a shipment
Delete a shipment
Retrieve Available Pick Up Slots
Item Categories
Request rates and taxes
List Shipments
Mark as directly handed over
Request a pickup
Update a shipment
Update a Shipment's Warehouse Status
Link to this section Functions
Add Credit
ENDPOINT:
POST https://api.easyship.com/company/v1/credits
Example request body:
%{
"amount"=> 1000
}
API REFERENCE:
Confirm and buy labels
ENDPOINT:
POST https://api.easyship.com/label/v1/labels
Example request body: [
%{
easyship_shipment_id: "ESUS3171766",
courier_id: "b4552ed2-ae95-4647-9746-5790bf252c7f"
}
]
API REFERENCE:
https://developers.easyship.com/reference#confirm-and-buy-labels
Create a shipment
ENDPOINT:
POST https://api.easyship.com/shipment/v1/shipments
Example request body:
%{
"platform_name"=> "Amazon",
"platform_order_number"=> "#1234",
"selected_courier_id"=> "b8d528a7-a2d4-4510-a7ac-11cbbb6542cd",
"destination_country_alpha2"=> "US", # required
"destination_city"=> "New York", # required
"destination_postal_code"=> "10022", # required
"destination_state"=> "NY",
"destination_name"=> "Aloha Chen", # required
"destination_address_line_1"=> "300 Park Avenue", # required
"destination_address_line_2"=> null,
"destination_phone_number"=> "+1 234-567-890", # required
"destination_email_address"=> "api-support@easyship.com",
"items"=> [ # required
%{
"description"=> "Silk dress",
"sku"=> "test",
"actual_weight"=> 1.2,
"height"=> 10,
"width"=> 15,
"length"=> 20,
"category"=> "fashion",
"declared_currency"=> "SGD",
"declared_customs_value"=> 100
}
]
}
API REFERENCE:
Delete a shipment
ENDPOINT:
DELETE https://api.easyship.com/shipment/v1/shipments/easyship_shipment_id
API REFERENCE:
Get a shipment
ENDPOINT:
GET https://api.easyship.com/shipment/v1/shipments/easyship_shipment_id
API REFERENCE:
get_shipment_checkpoints(easyship_shipment_id, platform_order_number, options \\ [])
View SourceCheckpoints
ENDPOINT:
GET https://api.easyship.com/track/v1/checkpoints
API REFERENCE
get_shipment_status(easyship_shipment_id, platform_order_number, options \\ [])
View SourceStatus
ENDPOINT:
GET https://api.easyship.com/track/v1/status
API REFERENCE:
Retrieve Available Pick Up Slots
ENDPOINT:
GET https://api.easyship.com/pickup/v1/pickup_slots/courier_id
API REFERENCE:
https://developers.easyship.com/reference#retrieve-available-pick-up-slots
Item Categories
ENDPOINT:
GET https://api.easyship.com/reference/v1/categories
API REFERENCE:
Request rates and taxes
ENDPOINT:
POST https://api.easyship.com/rate/v1/rates
Example request body:
%{
"origin_country_alpha2"=> "SG",
"origin_postal_code"=> "WC2N",
"destination_country_alpha2"=> "US", # required
"destination_postal_code"=> "10030",
"taxes_duties_paid_by"=> "Sender",
"is_insured"=> false,
"items"=> [ # required
%{
"actual_weight"=> 1.2,
"height"=> 10,
"width"=> 15,
"length"=> 20,
"category"=> "mobiles",
"declared_currency"=> "SGD",
"declared_customs_value"=> 100
}
]
}
API REFERENCE:
https://developers.easyship.com/reference#request-rates-and-taxes
List Shipments
ENDPOINT:
GET https://api.easyship.com/shipment/v1/shipments
API REFERENCE:
Mark as directly handed over
ENDPOINT:
POST https://api.easyship.com/pickup/v1/direct_handover
Example request body:
%{
"easyship_shipment_ids": ["ESUS3171766", "ESUS3171767", "ESUS3171764"]
}
API REFERENCE:
https://developers.easyship.com/reference#mark-as-handed-over
Request a pickup
ENDPOINT:
POST https://api.easyship.com/pickup/v1/pickups
Example request body:
%{
"courier_id"=> "b4552ed2-ae95-4647-9746-5790bf252c7f",
"preferred_date"=> "2016-12-08", # required
"preferred_max_time"=> "2016-12-08T18:00", # required
"preferred_min_time"=> "2016-12-08T09:00", # required
"easyship_shipment_ids"=> "ESUS3171766"
}
API REFERENCE:
update_shipment(easyship_shipment_id, params \\ %{}, options \\ [])
View SourceUpdate a shipment
ENDPOINT:
PATCH https://api.easyship.com/shipment/v1/shipments/easyship_shipment_id
Example request body:
%{
"platform_name"=> "Amazon",
"platform_order_number"=> "#1234",
"selected_courier_id"=> "b8d528a7-a2d4-4510-a7ac-11cbbb6542cd",
"destination_country_alpha2"=> "US",
"destination_city"=> "New York",
"destination_postal_code"=> "10022",
"destination_state"=> "NY",
"destination_name"=> "Aloha Chen",
"destination_address_line_1"=> "300 Park Avenue",
"destination_address_line_2"=> null,
"destination_phone_number"=> "+1 234-567-890",
"destination_email_address"=> "api-support@easyship.com",
"items"=> [
%{
"description"=> "Silk dress",
"sku"=> "test",
"actual_weight"=> 1.2,
"height"=> 10,
"width"=> 15,
"length"=> 20,
"category"=> "fashion",
"declared_currency"=> "SGD",
"declared_customs_value"=> 100
}
]
}
API REFERENCE:
Update a Shipment's Warehouse Status
ENDPOINT:
PATCH https://api.easyship.com/shipment/v1/shipments/update_warehouse_state
Example request body:
%{
"easyship_shipment_ids": [
"ESUS3171766"
],
"warehouse_state": "created"
}
API REFERENCE:
https://developers.easyship.com/reference#update-shipment-warehouse-status