API - Location

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

GET: Get location

The Get Location API provides information about different locations, including warehouses and offices. This API allows you to retrieve details such as the address, contact information, and geolocation coordinates for each location. Below is the documentation for the Get Location API.

 

Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Location?pageNumber=1&fromDate=&toDate=&searchString=&newestFirst=false
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Location?pageNumber=1&fromDate=&toDate=&searchString=&newestFirst=false 
Content-Typeapplication/json


Query parameter:

ParameterTypeRequiredDescriptionExample
pageNumberintegerNoPage number for pagination. Default is 1.1
fromDatestring (ISO)NoFilter locations created after this date.2025-01-01T00:00:00Z
toDatestring (ISO)NoFilter locations created before this date.2025-02-01T00:00:00Z
searchStringstringNoKeyword to search by name or address.Noida
newestFirstbooleanNoIf true, results are sorted by newest first. Default is false.true


Request body:

Does not require any request parameter


Example cURL:

curl --location 'https://api-ppd.kloudship.com:960/api/v1/Location?pageNumber=1&fromDate=&toDate=&searchString=&newestFirst=false' \
--header 'Authorization: Bearer <your_token>' \
--data ''

Response fields:

Root Level

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


Address Object (results[].address)

FieldTypeDescription
verificationStatusstringVerification result (e.g., "Success", "Failed", "Pending").
firstNamestringContact first name for the location.
lastNamestringContact last name.
companystringCompany or business name (may be empty).
street1stringPrimary street address line.
street2stringSecondary street address line (may be empty).
street3stringTertiary street address line (may be empty).
citystringCity name.
stateCodestringState code (e.g., "UP", "MH").
zipstringPostal / PIN code.
countryCodestringCountry code (ISO, e.g., "IN").
phonestringPrimary phone number.
phoneCodestringCountry calling code (e.g., "+91").
verifybooleanWhether the address has been verified (request-level flag).
categorystringAddress category (e.g., "Commercial", "Residential").
emailstringContact email for the location.
latitudenumberLatitude coordinate (decimal).
longitudenumberLongitude coordinate (decimal).
landmarkstring (optional)Nearby landmark (if any).
addressIdstring (optional)Internal ID of the address entity (if returned).


Response example:

{
    "results": [
        {
            "id": "6784fed7326a0ee24be9f4f7",
            "name": "Impledge Location",
            "createdDate": "2025-01-13T11:53:59.277Z",
            "isDefault": false,
            "defaultUsersCount": 0,
            "type": "Warehouse",
            "address": {
                "verificationStatus": "Success",
                "firstName": "Guest",
                "lastName": "User",
                "company": "",
                "street1": "Regus, 5th Floor, TOWER-C, Green Boulevard, Rasoolpur Nawada, B-Block, Sector 62,",
                "city": "Noida",
                "stateCode": "UP",
                "zip": "201309",
                "countryCode": "IN",
                "phone": "9999999999",
                "phoneCode": "+91",
                "verify": false,
                "category": "Commercial",
                "email": "guest@kloudship.com",
                "latitude": 28.6223216,
                "longitude": 77.3660891
            }
        },
        {
            "id": "678a3ea9c17c95b6756b00e5",
            "name": "KloudShip Guest XpressBees",
            "createdDate": "2025-01-17T11:27:37.699Z",
            "isDefault": false,
            "defaultUsersCount": 0,
            "type": "Warehouse",
            "address": {
                "verificationStatus": "Success",
                "firstName": "Guest",
                "lastName": "User XpressBees",
                "company": "Guest company",
                "street1": "Post Office G.N. BAZAR",
                "city": "Mathurea",
                "stateCode": "UP",
                "zip": "281121",
                "countryCode": "IN",
                "phone": "9999999996",
                "phoneCode": "+91",
                "verify": false,
                "category": "Commercial",
                "email": "guest@kloudship.com",
                "latitude": 27.5109929,
                "longitude": 77.6778616
            }
        }
    ],
    "pageSize": 20,
    "totalResults": 2,
    "totalPages": 1,
    "currentPage": 1
}

