# Methods

## Get User

<mark style="color:blue;">`GET`</mark> `https://fixer-uppers-api.azurewebsites.net/user/:id`

This endpoint allows you to retrieve user information

#### Path Parameters

| Name | Type   | Description    |
| ---- | ------ | -------------- |
| id   | string | ID of the user |

{% tabs %}
{% tab title="200 User successfully retrieved" %}

```
User object
```

{% endtab %}

{% tab title="404 Could not find a user matching this ID" %}

```
{
    "message": "User not found"
}
```

{% endtab %}
{% endtabs %}

## Get Badge

<mark style="color:blue;">`GET`</mark> `https://fixer-uppers-api.azurewebsites.net/badge/:id`

This endpoint allows you to retrieve badge details

#### Path Parameters

| Name | Type   | Description     |
| ---- | ------ | --------------- |
| id   | string | ID of the badge |

{% tabs %}
{% tab title="200 Badge successfully retrieved" %}

```
Badge Object
```

{% endtab %}

{% tab title="404 Could not find a badge matching this ID" %}

```
{
    "message": "Badge not found"
}
```

{% endtab %}
{% endtabs %}

## Create Listing

<mark style="color:green;">`POST`</mark> `https://fixer-uppers-api.azurewebsites.net/create-listing`

This endpoint allows a user to create a listings

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| authorisation | string | Author's user ID |

#### Request Body

| Name          | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| title         | string | Listing title                                  |
| description   | string | Listing description                            |
| listing\_type | string | The type of listing, as defined by ListingType |

{% tabs %}
{% tab title="200 Listing successfully created. This response contains the new listing ID in the body" %}

```
{
    "message": "Listing successfully created",
    "id": listing ID
}
```

{% endtab %}
{% endtabs %}

## Search Resources

<mark style="color:blue;">`GET`</mark> `https://fixer-uppers-api.azurewebsites.net/search`

This endpoint allows you to retrieve listings in your local area

#### Path Parameters

| Name  | Type   | Description       |
| ----- | ------ | ----------------- |
| query | string | The search string |

{% tabs %}
{% tab title="200 Successfully retrieved search results" %}

```
Array of Resource objects
```

{% endtab %}
{% endtabs %}

## Get Listings

<mark style="color:blue;">`GET`</mark> `https://fixer-uppers-api.azurewebsites.net/listings`

This endpoint allows you to retrieve all open listings

{% tabs %}
{% tab title="200 Successfully retrieved listings
Note: If no listings are found, this will return an empty array" %}

```
Array of listing objects
```

{% endtab %}
{% endtabs %}

## Get Listing

<mark style="color:blue;">`GET`</mark> `https://fixer-uppers-api.azurewebsites.net/listing/:id`

This endpoint allows you to retrieve details for a single listing

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
|      | string |             |

{% tabs %}
{% tab title="200 Successfully retrieved listing" %}

```
Listing object
```

{% endtab %}

{% tab title="404 Listing not found" %}

```
{
    "message": "Listing not found"
}
```

{% endtab %}
{% endtabs %}


---

# 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://issy.gitbook.io/fixer-uppers/master.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.
