Status codes provide extra information when a request is made to the MTAPI. The response code will be provided when a request has been successfully completed.
...
Response Headers
{
"cache-control": "no-cache",
"content-length": "123",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 20 Apr 2021 11:28:03 GMT",
"expires": "-1",
"mtapistatus": "-1",
"pragma": "no-cache",
"server": "Microsoft-IIS/8.5",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET"
}
...
InternalError = 901000 // instead of disclosing details, this error may be used
MtapiSettingError = 901001 // instead of disclosing details, this error may be used
ArgumentError = 901002, // use this status code for argument related errors where the app used to throw "ArgumentException", where error handler logs error however return a bad request to the caller
App Controller (603000 - 603999)
Application information wasn't found.
ApplicationInfoNotFound = 603000Api Key is null.
ApiKeyIsNull = 603001Application Key Validation Context is null.
ApiKeyValidationContextIsNull = 603002Api Key Validation Context Service Id is null.
ServiceIdNotProvided = 603003Api Key Validation Failed.
ApiKeyValidationKeyFailed = 603004
Accounts Controller (601000-601999)
...
The ISO Code wasn't provided.
MissingCountryIsoCode = 602000Getting the list of all countries failed.
GetCountriesFailed = 602001Getting a country's information failed.
GetCountryFailed = 602002Getting a list of Canadian Provinces failed.
GetCanadianProvincesFailed = 602003Getting a list of subdivisions failed.
GetCountrySubdivisionsFailed = 602004Getting a Provinces details failed.
GetCanadianProvinceFailed = 602005A country subdivision code wasn't provided.
MissingCountrySubdivisionCode = 602006
App Controller (603000-603999)
Artifacts Controller (604000-604999)
...
Invoices Controller (608000-608999)
Note: Not implemented yet.
...
InvalidServiceRequestId = 608000 // Consider using ServiceRequestNotFound = 4041001
...
A null InvoiceDTO was provided.
InvalidInvoice = 609000Invoice creation failed.
CreateInvoiceFailed = 609001Invoice id is zero.
InvoiceIdIsZero = 609002Invoice update failed.
UpdateInvoiceFailed = 609003Invalid number reference, or both number provided at the same time.
InvalidNumberOrReference = 609004Invoice(s) not found.
InvoiceNotFound = 609005
Metadata Definitions Controller (609000-609999)
...