GET: Get Package
The Get Package API provides the list of all created package in application
Endpoint details:
| Method | POST |
|---|---|
| Production Environment URL | https://api.kloudship.com/api/v1/PackageType |
| Test Environment URL | https://api-ppd.kloudship.com:960/api/v1/PackageType |
| Content-Type | application/json |
Query parameters:
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| pageNumber | integer | No | Specifies the page number to retrieve. | 1 |
| fromDate | string | No | Filters results from this date (in ISO format). | 2025-09-01 |
| toDate | string | No | Filters results up to this date (in ISO format). | 2025-09-30 |
| searchString | string | No | Filters results by matching package name or type. | Zerox |
| newestFirst | boolean | No | If true, results are sorted by newest creation date first. | true |
Request body:
Does not require any request parameter
Example cURL:
curl --location 'https://api-ppd.kloudship.com:960/api/v1/Packagetype?pageNumber=1&fromDate=&toDate=&searchString=null&newestFirst=true' \ --header 'Authorization: ••••••'
Response fields:
Root Object
| Field | Type | Description |
|---|---|---|
| results | array | List of package type objects. |
| pageSize | integer | Number of results returned per page. |
| totalResults | integer | Total number of package types available. |
| totalPages | integer | Total number of pages available. |
| currentPage | integer | Current page number of the response. |
Results Object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the package type. |
| createdDate | string | The date and time when the package type was created (in ISO 8601 format). |
| packageType | string | Type of package (e.g., Box, Envelope). |
| name | string | Name assigned to the package type. |
| length | number | Length of the package. |
| width | number | Width of the package. |
| height | number | Height of the package. |
| dimensionUnit | string | Unit of measurement for dimensions (e.g., cm, in). |
| weight | number | Weight of the package. |
| weightUnit | string | Unit of weight measurement (e.g., kg, lb). |
| isFavorite | boolean | Indicates whether this package type is marked as favorite. |
Response example:
{
"results": [
{
"id": "68cc23a40c5df3b3aca50e18",
"createdDate": "2025-09-18T15:22:12.037Z",
"packageType": "Box",
"name": "Zerox Package",
"length": 5.0,
"width": 5.0,
"height": 5.0,
"dimensionUnit": "in",
"weight": 2.0,
"weightUnit": "kg",
"isFavorite": false
},
{
"id": "6880a6b7e32e19eea1a57af8",
"createdDate": "2025-07-23T09:09:11.575Z",
"packageType": "Box",
"name": "Toy Box",
"length": 5.0,
"width": 6.0,
"height": 7.0,
"dimensionUnit": "cm",
"weight": 3.0,
"weightUnit": "kg",
"isFavorite": false
}
],
"pageSize": 20,
"totalResults": 4,
"totalPages": 1,
"currentPage": 1
}GET: Get package by ID
The Get Package by Id API provides the details of package which is fetched by id
Endpoint details:
| Method | POST |
|---|---|
| Production Environment URL | https://api.kloudship.com/api/v1/PackageType/{id} |
| Test Environment URL | https://api-ppd.kloudship.com:960/api/v1/PackageType{/id} |
| Content-Type | application/json |
{id}: Here you will provide the location id
Query parameters:
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| pageNumber | integer | No | Specifies the page number to retrieve. | 1 |
| fromDate | string | No | Filters results from this date (in ISO format). | 2025-09-01 |
| toDate | string | No | Filters results up to this date (in ISO format). | 2025-09-30 |
| searchString | string | No | Filters results by matching package name or type. | Zerox |
| newestFirst | boolean | No | If true, results are sorted by newest creation date first. | true |
Request body:
Does not require any request parameter
Example cURL:
curl --location 'https://api-ppd.kloudship.com:960/api/v1/Packagetype/6880a6b7e32e19eea1a57af7' \ --header 'Authorization: ••••••'
Response fields:
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the package type. |
| createdDate | string | The date and time when the package type was created (in ISO 8601 format). |
| packageType | string | Type of package (e.g., Box, Envelope). |
| name | string | Name assigned to the package type. |
| length | number | Length of the package. |
| width | number | Width of the package. |
| height | number | Height of the package. |
| dimensionUnit | string | Unit of measurement for dimensions (e.g., cm, in). |
| weight | number | Weight of the package. |
| weightUnit | string | Unit of weight measurement (e.g., kg, lb). |
| isFavorite | boolean | Indicates whether this package type is marked as favorite. |
Response example:
{
"id": "6880a6b7e32e19eea1a57af7",
"createdDate": "2025-07-23T09:09:11.575Z",
"packageType": "Box",
"name": "Medium Box - One KG",
"length": 6.0,
"width": 6.0,
"height": 8.0,
"dimensionUnit": "in",
"weight": 1.0,
"weightUnit": "kg",
"isFavorite": false
}POST: Create package by Id
This API allows users to create a new package type by providing dimensions, weight, and related details.
It returns the created package type object upon success.
Endpoint details:
| Method | POST |
|---|---|
| Production Environment URL | https://api.kloudship.com/api/v1/PackageType |
| Test Environment URL | https://api-ppd.kloudship.com:960/api/v1/PackageType |
| Content-Type | application/json |
Request body:
The request body should contain a JSON object with the address information to be posted. Here is an example of the
request body:
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| name | string | Yes | The name of the package type. | Zerox Package |
| length | number | Yes | Length of the package. | 5 |
| width | number | Yes | Width of the package. | 5 |
| height | number | Yes | Height of the package. | 5 |
| dimensionUnit | string | Yes | Unit for dimensions (cm, in). | in |
| weight | number | Yes | Weight of the package. | 2 |
| weightUnit | string | Yes | Unit for weight (kg, lb). | kg |
Example cURL:
curl --location 'https://api-ppd.kloudship.com:960/api/v1/Packagetype' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"name": "Zerox Package",
"length": 5,
"width": 5,
"height": 5,
"dimensionUnit": "in",
"weight": 2,
"weightUnit": "kg"
}'Example Request:
{
"name": "Zerox Package",
"length": 5,
"width": 5,
"height": 5,
"dimensionUnit": "in",
"weight": 2,
"weightUnit": "kg"
}Response fields:
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the created package type. |
| createdDate | string | Timestamp of when the package type was created (ISO 8601 format). |
| packageType | string | Type of package (e.g., Box, Envelope). |
| name | string | Name assigned to the package type. |
| length | number | Length of the package. |
| width | number | Width of the package. |
| height | number | Height of the package. |
| dimensionUnit | string | Unit for dimensions (cm, in). |
| weight | number | Weight of the package. |
| weightUnit | string | Unit for weight (kg, lb). |
| isFavorite | boolean | Indicates whether the package type is marked as a favorite (true = Yes, false = No). |
Response example:
{
"id": "68f0a950f452c6ae5889d0f1",
"createdDate": "2025-10-16T08:14:08.1740701Z",
"packageType": "Box",
"name": "Zerox Package",
"length": 5.0,
"width": 5.0,
"height": 5.0,
"dimensionUnit": "in",
"weight": 2.0,
"weightUnit": "kg",
"isFavorite": false
}PUT: Update package type
Updates the details of the package type based on the provided package type id.
Endpoint details:
| Method | POST |
|---|---|
| Production Environment URL | https://api.kloudship.com/api/v1/PackageType/{id} |
| Test Environment URL | https://api-ppd.kloudship.com:960/api/v1/PakageType/{id} |
| Content-Type | application/json |
{id}: Here you will provide the package type id
Request body:
The request body should contain a JSON object with the address information to be posted. Here is an example of the
request body:
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| name | string | Yes | The name of the package type. | Zerox Package |
| length | number | Yes | Length of the package. | 5 |
| width | number | Yes | Width of the package. | 5 |
| height | number | Yes | Height of the package. | 5 |
| dimensionUnit | string | Yes | Unit for dimensions (cm, in). | in |
| weight | number | Yes | Weight of the package. | 2 |
| weightUnit | string | Yes | Unit for weight (kg, lb). | kg |
Example cURL:
curl --location --request PUT 'https://api-ppd.kloudship.com:960/api/v1/Packagetype/6880a6b7e32e19eea1a57af8' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"name": "Toy Box",
"length": 5,
"width": 6,
"height": 7,
"dimensionUnit": "cm",
"weight": 3,
"weightUnit": "kg"
}'Example Request:
{
"name": "Zerox Package",
"length": 5,
"width": 5,
"height": 5,
"dimensionUnit": "in",
"weight": 2,
"weightUnit": "kg"
}Response fields:
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the created package type. |
| createdDate | string | Timestamp of when the package type was created (ISO 8601 format). |
| packageType | string | Type of package (e.g., Box, Envelope). |
| name | string | Name assigned to the package type. |
| length | number | Length of the package. |
| width | number | Width of the package. |
| height | number | Height of the package. |
| dimensionUnit | string | Unit for dimensions (cm, in). |
| weight | number | Weight of the package. |
| weightUnit | string | Unit for weight (kg, lb). |
| isFavorite | boolean | Indicates whether the package type is marked as a favorite (true = Yes, false = No). |
Response example:
{
"id": "68f0a950f452c6ae5889d0f1",
"createdDate": "2025-10-16T08:14:08.1740701Z",
"packageType": "Box",
"name": "Zerox Package",
"length": 5.0,
"width": 5.0,
"height": 5.0,
"dimensionUnit": "in",
"weight": 2.0,
"weightUnit": "kg",
"isFavorite": false
}DEL: Delete package type
The Delete Package type API allows you to delete a specific package type using its unique `package_id`.
Endpoint details:
| Method | POST |
|---|---|
| Production Environment URL | https://api.kloudship.com/api/v1/Pacagetype/{id} |
| Test Environment URL | https://api-ppd.kloudship.com:960/api/v1/PackageType/{id} |
| Content-Type | application/json |
{id}: Here you will provide the package type id
Example cURL:
curl --location --request DELETE 'https://api-ppd.kloudship.com:960/api/v1/Packagetype/6880a6b7e32e19eea1a57af8' \ --header 'Authorization: ••••••'
Response:
The response from the Delete package type API includes status code 200, which signifies the request was successful and the server has responded with the requested information. The response will contain either a "true" or "false" value.
Not Yet Signed Up?
- Get started with KloudShip - This article explains steps like signing up, KYC, and adding balance to your account
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article