# Code and Formats source: https://developer.mastercard.com/transaction-insights/documentation/code-and-formats/index.md ## Gateway Error Codes {#gateway-error-codes} All the errors that the gateway returns follow the same data format. Please refer to this page [Gateway Error Codes](https://developer.mastercard.com/platform/documentation/security-and-authentication/gateway-error-codes/) for further information. ## API Related Errors {#api-related-errors} | **Error/Reason Code** | **Description** | **How to Resolve** | |-------------------------------|--------------------------------------------------------------|-----------------------------------------------------------------| | INVALID_DATA_TRANSACTIONTYPE | Transaction type should be either ATM or POS | `transactionType` should be either 'ATM' or 'POS'. | | MISSING_DATA_TRANSACTIONTYPE | Transaction Type Must not be null | `transactionType` Must not be null | | INVALID_DATA_PERIOD | Period should be either monthly or quarterly or yearly | `period` should be either 'monthly' or 'quarterly' or 'yearly'. | | MISSING_DATA_PERIOD | Period Must not be null | `period` Must not be null | | INVALID_DATA_COUNTRYCODE | Country code should be MEX | `countryCode` should be 'MEX' | | MISSING_DATA_COUNTRYCODE | Country Code Must not be null | `countryCode` should be 'MEX' | | INVALID_DATA_REPORTQUARTER | Report Quarter should be 1 to 4 | Accepted Value for field `reportQuarter` is 1 to 4. | | MISSING_DATA__REPORTQUARTER | For a Quarterly period, report quarter must not be null | For a Quarterly period, 'reportQuarter' must not be null | | MISMATCHED_DATA_REPORTQUARTER | Report quarter should not be provided when period is Monthly | `reportQuarter` should not be provided when period is Monthly | | INVALID_DATA_REPORTYEAR | Report year must be a 4 digit numeric | Report year must be a 4 digit numeric | | MISSING_DATA_REPORTYEAR | Report Year Must not be null | `reportMonth` must must not be null. | | INVALID_DATA_REPORTMONTH | Report month must be a valid 2 digit numeric from 01 to 12 | `reportMonth` must be a valid 2 digit numeric | | MISSING_DATA_REPORTMONTH | For a Monthly period, report month must not be null | For a Monthly period, | | MISMATCHED_DATA_REPORTMONTH | Report month should not be provided when period is Quarterly | Report month should not be provided when period is Quarterly | | RESOURCE_NOT_FOUND | No data found with the requested payload | | ## Code and Formats {#code-and-formats} ### Errors Overview {#errors-overview} We use standard HTTP response codes for success and failure notification, and our error are further classified by `error_type`. In general 200 HTTP codes correspond to success, 40X codes are for developer or user related failures. | **Status Code** | **Response** | **Description** | |-----------------|------------------------|-----------------------------------------------------------------------------------------------| | 200 | OK | Everything worked as expected. | | 204 | NO CONTENT | The server successfully executed the method, but No data was found with the provided payload. | | 400 | BAD REQUEST | The request was unacceptable, often due to a missing a required parameter. | | 403 | FORBIDDEN | The API key does not have permissions to perform the request. | | 404 | NOT FOUND | The requested resource does not exists. | | 405 | NOT ALLOWED | The server does not implement the requested HTTP Method. | | 415 | UNSUPPORTED MEDIA TYPE | The server does not implement the media type that would be acceptable to the client. |