# GET - Retrieve List of Deals

## Retrieve a list of Deals

**Method:** <mark style="color:blue;">`GET`</mark>

**Endpoint:** `/DEAL`?page=1\&pageSize=100

**Headers:**

| Name          | Value                |
| ------------- | -------------------- |
| Content-Type  | `application/json`   |
| Authorization | `Bearer <API TOKEN>` |

**Example Request (JavaScript - Fetch):**

```javascript
const myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <API TOKEN>");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://bizmate.fasttask.net/api/v1/deal?page=1&pageSize=100", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

```

**Example Request (cURL):**

```http
curl --location 'https://bizmate.fasttask.net/api/v1/deal?page=1&pageSize=100' \
--header 'Authorization: Bearer <API TOKEN>'
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
[
{
    "id": "id",
    "createdAt": "2024-08-08T00:20:15.867Z",
    "createdBy": "",
    "updatedAt": "2024-08-08T00:20:16.551Z",
    "updatedBy": "",
    "fields": {
        "status": "Application Received",
        "watchers": [
            {
                "type": "user",
                "id": ""
            }
        ],
        "statusSinceDate": "2024-08-08T00:20:16.000Z",
        "subStatusSinceDate": "2024-08-08T00:20:16.000Z",
        "lastActivityDate": null,
        "subStatus": "Banks In",
        "name": "Some Text",
        "customer": {
            "id": "",
            "name": "Some Text"
        },
        "callClientOrBroker": "Call Client",
        "broker": {
            "id": "",
            "name": "Test Bizcap"
        },
        "brokerRep": {
            "id": "",
            "firstName": "Test Bizcap",
            "lastName": "Partner Contact"
        },
        "loanType": null,
        "internalBdmUser": null,
        "omNumberOfPayments": null,
        "omPaybackAmount": null,
        "omTermDays": null,
        "omDeclineReasons": null,
        "omCollectionFrequency": null,
        "omPrincipalAmount": null,
        "omAdvanceID": null,
        "omDateFunded": null,
        "omAdvanceType": null,
        "amount": "123.00",
        "numberOfCallsMade": 0,
        "bankStatementsCreditsSenseLink": ",
        "bankStatementsUpdateLink": null,
        "sfid": null,
        "lastCallDate": null,
        "callOnBehalfOf": "Some Text",
        "partnerLeadReferenceId": "Some Text",
        "applicationLink": ""
    }
}, 
{
    "id": "id",
    "createdAt": "2024-08-08T00:20:15.867Z",
    "createdBy": "",
    "updatedAt": "2024-08-08T00:20:16.551Z",
    "updatedBy": "",
    "fields": {
        "status": "Application Received",
        "watchers": [
            {
                "type": "user",
                "id": ""
            }
        ],
        "statusSinceDate": "2024-08-08T00:20:16.000Z",
        "subStatusSinceDate": "2024-08-08T00:20:16.000Z",
        "lastActivityDate": null,
        "subStatus": "Banks In",
        "name": "Some Text",
        "customer": {
            "id": "",
            "name": "Some Text"
        },
        "callClientOrBroker": "Call Client",
        "broker": {
            "id": "",
            "name": "Test Bizcap"
        },
        "brokerRep": {
            "id": "",
            "firstName": "Test Bizcap",
            "lastName": "Partner Contact"
        },
        "loanType": null,
        "internalBdmUser": null,
        "omNumberOfPayments": null,
        "omPaybackAmount": null,
        "omTermDays": null,
        "omDeclineReasons": null,
        "omCollectionFrequency": null,
        "omPrincipalAmount": null,
        "omAdvanceID": null,
        "omDateFunded": null,
        "omAdvanceType": null,
        "amount": "123.00",
        "numberOfCallsMade": 0,
        "bankStatementsCreditsSenseLink": ",
        "bankStatementsUpdateLink": null,
        "sfid": null,
        "lastCallDate": null,
        "callOnBehalfOf": "Some Text",
        "partnerLeadReferenceId": "Some Text",
        "applicationLink": ""
    }
}
]
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% 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://docs.bizcap.com.au/bizmate-crm-partner-api/deals/get-retrieve-list-of-deals.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.
