# API Error codes (extended)

Movider API of <https://rest.movider.co> might return the error codes:

### Group: System failure (E00)

| Group | Code                    | Description                                             |
| :---- | :---------------------- | :------------------------------------------------------ |
| E00   | E00\_SE                 | System Error                                            |
| E00   | E00\_RABBIT\_DISCON     | Queue service has disconnected, Please contact support. |
| E00   | E00\_UHE                | System Error                                            |
| E00   | E00\_UNAUTH             | Unauthorized                                            |
| E00   | E00\_TOO\_MANY\_REQUEST | Too many Requests                                       |

### Group: Contact API (E01)

| Group | Code                      | Description                          |
| :---- | :------------------------ | :----------------------------------- |
| E01   | E01\_CONTACT\_NOTFOUND    | The given contact id is not found.   |
| E01   | E01\_INVALID\_PHONE\_NO   | The type of phone number is invalid. |
| E01   | E01\_FORM                 | Contacts form is invalid.            |
| E01   | E01\_FORM\_CONTACTS       | Contact is invalid.                  |
| E01   | E01\_FORM\_PHONENUMBER    | PhoneNumber is invalid.              |
| E01   | E01\_FORM\_FIRSTNAME      | Firstname is invalid.                |
| E01   | E01\_FORM\_LASTNAME       | Lastname is invalid.                 |
| E01   | E01\_FORM\_CONTACTID      | ContactID is invalid.                |
| E01   | E01\_FORM\_USERAUDIENCEID | AudienceID is invalid.               |
| E01   | E01\_FORM\_EMAIL          | Email is invalid.                    |
| E01   | E01\_FORM\_PAGE           | Page is invalid.                     |
| E01   | E01\_FORM\_LIMIT          | Limit is invalid.                    |

### Group: Campaign API (E02)

| Group | Code                                | Description                                                       |
| :---- | :---------------------------------- | :---------------------------------------------------------------- |
| E02   | E02\_CAMPAIGN\_NAME\_DUPLICATED     | The campaign name exists.                                         |
| E02   | E02\_EXCEED\_PHONES                 | The total Phone number exceeds the limit.                         |
| E02   | E02\_RATES\_INVALID                 | System Error.                                                     |
| E02   | E02\_INVALID\_BALANCE               | Insufficient balance.                                             |
| E02   | E02\_COUNTRY\_TEMPORARY\_RESTRICTED | The country that was sent can't be sent right now.                |
| E02   | E02\_DELIVERY\_DATE\_INVALID        | The delivery date is invalid, Please use the date format ISO8601. |
| E02   | E02\_SCHEDULE\_DELETE\_NOT\_ALLOWED | The scheduled campaign can not be deleted or it does not exist.   |
| E02   | E02\_CAMPAIGN\_FAILED               | The campaign is can not be created.                               |
| E02   | E02\_SCHEDULE\_NOT\_FOUND           | The scheduled campaign was not found.                             |
| E02   | E02\_FORM                           | Campaign form is invalid.                                         |
| E02   | E02\_FORM\_CAMPAIGNNAME             | Campaign name is invalid.                                         |
| E02   | E02\_FORM\_MESSAGE                  | Message in invalid.                                               |
| E02   | E02\_FORM\_PHONENUMBERS             | Phone numbers is invalid.                                         |
| E02   | E02\_FORM\_PAGE                     | Page is invalid.                                                  |
| E02   | E02\_FORM\_LIMIT                    | Limit is invalid.                                                 |

### Group: Audience API (E03)

| Group | Code                                 | Description                             |
| :---- | :----------------------------------- | :-------------------------------------- |
| E03   | E03\_AUDIENCE\_ID\_NOTFOUND          | Audience ID not found.                  |
| E03   | E03\_AUDIENCE\_NAME\_DUPLICATED      | The audience name exists.               |
| E03   | E03\_AUDIENCE\_CONTACT\_ID\_NOTFOUND | The given contact id is not found.      |
| E03   | E03\_AUDIENCE\_CONTACT\_EXIST        | The contact exists within the audience. |
| E03   | E03\_FORM                            | Audience form is invalid.               |
| E03   | E03\_AUDIENCENAME                    | AudienceName is invalid.                |
| E03   | E03\_CONTACTID                       | ContactID is invalid.                   |
| E03   | E03\_PAGE                            | Page is invalid.                        |
| E03   | E03\_LIMIT                           | Limit is invalid.                       |

