# Add Error Report

## Add Error Report

<mark style="color:green;">`POST`</mark> `[PlatformAddress]/api/1.0/account?action=addErrorReport`

#### Path Parameters

| Name      | Type    | Description                                                                |
| --------- | ------- | -------------------------------------------------------------------------- |
| code      | string  | The distinguish code of error report                                       |
| message   | string  | Th message description of an error report                                  |
| level     | integer | The severity level of an error report                                      |
| refType   | integer | The type of the error report e.g. booking, accommodation group..           |
| refId1    | integer | The reference identifier 1 of the error report                             |
| refId2    | integer | The reference identifier 2 of the error report                             |
| refId3    | integer | The reference identifier 3 of the error report                             |
| refId4    | integer | The reference identifier 4 of the error report                             |
| refId5    | integer |                                                                            |
| debugData | string  | The information for debugging this error. Maximum 1000 characters allowed. |

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

```
{
  "success": true,
  "id": 755
}
```

{% endtab %}
{% endtabs %}

## Example Request

### Add Error Report *(Related to Venue Booking)*

```javascript
{
  "refType": 2,
  "code": "254856",
  "message": "This is an error reported while booking",
  "level": 3,
  "refId1": 107,
  "refId2": 2256,
}
```

## Returns

| Property | Description                                                                                            |
| -------- | ------------------------------------------------------------------------------------------------------ |
| success  | Whether or not the error report was added to the account                                               |
| id       | The unique id of the error report. This will be the same id if similar error already exist in database |

## RefType

One of the following value:

| Type                | refType |
| ------------------- | ------- |
| Custom              | 1       |
| Venue Booking       | 2       |
| Accommodation Group | 3       |
| Room Reservation    | 4       |

Pass refIds as per below mapping. All below mentioned refIds are mandatory to pass in order to save an error report against specific model.

## RefType-RefId Mapping

#### Venue Booking

| RefId  | Related identifier              |
| ------ | ------------------------------- |
| refId1 | The identifier of venue         |
| refId2 | The identifier of venue booking |

#### Accommodation Group

| RefId  | Related identifier                            |
| ------ | --------------------------------------------- |
| refId1 | The identifier of venue                       |
| refId2 | The identifier of venue booking               |
| refId3 | The identifier of booking accommodation group |

#### Room Reservation

| RefId  | Related identifier                 |
| ------ | ---------------------------------- |
| refId1 | The identifier of venue            |
| refId2 | The identifier of venue booking    |
| refId3 | The identifier of room reservation |

## Throws

| Code                 | Description                           |
| -------------------- | ------------------------------------- |
| Specific Code: 24262 | The error report details are invalid. |


---

# 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://developer.ivvy.com/account/add-error-report.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.
