Shipment API¶
Request a shipment request for a transaction (with webhook notification)
Properties of shipping information¶
| Item name | Description |
|---|---|
| service_id |
(Required) Shipping method ID Please input id which is listed in shipping_services.csv of master data. |
| service_name |
Delivery Method Name
|
| tracking |
(Required) Flag with tracking
|
| tracking_number |
Tracking Number
|
| receipt_number |
Voucher number and receipt number
|
| message |
Comments for purchasers
Emojis and special characters are counted as 2 to 4 characters per each |
About Shipping Service ID and Shipping Service Name
If you specify Other service ID (999) as the delivery service ID, the
delivery service name is required.
About tracking number
The tracking number is required if the flag with tracking is true.
POST /api/v1/orders/:order_id/shipment_request.json¶
Accept the shipment request for the transaction.
API Request¶
POST /api/v1/orders/:order_id/shipment_request.json
{
"order": {
"order_shipment": {
"service_id": 1,
"service_name": "Japan Post - Yu-pack",
"tracking": true,
"tracking_number": "12293920-1-20303333-21",
"receipt_number": "12293920-1-20303333-21",
"message": "Thank you very much for your purchase."
}
}
}
API response¶
Success¶
HTTP/1.1 201 Created
{
"request_received_at": "2019-09-05T12:10:40.114775+09:00",
"request_uid": "2001909051121040114775490365"
}
|
Item |
Description |
|---|---|
|
request_received_at |
Request received date and time (ISO8601) |
|
request_uid |
request identifier |
failure¶
HTTP/1.1 422 Unprocessable Entity
{
"errors": {
"service_id": [
"Shipping method ID is required."
]
}
}
Simple validation will be performed for required fields, etc.
|
Item |
Description |
|---|---|
|
errors |
Error for each input item |