ShipGlobal

Labels API v1 – Client Documentation

Base URL: https://labels.shipglobal.in/api/v1/

This API lets you authenticate and create shipment labels. Order payloads are forwarded to our last‑mile provider as‑is (no address normalization by ShipGlobal).

1) Authentication

Authenticate once, then include the returned bearer token with each request.

POST /customers.php – Login

Headers

  • Content-Type: application/json

Body

{
  "email": "client@example.com",
  "password": "secret123"
}

Response (200 OK)

{
  "token": "64-hex-chars...",
  "expires_at": "2025-08-21 07:00:00",
  "customer": { "id": 1, "name": "Your Name", "email": "client@example.com" }
}

Tokens currently expire ~24h after issuance.

Use the token by adding the header Authorization: Bearer <token> to subsequent requests.

2) Create Label

POST /addOrder.php

Creates an order and attempts to generate a label with our last‑mile provider. The request body must follow the structure below. Fields not listed here are ignored but stored.

Headers

  • Authorization: Bearer <token>
  • Content-Type: application/json

Required fields

GroupFieldType / Notes
Generalinvoice_nostring
Generalinvoice_datestring (YYYY-MM-DD)
Generalorder_referencestring (unique per order recommended)
Parcelpackage_weightnumber (kg)
Parcelpackage_lengthnumber (cm)
Parcelpackage_breadthnumber (cm)
Parcelpackage_heightnumber (cm)
Currencycurrency_codestring (ISO 4217, e.g., EUR)
Flagscsb5_statusinteger
Sellerseller_nickname, seller_firstname, seller_lastname, seller_mobile, seller_email, seller_address, seller_city, seller_postcode, seller_country_code, seller_statestrings; seller_email must be valid
Recipientcustomer_shipping_firstname, customer_shipping_lastname, customer_shipping_mobile, customer_shipping_email, customer_shipping_address, customer_shipping_city, customer_shipping_postcode, customer_shipping_country_code, customer_shipping_statestrings; customer_shipping_email must be valid
Itemsvendor_order_itemsarray of item objects (min 1)

Optional fields such as seller_company, seller_tax_id_type, seller_tax_id, ioss_number, etc., are accepted and stored.

Item object (required keys)

FieldType / Notes
vendor_order_item_namestring
vendor_order_item_quantityinteger
vendor_order_item_unit_pricenumber
vendor_order_item_hsnstring
vendor_order_item_tax_ratenumber

Note: If you include tracking, it will be forwarded to the carrier as an identification/reference where applicable.

Example request (cURL)

curl --location -X POST 'https://labels.shipglobal.in/api/v1/addOrder.php' \ 
  -H 'Authorization: Bearer <token>' \ 
  -H 'Content-Type: application/json' \ 
  --data-raw '{
  "invoice_no": "INV-123456",
  "invoice_date": "2025-08-20",
  "order_reference": "ORDER-98765",
  "service": "DPD-CLASSIC",
  "package_weight": 2.5,
  "package_length": 30,
  "package_breadth": 20,
  "package_height": 15,
  "currency_code": "EUR",
  "csb5_status": 1,
  "seller_nickname": "ShipGlobalTest",
  "seller_firstname": "John",
  "seller_lastname": "Doe",
  "seller_mobile": "+491234567890",
  "seller_email": "seller@example.com",
  "seller_address": "Fasanenweg 5",
  "seller_city": "Kelsterbach",
  "seller_postcode": "65451",
  "seller_country_code": "DE",
  "seller_state": "Hessen",
  "customer_shipping_firstname": "Alice",
  "customer_shipping_lastname": "Müller",
  "customer_shipping_mobile": "+491112223334",
  "customer_shipping_email": "alice.mueller@example.com",
  "customer_shipping_address": "Berliner Str. 10",
  "customer_shipping_city": "Berlin",
  "customer_shipping_postcode": "10115",
  "customer_shipping_country_code": "DE",
  "customer_shipping_state": "Berlin",
  "vendor_order_items": [
    { "vendor_order_item_name": "Bluetooth Headphones", "vendor_order_item_sku": "SKU-HEAD-123", "vendor_order_item_quantity": 1, "vendor_order_item_unit_price": 59.99, "vendor_order_item_hsn": "85183000", "vendor_order_item_tax_rate": 19 }
  ],
  "tracking": "TESTTRACK123456"
}'

Successful response

{
  "order_id": 12345,
  "dpd": {
    "success": true,
    "label": "generated",
    "waybill_number": "DPD-XXXXXX",
    "file_path": null,
    "error": "",
    "remark": "",
    "raw_response": {
      "pdf_base64": "JVBERi0xLjcKJcTl8uXrp...",
      "tracking_url": "https://tracking.dpd.de/rest/plc/en_US/DPD-XXXXXX"
    }
  }
}

3) Errors

StatusWhenBody (example)
400Malformed / non-JSON body{"error":"Invalid JSON"}
401Missing/invalid token{"error":"Unauthorized"}
405Wrong HTTP method{"error":"Method Not Allowed"}
422Validation errors{"error":"Validation failed","details":["Missing/empty field: ..."]}
500Unexpected server error{"error":"Internal error"}

4) Behavior Notes

5) Support

For credentials, sandbox access, or questions, contact your ShipGlobal representative.


© ShipGlobal. This document describes the public client-facing endpoints only.