- Fakturan.nu API 2 /
- Products /
- index
GET
/api/v2/products
List products
Params
-
product_code
Filter by product_code
-
name
Filter by product name
-
sort
Allowed sort fields: name, product_code, price. The direction is specified by prefixing the field with +/- (+ for ASC, - for DESC). Example: “sort=+field,-secondary_field”
Examples
GET /api/v2/products 200 { "data": [ { "id": 3, "product_code": "XYZ", "name": "My product", "unit": "kg", "price": "150.0", "price_inc_tax": "187.5", "tax": 25 } ], "paging": { "total_pages": 1, "current_page": 1, "next": null, "previous": null } }
GET /api/v2/products?per_page=15 200 { "data": [ { "id": 3, "product_code": "XYZ", "name": "My product", "unit": "kg", "price": "150.0", "price_inc_tax": "187.5", "tax": 25 }, { "id": 4, "product_code": "", "name": "Product 2", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 5, "product_code": "", "name": "Product 3", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 6, "product_code": "", "name": "Product 4", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 7, "product_code": "", "name": "Product 5", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 8, "product_code": "", "name": "Product 6", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 9, "product_code": "", "name": "Product 7", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 10, "product_code": "", "name": "Product 8", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 11, "product_code": "", "name": "Product 9", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 12, "product_code": "", "name": "Product 10", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 13, "product_code": "", "name": "Product 11", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 14, "product_code": "", "name": "Product 12", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 15, "product_code": "", "name": "Product 13", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 16, "product_code": "", "name": "Product 14", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 }, { "id": 17, "product_code": "", "name": "Product 15", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 } ], "paging": { "total_pages": 2, "current_page": 1, "next": "http://www.example.com/api/v2/products?page=2&per_page=15", "previous": null } }
GET /api/v2/products?page=2&per_page=10 200 { "data": [ { "id": 18, "product_code": "", "name": "Product 16", "unit": "", "price": "0.0", "price_inc_tax": "0.0", "tax": 25 } ], "paging": { "total_pages": 2, "current_page": 2, "next": null, "previous": "http://www.example.com/api/v2/products?page=1&per_page=15" } }