Skip to main content

Error Codes

This page lists all error codes returned by the MagniFinance API.

Error Code Reference​

ValueNameDescription
01AuthenticationErrorYour authentication values are incorrect. Check the email and token in the header.
02ValidationErrorThe error is detailed in ValidationErrors. The validation error compiles validation errors in fields, such as: field not filled in, field invalid, field oversized. (It has a detail option to aid understanding)
04InvalidTaxIdIf the tax field (Example: NIF) is not valid or this field is not present in the request, this error will be returned.
06ElementDoesNotExistIn TaxId Validation it means the country isn't supported (only PT is today). In the DocumentGet endpoint, for example, this error is returned when a non-existent DocumentId is inserted in the query. If you have just created the document, it is recommended that you wait about 10 seconds before performing the Get.
07TypeInvalidError returned when an invalid type value is entered. Create Document accepts "T", "I", "S", "C", "D", "B", "P" and "Z", in upper case; Create Waybill accepts "W" and "Y". See the document types. Example value: "T"
10TaxExemptionDoesNotExistThis error is returned when a non-existent code is inserted when creating the document. To check the valid codes, access the Appendix.
11CurrencyDoesNotExistError returned when an invalid currency value is entered. Currency to be used additionally to EUR. (List with valid values: ISO 4217) Example value: "BRL"
14SaveFailedGeneric error which provides more details in ErrorHumanReadable and ValidationErrors.
16NoPartnerFoundWithTaxIdIPPN: returned by GetPartnerAccessTokens when the partner isn't linked to your IPPN account with access granted. The error is the same whether the request is still pending, was rejected or revoked, or was never made; check the state in the web interface under Config → IPPN → Partnership Management.
18SerieDataNotMatchError returned when an invalid series value is entered. You can consult a list of series for each type of document following the path in the system: Settings -> General -> Document series. Example value: "FR". You can view your series in the platform under Settings → General → Document series.
19FailedToCreateNewProductUnitCheck if in "Lines", it has the Unit field (required) and is corresponding to its string(50) characteristics.
22InvalidPercentagePercentage fields should be between 1 and 100.
26NoClientFoundReturned by Get a Client (ClientGet) when there's no company with that tax id and country in your subscription.
38PartnershipNotFoundIPPN: returned by AddPartner and GetPartnerAccessTokens when the token you sent isn't your IPPN account's token, or your IPPN account isn't set up correctly. It doesn't mean the partner is missing; for that, see NoPartnerFoundWithTaxId.
39DocumentDetailClientAndSupplierCantBeTheSameThis error occurs when the supplier is also the customer. Check the Customer NIF informed in the request. The customer cannot be the supplier.

Error Response Format​

When an error occurs, the API returns a response with the following structure:

{
"RequestId": "dc5983e0-a93c-4690-a2c4-4379978382fd",
"Object": null,
"Type": 1,
"ErrorValue": {
"Value": 6,
"Name": "ElementDoesNotExist"
},
"ErrorHumanReadable": null,
"ValidationErrors": null,
"IsSuccess": false,
"IsError": true
}

Response Fields​

FieldTypeDescription
Typeint0 = Success; 1 = Error
ErrorValueobjectContains Value (error code number) and Name (error code name)
ErrorHumanReadablestringText that explains the error found
ValidationErrorsarrayList of validation errors with details
IsErrorbooleanWhether the request failed or not
IsSuccessbooleanWhether the request succeeded or not

ValidationErrors Structure​

When a ValidationError occurs, the ValidationErrors array contains objects with these fields:

FieldDescriptionExample
TypeIdentifies the error with a token"DocumentIsADuplicate"
FieldName of the field in which validation failed"DocumentDetailExternalId"
ElementNumberWhich element failed when the field repeats (for example the line number in Lines); 0 otherwise0
DetailDetailed error explanation"Duplicate Document"