# Code and Formats
source: https://developer.mastercard.com/eop-admin/documentation/code-and-formats/index.md

## Error codes {#error-codes}

### Error structure {#error-structure}

Mastercard returns errors in the following structure.

```json
{
  "Errors": {
    "Error": [
      {
        "Source": "<source>",
        "ReasonCode": "<unique code>",
        "Description": "<short description of the error>",
        "Recoverable": true/false,
        "Details": "<Optional detailed description of the issue>"
      }
    ]
  }
}
```

### Service error codes {#service-error-codes}

|   **Error code**   |                                                **Description**                                                 | **HTTP response code** |                                                                **Resolution steps**                                                                 |
|--------------------|----------------------------------------------------------------------------------------------------------------|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| MCMUA-YYMMDD-1001  | User doesn't have permission to create Merchant.                                                               | UNAUTHORIZED           | Provide Merchant permission to user.                                                                                                                |
| MCMBR-YYMMDD-1002  | Merchant create request failed due to invalid payload.                                                         | BAD_REQUEST            | Verify the Merchant create payload is inline with [API Reference](https://developer.mastercard.com/eop-admin/documentation/api-reference/index.md). |
| MCMUA-YYMMDD-1003  | User doesn't have permission to update Merchant.                                                               | UNAUTHORIZED           | Provide Merchant permission to user.                                                                                                                |
| MCMUA-YYMMDD-1004  | User doesn't have permission to view Merchant.                                                                 | UNAUTHORIZED           | Provide Merchant permission to user.                                                                                                                |
| MCMRN-YYMMDD-1005  | Merchant doesn't exist.                                                                                        | NOT_FOUND              | Use the valid Merchant.                                                                                                                             |
| MCMCF-YYMMDD-1006  | Merchant already exists.                                                                                       | CONFLICT               | Merchant already exists in the platform.                                                                                                            |
| MCMIE-YYMMDD-1007  | Merchant creation failed due to internal mastercard error.                                                     | INTERNAL_SERVER_ERROR  | Merchant creation failed. Reach out to the Mastercard support team with the error code or correlation id.                                           |
| MCMBR-YYMMDD-1008  | External id is missing for the Merchant.                                                                       | BAD_REQUEST            | Add an external id to the Merchant request.                                                                                                         |
| MCMBR-YYMMDD-1009  | Merchant country code is not valid, it should be ISO standard 3 letter country codes like USA.                 | BAD_REQUEST            | Use a valid ISO standard 3 letter country code.                                                                                                     |
| MCMBR-YYMMDD-1010  | Merchant language is missing or invalid.                                                                       | BAD_REQUEST            | Use valid Merchant language eg. en_US                                                                                                               |
| MCMRN-YYMMDD-1011  | Classifier is missing in the Merchant payload.                                                                 | NOT_FOUND              | Add classifier data in the payload.                                                                                                                 |
| MCMRN-YYMMDD-1012  | Category is missing in the Merchant payload.                                                                   | NOT_FOUND              | Add category data in the payload.                                                                                                                   |
| MCMRN-YYMMDD-1013  | Category is not valid.                                                                                         | NOT_FOUND              | Use a valid category for the Merchant.                                                                                                              |
| MCMBR-YYMMDD-1014  | Merchant classifier creation failed.                                                                           | BAD_REQUEST            | Do not use accented characters in the Merchant name, it is used to create classifier.                                                               |
| MCMBR-YYMMDD-1015  | Merchant address payload is invalid. Please verify the address and location id is not empty.                   | BAD_REQUEST            | Address must contain the full address object and location id to it.                                                                                 |
| MCMMUA-YYMMDD-2001 | User doesn't have permission to create Merchant media.                                                         | UNAUTHORIZED           | Provide permission to user to create media.                                                                                                         |
| MCMMBR-YYMMDD-2002 | Merchant media create request failed due to invalid payload.                                                   | BAD_REQUEST            | Provide valid payload in byte array.                                                                                                                |
| MCMMBR-YYMMDD-2003 | Merchant media is missing.                                                                                     | BAD_REQUEST            | Media is missing for Merchant used.                                                                                                                 |
| MCMRN-YYMMDD-2004  | Merchant media doesn't exist.                                                                                  | NOT_FOUND              | Media provided should exist, upload new media and try again.                                                                                        |
| MCMMBR-YYMMDD-2005 | Media is not approved. Please approve the media and try again.                                                 | BAD_REQUEST            | Approve the media used for offer creation.                                                                                                          |
| MCMMIE-YYMMDD-2006 | Merchant media create request failed due to internal error.                                                    | INTERNAL SERVER ERROR  | Reach out to the Mastercard support team with the error code or correlation id.                                                                     |
| MCMMBR-YYMMDD-2007 | Merchant media create request failed due to unknown file format.                                               | BAD_REQUEST            | Send the valid - accepted file format as described in the API specification.                                                                        |
| MCMMIE-YYMMDD-2008 | Merchant media create request failed at Akamai.                                                                | INTERNAL SERVER ERROR  | External image creation failed, try again or reach out to the Mastercard support team with the error code.                                          |
| MCMMIE-YYMMDD-2009 | Merchant media create request failed due to IO error.                                                          | INTERNAL SERVER ERROR  | Reach out to Mastercard team with error or check the image is valid.                                                                                |
| MCSUA-YYMMDD-5001  | User doesn't have permission to the source.                                                                    | UNAUTHORIZED           | Provide source permission to the user.                                                                                                              |
| MCSRN-YYMMDD-5002  | The source doesn't exist.                                                                                      | NOT_FOUND              | Use valid source that exists in the platform.                                                                                                       |
| MCSBR-YYMMDD-5003  | Source config missing for Merchant.                                                                            | BAD_REQUEST            | Add source configuration for Merchant.                                                                                                              |
| MCSBR-YYMMDD-5004  | Source config missing for offer.                                                                               | BAD_REQUEST            | Add source configuration for offer.                                                                                                                 |
| MCCUA-YYMMDD-6001  | User doesn't have permission to create contract.                                                               | BAD_REQUEST            | Add permission to allow the user to create contract.                                                                                                |
| MCCRN-YYMMDD-6002  | The contract doesn't exist.                                                                                    | NOT_FOUND              | Use valid contract that exists in the platform.                                                                                                     |
| MCCRN-YYMMDD-6003  | Source contract is missing or not created.                                                                     | BAD_REQUEST            | Add source contract to create offer.                                                                                                                |
| MCCBR-YYMMDD-6004  | All contracts are expired for the source.                                                                      | BAD_REQUEST            | Renew the contracts to create offers.                                                                                                               |
| MCCRN-YYMMDD-6005  | Merchant contract is missing or not created.                                                                   | BAD_REQUEST            | Merchant is missing a contract, which is needed to create offers for Merchants.                                                                     |
| MCCBR-YYMMDD-6006  | All contracts for the Merchant are expired.                                                                    | BAD_REQUEST            | Renew contracts for Merchant to create offer.                                                                                                       |
| MCPUA-YYMMDD-7001  | User doesn't have permission to view Publishers.                                                               | UNAUTHORIZED           | Add permission to user to view Publishers.                                                                                                          |
| MCPRN-YYMMDD-7002  | The Publisher doesn't exist.                                                                                   | NOT_FOUND              | Use valid Publisher that exists in the platform.                                                                                                    |
| MCPBR-YYMMDD-7003  | The Publisher config is missing, complete full Publisher onboarding.                                           | BAD_REQUEST            | Publisher configuration is missing. Offer cannot be created with missing configurations. Add all configurations to Publisher.                       |
| MCPBR-YYMMDD-7004  | The Publisher program is missing, complete full Publisher onboarding along with programs.                      | BAD_REQUEST            | Add program to the Publisher.                                                                                                                       |
| MCPBR-YYMMDD-7005  | The Publisher reimbursement type is missing, complete full Publisher onboarding along with reimbursement type. | BAD_REQUEST            | Add reimbursement type to the Publisher configuration.                                                                                              |
| MCPBR-YYMMDD-7006  | The Publisher point type is missing, complete full Publisher onboarding along with point type.                 | BAD_REQUEST            | Add point type to the Publisher configuration.                                                                                                      |
| MCPBR-YYMMDD-7007  | The Publisher date is missing, complete full Publisher date configuration.                                     | BAD_REQUEST            | Add offer dates to the Publisher configuration.                                                                                                     |
| MCOUA-YYMMDD-3001  | User doesn't have permission to create offer.                                                                  | UNAUTHORIZED           | Add permission to user to allow create offer.                                                                                                       |
| MCOBR-YYMMDD-3002  | Offer create request failed due to invalid payload.                                                            | BAD_REQUEST            | Verify the payload is valid from the [API Reference](https://developer.mastercard.com/eop-admin/documentation/api-reference/index.md).              |
| MCOUA-YYMMDD-3003  | User doesn't have permission to update offer.                                                                  | UNAUTHORIZED           | Verify the user has permission to update offer. Add update offer permission to user.                                                                |
| MCOBR-YYMMDD-3004  | Offer create request failed due to an error encountered while building offer data.                             | BAD_REQUEST            | Offer payload has issues, submit a valid payload.                                                                                                   |
| MCOCF-YYMMDD-3005  | Offer already exists.                                                                                          | CONFLICT               | Offer already exists with valid dates and Merchant. Submit the offer with new dates.                                                                |
| MCOUA-YYMMDD-3006  | User doesn't have permission to view offer.                                                                    | UNAUTHORIZED           | Add permission to view offer to the user.                                                                                                           |
| MCOBR-YYMMDD-3007  | The offer redemption type is missing.                                                                          | BAD_REQUEST            | Add redemption type to the offer payload.                                                                                                           |
| MCOBR-YYMMDD-3008  | Active Merchant not found to create offer.                                                                     | BAD_REQUEST            | Use active Merchant to create offer or activate the Merchant if it is inactive.                                                                     |

### Gateway error codes {#gateway-error-codes}

In addition to service error codes, error codes can also be returned by Mastercard's gateway, which is used to verify your request's signature, and route it to the correct location.

You can find a list of the errors returned by our Gateway, as well as resolutions to each, on the following page [Gateway Error Codes](https://developer.mastercard.com/platform/documentation/security-and-authentication/gateway-error-codes/).

## Next steps {#next-steps}

Refer to the [Support](https://developer.mastercard.com/eop-admin/documentation/support/index.md) section to access frequently asked questions and access technical support.
