Flexigift Service API

Get Products

The Get Products service returns an array of the products in the system along with their details.

URL

{base_url}/products

HTTP method

GET

Request headers

None

Request parameters

None

Request data

None

Response data

Name Type Mandatory? Constraints Notes
id int yes - Unique internal ID generated by the system.
product_id string true - Unique ID provided by the manufacturer.
name string true - -
price float true - -
eligible_issuer string true - The issuer whose gift cards can be used to pay for this product.

HTTP response codes

Code Description Notes
200 OK -

Example requests and responses

Get all Products

Request:

curl http://localhost:3000/products

Response:

[
  {
    "id": 1,
    "product_id": "hanes-underwear-001",
    "name": "Hanes Men's Underwear Pack",
    "price": 15.99,
    "eligible_issuer": "Hanes"
  },
  {
    "id": 2,
    "product_id": "nike-shoes-002",
    "name": "Nike Running Shoes",
    "price": 89.99,
    "eligible_issuer": "Nike"
  },
  {
    "id": 3,
    "product_id": "starbucks-coffee-003",
    "name": "Starbucks Ground Coffee",
    "price": 12.99,
    "eligible_issuer": "Starbucks"
  },
  {
    "id": 4,
    "product_id": "gap-jacket-004",
    "name": "Gap Winter Jacket",
    "price": 65,
    "eligible_issuer": "Gap"
  }
]