GET: Location by ID

The Get Location by ID API allows you to retrieve location information based on a unique identifier (ID). This API provides detailed information about a specific location, including its name, type, address, and contact details.


Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Location/{id}
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Location/{id} 
Content-Typeapplication/json
{id}: Here you will provide the location id

Request body:

Does not require any request parameter


Example cURL:

curl --location 'https://api-ppd.kloudship.com:960/api/v1/Location/6784fed7326a0ee24be9f4f7' \
--header 'Authorization: ••••••' \
--data ''

Response fields:

Root Level

FieldTypeDescription
idstringUnique identifier for the location.
namestringDisplay name of the location.
createdDatestring (ISO 8601)Created timestamp (e.g., "2025-10-15T12:46:11.153Z").
isDefaultbooleanWhether this location is the default one.
defaultUsersCountintegerCount of default users assigned to this location.
typestringType of location (e.g., "Warehouse", "Hub", "Store").
addressobjectAddress object containing detailed address information (see below).


Address Object (address)

FieldTypeDescription
verificationStatusstringVerification result (e.g., "Success", "Failed", "Pending").
firstNamestringContact first name for the location.
lastNamestringContact last name.
companystringCompany or business name (may be empty).
street1stringPrimary street address line.
street2stringSecondary street address line (may be empty).
street3stringTertiary street address line (may be empty).
citystringCity name.
stateCodestringState code (e.g., "UP", "MH").
zipstringPostal / PIN code.
countryCodestringCountry code (ISO, e.g., "IN").
phonestringPrimary phone number.
phoneCodestringCountry calling code (e.g., "+91").
verifybooleanWhether the address has been verified.
categorystringAddress category (e.g., "Commercial", "Residential").
emailstringContact email for the location.
latitudenumberLatitude coordinate (decimal).
longitudenumberLongitude coordinate (decimal).


Response example:

{
    "id": "6784fed7326a0ee24be9f4f7",
    "name": "Impledge Location",
    "createdDate": "2025-01-13T11:53:59.277Z",
    "isDefault": false,
    "defaultUsersCount": 0,
    "type": "Warehouse",
    "address": {
        "verificationStatus": "Success",
        "firstName": "Guest",
        "lastName": "User",
        "company": "",
        "street1": "Regus, 5th Floor, TOWER-C, Green Boulevard, Rasoolpur Nawada, B-Block, Sector 62,",
        "street2": "",
        "street3": "",
        "city": "Noida",
        "stateCode": "UP",
        "zip": "201309",
        "countryCode": "IN",
        "phone": "9799999999",
        "phoneCode": "+91",
        "verify": false,
        "category": "Commercial",
        "email": "guest@kloudship.com",
        "latitude": 28.6223216,
        "longitude": 77.3660891
    }
}

POST: Create location

The Post Create Location API allows you to create and post address information to our system. This API is designed to handle address details for various types of locations, such as offices, warehouses, and more. This document provides comprehensive information about the request structure, response format, and endpoint details for using the Post Address API.


Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Location
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Location
Content-Typeapplication/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:

FieldTypeRequiredDescription
namestringYesDisplay name of the location.
typestringYesType of location (e.g., "Warehouse", "Hub", "Store").
addressobjectYesAddress details object (see below).

Address Object (Request)

FieldTypeRequiredDescription
firstnamestringYesContact first name for the location.
lastnamestringNoContact last name.
companystringNoCompany or business name.
street1stringYesPrimary street address line.
street2stringNoSecondary street address line (optional).
street3stringNoTertiary street address line (optional).
citystringYesCity name.
stateCodestringYesState code (e.g., "DL", "UP").
countryCodestringNoCountry code (ISO format, e.g., "IN").
phonestringYesContact phone number.
zipstringYesPostal / PIN code.
emailstringYesContact email for the location.
isResidentialbooleanNoWhether the address is residential (true/false).
latitudenumberNoLatitude coordinate (decimal).
longitudenumberNoLongitude coordinate (decimal).
verifybooleanNoWhether to verify the address before saving.


Request example:

{
    "name": "abc",
    "type": "Warehouse",
    "address": {
        "firstname": "xyz",
        "lastname": " ",
        "company": "Impledge company",
        "street1": "Regus 5th floor",
        "street2": "",
        "street3": "",
        "city": "Delhi ",
        "stateCode": "DL",
        "countryCode": "IN",
        "phone": "959999999",
        "zip": "110032",
        "email": "viabc@kloudship.com",
        "isResidential": false,
        "latitude": 0.0,
        "longitude": 0.0,
        "verify":true
    }
}

Example cURL:

curl --location 'https://api-ppd.kloudship.com:960/api/v1/Location' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data-raw '{
    "name": "abc",
    "type": "Warehouse",
     "address": {
        "firstname": "xyz",
        "lastname": " ",
        "company": "Impledge company",
        "street1": "Regus 5th floor",
        "street2": "",
        "street3": "",
        "city": "Delhi ",
        "stateCode": "DL",
        "countryCode": "IN",
        "phone": "959999999",
        "zip": "110032",
        "email": "viabc@kloudship.com",
        "isResidential": false,
        "latitude": 0.0,
        "longitude": 0.0,
        "verify":true
    }
}'

Response fields:

Root Level

FieldTypeDescription
idstringUnique identifier for the created location.
namestringName of the created location.
createdDatestring (ISO 8601)Timestamp when the location was created.
isDefaultbooleanWhether this is the default location.
defaultUsersCountintegerCount of default users assigned to this location.
typestringType of location (e.g., "Warehouse", "Hub", "Store").
addressobjectAddress object with verification and contact details (see below).


Address Object (Response)

FieldTypeDescription
verificationStatusstringAddress verification result (e.g., "Success", "Failed", "Pending").
firstNamestringContact first name for the location.
lastNamestringContact last name.
companystringCompany or business name.
street1stringPrimary street address line.
street2stringSecondary street address line (if any).
street3stringTertiary street address line (if any).
citystringCity name.
stateCodestringState code (e.g., "DL").
zipstringPostal / PIN code.
countryCodestringCountry code (ISO, e.g., "IN").
phonestringContact phone number.
phoneCodestringCountry calling code (e.g., "+91").
verifybooleanWhether the address was verified.
categorystringAddress category (e.g., "Commercial", "Residential").
emailstringContact email.
latitudenumberLatitude coordinate.
longitudenumberLongitude coordinate.

 

Response example:

{
    "id": "68efa2bf340a4de8435bb323",
    "name": "abc",
    "createdDate": "2025-10-15T13:33:52.9642487Z",
    "isDefault": false,
    "defaultUsersCount": 0,
    "type": "Warehouse",
    "address": {
        "verificationStatus": "Success",
        "firstName": "abc",
        "lastName": "",
        "company": "Impledge company",
        "street1": "Regus 5th floor",
        "street2": "",
        "street3": "",
        "city": "Delhi",
        "stateCode": "DL",
        "zip": "110032",
        "countryCode": "IN",
        "phone": "95999999",
        "phoneCode": "+91",
        "verify": true,
        "category": "Commercial",
        "email": "abc@kloudship.com",
        "latitude": 0.0,
        "longitude": 0.0
    }
}

PUT: Update Location

Updates the details of the location based on the provided location ID.


Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Location/{id}
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Location/{id} 
Content-Typeapplication/json
{id}: Here you will provide the location 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:

FieldTypeRequiredDescription
namestringYesDisplay name of the location.
typestringYesType of location (e.g., "Warehouse", "Hub", "Store").
addressobjectYesAddress details object (see below).

Address Object (Request)

FieldTypeRequiredDescription
firstnamestringYesContact first name for the location.
lastnamestringNoContact last name.
companystringNoCompany or business name.
street1stringYesPrimary street address line.
street2stringNoSecondary street address line (optional).
street3stringNoTertiary street address line (optional).
citystringYesCity name.
stateCodestringYesState code (e.g., "DL", "UP").
countryCodestringNoCountry code (ISO format, e.g., "IN").
phonestringYesContact phone number.
zipstringYesPostal / PIN code.
emailstringYesContact email for the location.
isResidentialbooleanNoWhether the address is residential (true/false).
latitudenumberNoLatitude coordinate (decimal).
longitudenumberNoLongitude coordinate (decimal).
verifybooleanNoWhether to verify the address before saving.


