Get user shipping address interface

Retrieve the shipping address information of the currently logged-in user, this interface will return the most recently used shipping address.

Points to note

  • The interface uses the GET method and does not require the submission of request body data
  • Access requires user login
  • Return the information of the most recently used shipping address
  • Return empty data if the user does not have a shipping address

Request address

{ๅŸŸๅๅœฐๅ€}/api/order/address

Description:{ๅŸŸๅๅœฐๅ€}Replace it with your domain name, such ashttps://en.anqicms.com/api/order/address

Request Syntax

GET {ๅŸŸๅๅœฐๅ€}/api/order/address

Request Headers

This interface also involves common request headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Request parameters

None

Response header

This interface only involves public response headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Return parameters

Field name Type Description
code int Error code
msg string Error description
data object Shipping address data

Data result parameter

Field name Type Description
id int Address ID
name string Recipient's name
last name string recipient's surname
email string Email address
company string company name
phone string Contact phone number
Province string Province
City string City
Country string district
address information string detailed address
postal code string postal code
created_time int Timestamp of creation
updated_time int update timestamp
user_id int User ID
status int Status (1: enabled, 0: disabled)

Usage Example

Request example

GET /api/order/address HTTP/1.1
Host: www.anqicms.com
Content-Type: application/json

Response Example

{
  "code": 0,
  "msg": "",
  "data": {
    "id": 1,
    "created_time": 1669212548,
    "updated_time": 1669212548,
    "user_id": 1000,
    "name": "็Ž‹ๅ…ˆ็”Ÿ",
    "last_name": "็Ž‹",
    "email": "[email protected]",
    "company": "็คบไพ‹ๅ…ฌๅธ",
    "phone": "13888888888",
    "province": "ๆฒณๅ—็œ",
    "city": "้ƒ‘ๅทžๅธ‚",
    "country": "ไธญๅŽŸๅŒบ",
    "address_info": "ไธญๅŽŸ่ฅฟ่ทฏ233ๅท",
    "postcode": "450000",
    "status": 1
  }
}

error code

Error code Description
0 OK
-1 Error, the reason is indicated in msg
1001 Not logged in
1002 Not authorized
200 API request OK