LogoLogo
MerchantsHelpSign in
  • Overview
    • Countries & Currencies
    • Glopal Solutions Portfolio
  • Getting started
    • Shopify
      • Glopal Duty & Tax for Shopify
      • Shopify Collaborator Access
    • BigCommerce
    • Magento (Adobe Commerce)
      • Magento 1
      • Magento 2
        • Magento Activation
        • Magento Configuration
        • Magento Database Model
    • Visualsoft
    • PrestaShop
  • Marketing Solutions
    • Acquisition channels
      • Integrate Google Ads
      • Integrate Facebook Ads
    • Feed localization
      • Read domestic items
      • Localize the items
      • Upload the localized items
    • Features / Customization
      • Google Shopping countries coverage
      • Filters
      • Free listings
      • Comparison Shopping Services (CSS)
    • Google Ads
      • Conversion tracking
      • Standard accounts structure
      • Launching and monitoring Google Ads campaigns
    • Facebook
      • Facebook & Instagram Shops
      • Catalog Based Campaigns
      • Conversion and Brand awareness campaigns
      • Facebook conversion tracking
    • Email marketing
  • Localization
    • Site localization
      • Content localization
      • Price localization
      • Site search
      • Checkout
      • User account
    • Site discovery
      • Domains and Routing
      • Search engine optimization
      • Geo-localization
      • Country selector
    • Content distribution
      • Site security
      • Domains (DNS)
      • Traffic Splitting
        • Akamai
        • Cloudflare
        • Nginx
        • Microsoft IIS
        • AWS CloudFront
        • Magento Cloud
      • Third-party CDN
        • Cloudflare
      • Site speed
    • Integrations
      • CSS customizations
      • JavaScript customizations
      • Server-side customizations
      • Exclude from localization
      • Integration examples
        • Hiding Products
        • Newsletter Signup
        • Custom Price Logic
  • Checkout
    • Localized checkout
      • Overview
      • Styling
      • Integration
        • Callback Functions
        • Confirmation Page
        • Checkout Analytics
        • Allowlisting Glopal IPs
      • Price localization
    • Order processing
      • Order creation
        • Plug & Play integration
        • Order API
        • Event webhook
        • Custom Integration
      • Cancellation & refund
      • Returns
      • Buyer's communication
      • Customer account
    • Financials
      • EU VAT
  • DUTY & TAXES
    • Product Classification
    • Duty & Tax Calculation
      • Product Pricing
      • Supported Countries
    • Compliance Checks
      • Prohibited Goods
      • Denied Party Screening
  • SHIPPING
    • Order Creation
    • Label Generation
    • Manifest
    • Tracking
  • Translations
    • Translation Editor
  • MERCHANT ACCOUNT
    • Dashboards
      • SEO dashboard
  • What's New
    • Release Notes
Powered by GitBook
On this page
  1. SHIPPING

Label Generation

Translate an order into shipment parcel(s), and get in return the shipment label and documents

PreviousOrder CreationNextManifest

Last updated 3 months ago

Order Processing

  1. From Order to Shipment: An order of multiple products can be split into multiple fulfilments and parcels to maximise inventory usage and minimise delivery time. Glopal amends the original order and creates a new order entity per fulfilment and eventually parcel, and recomputes total landing costs separately for each entity.

  2. Shipping Label Generation: Once the shipment entities are known, Glopal can prepare the shipping documents and request the shipping labels from its network of pre-integrated carriers.

Native API Integration

Address Transliteration

As part of the label generation process, Glopal can transliterate the local buyer address into the Latin/English alphabet, to comply with carrier international shipment standards.

This feature is also available as standalone API service.

Announce order fulfillment structure and/or process parcel labels and documents

post
Header parameters
x-loginstringRequired

Client username (set by Glopal)

Example: usernamePattern: ^[a-z0-9\-]{3,255}$
x-aliasstringOptional

Optional system username to enable separation of authentication credentials by integrated client system. (set by Glopal)

Example: alias-usernamePattern: ^[a-z0-9\-]{3,50}$
x-signaturestringRequired

The authentication signature is created by using the concatenation of the login, the ‘@’ sign and the timestamp, transformed into a HMAC_256 signature using your secret access key.

Example: 40b976b35a08bb951439ea7bbfa0a7bd73dab7c813399a31d9d1a157bc08929bPattern: ^[0-9a-f]{64}$
x-timestampnumber · floatRequired

