wOow Global

Retrieve Shipping Label

Get shipping label for an order

Retrieve Shipping Label

This endpoint allows users to retrieve the shipping label associated with a specific order using its tracking number.

API Tester - Retrieve Shipping Label

Get shipping label for a specific order by tracking number

Environment:
GET
https://dev-api.woowbd.com/api/v1/developer/labels/{tracking_number}

Get your token from: http://dev-app.woowbd.com/dashboard/developer

Request Parameters

  • tracking_number (path parameter): The unique identifier for the order whose shipping label is being requested. This should be replaced with the actual tracking number of the order.

Response Structure

The response will return a JSON object with the following structure:

  • status (boolean): Indicates the success of the request.
  • message (string): A message providing additional information about the request status.
  • data (array): Contains an array of label information, including:
    • label_url (string): The URL to download the shipping label.
    • packing_list_url (string): The URL to download the packing list.
    • courier_tracking (string): The tracking information provided by the courier.
  • errors (array): An array that contains any errors encountered during the request.
  • response_code (string): The response code indicating the result of the request.

Example Request

curl -X GET "https://api.woowbd.com/labels/WOOW123456789" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "status": true,
  "message": "Shipping label retrieved successfully",
  "data": [
    {
      "label_url": "https://api.woowbd.com/labels/WOOW123456789.pdf",
      "packing_list_url": "https://api.woowbd.com/packing-lists/WOOW123456789.pdf",
      "courier_tracking": "1Z999AA1234567890"
    }
  ],
  "errors": [],
  "response_code": "200"
}

Notes

  • Ensure that the tracking number provided is valid and corresponds to an existing order.
  • The response may include error messages if the tracking number is not found or if there are issues with the request.

Code Examples

JavaScript

const response = await fetch('https://api.woowbd.com/labels/WOOW123456789', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data.data[0].label_url);

Python

import requests

response = requests.get(
    'https://api.woowbd.com/labels/WOOW123456789',
    headers={
        'Authorization': f'Bearer {API_KEY}',
        'Content-Type': 'application/json'
    }
)

data = response.json()
label_url = data['data'][0]['label_url']

PHP

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.woowbd.com/labels/WOOW123456789');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $API_KEY,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
$label_url = $data['data'][0]['label_url'];