Request example:

{
    "name": "abc",
    "type": "Warehouse",
    "address": {
        "firstname": "xyz",
        "lastname": " ",
        "company": "Impledge company",
        "street1": "Regus 5th floor",
        "street2": "",
        "street3": "",
        "city": "Delhi ",
        "stateCode": "DL",
        "countryCode": "IN",
        "phone": "959999999",
        "zip": "110032",
        "email": "viabc@kloudship.com",
        "isResidential": false,
        "latitude": 0.0,
        "longitude": 0.0,
        "verify":true
    }
}

Example cURL:

curl --location --request PUT 'https://api-ppd.kloudship.com:960/api/v1/Location/68efa9f1340a4de8435bb331' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data-raw '{
    "name": "abc",
    "type": "Warehouse",
     "address": {
        "firstname": "xyz",
        "lastname": " ",
        "company": "Impledge company",
        "street1": "Regus 5th floor",
        "street2": "",
        "street3": "",
        "city": "Delhi ",
        "stateCode": "DL",
        "countryCode": "IN",
        "phone": "959999999",
        "zip": "110032",
        "email": "viabc@kloudship.com",
        "isResidential": false,
        "latitude": 0.0,
        "longitude": 0.0,
        "verify":true
    }
}'

Response fields:

Root Level

FieldTypeDescription
idstringUnique identifier for the created location.
namestringName of the created location.
createdDatestring (ISO 8601)Timestamp when the location was created.
isDefaultbooleanWhether this is the default location.
defaultUsersCountintegerCount of default users assigned to this location.
typestringType of location (e.g., "Warehouse", "Hub", "Store").
addressobjectAddress object with verification and contact details (see below).


Address Object (Response)

FieldTypeDescription
verificationStatusstringAddress verification result (e.g., "Success", "Failed", "Pending").
firstNamestringContact first name for the location.
lastNamestringContact last name.
companystringCompany or business name.
street1stringPrimary street address line.
street2stringSecondary street address line (if any).
street3stringTertiary street address line (if any).
citystringCity name.
stateCodestringState code (e.g., "DL").
zipstringPostal / PIN code.
countryCodestringCountry code (ISO, e.g., "IN").
phonestringContact phone number.
phoneCodestringCountry calling code (e.g., "+91").
verifybooleanWhether the address was verified.
categorystringAddress category (e.g., "Commercial", "Residential").
emailstringContact email.
latitudenumberLatitude coordinate.
longitudenumberLongitude coordinate.

 

Response example:

{
    "id": "68efa2bf340a4de8435bb323",
    "name": "abc",
    "createdDate": "2025-10-15T13:33:52.9642487Z",
    "isDefault": false,
    "defaultUsersCount": 0,
    "type": "Warehouse",
    "address": {
        "verificationStatus": "Success",
        "firstName": "abc",
        "lastName": "",
        "company": "Impledge company",
        "street1": "Regus 5th floor",
        "street2": "",
        "street3": "",
        "city": "Delhi",
        "stateCode": "DL",
        "zip": "110032",
        "countryCode": "IN",
        "phone": "95999999",
        "phoneCode": "+91",
        "verify": true,
        "category": "Commercial",
        "email": "abc@kloudship.com",
        "latitude": 0.0,
        "longitude": 0.0
    }
}

DEL: Delete location

The Delete Location API allows you to delete a specific address location using its unique `location_id`.


Endpoint details:

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/Location/{id}
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/Location/{id} 
Content-Typeapplication/json
{id}: Here you will provide the location id

Example cURL:

curl --location --request DELETE 'https://api-ppd.kloudship.com:960/api/v1/Location/676aad43e60bb079a418f79a' \
--header 'Authorization: ••••••' \
--data ''

Response:

 The response from the Delete Location API includes the status code 200, which signify 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?

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