# Bosbec Orders API Base URL: https://example.in.bosbec.io Authentication: None required. Content-Type for POST requests: application/json --- ## 1. Get Products GET /products Retrieves a paginated list of products. Supports filtering by product ID. ### Query Parameters | Parameter | Type | Required | Description | |--------------|---------|----------|-------------| | page | integer | No | Page number to retrieve. Defaults to 1. | | page_size | integer | No | Number of products per page. Defaults to 10. | | product_id | string | No | Will search for a specific product (e.g. PROD5). | ### Example Request GET /products?page=1&page_size=5&product_id=PROD5 ### Notes Returns a list of product objects with details such as name, category, price, stock, SKU, brand, and weight. --- ## 2. Get Orders GET /orders Retrieves a paginated list of orders. Supports filtering by order ID or customer ID. ### Query Parameters | Parameter | Type | Required | Description | |--------------|---------|----------|-------------| | page | integer | No | Page number to retrieve. Defaults to 1. | | page_size | integer | No | Number of orders per page. Defaults to 10. | | order_id | string | No | Will get orders by specific id (e.g. ORD3). Cannot be used with customer_id. | | customer_id | string | No | Will get orders by specific customer id (e.g. CUST1). Cannot be used with order_id. | ### Example Request GET /orders?page=1&page_size=5&order_id=ORD3 ### Notes Returns a list of order objects. --- ## 3. Get Customers GET /customers Retrieves a paginated list of customers. Supports filtering by customer ID and by last order date range. ### Query Parameters | Parameter | Type | Required | Description | |--------------------|----------|----------|-------------| | page | integer | No | Page number to retrieve. Defaults to 1. | | page_size | integer | No | Number of customers per page. Defaults to 10. | | customer_id | string | No | Will search for a specific customer (e.g. CUST1). Cannot be used with last_order_after or last_order_before. | | last_order_after | datetime | No | Search for customers where their last order was after the specified dateTime (format YYYY-MM-DD HH:MM:SSZ). Cannot be used with customer_id. | | last_order_before | datetime | No | Search for customers where their last order was before the specified dateTime (e.g. 2026-07-01 00:00:00Z). Cannot be used with customer_id. | ### Example Request GET /customers?page=1&page_size=5&last_order_before=2026-07-01 00:00:00Z ### Notes Returns a list of customer objects. --- ## 4. Create Customer POST /customers Creates a new customer record. ### Request Body (JSON) | Field | Type | Required | Description | |------------|--------|----------|-------------| | firstname | string | No | Customer's first name. | | lastname | string | No | Customer's last name. | | email | string | No | Customer's email address. | | phone | string | No | Contact phone number (international format). | | address | string | No | Street address. | | city | string | No | City. | | zip | string | No | Postal / ZIP code. | | country | string | No | Country. | ### Example Body { "firstname": "Joseph", "lastname": "Brooks", "email": "joseph.brooks969@email.com", "phone": "+44778300969", "address": "58 Cedar Drive", "city": "Nottingham", "zip": "NG1 5EU", "country": "United Kingdom" } --- ## 5. Create Product POST /products Creates a new product record. ### Request Body (JSON) | Field | Type | Required | Description | |-----------|--------|----------|-------------| | name | string | No | Product name. | | category | string | No | Product category (e.g. Sports). | | price | string | No | Unit price. | | stock | string | No | Available stock quantity. | | sku | string | No | Stock keeping unit identifier. | | brand | string | No | Brand name. | | weight | string | No | Product weight (e.g. 0.8kg). | ### Example Body { "name": "Running Shoes Black", "category": "Sports", "price": "79.99", "stock": "120", "sku": "SHO-RUN-BLK", "brand": "SportsFit", "weight": "0.8kg" } --- ## 6. Create Order POST /orders Creates a new order record. ### Request Body (JSON) | Field | Type | Required | Description | |-------------------|----------|----------|-------------| | customer_id | string | Yes | ID of the customer placing the order (e.g. CUST3). | | product_id | string | Yes | ID of the product being ordered (e.g. PROD2). | | order_date | datetime | No | Order date (format YYYY-MM-DD HH:MM:SSZ). | | status | string | No | Order status (e.g. delivered). | | payment_method | string | No | Payment method (e.g. credit_card). | | shipping_address | string | No | Shipping address. | ### Example Body { "customer_id": "CUST3", "product_id": "PROD2", "order_date": "2026-08-13 00:00:00Z", "status": "delivered", "payment_method": "credit_card", "shipping_address": "45 Baker Street" }