How do I connect my in-house order management system with my LateShipment.com account?

Created by Jenarthan M, Modified on Mon, 23 Dec, 2024 at 8:04 PM by Jenarthan M

You can connect your API-enabled in-house order processing system to push data to your LateShipment.com account when you create a label for the shipment.

 

Add the following code to your server. Your account contains a unique API key to ensure the data you share with us is done securely. Enter your account's API key in the request along with the email address associated with your LateShipment.com account.

    url = "https://smart.lateshipment.com/Genericwebhook/webhookapi.php"
    payload = "<< JSON Data >>"
    headers = {
        'X-Auth-Email': "demo1@lateshipment.com",
        'X-Auth-Key': "308473bc1fff0454ce6831ab3",
        'Content-Type': "application/json"
    }

    response = requests.request("POST", url, data=payload, headers=headers)
    print(response.text)



At the event of Label Creation for every order, you would need to deliver a JSON payload in the body of a POST request.

 

Required Parameters

ParameterDescription
API KeyX digit API key generated by the user
Authorization EmailCustomer Authorization Email
Request BodyJSON Data in the required format

 

JSON Data Format

    {
    "order_no":"<< Order No >>",
    "order_date":"<< Order Date >>", 
    "customer_name":"<< Customer Name >>",
    "customer_email":"<< Customer Email >>",
    "customer_phoneno":"<< Customer Phone Number >>",
    "trackingnumber":"<< Tracking Number >>",
    "carrier_type":"<< Carrier Type >>",
    "product":"<< product Name >>",
    "amount":"<< Amount >>",
    "number_of_items":"<< Number of Items >>",
    "shipping_address":"<< shipper address >>",
    "billing_address":"<< Billing address >>"
    }


Sample Request:

    {
    "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":"Chin Cup For Softball Face Mask",
    "amount":"9.99",
    "number_of_items":"2",
    "shipping_address":"Lacy Bailey,14 Lingo Rd,greenbrier,us 72058-8501",
    "billing_address":"Lacy Bailey,14 Lingo Rd,greenbrier,us 72058-8501"
    }


Sample Response:

    {
    "message":"Request Received Successfully",
    "status":"Success"
    }


HTTP Status codes

ResultStatusMessage
SuccessSuccess(200 OK)Request Received Successfully
Order Details Not FoundFailed(409 Conflict)Order Number,Trackingnumber,Carrier Type should not be empty
Invalid Data Format (JSON)Failed(409 Conflict)Invalid JSON format
Invalid API Key / Invalid Authorization EmailFailed(401 Unauthorized)Authorization Header Error. Check Your Authorization Email and Authorization Key
Content-Type ErrorFailed(400 Bad Request)Authorization Header Error. Content-Type : application/json only accepted
API Key / Authorization Email Not FoundFailed(400 Bad Request)Authorization Header Error. Authorization Email and Authorization Key Required

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

Feedback sent

We appreciate your effort and will try to fix the article