GET Products with Offers

To get all active products with offers & with pagination.

HTTP Request
GET
https://access.way2order.com/api/v1/getproductswithoffers
Request Header
Content-Type: application/json
Authorization: Bearer {access_token}
Query Parameters

The following query parameters are available

Parameter Description
sort Sort Order Refer 'Sort Fields' below
page Page Number Default 1
per_page Records per Page Default 25, Maximum 100

The query parameters are to be appended to the endpoint. To get 20 products with offers from page 2, sorted by 'name' in descending (DESC) order, the endpoint with the query parameters will be

https://access.way2order.com/api/v1/getproductswithoffers?sort=-name&page=2&per_page=20
Sort Fields

The following sort fields are available

ASC Order DESC Order
dt_create -dt_create
dt_update -dt_update
code -code Default
name -name
Request Response
{
    "data": [
        {
            "_id": "5b630118a8b17871571c43d1",
            "code": "ARCS 200",
            "name": "Bronze Globe Valve (Screwed)",
            "isenabled": true,
            "isvisible": true,
            "dt_create": "2018-08-02T13:03:20.998Z",
            "dt_update": "2018-12-15T12:51:50.141Z",
            "id": "5b630118a8b17871571c43d1"
        },
        {
            "_id": "5b630118a8b17871571c43d2",
            "code": "ARCS 201",
            "name": "Bronze Angle Globe Valve No.4 (Screwed)",
            "isenabled": true,
            "isvisible": true,
            "dt_create": "2018-08-02T13:03:20.999Z",
            "dt_update": "2018-12-14T08:36:11.713Z",
            "id": "5b630118a8b17871571c43d2"
        },
        ...
    ],
    "pagination": {
        "page": 1,
        "per_page": 25,
        "total_pages": 2,
        "total_elements": 37
    }
}
Attribute Details
Attribute Type Description
_id String ID of the Product
code String Product Code
name String Product Name
isenabled Boolean true if enabled, false if deleted
isvisible Boolean true if visible, false if hidden
dt_create Date Product Creation Date
dt_update Date Product Last Updation Date
id String ID of the Product

From the 'data' Array, the '_id' for a particular product can then be used to fetch complete details about the product using the endpoint /getproductdetails/{productID}
The 'pagination' Object in the response contains the following information

Property Details
page Current Page Number
per_page Records per Page
total_pages Total Number of Pages
total_elements Total Records