API - Shipment

Created by KloudShip Support, Modified on Fri, 24 Oct at 7:43 PM by KloudShip Support

GET: Shipments

The GET Shipments API endpoint is used for retrieving all shipment list information. The response provides comprehensive details about the shipments, including addresses, packages, rates, labels, and more. Use the provided request example and response format to integrate this API into your application for seamless shipment tracking and management.


Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Shipment
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Shipment
Content-Typeapplication/json


Query paramters:

ParameterTypeDescription
pageNumberintegerThe current page number to retrieve.
newestFirstbooleanSort shipments by most recent first (true) or oldest first (false).
searchStringstringKeyword or term to search shipments (e.g., tracking number or order ID).
processedStatusesstringFilter by processed shipment status (e.g., PreTransit, Intransit).
carriersstringFilter shipments by carrier name (e.g., Delhivery, XpressBees).
orderTypesstringFilter by order type (e.g., Prepaid, Cod).
statusesstringFilter by general status (e.g., Confirmed, Pending, Failed).
carrierAccountIdsstringFilter by specific carrier account IDs.
additionalFilterstringOptional field for environment-specific filtering.
accountIdsstringFilter shipments by account identifiers.
fromDatestringStart date for filtering (ISO 8601 format).
toDatestringEnd date for filtering (ISO 8601 format).


Request body:

Does not require any request parameter


Example cURL:

curl --location 'https://api-ppd.kloudship.com:960/api/v1/Shipment?pageNumber=1&fromDate=&toDate=&searchString=null&newestFirst=false' \
--header 'Authorization: ••••••'

Response fields:

Root Level

FieldTypeDescription
resultsarrayList of shipment objects.
pageSizeintegerNumber of records returned per page.
totalResultsintegerTotal number of matching shipments.
totalPagesintegerTotal pages available.
currentPageintegerCurrent page index.


Shipment Object (results[])

FieldType
Description
idstringUnique identifier of the shipment.
accountIdstringAccount ID associated with the shipment.
relatedShipmentIdstringID of the related shipment (e.g., return shipment).
locationIdstringID of the origin location.
manifestIdstringID of the manifest linked to the shipment.
trackingNumberstringPrimary tracking number.
trackingUrlstringTracking page URL for the shipment.
processedStatusstringCurrent processed status (e.g., PreTransit).
processedStatusCodestringCode representing the processed status.
statusstringShipment status (e.g., Confirmed, Delivered).
paymentTypestringType of payment (e.g., Prepaid, COD).
isTestbooleanIndicates if this is a test shipment.
typestringShipment type (Forward, Return).
createdDatestringTimestamp when the shipment was created.
transactionIdstringTransaction ID related to this shipment.


Address Object (Used in addressFrom, addressShipTo, addressBillTo, addressReturn, addressAdditional)

FieldTypeDescription
idstringAddress ID.
savebooleanWhether the address should be saved.
firstNamestringContact first name.
lastNamestringContact last name.
companystringCompany or business name.
street1stringPrimary street address.
street2stringSecondary address line.
street3stringTertiary address line.
citystringCity name.
stateCodestringState code (e.g., DL, MH).
zipstringPostal code.
countryCodestringCountry code (ISO).
phonestringContact phone number.
phoneCodestringCountry calling code.
verifybooleanWhether the address is verified.
categorystringAddress category (Commercial or Residential).
emailstringContact email.
latitudenumberLatitude coordinate.
longitudenumberLongitude coordinate.


Packages Object (packages[])

FieldTypeDescription
packageIdstringUnique package identifier.
packageNumberintegerSequence number of the package.
packageNamestringName or type of package.
lengthnumberLength of the package.
widthnumberWidth of the package.
heightnumberHeight of the package.
weightnumberWeight of the package.
finalPackageTypestringFinal package type (e.g., Box).
finalWeightUnitstringWeight unit (e.g., kg, oz).
finalDimensionUnitstringDimension unit (e.g., cm, in).
finalWeightnumberFinal calculated weight.
finalVolumenumberFinal calculated volume.
oversizedbooleanIndicates if the package is oversized.
isMasterbooleanMarks the master package in a shipment.


