Skip to content

Reference

API v1

Pataa Address API is a fast and simple interface that allows you to quickly fetch the address and customer details against a Pataa code

Overview

Get Started

  1. Get your API Key
  2. Checkout the wrapper for your preferred language here.
  3. Or start using the address API directly

Getting the user details using Pataa Code

Resource URL

Method URL
POST https://apiv1.pataa.com/get-pataa

Parameters

Key Required (yes/no) Description
api_key yes API key a token genrated by the user on the dashboard and used to authenticate the api call
pc yes pc stands for Pataa Code. It is alphanumeric value fed by the user to get details of associated address

Example Body : raw (json)

    {
        "api_key":"777XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "pc":"KUMAR100"
    }
Tips
  • Always use HTTPS
  • Remember to send the required parameters as json in the body
  • Always include a valid API key in the parameters

Response on success

    {
    "status": 200,
    "msg": "Successfully fetched the details for Pataa code",
    "result": {
        "user": {
            "first_name": "pataa",
            "last_name": "Navigations",
            "country_code": "+91",
            "mobile": "9993942233"
        },
        "pataa": {
            "pataa_code": "KUMAR100",
            "address1": "100, JV Bhole Road",
            "address2": "Opp. Agar Bazaar",
            "address3": "Near Siddhivinayak Temple",
            "address4": "Dadar West",
            "zipcode": "400002",
            "city_name": "Mumbai",
            "state_code": "MH",
            "state_name": "Maharashtra",
            "country_code": "IN",
            "country_name": "India",
            "qr_code": "https://app.pataa.com/g8VH"
        },
        "pc_img": [],
        "landmarks": []
    }
}

Error Handling

You will get a 200 HTTP status code, if no error is found. If there is an error, such as an incorrect Pataa Code, you will get a http status code of 204 in the body of the response. The body will also contain an error block with a code and a message code that can be used programmatically, which will help you to respond appropriately. This Message is intended to help you fix, whatever went wrong.

Response on failure
    {
    "status": 204,
    "msg": "Pataa Code not found"
    }
Response on API key missmatch
    {
    "status": 401,
    "msg": "Invalid API key, You are not authorized. Please provide a valid key."
    }

Below is the list of all HTTP error codes. New error codes may be added in future.

Code Description
200 Request Successful.
204 There is no content to send for this request, but the headers may be useful.
401 MissingKey or InvalidKey. Check you API key is supplied as key=[API-KEY].
50x Internal Server Error.