1.0.0 • Published 3 years ago

fastfurnitureapilayer v1.0.0

Weekly downloads
4
License
-
Repository
-
Last release
3 years ago

README

This fast furniture azure project contains api functions interacting with products data

Setup locally

clone

git clone git@bitbucket.org:engin_cetinkaya/cekaso-fast-furniture-api-layer.git

install dependencies

npm install

run

npm run start

List of api

Get Product List

Returns a list of products filtered by merchant id and supplier id

Request Information

CategoryValue
Http requestGET
URL/api/product/list

Headers

None are specified.

Parameters

ParameterDefinition
supplierIdthe supplier id
merchantIdthe merchant id (optional)
allProductsdefault: false, if true, returns all products of the specified supplier, else only merchant specific products (if merchent id is set)

###Output Schema of request |Field|Definition| |---------|------| |_id| unique system id| |productId|product id| |productNameBySupplier|product name by supplier| |productNameByMerchant|product name by merchant (if merchant id is set)| |productNameByVme|product name by vme|

Response

{
  "request": {
    "supplierId": "1484",
    "merchantId": "1234",
    "allProducts": false
  },
  "products": [
    {
      "_id": "5f62df0d8e3238b91c0d767b",
      "productId": "1528",
      "productNameBySupplier": "Marseille1",
      "productNameByMerchant": "Marseille1",
      "productNameByVme": "Marseille1"
    },
    {
      "_id": "5f62df0e8e3238b91c0d767c",
      "productId": "1571",
      "productNameBySupplier": "Lana",
      "productNameByMerchant": "Lana",
      "productNameByVme": "Lana"
    }
  ]
}

Get Product Data

Returns descriptive information for a specific product. The request should contain the system id or the product id and the supplier id.

Response

{
  "_id": "5f62df0d8e3238b91c0d767b",
  "productId": "1528",
  "supplierId": "polipol",
  "merchantId": "1234",
  "description": "Betonoptiken bei Möbeln werden immer beliebter. Der Kleiderschrank Leek greift sie am Korpus auf und kombiniert sie mit einer weißen Front. Leek verfügt über ein praktisch unterteiltes Schrankinneres hinter den vier großen Drehtüren. Sieben große Fächer und eine Kleiderstange bieten viel Platz für Kleidung – zusammengelegt und auf einen Bügel aufgehängt. Darüber hinaus stehen Ihnen sechs große Schubladen zur Verfügung.",
  "url": "https://cekaso-shareme.s3.eu-central-1.amazonaws.com/fastfurniture/1.jpg",
  "productNameBySupplier": "Marseille1",
  "productNameByMerchant": "Marseille1",
  "productNameByVme": "Marseille1",
  "created": "2020-09-22 10:15:24",
  "updated": "2020-09-25 14:11:32"
}

Request Information

CategoryValue
Http requestGET
URL/api/product

Headers

None are specified.

Parameters

ParameterDefinition
_idunique system id (required if productId + supplierId is missing)
productIdget product id (required if _id is missing)
supplierIdsupplier id (required if _id is missing)
merchantIdmerchant id (optional)

Output Schema of request

FieldDefinition
_idunique generated id
productIdproduct id
descriptionproduct description
urlproduct picture url
productNameBySupplierproduct name by supplier
productNameByMerchantproduct name by merchant (if merchant id is set)
productNameByVmeproduct name by vme

Get Product Delivery Week

Returns delivery week of a specific product

Response

{
  "_id": "5f62df0d8e3238b91c0d767b",
  "deliveryWeek": "34",
  "shippingTime": "4"
}

Request Information

CategoryValue
Http requestGET
URL/api/product/delivery-week

Headers

None are specified.

Parameters

ParameterDefinition
_idunique system id (required if productId + supplierId is missing)
productIdget product id (required if _id is missing)
supplierIdsupplier id (required if _id is missing)

Output Schema of request

FieldDefinition
_idunique system id
deliveryWeekdelivery week of the product
shippingTimeadditional weeks until the product arrives at the customer

Get Product Warehouse Stock

Returns warehouse stock of a specific product

Response (in stock)

{
  "_id": "5f62df0d8e3238b91c0d767b",
  "amount": "42"
}

Response (available from)

{
  "_id": "5f62df0d8e3238b91c0d767b",
  "amount": "0",
  "availableFromDate": "2021-06-11"
}

Request Information

CategoryValue
Http requestGET
URL/api/product/warehouse-stock

Headers

None are specified.

Parameters

ParameterDefinition
_idunique system id (required if productId + supplierId is missing)
productIdget product id (required if _id is missing)
supplierIdsupplier id (required if _id is missing)

Output Schema of request

FieldDefinition
_idunique system id
amountamount of products in stock (0 if stock is empty)
availableFromDatedate (YYYY-MM-DD) when the product is available again if stock is empty (amount == 0)