Items Object (items[])

FieldTypeDescription
idstringUnique item ID.
productNamestringName of the product.
skustringSKU code.
quantityintegerQuantity of items.
weightnumberItem weight.
valuenumberUnit value of the item.
totalValuenumberTotal value of all units.
hsnCodestringHSN code.
originCountrystringCountry of origin.
categorystringProduct category.
taxInfosarrayTax details (code and value).


Rate Object (rate)

FieldTypeDescription
totalFeenumberTotal fee charged.
valueCurrencystringCurrency of fee.
deliveryDaysEstimatedintegerEstimated delivery days.
deliveryDateEstimatedstringEstimated delivery date.
carrierstringCarrier name.
servicestringCarrier service name.
categoriesarrayRate categories (Cheapest, Fastest).
specialServicesarrayApplied special services (e.g., COD).


Tracking Object (trackings[])

FieldTypeDescription
trackingBarcodeNumberstringTracking number assigned to the package.
trackingUrlstringURL for live tracking.
processedStatusIDstringStatus ID (PreTransit, Delivered).
isMasterbooleanIndicates if this is the master tracking.


Refund Object (refund)

FieldTypeDescription
statusstringRefund status (Rejected, Approved).
transactionDatestringDate of refund transaction.
reasonstringReason for refund.


Date Object (date)

FieldTypeDescription
shipDatestringActual ship date.
pickupDatestringActual pickup date.
deliveryDatestringActual delivery date.
deliveryDateEstimatedstringEstimated delivery date.
returnDeliveryDatestringReturn delivery date.


Response example:

{
  "results": [
    {
      "id": "string",
      "accountId": "string",
      "relatedShipmentId": "string",
      "addressFrom": { /* ... */ },
      "addressShipTo": { /* ... */ },
      "locationId": "string",
      "order": { /* ... */ },
      "packages": [ /* ... */ ],
      "items": [ /* ... */ ],
      "rate": { /* ... */ },
      "date": { /* ... */ },
      "manifestId": "string",
      "labels": [ /* ... */ ],
      "trackings": [ /* ... */ ],
      "trackingNumber": "string",
      "processedStatus": "PreTransit",
      "status": "Confirmed",
      "refund": { /* ... */ },
      "paymentType": "Prepaid",
      "type": "Forward",
      "customsDeclaration": { /* ... */ },
      "createdDate": "2025-10-16T13:25:40.035Z",
      "transactionId": "string"
    }
  ],
  "pageSize": 20,
  "totalResults": 100,
  "totalPages": 5,
  "currentPage": 1
}

GET: Shipment by Id

 The GET Shipment by Id API endpoint for retrieving shipment information allows you to fetch detailed information about a specific shipment using its unique ID. The response provides comprehensive details about the shipment, including addresses, packages, rates, labels, and more. Use the provided request example and response format to integrate this API into your application for seamless shipment tracking and management.


Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Shipment/{id}
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Shipment/{id}
Content-Typeapplication/json


Path variable:

ParameterTypeRequiredDescriptionExample
IdstringYes This id can be Tracking id /Shipment id / Transaction id / TrackingNumber / Tracking Barcode Number151730780008322


Query parameters:

ParameterTypeRequiredDescriptionExample
shipmentIdTypestringYesSpecifies the type of tracking ID. Possible values: Id, ShipmentId, TransactionId, TrackingNumber, TrackingBarcodeNumberTrackingNumber


Example cURL:

curl --location 'https://api-ppd.kloudship.com:960/api/v1/Shipment/151730780007610?shipmentIdType=TrackingNumber' \
--header 'transactionId: 354365' \
--header 'Authorization: ••••••'

Response fields:

Shipment Object 

