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
  • HTTP method
  • Path
  • Headers
  • Content type
  • Parameters
  • Pagination
  • Errors
  • API Status & limitations
  1. Start here

Making a request

This page shows you how to make a request.

This guide explains the basics of making REST API requests to The Furniture Bros API. It covers essential elements such as HTTP methods, paths, headers, authentication, parameters, pagination, and error handling.

HTTP method

The FurnitureBros API supports standard HTTP methods:

  • GET: Retrieve data.

  • POST: Submit data to create or modify resources.

  • PUT: Update existing resources.

  • DELETE: Remove resources.

Path

API endpoints follow this structure:

http://thefurniturebros.com/{endpoint}

For example:

  • GET /products: Get Product List

  • POST /products/upload: Upload a Product.

Headers

Requests should include the following headers:

  • Authentication Header: For endpoints requiring authentication.

    Authorization: <API_TOKEN>
  • Content-Type Header: Specify the format of the request payload.

    Content-Type: application/json

Content type

Two content types are supported based on the nature of the request:

  • application/json: Used for most requests with JSON-formatted data.

  • multipart/form-data: Required for file uploads, such as uploading a product image.

Specify the appropriate Content-Type in the header when making a request.

Parameters

Path parameters

Path parameters specify the resource or action in the URL. Examples:

  • GET /prdocuts/{filename}: Fetch the image of the product.

  • GET /stats/productTable/{page}: Fetch the information of the products.

Body parameters

Most endpoints require a JSON body in the request. Example:

POST /auth/register

{
    "name": "John Dane",
    "email":"jon_dane@gmail.com",
    "password":"123456"
}

Query parameters

The Furniture Bros API currently does not use query parameters.

Pagination

Some endpoints support pagination. Pagination details are specified in the path parameter, like:

  • GET /stats/productTable/{page}

  • GET /stats/order/all/{page}

  • GET /users/get_all/{page}

Example:

GET http://thefurniturebros.com/stats/productTable/2

Errors

The API uses standard HTTP response codes to indicate success or failure:

Response code
Description

200

OK. Request was successful.

400

Bad Request. The request is invalid or malformed.

401

Unauthorized. Missing or invalid API key.

403

Forbidden. You do not have permission to access the resource.

500

Internal Server Error. An unexpected server error occurred.

API Status & limitations

The API currently supports the following features and limitations:

  • CORS Support: The Furniture Bros API allows requests from any device or origin, enabling seamless cross-origin resource sharing (CORS). You can integrate the API into web, mobile, or server-side applications without restrictions.

  • No Rate Limits: There are no rate limits, so you can make as many requests as needed without encountering a 429 Too Many Requests error.

For further assistance, refer to the specific endpoint documentation or contact support.

PreviousAuthenticationNextExamples

Last updated 6 months ago

For endpoints that require authentication, include your API key in the Authorization header. Public endpoints do not require an API key. Learn more .

here