### Group: Viber Campaign API (E04)

| Group | Code                                          | Description                                                                                                                                       |
| :---- | :-------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ |
| E04   | E04\_MESSAGE\_EXCEED\_LIMIT                   | Message characters is exceed limit.                                                                                                               |
| E04   | E04\_TOTAL\_PHONE\_EXCEED\_LIMIT              | Total phone numbers is exceed limit.                                                                                                              |
| E04   | E04\_FORM                                     | Campaign form is invalid.                                                                                                                         |
| E04   | E04\_FORM\_CAMPAIGNNAME                       | Campaign name is invalid.                                                                                                                         |
| E04   | E04\_FORM\_MESSAGE                            | Message is invalid.                                                                                                                               |
| E04   | E04\_FORM\_CAMPAIGNTYPE                       | Campaign type is invalid.                                                                                                                         |
| E04   | E04\_FORM\_PHONENUMBERS                       | Phone numbers is invalid.                                                                                                                         |
| E04   | E04\_FORM\_PAGE                               | Page is exceed limit.                                                                                                                             |
| E04   | E04\_FORM\_LIMIT                              | Limit is invalid.                                                                                                                                 |
| E04   | E04\_FORM\_IMAGEURL                           | Image Url is invalid.                                                                                                                             |
| E04   | E04\_FORM\_IMAGE\_UNREACHABLE                 | Image url was unreachable.                                                                                                                        |
| E04   | E04\_FORM\_IMAGE\_SIZE\_EXCEED                | Image size was exceed limit.                                                                                                                      |
| E04   | E04\_FORM\_BUTTON\_INVALID                    | Form Button is invalid, Some missing required key will cause this error.                                                                          |
| E04   | E04\_FORM\_BUTTON\_REQ\_TEXT                  | Form button is required text content.                                                                                                             |
| E04   | E04\_FORM\_BUTTON\_CAPTION\_EXCEED\_LIMIT     | Button caption is exceed limit.                                                                                                                   |
| E04   | E04\_FORM\_BUTTON\_URL\_INVALID               | Button url is invalid.                                                                                                                            |
| E04   | E04\_FORM\_FILE\_UNKNOWN\_SIGNATURE\_ERROR    | Failed to extract file signature.                                                                                                                 |
| E04   | E04\_FORM\_FILE\_DECODE\_SIGNATURE\_ERROR     | Malformed array buffer.                                                                                                                           |
| E04   | E04\_FORM\_FILE\_EXTENSIONS\_IS\_NOT\_ALLOWED | File extension was not allowed.                                                                                                                   |
| E04   | E04\_FORM\_FILE\_FAILED\_TO\_DOWNLOAD         | Access to the image download is denied by the server. Please make sure the provided URL is correct and that the server allows external downloads. |
| E04   | E04\_FORM\_CONTENT\_ERROR                     | Request must have at least one content.                                                                                                           |
| E04   | E04\_CAMPAIGN\_NAME\_DUPLICATED               | Campaign name is exists.                                                                                                                          |
| E04   | E04\_CAMPAIGN\_FAILED                         | The campaign is can not be create.                                                                                                                |
| E04   | E04\_COUNTRY\_TEMPORARY\_RESTRICTED           | The country that was sent can't be sent right now.                                                                                                |
| E04   | E04\_DELIVERY\_DATE\_INVALID                  | Delivery date is invalid, Please use date format ISO8601.                                                                                         |
| E04   | E04\_SCHEDULE\_DELETE\_NOT\_ALLOWED           | The schedule campaign can not be deleted or it does not exist.                                                                                    |
| E04   | E04\_SCHEDULE\_NOT\_FOUND                     | The scheduled campaign was not found.                                                                                                             |
| E04   | E04\_SCHEDULE\_REFUND\_PACKAGE\_ERROR         | Refunding credit has error, Please connect support team for further investigate.                                                                  |
| E04   | E04\_SCHEDULE\_EXCEED\_DELETE\_TIMEFRAME      | Campaign was not allowed to be delete, Due to timeframe limit (last 2 minute).                                                                    |

Following properties:

* `error_name` **string**: Error name
* `error_code` **string**: Error code
* `error_group` **string**: Error group code
* `message` **string**: Readable error description

```json
{
    "error_name": "UnauthorizedException",
    "error_code": "E00_SE",
    "error_group": "E00",
    "message": "Unauthorized"
}
```