The authentication timestamp must be a decimal numeric representing the current POSIX time, extended to microsecond accuracy. If the requesting system does not provide high-resolution time, it is advised to use a 6-digit random number. It is important to have the requesting system synchronised with a reliable time source (f.i. a stratum 2 NTP server) to avoid request rejection.

Example: 1680010295.775523Pattern: ^[12]\d{9}\.\d{6}$
x-versionnumber · floatOptionalDefault: 0.68Pattern: (^0\.\d{2}$|^[1-9]\d*\.\d{2}$)
Body
all ofOptional
Responses
200
OK
Responseall of
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not found
405
Method not allowed
500
Internal server error
503
Service unavailable
post
const timestamp = String(Date.now() / 1000).padEnd(17, '0');
const username = "username";
const signature = CryptoJS.HmacSHA256(
  `${username}@${timestamp}`, "sharedsecret"
  ).toString(CryptoJS.digest)

const response = await fetch('https://ws.xport.glopalservice.com/outbound/immediate_shipment', {
  method: 'POST',
  headers: {
    "Content-Type": "application/json",
    "x-login": username,
    "x-timestamp": timestamp,
    "x-signature": signature
  },
  body: JSON.stringify({
    "order": {
      "reference": "test123",
      "parcel": [
        {
          "fulfillment_id": "FU.123OMS",
          "item": [
            {
              "qty": 1,
              "merchant_sku": "1234567890"
            }
          ]
        }
      ]
    }
  }),
});
const data = await response.json();
{
  "error": 0,
  "advice": [
    {
      "ship_from": {
        "name": "Test Testington",
        "user_reference": "testref",
        "address1": "Test street 1",
        "address2": "Second floor",
        "address3": "Room 37",
        "postcode": "90210",
        "state": "CA",
        "city": "Beverly Hills",
        "country": "US"
      },
      "ship_to": {
        "name": "Test Testington",
        "user_reference": "testref",
        "address1": "Test street 1",
        "address2": "Second floor",
        "address3": "Room 37",
        "postcode": "90210",
        "state": "CA",
        "city": "Beverly Hills",
        "country": "US"
      },
      "date": "2023-01-23 12:13:14",
      "outboundawb": "AWB1234567890_23",
      "web_order": "test123",
      "shipment_id": 123456,
      "pod_id": 1,
      "suite_number": "5432-1234",
      "vat_number": "T12344434",
      "reason_for_export": "Permanent",
      "product": [
        {
          "qty": 1,
          "measure": "Item",
          "mnfgr": "FR",
          "hs_code": "330310",
          "sku": "1234567890",
          "description": "Pink summer dress",
          "note": "Special packaging",
          "unit_value": 234.56,
          "sub_total": 234.56,
          "alt_merchant_sku": [
            "1234567890"
          ],
          "documentation": [
            {
              "code": "Dress",
              "description": "Test description"
            }
          ]
        }
      ],
      "declared_value": 234.56,
      "invoice_total": 234.56,
      "currency": "IAR",
      "terms_of_trade": "DDP",
      "total_packages": 1,
      "package": {
        "height": 23.45,
        "width": 34.56,
        "depth": 13.57,
        "weight_unit": "kg",
        "dimension_unit": "cm",
        "dead_weight": 12.34
      },
      "transport": {
        "carrier": "DHL",
        "service": "DHL Express"
      },
      "fulfillment_id": "FU.123OMS",
      "transaction_id": "642edad40de2f361ba4d1684aaf3c53a0afc687b",
      "wms_id": "WMS12345",
      "outbound": {
        "is_paperless": 1,
        "transit_number": "TRANS12344",
        "awb": "AWB1234567890_23",
        "tracking_url": "https://test.xport.glopalservice.com/test",
        "carrier_tracking_url": "https://test.xport.glopalservice.com/test",
        "carrier_name": "DHL Express",
        "label_file_zpl": "document/example.zpl",
        "label_file_pdf": "document/example.pdf",
        "advice_file_pdf": "document/example.pdf",
        "label_url_zpl": "https://test.xport.glopalservice.com/test",
        "label_url_pdf": "https://test.xport.glopalservice.com/test",
        "advice_url_pdf": "https://test.xport.glopalservice.com/test",
        "label_dpi_density": "string",
        "label_type": "BL4x6"
      },
      "return": {
        "awb": "AWB1234567890_23",
        "tracking_url": "https://test.xport.glopalservice.com/test",
        "carrier_tracking_url": "https://test.xport.glopalservice.com/test",
        "carrier_name": "DHL Express",
        "label_file_zpl": "document/example.zpl",
        "label_file_pdf": "document/example.pdf",
        "advice_file_pdf": "document/example.pdf",
        "label_url_zpl": "https://test.xport.glopalservice.com/test",
        "label_url_pdf": "https://test.xport.glopalservice.com/test",
        "advice_url_pdf": "https://test.xport.glopalservice.com/test",
        "label_dpi_density": "string",
        "label_type": "BL4x6"
      },
      "last_mile": {
        "awb": "AWB1234567890_23",
        "tracking_url": "https://test.xport.glopalservice.com/test",
        "carrier_tracking_url": "https://test.xport.glopalservice.com/test",
        "carrier_name": "DHL Express",
        "label_file_zpl": "document/example.zpl",
        "label_file_pdf": "document/example.pdf",
        "advice_file_pdf": "document/example.pdf",
        "label_url_zpl": "https://test.xport.glopalservice.com/test",
        "label_url_pdf": "https://test.xport.glopalservice.com/test",
        "advice_url_pdf": "https://test.xport.glopalservice.com/test",
        "label_dpi_density": "string",
        "label_type": "BL4x6"
      }
    }
  ]
}
  • Order Processing
  • Native API Integration
  • POSTAnnounce order fulfillment structure and/or process parcel labels and documents
  • Address Transliteration
  • POSTTransliterate address

