Fetch postalcodes

GET /postalcodes

Use this endpoint to retrieve a detailed list of postalcodes in your organization. This version is more concise, clear, and improves overall readability.

Header

                    
                        
                        
                        Content-Type
                        Example: application/json
                        Accept
                        Example: application/json
                    
                

Response Parameters

Parameter Datatype Description
data object This object contains the entire resource.
id Integer The unique postalcode identifier.
code String The postalcode.

Sample Request

                    
                        curl --location 'https://webservices.sourcehub.in/api/postalcodes'
                    
                

Sample Success Response

                    
                        {
                            "data": [
                                {
                                    "id": 30,
                                    "code": "560063"
                                },
                                {
                                    "id": 31,
                                    "code": "560030"
                                },
                                {
                                    "id": 32,
                                    "code": "560034"
                                },
                                {
                                    "id": 33,
                                    "code": "560007"
                                },
                                {
                                    "id": 34,
                                    "code": "560092"
                                }
                            ]
                        }
                    
                

Errors

The API key/secret provided is invalid. Error Status: 401

The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons are:

  • Different keys for test mode and live modes.
  • Expired API key.

Solution :
The API keys must be active and entered correctly with no whitespace before or after the keys.

CONTENTS