Address

This page contains the documentation for the address endpoints.

The address endpoints allow you to add, modify, select and delete an address. You can view the list of addresses that you have.

Get Addresses

get

This endpoint allows you to get the list of addresses.

Authorizations
Responses
200

Successful response. Returns the user's address information.

application/json
get
GET /address/list HTTP/1.1
Host: thefurniturebros.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "_id": "6556dd7a50e4db57682be25c",
  "user": {
    "_id": "6555a0f89feeac7dccd9b1dd",
    "name": "first account"
  },
  "addresses": [
    {
      "address": "383 Kent St, Sydney NSW 2000, Australia",
      "main": false,
      "_id": "656bf54c99723847983a9714"
    },
    {
      "address": "80 Collins St, Melbourne VIC 3000, Australia",
      "main": true,
      "_id": "656d3c9b6f828da5305bad97"
    }
  ],
  "__v": 53
}

Get Google Places Key

get

This endpoint allows you to get the API key for Google Places API. Learn more here.

Authorizations
Responses
200

Successful response. The order has been created successfully.

text/plain
Responsestring

The API key for Google Places.

Example: AIzaSyC6ASDCKAAS3G1E2EjRKlzk8TvHziasds"
get
GET /address/api_key HTTP/1.1
Host: thefurniturebros.com
Authorization: YOUR_API_KEY
Accept: */*
AIzaSyC6ASDCKAAS3G1E2EjRKlzk8TvHziasds"

Add an Address

post

This endpoint allows you to add an address for the user.

Authorizations
Body
addressstringRequired

The address of the user to add. Newly added address will be selected as the main address.

Responses
200

Successful response. The order has been created successfully.

text/plain
ResponsestringExample: success
post
POST /address/add HTTP/1.1
Host: thefurniturebros.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 53

{
  "address": "383 Kent St, Sydney NSW 2000, Australia"
}
success

Delete an Address

delete

This endpoint allows you to delete an address.

Authorizations
Body
addressIdstringRequired

The address ID of the user to be deleted. Use the GET get addresses endpoint to look at the list of addresses, and it's ID.

Responses
200

Successful response. Returns the user's address information.

application/json
delete
DELETE /address/delete HTTP/1.1
Host: thefurniturebros.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "addressId": "674b3347dc3d9360b4c32da3"
}
{
  "_id": "6556dd7a50e4db57682be25c",
  "user": "6555a0f89feeac7dccd9b1dd",
  "addresses": [
    {
      "address": "383 Kent St, Sydney NSW 2000, Australia",
      "main": false,
      "_id": "656bf54c99723847983a9714"
    },
    {
      "address": "80 Collins St, Melbourne VIC 3000, Australia",
      "main": true,
      "_id": "656d3c9b6f828da5305bad97"
    }
  ],
  "__v": 53
}

Last updated