FieldTypeDescription
idstringUnique identifier of the shipment.
accountIdstringAccount ID associated with the shipment.
relatedShipmentIdstringID of the related shipment (e.g., return shipment).
locationIdstringID of the origin location.
manifestIdstringID of the manifest linked to the shipment.
trackingNumberstringPrimary tracking number.
trackingUrlstringTracking page URL for the shipment.
processedStatusstringCurrent processed status (e.g., PreTransit).
processedStatusCodestringCode representing the processed status.
statusstringShipment status (e.g., Confirmed, Delivered).
paymentTypestringType of payment (e.g., Prepaid, COD).
isTestbooleanIndicates if this is a test shipment.
typestringShipment type (Forward, Return).
createdDatestringTimestamp when the shipment was created.
transactionIdstringTransaction ID related to this shipment.


Address Object (Used in addressFrom, addressShipTo, addressBillTo, addressReturn, addressAdditional)

FieldTypeDescription
idstringAddress ID.
savebooleanWhether the address should be saved.
firstNamestringContact first name.
lastNamestringContact last name.
companystringCompany or business name.
street1stringPrimary street address.
street2stringSecondary address line.
street3stringTertiary address line.
citystringCity name.
stateCodestringState code (e.g., DL, MH).
zipstringPostal code.
countryCodestringCountry code (ISO).
phonestringContact phone number.
phoneCodestringCountry calling code.
verifybooleanWhether the address is verified.
categorystringAddress category (Commercial or Residential).
emailstringContact email.
latitudenumberLatitude coordinate.
longitudenumberLongitude coordinate.


Packages Object (packages[])

FieldTypeDescription
packageIdstringUnique package identifier.
packageNumberintegerSequence number of the package.
packageNamestringName or type of package.
lengthnumberLength of the package.
widthnumberWidth of the package.
heightnumberHeight of the package.
weightnumberWeight of the package.
finalPackageTypestringFinal package type (e.g., Box).
finalWeightUnitstringWeight unit (e.g., kg, oz).
finalDimensionUnitstringDimension unit (e.g., cm, in).
finalWeightnumberFinal calculated weight.
finalVolumenumberFinal calculated volume.
oversizedbooleanIndicates if the package is oversized.
isMasterbooleanMarks the master package in a shipment.


Items Object (items[])

FieldTypeDescription
idstringUnique item ID.
productNamestringName of the product.
skustringSKU code.
quantityintegerQuantity of items.
weightnumberItem weight.
valuenumberUnit value of the item.
totalValuenumberTotal value of all units.
hsnCodestringHSN code.
originCountrystringCountry of origin.
categorystringProduct category.
taxInfosarrayTax details (code and value).


Rate Object (rate)

FieldTypeDescription
totalFeenumberTotal fee charged.
valueCurrencystringCurrency of fee.
deliveryDaysEstimatedintegerEstimated delivery days.
deliveryDateEstimatedstringEstimated delivery date.
carrierstringCarrier name.
servicestringCarrier service name.
categoriesarrayRate categories (Cheapest, Fastest).
specialServicesarrayApplied special services (e.g., COD).


Trackings Object (trackings[])

FieldTypeDescription
trackingBarcodeNumberstringTracking number assigned to the package.
trackingUrlstringURL for live tracking.
processedStatusIDstringStatus ID (PreTransit, Delivered).
isMasterbooleanIndicates if this is the master tracking.


Refund Object (refund)

FieldTypeDescription
statusstringRefund status (Rejected, Approved).
transactionDatestringDate of refund transaction.
reasonstringReason for refund.


Date Object (date)

FieldTypeDescription
shipDatestringActual ship date.
pickupDatestringActual pickup date.
deliveryDatestringActual delivery date.
deliveryDateEstimatedstringEstimated delivery date.
returnDeliveryDatestringReturn delivery date.


Response Example:

{
  "id": "151730780007610",
  "accountId": "68f0a950f452c6ae5889d0f1",
  "relatedShipmentId": null,
  "addressFrom": {
    "firstName": "John",
    "lastName": "Doe",
    "company": "JD Logistics",
    "street1": "123 Main Street",
    "city": "Delhi",
    "stateCode": "DL",
    "zip": "110001",
    "countryCode": "IN",
    "phone": "9876543210",
    "email": "john@example.com"
  },
  "addressShipTo": {
    "firstName": "Jane",
    "lastName": "Smith",
    "company": "Smith Enterprises",
    "street1": "456 Market Road",
    "city": "Mumbai",
    "stateCode": "MH",
    "zip": "400001",
    "countryCode": "IN",
    "phone": "9876500000",
    "email": "jane@example.com"
  },
  "packages": [
    {
      "packageId": "pkg-12345",
      "packageNumber": 1,
      "packageName": "Box",
      "length": 10,
      "width": 5,
      "height": 5,
      "weight": 2,
      "finalWeightUnit": "kg",
      "finalDimensionUnit": "cm",
      "isMaster": true
    }
  ],
  "rate": {
    "totalFee": 150,
    "carrier": "XpressBees",
    "service": "Surface",
    "deliveryDateEstimated": "2025-10-18T14:01:12.602Z"
  },
  "trackingNumber": "151730780007610",
  "trackingUrl": "https://www.xpressbees.com/shipment/tracking?awbNo=151730780007610",
  "processedStatus": "PreTransit",
  "status": "Confirmed",
  "createdDate": "2025-10-16T14:01:12.602Z",
  "transactionId": "354365"
}

POST: Create shipment

This documentation outlines the usage of the "Create Shipment" endpoint for the Kloudship API. The endpoint allows you to create a new shipment by sending a POST request with the required payload. Below are the details of the request and the response for the API.

Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Shipment
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Shipment
Content-Typeapplication/json


Headers:

HeaderTypeRequiredDescription
Content-TypestringYesMust be application/json
AuthorizationstringYesBearer token for authentication
transactionIdstringNoOptional unique transaction identifier for tracking requests


Request fields:

FieldTypeRequiredDescription
addressFromobjectYesSender’s address details
addressShipToobjectYesReceiver’s address details
isBillToSameAsShipTobooleanNoIf true, billing address = shipping address
addressBillToobjectNoBilling address if different
addressReturnobjectNoReturn address
addressAdditionalobjectNoAdditional address (if any)
packagesarrayYesList of packages to be shipped
itemsarrayYesProduct/item details included in shipment
labelobjectYesLabel configuration (type, size, format)
carrierAccountIdstringYesCarrier account ID
servicestringYesSelected carrier service
orderTypestringNoType of order (if applicable)
specialServicesarrayNoSpecial add-ons like insurance, COD, etc.
customsDeclarationobjectNoRequired for international shipments
locationIdstringYesOrigin warehouse or location ID
isTestbooleanNoUse true for sandbox/testing mode


Request example:

{
    "addressFrom": {
        "firstname": "Nisha",
        "lastname": "Thuwal",
        "company": "Bharti Creations",
        "street1": "Bharti Creations, Gaon Bhag",
        "street2": "",
        "city": "Sangli",
        "stateCode": "MH",
        "zip": "416416",
        "countryCode": "IN",
        "phone": "9354456354",
        "email": "mayank.thuwal@impledge.com",
        "save": false,
        "verify": false,
        "isResidential": false,
        "latitude": 16.8597981,
        "longitude": 74.5635889
    },
    "locationId": "678a3ea9c17c95b6756b00e5",
    "carrierAccountId": "670ca085323de7c806a1e654",
    "service": "Surface",
    "addressShipTo": {
        "firstname": "Mayank",
        "lastname": "Thuwal",
        "company": "Impledge Technologies",
        "street1": "5TH FLOOR, REGUS, TOWER C",
        "street2": "Green Boulevard, B-BLOCK",
        "city": "Gautam Buddha Nagar",
        "stateCode": "UP",
        "zip": "201309",
        "countryCode": "IN",
        "phone": "9354456354",
        "email": "mayank.thuwal@impledge.com",
        "save": false,
        "verify": true,
        "isResidential": false,
        "latitude": 28.6228797,
        "longitude": 77.3672554
    },
    "packages": [
        {
            "name": "Watch Box",
            "length": 10.0,
            "width": 10.0,
            "height": 5.0,
            "dimensionUnit": "cm",
            "weight": 1.64,
            "weightUnit": "kg"
        }
    ],
    "items": [
        {
            "productId": "58712aebe8f048ec902bcc6c2d06426c",
            "productName": "Used Watch",
            "name": "Used Watch",
            "weight": 1000.0,
            "weightUnit": "g",
            "totalValue": 599.0,
            "value": 500.0,
            "taxInfos": [
                { "code": "IGST", "value": "99" }
            ]
        }
    ],
    "label": {
        "labelFileType": "PDF",
        "labelSize": "4x6",
        "labelOrientation": "Portrait",
        "labelType": "Url",
        "customText1": "Handle carefully",
        "customText2": "Don't Ring Door Bell"
    },
    "specialServices": [
        {
            "code": "Insure",
            "parameters": [
                { "code": "Amount", "value": "50" }
            ]
        }
    ],
    "isTest": true
}

