User Address

Get user address details and update address

Get Address Details

GET ‎https://<domain>/<api prefix>/<version>/user/get/address/

This API endpoint will give you the user address details.

Headers

Name
Type
Description

apikey*

string

apikey

Authorization*

string

Bearer access-token

​HTTP/1.1 200 OK
Content-Type: application/json

Body:
{
    "status_code": 200,
    "errors": {},
    "data": {
        "UserAddress": {
            "address": "<address>",
            "city": "<city>",
            "postcode": "<postcode>",
            "phone": "<phone_number>",
            "state": {
                "id": <state_id>,
                "name": <state_name>
            },
            "country": {
                "id": <country_id>,
                "name": <country_name>,
                "sortname": <country_short_name_code>
            }
        }
    }
}

Sample code

Node

PHP

Update Address Details

POST ‎https://<domain>/<api prefix>/<version>/user/manage/address/

This API endpoint will update user address details.

Headers

Name
Type
Description

apikey*

string

apikey

Authorization*

string

Bearer access-token

Request Body

Name
Type
Description

country*

string

address*

string

address

city*

string

city

postcode*

string

postcode

phone*

string

phone number

state*

string

state id

States

Sample code

Node

PHP

Error Responses

Status Code

Error Type

Field

Description

400

Validation Error

phone

Phone number must be entered in the formate: '99999999'. Up to 15 digits allowed.

400

Validation Error

postcode

The postcode is not valid for <country_name>.

400

Validation Error

country, state

A valid integer is required.

400

Validation Error

address, phone, city, postcode

This field may not be blank.

Last updated

Was this helpful?