ShipGlobal – Label Generation API

API documentation for logistics label generation

1. Overview

ShipGlobal provides API-based integration for logistics companies to generate shipping labels through our portal.

Base URL: https://dev.labels.shipgl.in/api/v1/

2. Authentication API

Login Endpoint

POST /customers.php

Sample Request

{
  "email":    "test@shipglobal.in",
  "password": "123456"
}

Sample Response

{
  "token":      "your_token_here",
  "expires_at": "YYYY-MM-DD HH:MM:SS",
  "customer": {
    "id":    1,
    "name":  "Test Account",
    "email": "test@shipglobal.in"
  }
}

3. Order Creation & Label Generation

POST /addOrder.php

Sample Unified Request (M/O in same arrangement)

M = Mandatory, O = Optional

{
    "invoice_no":        "INV-123456", // M
    "invoice_date":      "2025-08-20", // M
    "order_reference":   "ORDER-9876533", // M
    "service":           "{{SERVICE_CODE}}", // M
    "package_weight":    2500, // M – in grams (e.g. 2500 = 2.5 KG)
    "package_length":    30, // M – in cm
    "package_breadth":   20, // M – in cm
    "package_height":    15, // M – in cm
    "currency_code":     "EUR", // M
    "csb5_status":       1, // M

    "seller_nickname":   "ShipGlobalTest", // M
    "seller_firstname":  "John", // M
    "seller_lastname":   "Doe", // M
    "seller_mobile":     "+491234567890", // M
    "seller_email":      "seller@example.com", // M
    "seller_company":    "ShipGlobal GmbH", // M
    "seller_address":    "Fasanenweg 5", // M
    "seller_address_2":  "Unit 2", // M
    "seller_address_3":  "Building A", // O
    "seller_city":       "Kelsterbach", // M
    "seller_postcode":   "65451", // M
    "seller_country_code": "DE", // M
    "seller_state":      "Hessen", // M
    "seller_tax_id_type": "VAT", // O
    "seller_tax_id":      "DE123456789", // O

    "customer_shipping_firstname":    "Alice", // M
    "customer_shipping_lastname":     "Muller", // M
    "customer_shipping_mobile":       "+12125551234", // M
    "customer_shipping_email":        "alice.mueller@example.com", // M
    "customer_shipping_company":      "Customer LLC", // M
    "customer_shipping_address":      "350 5th Ave", // M
    "customer_shipping_address_2":    "Floor 10", // M
    "customer_shipping_address_3":    "Near Lobby", // O
    "customer_shipping_city":         "New York", // M
    "customer_shipping_postcode":     "10467", // M
    "customer_shipping_country_code": "US", // M
    "customer_shipping_state":        "NY", // M

    "ioss_number": "IM1234567890", // O

  "vendor_order_items": [
    {
            "vendor_order_item_name":       "Bluetooth Headphones", // M
            "vendor_order_item_sku":        "SKU-HEAD-123", // M
            "vendor_order_item_quantity":   1, // M
            "vendor_order_item_unit_price": 59.99, // M
            "vendor_order_item_hsn":        "85183000", // M
            "vendor_order_item_tax_rate":   19 // M
    }
    ], // M

    "tracking": "TESTTRACK123456", // M
    "mailClass": "First", // O (M for VIPPARCEL)
    "deliveryConfirmation": "NO_SIGNATURE", // O (M for VIPPARCEL)
    "retry": false // O
}

Sample Success Response

{
  "success": true,
  "label": "generated",
  "data": {
    "order_number": "ABCD12345678",
    "waybill_number": "UUSXXXXXXXXXXXX",
    "pdf_base64": "BASE64_ENCODED_PDF_STRING"
  }
}

Field Units Reference

FieldUnitExample
package_weightGrams (g)2500 = 2.5 KG
package_lengthCentimeters (cm)30
package_breadthCentimeters (cm)20
package_heightCentimeters (cm)15

Important: package_weight must be provided in grams. The API internally converts it to KG before sending to carrier services.

4. Duplicate Order Handling

If the combination of order_reference + invoice_no already exists:

Note: Pass download as a query parameter in the URL

5. Label Handling

pdf_base64 :  Decode the Base64 string and save it as a .pdf file for printing

6. Supported Services

ServiceService Code
DPDDPD-CLASSIC
UniUniUNIUNI-CLASSIC
VipParcelVIPPARCEL-CLASSIC
DHL E-CommerceDHLECS-CLASSIC
UBI (eTower)UBI-CLASSIC

7. Process Destination API

Notify the lastmile carrier that a batch of orders is incoming (manifest close / destination handoff).
This endpoint internally calls the carrier's processDestination method for supported services (e.g. UBI-CLASSIC).

POST /processDestination.php

Request Body

M = Mandatory, O = Optional

{
  "service":                  "UBI-CLASSIC",                       // M – carrier service code
  "order_reference_numbers":  ["WAYBILL001", "WAYBILL002"],          // M – array of order_reference values from addOrder
  "manifest_code":           "MANIFEST-2026-001"                    // M – manifest / bag number
}

Sample Success Response

{
  "message": "Process destination request processed successfully",
  "details": {
    "status":   "Success",
    "errors":   null,
    "warnings": null,
    "data": [
      {
        "status":     "Success",
        "errors":    null,
        "warnings":  null,
        "orderId":   "TEST_CST-0078",
        "trackingNo": "420922839214490411387001126133"
      }
    ]
  }
}

Sample Error Responses

// Carrier returned failure
{
  "error":   "Process destination request failed",
  "details": {
    "status":   "Failed",
    "errors":   "...",
    "warnings": null,
    "data":     null
  }
}

// Invalid order references (not found in DB)
{
  "error":   "Invalid Request",
  "details": {
    "order_reference_numbers": "The following order_reference_number do not exist: ORD-999"
  }
}

// Validation error
{
  "error":   "Validation failed",
  "details": ["Missing/empty field: manifest_code"]
}

Supported Services

ServiceService CodeDestination Notify
UBI (eTower)UBI-CLASSIC✅ Supported
DPDDPD-CLASSIC— Not supported
UniUniUNIUNI-CLASSIC— Not supported
VipParcelVIPPARCEL-CLASSIC— Not supported
DHL E-CommerceDHLECS-CLASSIC— Not supported

Response Fields (details.data[])

FieldTypeDescription
statusstringSuccess or Failed per shipment
orderIdstringCarrier's internal order ID (matches the order_reference sent)
trackingNostringFinal tracking number assigned by the lastmile carrier
errorsstring|nullError message from carrier if status is Failed
warningsstring|nullNon-fatal warnings from carrier

Notes

8. Integration Flow Summary

  1. Register as a customer
  2. Login to obtain Bearer token
  3. Call Add Order API
  4. Receive waybill and Base64 label
  5. Decode and print label

9. Support

Technical Support: ShipGlobal Integration Team