Example cURL:

curl --location 'https://api-ppd.kloudship.com:960/api/v1/Shipment' \
--header 'transactionId: e9ae06c4-be54-4eba-ad26-0e76a9ba9d4a' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data-raw '{
  ...same as request body above...
}'

Response fields:

FieldTypeDescription
idstringUnique identifier of the shipment
trackingNumberstringAssigned tracking number by carrier
trackingUrlstringCarrier tracking page URL
statusstringCurrent shipment status (e.g., Confirmed)
processedStatusstringInternal status code (e.g., PreTransit)
addressFromobjectSender details
addressShipToobjectRecipient details
packagesarrayPackage dimensions and weight
itemsarrayProduct-level details for shipment
rateobjectBilling details — total charges, currency, carrier info
labelsarrayLabel URLs and format
dateobjectShipping and delivery dates
customsDeclarationobjectCustoms info for international shipments
paymentTypestringPayment mode (Prepaid or COD)
isTestbooleanIndicates test mode
errorsarrayList of validation or carrier errors (if any)
createdDatestringDate when shipment was created
transactionIdstringTransaction reference ID


Response example:

{
  "id": "6745a01fba34f7f7b9271b10",
  "trackingNumber": "151730750000015",
  "trackingUrl": "https://www.xpressbees.com/shipment/tracking?awbNo=151730750000015",
  "status": "Confirmed",
  "processedStatus": "PreTransit",
  "rate": {
    "valueCurrency": "INR",
    "totalFee": 300.9,
    "carrier": "XpressBees",
    "service": "Surface"
  },
  "labels": [
    {
      "url": "https://s3.amazonaws.com/kloudship-labels/sample-label.pdf",
      "fileType": "PDF",
      "size": "4x6",
      "orientation": "Portrait"
    }
  ],
  "createdDate": "2025-10-16T14:13:57.570Z",
  "isTest": true
}

PUT: Shipment refund

The PUT Refund Shipment API allows you to initiate a refund for a specific shipment. This API is used to cancel a shipment and initiate the refund process. It requires the shipment ID and cancellation reason as input parameters.


Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Shipment/{id}/refund
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Shipment/{id}/Refund
Content-Typeapplication/json


Header:

HeaderTypeRequiredDescription
Content-TypestringYesMust be application/json
AuthorizationstringYesBearer token for authentication
transactionIdstringYesOptional unique identifier for tracking this refund request


Path parameter

ParameterTypeRequiredDescription
shipmentIdstringYesUnique ID of the shipment for which the refund is being initiated


Request body:

{
  "CancelationReason": "Not interested"
}

Example cURL:

curl --location --request PUT 'https://api-ppd.kloudship.com:960/api/v1/Shipment/68f10000f452c6ae5889d1a0/Refund' \
--header 'transactionId: b9257979-5387-43c9-a47f-2df940added8' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "CancelationReason": "Not interested"
}'

Response fields:

FieldTypeDescription
statusstringRefund request status — usually "Initiated"
transactionDatestring (ISO 8601)Timestamp of when refund was initiated
reasonstringReason provided during refund initiation


Example response:

{
  "status": "Initiated",
  "transactionDate": "2025-10-16T14:24:10.3683578Z",
  "reason": "Not interested"
}



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