# Catalog and Ordering

### Querying the Firstbase Catalog

You can query the Firstbase Catalog to retrieve detailed information on all available SKUs by submitting a GET request to the `/api/catalog/skus` endpoint. The catalog provides three key types of data:

* **SKU Information.** Includes SKU ID, title, part number, and any available metadata.&#x20;
* **SKU Pricing Information.** Displays the pricing for each SKU, segmented by region.&#x20;
* **SKU Availability Information.** Provides stock availability, broken down by region and the condition (new or used) of the devices.

For a more specific query, you can also retrieve details for a particular SKU by using the `/api/catalog/skus/{sku_id}` endpoint.

Once you’ve obtained the SKU details, you can use this information to place orders through the API by providing the `sku_id` in the order request.

### Placing Orders

To place an order, submit a POST request to the `/api/orders` endpoint. The request body should include the following details:

* **Shipping Address**. The full address for where the order will be delivered.&#x20;
* **Person ID**. The unique identifier for the person placing the order.&#x20;
* **SKU ID**. The identifier for the item you want to order, retrieved from the catalog.

Additionally, you can specify if you want expedited shipping and your preferred condition (e.g., new or used) for the item. Here’s an example request body:

```json
{
  "shippingAddress": {
    "addressLine1": "string",
    "addressLine2": "string",
    "administrativeArea": "string",
    "countryCode": "string",
    "dependentLocality": "string",
    "locality": "string",
    "postalCode": "string",
    "sortingCode": "string",
    "phoneNumber": "string"
  },
  "personId": "string",
  "skus": [
    {
      "id": "string",
      "expeditedShippingOption": "EXPEDITED_STANDARD",
      "preferredCondition": "NEW"
    }
  ]
}
```

### Querying Order Details

To retrieve details about all of your orders, submit a GET request to the /API/orders endpoint. The response will provide information about each order, including:

* **Order ID**. The unique identifier for the entire order.&#x20;
* **Order Status**. The current status of the order (e.g., Partially shipped).&#x20;
* **Order Item ID**. The identifier for each item in the order.&#x20;
* **Order Item Status.** The current status of each item (e.g., Delivered, Shipped).&#x20;
* **Order Item Tracking URL.** A URL to track the shipment of each item.

If you need specific details about a particular order, use the `/api/orders/{orderID}` endpoint. This will provide detailed information about that order, including order status, item statuses, and tracking URLs for each item.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.firstbase.com/introduction/use-cases/catalog-and-ordering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
