How to Connect Your Custom Store to LateShipment.com

Modified on: Mon, 14 Jul, 2025 at 10:55 AM

If you're using a custom store and would like to integrate with LateShipment.com to send shipment tracking and order data, follow the instructions below. This guide will walk you through setting up a secure webhook connection that allows us to receive and process your order data.

Step 1: Add the Webhook Code to Your Server

In your dashboard, navigate to the bottom left and click Settings > Connect Store, then select Others from the dropdown. To begin, add the following code to your server in the programming language of your choice. This snippet securely sends order and tracking data to LateShipment.com using your unique API key.

Python Example (we also provide code in Node.js, PHP, and Java):

import requests


url = "https://smart.lateshipment.com/Genericwebhook/webhookapi.php"

payload = "<< JSON Data >>"

headers = {

    'X-Auth-Email': "your_email@example.com",

    'X-Auth-Key': "your_api_key_here",

    'Content-Type': "application/json"

}


response = requests.post(url, data=payload, headers=headers)

print(response.text)


Replace << JSON Data >> with your actual payload in the format shown below.


Step 2: Trigger Event – Label Creation

You need to send a POST request with the JSON payload whenever a label is created for an order. This allows us to receive the latest tracking and order data in real time.


Required Parameters

Parameter

Description

API Key

Unique API key generated for your account

Authorization Email

The email associated with your account

Request Body

JSON data (see format below)


JSON Data Format (Payload)

Here’s the format your payload should follow:

{

  "order_no": "54321",

  "order_date": "2019-07-25 19:08:49",

  "customer_name": "User Name",

  "customer_email": "user@example.com",

  "customer_phoneno": "1234567890",

  "trackingnumber": "123456789123456789",

  "carrier_type": "UPS",

  "product": "Product Name",

  "productid": "12345",

  "quantity": "1",

  "image_url": "https://www.example.com/image1.png",

  "product_price": "17.50",

  "subtotal_amount": "8.00",

  "shipping_amount": "1.00",

  "payment_status": "paid",

  "package_status": "shipped",

  "amount": "9.99",

  "Number_of_items": "2",

  "shipping_name": "User Name",

  "shipping_street": "123 Main St",

  "shipping_street1": "Apt 4B",

  "shipping_city": "New York",

  "shipping_state": "NY",

  "shipping_zip": "10001",

  "shipping_country": "USA",

  "billing_name": "User Name",

  "billing_street": "123 Main St",

  "billing_street1": "Apt 4B",

  "billing_city": "New York",

  "billing_state": "NY",

  "billing_zip": "10001",

  "billing_country": "USA"

}



Sample Response

{

  "message": "Request Received Successfully",

  "status": "Success"

}



Possible Errors & Status Codes

Result

Status Code

Message Description

Success

200 OK

Request Received Successfully

Missing Fields

409 Conflict

Order Number, Tracking Number, Carrier Type must not be empty

Invalid JSON Format

409 Conflict

Invalid JSON format

Invalid API Key / Email

401 Unauthorized

Authorization Header Error. Check your email and API key

Wrong Content-Type

400 Bad Request

Only application/json content-type is accepted

Missing Auth Headers

400 Bad Request

Authorization Email and API Key are required


Need Help?

If you have questions or need support, feel free to reach out to your onboarding specialist or contact our support team at support@lateshipment.com. We’re happy to help you get set up!


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article