# Deal

A deal represents an opportunity to increase revenue

| Name                   | Type                                                                | Description                                                 |
| ---------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------- |
| account                | [Account](/developer/api-reference/types/account.md)                | Account the deal belongs to                                 |
| accountId              | ID                                                                  | Account that the deal belongs to                            |
| amount                 | Float                                                               | Total value of the deal                                     |
| closeDate              | ISO8601Date                                                         | Datetime the deal closed                                    |
| code                   | String                                                              | Unique code                                                 |
| contact                | [Contact](/developer/api-reference/types/contact.md)                | Primary contact for the deal                                |
| contactId              | ID                                                                  | Primary contact for the deal                                |
| createdAt              | ISO8601DateTime                                                     | Datetime the deal was created                               |
| currency               | [Currency](/developer/api-reference/types/currency.md)              | Primary currency for billing                                |
| currencyId             | ID                                                                  | Primary currency for billing                                |
| customFieldDefinitions | List ([CustomField](/developer/api-reference/types/customfield.md)) | Custom field definitions for this object type               |
| customFieldsData       | JSON                                                                | All custom field values for this object as a JSON object    |
| dealStage              | [Deal](/developer/api-reference/types/deal.md)                      | Current stage of the deal                                   |
| dealStageId            | ID                                                                  | Current stage of the deal                                   |
| description            | String                                                              | Description of the deal                                     |
| entity                 | [Entity](/developer/api-reference/types/entity.md)                  | The entity this deal belongs to                             |
| entityId               | ID                                                                  | The ID of the entity this deal belongs to                   |
| hasCustomFields        | Boolean                                                             | Whether this object type has any custom fields defined      |
| id                     | ID                                                                  | Unique identifier for the deal                              |
| kind                   | [DealKind](/developer/api-reference/enums.md#dealkind)              | The kind of deal                                            |
| leadSourceId           | ID                                                                  | Lead source for the deal                                    |
| name                   | String                                                              | Name of the deal                                            |
| notForRevenue          | Boolean                                                             | Will exclude this deal from analytics                       |
| origin                 | [DealOrigin](/developer/api-reference/enums.md#dealorigin)          | Describes the origin of the deal: sales, portal, signup etc |
| owner                  | [User](/developer/api-reference/types/user.md)                      | Owner of the deal                                           |
| ownerUserId            | ID                                                                  | Owner of the deal                                           |
| probability            | Int                                                                 | Probability that the deal will close                        |
| quoteDefaults          | [Quote](/developer/api-reference/types/quote.md)                    | Default values for a new quote based on this deal           |
| quotes                 | List ([Quote](/developer/api-reference/types/quote.md))             | Quotes on the deal                                          |
| stageDescription       | ID                                                                  | Description of the deal stage                               |
| updatedAt              | ISO8601DateTime                                                     | Datetime the deal was last updated                          |
| viaPortal              | Boolean                                                             | Whether the deal was created from Portal UI or not          |


---

# 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.bunny.com/developer/api-reference/types/deal.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.
