ShiftDocs

Addresses

Pickup addresses

Create a New Address

POST{host}/api/v1/open/address

Request Parameters

ParameterRequiredDescription
addressNameRequiredName for the address
addressLine1RequiredMax 60 chars – do not send garbage chars
addressLine2RequiredMax 60 chars – do not send garbage chars
zipCodeRequired6-digit Indian pincode only
addressTypeOptionalSENDER (pickup) or RECEIVER (customer)
contactNameRequiredMax 60 chars
emailRequiredProper email format is mandatory
phoneNumberRequiredUsed for SMS and WhatsApp communication
cityOptionalAuto-populated based on zipcode
stateOptionalAuto-populated based on zipcode

If city-state data is not available with Google Maps API for the given pincode, then the API call will fail.

Request Example

curl --location --request POST '<HOST>/api/v1/open/address' \
--header 'Authorization: Basic XXX==' \
--header 'sitecode: CARRIER' \
--header 'Content-Type: application/json' \
--data-raw '{
    "addressName": "John Doe'\''s Residence",
    "addressLine1": "123 Main St",
    "addressLine2": "Apt 4B",
    "zipCode": 500098,
    "addressType": "SENDER",
    "contactName": "John Doe",
    "email": "johndoe@example.com",
    "phoneNumber": "+918885000000"
}'

Response Example

{
  "data": 99880,
  "errorMessage": null
}

The data field contains the unique address ID which can be used to create orders.


Update an Existing Address

PUT{host}/api/v1/open/address

Request Example

curl --location --request PUT '<HOST>/api/v1/open/address' \
--header 'Authorization: Basic XXX' \
--header 'sitecode: CARRIER' \
--header 'Content-Type: application/json' \
--data-raw '{
    "addressId": 59673,
    "addressName": "John Donut'\''s Residence",
    "addressLine1": "123 Main St",
    "addressLine2": "Apt 4B",
    "city": "Hyderabad",
    "state": "TG",
    "zipCode": 500098,
    "addressType": "SENDER",
    "contactName": "John Donut",
    "email": "johndoe@example.com",
    "phoneNumber": "+918885000000"
}'

Response Example

{
  "data": true,
  "errorMessage": null
}

Get Address Details

GET{host}/api/v1/open/address/{addressId}

Request Example

curl --location --request GET '<HOST>/api/v1/open/address/59673' \
--header 'Authorization: Basic XXX' \
--header 'sitecode: CARRIER'

Response Example

{
  "data": {
    "addressId": 59673,
    "addressName": "John Donut's Residence",
    "addressLine1": "123 Main St",
    "addressLine2": "Apt 4B",
    "city": "Hyderabad",
    "state": "Telangana",
    "zipCode": 500098,
    "addressType": "SENDER",
    "contactId": 20915,
    "contactName": "John Donut",
    "email": "johndoe@example.com",
    "phoneNumber": "+91888000000"
  },
  "errorMessage": null
}

Delete an Address

DELETE{host}/api/v1/open/address/{addressId}

Request Example

curl --location --request DELETE '<HOST>/api/v1/open/address/59673' \
--header 'Authorization: Basic XXX' \
--header 'sitecode: CARRIER'

Response Example

{
  "data": true,
  "errorMessage": null
}

Stuck on an integration?

Your account manager can put you in touch with our tech team.

Talk to us