Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 = 603000

  • Api Key is null.
    ApiKeyIsNull = 603001

  • Application Key Validation Context is null.
    ApiKeyValidationContextIsNull = 603002

  • Api Key Validation Context Service Id is null.
    ServiceIdNotProvided = 603003

  • Api Key Validation Failed.
    ApiKeyValidationKeyFailed = 603004

Accounts Controller (601000-601999)

...

  • The ISO Code wasn't provided.
    MissingCountryIsoCode = 602000

  • Getting the list of all countries failed.
    GetCountriesFailed = 602001

  • Getting a country's information failed.
    GetCountryFailed = 602002

  • Getting a list of Canadian Provinces failed.
    GetCanadianProvincesFailed = 602003

  • Getting a list of subdivisions failed.
    GetCountrySubdivisionsFailed = 602004

  • Getting a Provinces details failed.
    GetCanadianProvinceFailed = 602005

  • A 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 = 609000

  • Invoice creation failed.
    CreateInvoiceFailed = 609001

  • Invoice id is zero.
    InvoiceIdIsZero = 609002

  • Invoice update failed.
    UpdateInvoiceFailed = 609003

  • Invalid number reference, or both number provided at the same time.
    InvalidNumberOrReference = 609004

  • Invoice(s) not found.
    InvoiceNotFound = 609005

Metadata Definitions Controller (609000-609999)

...