Ship For Me Order Create
Create a new ship-for-me order with tracking information and product details
Ship For Me Order Create
This endpoint allows users to create a new ship-for-me order. This service enables customers to ship their existing packages to their desired destination using our shipping network.
API Tester - Create Ship For Me Order
Create a new ship-for-me order with tracking information and delivery details
Get your token from: http://dev-app.woowbd.com/dashboard/developer
Request Format
- Method: POST
- Endpoint:
{{base_url}}/ship-for-me/create - Request Body: The request body must be in JSON format and should include the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
trackings | array | Yes | Array of tracking packages to be shipped |
receiver | object | Yes | Receiver information |
sender | object | Yes | Sender information |
delivery_option | string | Yes | Delivery option: "cargo", "express" |
delivery_method | string | Yes | Delivery method: "warehouse_pickup", "home_delivery" |
Trackings Array
| Parameter | Type | Required | Description |
|---|---|---|---|
trackings[].tracking_number | string | Yes | Tracking number of the package |
trackings[].amazon_otp | string | Yes | Amazon OTP for package verification |
trackings[].products | array | Yes | Array of products in the package |
Products Array
| Parameter | Type | Required | Description |
|---|---|---|---|
trackings[].products[].name | string | Yes | Name of the product |
trackings[].products[].quantity | integer | Yes | Quantity of the product |
trackings[].products[].notes | string | No | Additional notes about the product |
Receiver Object
| Parameter | Type | Required | Description |
|---|---|---|---|
receiver.country_code | string | Yes | Receiver's country code |
receiver.name | string | Conditional | Recipient's full name (required for home_delivery) |
receiver.email | string | Conditional | Recipient's email address (required for home_delivery) |
receiver.phone_number | string | Conditional | Recipient's phone number (required for home_delivery) |
receiver.city | string | Conditional | City name (required for home_delivery) |
receiver.zip_code | string | Conditional | Postal/ZIP code (required for home_delivery) |
receiver.address | string | Conditional | Primary address line (required for home_delivery) |
receiver.address_2 | string | No | Secondary address line (optional) |
Note: When delivery_method is set to "home_delivery", all receiver fields (name, email, phone_number, city, zip_code, address) are required. When delivery_method is set to "warehouse_pickup", only country_code is required for the receiver object.
Sender Object
| Parameter | Type | Required | Description |
|---|---|---|---|
sender.country_code | string | Yes | Sender's country code |
Request Body Example
{
"trackings": [
{
"tracking_number": "string", // Tracking number of the package
"amazon_otp": "string", // Amazon OTP for package verification
"products": [
{
"name": "string", // Name of the product
"quantity": 1, // Quantity of the product
"notes": "string" // Additional notes about the product
}
]
}
],
"receiver": {
"country_code": "string", // Receiver's country code
"name": "string", // Recipient's full name
"email": "string", // Recipient's email address
"phone_number": "string", // Recipient's phone number
"city": "string", // City name
"zip_code": "string", // Postal/ZIP code
"address": "string", // Primary address line
"address_2": "string" // Secondary address line (optional)
},
"sender": {
"country_code": "string" // Sender's country code
},
"delivery_option": "string", // Delivery option: "cargo", "express"
"delivery_method": "string" // Delivery method: "warehouse_pickup", "home_delivery"
}Example Request
curl -X POST "{{base_url}}/ship-for-me/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"trackings": [
{
"tracking_number": "657657657",
"amazon_otp": "55456456",
"products": [
{
"name": "Sun glasses",
"quantity": 1,
"notes": ""
},
{
"name": "Mobile",
"quantity": 1,
"notes": ""
}
]
}
],
"receiver": {
"country_code": "BD",
"name": "abcd123",
"email": "abcd123@gmail.com",
"phone_number": "+8801701234567",
"city": "Patuakhali",
"zip_code": "6589",
"address": "Patuakhali Sadar",
"address_2": "Building 123, Floor 2"
},
"sender": {
"country_code": "US"
},
"delivery_option": "cargo",
"delivery_method": "home_delivery"
}'Response Format
On a successful order creation, the response will be in JSON format and will include the following structure:
{
"status": true, // Indicates if the request was successful
"message": "string", // Optional message providing additional information
"data": {
"tracking_numbers": ["string"] // Array of tracking numbers for the ship-for-me orders
},
"errors": [], // Array of errors if any occurred during the request
"response_code": "string" // Response code indicating the status of the request
}Example Response
{
"status": true,
"message": "Created ship for me order successfully",
"data": {
"tracking_numbers": [
"SFM916225256",
"SFM856445419"
]
},
"errors": [],
"response_code": "68be8f671f2ba"
}This endpoint is essential for managing ship-for-me orders and tracking shipments effectively.
Error Responses
400 Bad Request
{
"status": false,
"message": "Invalid request parameters",
"data": [],
"errors": [
"Tracking number is required",
"Amazon OTP is required",
"Receiver information is incomplete"
],
"response_code": "validation_error"
}401 Unauthorized
{
"status": false,
"message": "Authentication required",
"data": [],
"errors": [
"Invalid or missing API key"
],
"response_code": "unauthorized"
}422 Unprocessable Entity
{
"status": false,
"message": "Order creation failed",
"data": [],
"errors": [
"Invalid tracking number",
"Amazon OTP verification failed",
"Delivery address is not supported"
],
"response_code": "order_failed"
}Code Examples
JavaScript
const createShipForMeOrder = async (orderData) => {
try {
const response = await fetch('{{base_url}}/ship-for-me/create', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify(orderData)
});
const result = await response.json();
if (result.status) {
console.log('Order created successfully:', result.data.tracking_numbers);
return result.data;
} else {
console.error('Order creation failed:', result.errors);
throw new Error(result.message);
}
} catch (error) {
console.error('Error creating ship-for-me order:', error);
throw error;
}
};
// Example usage
const orderData = {
trackings: [
{
tracking_number: "657657657",
amazon_otp: "55456456",
products: [
{
name: "Sun glasses",
quantity: 1,
notes: ""
},
{
name: "Mobile",
quantity: 1,
notes: ""
}
]
}
],
receiver: {
country_code: "BD",
name: "abcd123",
email: "abcd123@gmail.com",
phone_number: "+8801701234567",
city: "Patuakhali",
zip_code: "6589",
address: "Patuakhali Sadar",
address_2: "Building 123, Floor 2"
},
sender: {
country_code: "US"
},
delivery_option: "cargo",
delivery_method: "home_delivery"
};
createShipForMeOrder(orderData);Python
import requests
import json
def create_ship_for_me_order(order_data):
url = "{{base_url}}/ship-for-me/create"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
try:
response = requests.post(url, headers=headers, json=order_data)
result = response.json()
if result["status"]:
print("Order created successfully:", result["data"]["tracking_numbers"])
return result["data"]
else:
print("Order creation failed:", result["errors"])
raise Exception(result["message"])
except requests.exceptions.RequestException as e:
print("Error creating ship-for-me order:", e)
raise
# Example usage
order_data = {
"trackings": [
{
"tracking_number": "657657657",
"amazon_otp": "55456456",
"products": [
{
"name": "Sun glasses",
"quantity": 1,
"notes": ""
},
{
"name": "Mobile",
"quantity": 1,
"notes": ""
}
]
}
],
"receiver": {
"country_code": "BD",
"name": "abcd123",
"email": "abcd123@gmail.com",
"phone_number": "+8801701234567",
"city": "Patuakhali",
"zip_code": "6589",
"address": "Patuakhali Sadar",
"address_2": "Building 123, Floor 2"
},
"sender": {
"country_code": "US"
},
"delivery_option": "cargo",
"delivery_method": "home_delivery"
}
create_ship_for_me_order(order_data)PHP
<?php
function createShipForMeOrder($orderData) {
$url = "{{base_url}}/ship-for-me/create";
$headers = [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($orderData));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($response === false) {
throw new Exception("cURL error: " . curl_error($ch));
}
$result = json_decode($response, true);
if ($result["status"]) {
echo "Order created successfully: " . json_encode($result["data"]["tracking_numbers"]);
return $result["data"];
} else {
echo "Order creation failed: " . json_encode($result["errors"]);
throw new Exception($result["message"]);
}
}
// Example usage
$orderData = [
"trackings" => [
[
"tracking_number" => "657657657",
"amazon_otp" => "55456456",
"products" => [
[
"name" => "Sun glasses",
"quantity" => 1,
"notes" => ""
],
[
"name" => "Mobile",
"quantity" => 1,
"notes" => ""
]
]
]
],
"receiver" => [
"country_code" => "BD",
"name" => "abcd123",
"email" => "abcd123@gmail.com",
"phone_number" => "+8801701234567",
"city" => "Patuakhali",
"zip_code" => "6589",
"address" => "Patuakhali Sadar",
"address_2" => "Building 123, Floor 2"
],
"sender" => [
"country_code" => "US"
],
"delivery_option" => "cargo",
"delivery_method" => "home_delivery"
];
try {
createShipForMeOrder($orderData);
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}
?>Notes
- Package Verification: Our team will verify the tracking number and Amazon OTP before processing the order
- Processing Time: Ship-for-me orders typically take 1-2 business days to process
- Shipping: Shipping rates apply based on the package weight, destination, and delivery option
- Tracking: You'll receive tracking information once the order is processed
- Cancellation: Orders can be cancelled within 24 hours of creation if not yet processed
- Delivery Options:
cargo: Standard shipping (3-7 business days)express: Express shipping (1-3 business days)
- Delivery Methods:
warehouse_pickup: Customer picks up from our warehousehome_delivery: Package delivered to customer's address
Related Endpoints
- Get Order Details - Retrieve details of your ship-for-me order
- Track Order - Track the status of your order
- Cancel Order - Cancel an existing order