Create new user address (02/02)

It will create address for the logged in user.

GET https://castleindia.in/emart/public /api/create-address /api/create-address

Headers

NameTypeDescription

Accept

String

application/json

Authorization

String

Bearer {bearer_token without brackets}

Request Body

NameTypeDescription

email

String

email of the user.

state_id

Integer

state id from state list.

type

String

Eg: Work, Home, Office or it can be set as blank.

pincode

String

Pincode eg:110011

defaddress

Integer

Send 1 if want to set this address as default else send 0

city_id

String

city id from the city list.

country_id

Integer

Country id from country list.

Address

String

Address of the user

phone

String

Phone no of user

name

String

Name of user

{
    "msg": "Address created successfully",
    "address": {
        "name": "John Doe",
        "email": "sam.curran@test.com",
        "address": "Sector -62 , RCM Area",
        "type": "Home",
        "phone": "7894561230",
        "pin_code": "311001",
        "country": {
            "id": 101,
            "name": "India"
        },
        "state": {
            "id": 33,
            "name": "Rajasthan"
        },
        "city": {
            "id": 3327,
            "name": "Bhilwara"
        },
        "defaddress": "1"
    },
    "status": "success"
}

IF response fail

{
    "msg": "The name field is required.",
    "status": "fail"
}

Last updated