wOow Global

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

Environment:
POST
https://dev-api.woowbd.com/api/v1/developer/ship-for-me/create

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:
ParameterTypeRequiredDescription
trackingsarrayYesArray of tracking packages to be shipped
receiverobjectYesReceiver information
senderobjectYesSender information
delivery_optionstringYesDelivery option: "cargo", "express"
delivery_methodstringYesDelivery method: "warehouse_pickup", "home_delivery"

Trackings Array

ParameterTypeRequiredDescription
trackings[].tracking_numberstringYesTracking number of the package
trackings[].amazon_otpstringYesAmazon OTP for package verification
trackings[].productsarrayYesArray of products in the package

Products Array

ParameterTypeRequiredDescription
trackings[].products[].namestringYesName of the product
trackings[].products[].quantityintegerYesQuantity of the product
trackings[].products[].notesstringNoAdditional notes about the product

Receiver Object

ParameterTypeRequiredDescription
receiver.country_codestringYesReceiver's country code
receiver.namestringConditionalRecipient's full name (required for home_delivery)
receiver.emailstringConditionalRecipient's email address (required for home_delivery)
receiver.phone_numberstringConditionalRecipient's phone number (required for home_delivery)
receiver.citystringConditionalCity name (required for home_delivery)
receiver.zip_codestringConditionalPostal/ZIP code (required for home_delivery)
receiver.addressstringConditionalPrimary address line (required for home_delivery)
receiver.address_2stringNoSecondary 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

ParameterTypeRequiredDescription
sender.country_codestringYesSender'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 warehouse
    • home_delivery: Package delivered to customer's address