Read products
GET
/products
Read a list of products, including their details, with pagination, or a subset of products based on query parameters. Products may have different attributes such as name, description, price, and stock information. The endpoint supports various search criteria for filtering products based on specific attributes.
Query parameters
-
page integer(int)
Specify the page number to fetch, defaults to 1.
-
limit integer(int)
Specify the number of items to fetch per page, defaults to 25.
-
productSearch string
Perform a search in productNumber, name, and supplier's productNumber and name. Wildcards are allowed using '%'. '%' at the end returns 'starts with'. '%' at the beginning returns 'ends with'. '%' at both ends returns 'contains'.
-
productNumber string
Searches for product number.
GET /products
curl \
-X GET https://rest.api.24sevenoffice.com/v1/products \
-H "Authorization: string"
Response examples (200)
# Headers
link: string
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string
# Payload
[
{
"id": 123,
"name": "White shoe laces",
"number": "SH-1234567",
"type": "default",
"status": "active",
"description": "1 meter long shoe laces - white",
"costPrice": 50,
"salesPrice": 400,
"indirectCost": 12.77,
"stock": {
"isManaged": true,
"quantity": 146,
"location": "A-313"
},
"ean": "0123456789000",
"eanAlternative": "0123456789012345678901234",
"units": {
"id": 2,
"name": "Metre",
"symbol": "m"
},
"category": {
"id": 12,
"name": "Shoe accessories"
},
"supplier": {
"id": 67890,
"name": "XYZ Inc."
},
"createdAt": "2022-01-01 18:00:00.000Z",
"modifiedAt": "2023-12-31 18:00:00.000Z"
},
{
"id": 456,
"name": "Black leather belt",
"number": "BL-9876543",
"type": "default",
"status": "active",
"description": "Genuine leather belt for men",
"costPrice": 30,
"salesPrice": 150,
"indirectCost": 8.5,
"stock": {
"isManaged": true,
"quantity": 82,
"location": "B-105"
},
"ean": "0987654321000",
"units": {
"id": 13,
"name": "Piece",
"symbol": "pcs"
},
"category": {
"id": 15,
"name": "Fashion accessories"
},
"supplier": {
"id": 54321,
"name": "ABC Supplies"
},
"createdAt": "2022-02-15 12:00:00.000Z",
"modifiedAt": "2023-11-30 15:30:00.000Z"
},
{
"id": 789,
"name": "Blue cotton t-shirt",
"number": "TC-5678901",
"type": "default",
"status": "active",
"description": "Comfortable round-neck t-shirt for casual wear",
"costPrice": 15,
"salesPrice": 35,
"indirectCost": 5.25,
"stock": {
"isManaged": true,
"quantity": 210,
"location": "C-212"
},
"ean": "5678901234000",
"units": {
"id": 13,
"name": "Piece",
"symbol": "pcs"
},
"category": {
"id": 18,
"name": "Apparel"
},
"supplier": {
"id": 12345,
"name": "Fashion Hub"
},
"createdAt": "2022-03-20 09:30:00.000Z",
"modifiedAt": "2023-10-25 10:45:00.000Z"
}
]