Transliterate address

post
Header parameters
x-loginstringRequired

Client username (set by Glopal)

Example: usernamePattern: ^[a-z0-9\-]{3,255}$
x-aliasstringOptional

Optional system username to enable separation of authentication credentials by integrated client system. (set by Glopal)

Example: alias-usernamePattern: ^[a-z0-9\-]{3,50}$
x-signaturestringRequired

The authentication signature is created by using the concatenation of the login, the ‘@’ sign and the timestamp, transformed into a HMAC_256 signature using your secret access key.

Example: 40b976b35a08bb951439ea7bbfa0a7bd73dab7c813399a31d9d1a157bc08929bPattern: ^[0-9a-f]{64}$
x-timestampnumber · floatRequired

The authentication timestamp must be a decimal numeric representing the current POSIX time, extended to microsecond accuracy. If the requesting system does not provide high-resolution time, it is advised to use a 6-digit random number. It is important to have the requesting system synchronised with a reliable time source (f.i. a stratum 2 NTP server) to avoid request rejection.

Example: 1680010295.775523Pattern: ^[12]\d{9}\.\d{6}$
x-versionnumber · floatOptionalDefault: 0.68Pattern: (^0\.\d{2}$|^[1-9]\d*\.\d{2}$)
Body
all ofOptional
Responses
200
OK
Responseall of
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not found
405
Method not allowed
500
Internal server error
503
Service unavailable
post
const timestamp = String(Date.now() / 1000).padEnd(17, '0');
const username = "username";
const signature = CryptoJS.HmacSHA256(
  `${username}@${timestamp}`, "sharedsecret"
  ).toString(CryptoJS.digest)

const response = await fetch('https://ws.xport.glopalservice.com/address/translate', {
  method: 'POST',
  headers: {
    "Content-Type": "application/json",
    "x-login": username,
    "x-timestamp": timestamp,
    "x-signature": signature
  },
  body: JSON.stringify({
    "from": "en_US",
    "to": "ja_JP",
    "address": {
      "name": "Test Testington",
      "user_reference": "testref",
      "address1": "Test street 1",
      "address2": "Second floor",
      "address3": "Room 37",
      "postcode": "90210",
      "state": "CA",
      "city": "Beverly Hills",
      "country": "US"
    },
    "max_address_length": 45
  }),
});
const data = await response.json();
{
  "address": {
    "name": "Test Testington",
    "user_reference": "testref",
    "address1": "Test street 1",
    "address2": "Second floor",
    "address3": "Room 37",
    "postcode": 90210,
    "state": "CA",
    "city": "Beverly Hills",
    "country": "US"
  },
  "error": 0,
  "errors": [
    {
      "code": "ISSUE_CODE",
      "details": "Issue description",
      "field": "field"
    }
  ],
  "warnings": [
    {
      "code": "ISSUE_CODE",
      "details": "Issue description",
      "field": "field"
    }
  ]
}