The Furniture Bros API docs
  • Start here
    • Introduction
    • Get Started
    • Authentication
    • Making a request
    • Examples
    • Functionalities
    • Release Notes
      • 5 Dec 2024
      • 4 Dec 2023
      • 30 Nov 2023
      • 24 Nov 2023
      • 20 Nov 2023
      • 14 Nov 2023
      • 26 Oct 2023
      • 23 Oct 2023
      • 05 Oct 2023
    • Glossary
      • API terms
      • Functionality terms
  • API Endpoints
    • Account
    • Product
    • Cart
    • Address
    • Orders
    • Statistics
Powered by GitBook
On this page
  1. API Endpoints

Address

This page contains the documentation for the address endpoints.

PreviousCartNextOrders

Last updated 6 months ago

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
400
See message description.
500
see message description.
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"
400
See message description.
500
see message description.
get
GET /address/api_key HTTP/1.1
Host: thefurniturebros.com
Authorization: YOUR_API_KEY
Accept: */*
AIzaSyC6ASDCKAAS3G1E2EjRKlzk8TvHziasds"
  • GETGet Addresses
  • GETGet Google Places Key
  • POSTAdd an Address
  • DELETEDelete an Address

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
400
See message description.
500
see message description.
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
400
See message description.
500
see message description.
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
}