Errors & Validations

Learn about the different statuses and errors you could face using Pluggy's API.

Partial Products Errors

Sometimes we fail to recover a specific product while creating a connection with the institution, due to a problem with the connection or instability on the provider. In this scenario, the Item will land on a PARTIAL_SUCCESS executionStatus, and the attribute statusDetail will provide more information on the product collection.

{
    "accounts": {
      "isUpdated": true,
      "lastUpdatedAt": "2022-03-08T22:43:04.796Z"
    },
    "identity": {
      "isUpdated": false,
      "lastUpdatedAt": null
    },
    "creditCards": {
      "isUpdated": true,
      "lastUpdatedAt": "2022-03-08T22:43:04.796Z"
    },
    "investments": {
      "isUpdated": true,
      "lastUpdatedAt": "2022-03-08T22:43:04.796Z"
    },
    "transactions": {
      "isUpdated": true,
      "lastUpdatedAt": "2022-03-08T22:43:04.796Z"
    },
    "paymentData": null
}

There are different scenarios that a product shows:

Product updated

When the product is updated, the lastUpdatedAt date will be updated with the synchronization timestamp, as well as the isUpdated flag will be updated to easily compare/filter updated products.

{
  "isUpdated": true,
  "lastUpdatedAt": "2022-03-08T22:43:04.796Z"
}

Product was not updated

There was an issue when collecting the product, in this case the isUpdated will reflect this situation and the lastUpdatedAt date will showcase when it was the last synchronization. If the product was never collected it will return null.

{
  "isUpdated": false,
  "lastUpdatedAt": null
}
{
  "isUpdated": false,
  "lastUpdatedAt": "2022-03-08T22:43:04.796Z"
}

Product was not requested

For products that were not requested to Pluggy API, we won't return any details about it.

{
  "paymentData": null
}

Item Creation Validations

Validations in Pluggy API are very important. They are used to avoid executing connectors with invalid parameters and to create item connections that won't be synced due to invalid credentials or parameters. When creating or updating an item, validations will be executed for that item based on the connector's credentials.

This is an example of a validation response when creating an item:

{
  "message": "Connector parameters do not match validation rules",
  "errors": [
    {
      "code": "002",
      "message": "user parameter length must be at least 6.",
      "parameter": "user"
    },
    {
      "code": "002",
      "message": "password parameter length must be at least 6.",
      "parameter": "password"
    }
  ]
}

The Error object

When there was an error with the whole item execution (for example, due invalid credentials), the item is returned with an error object with more useful information, like code and message:

{
  "error": {
    "code": "INVALID_CREDENTIALS",
     "message": "Invalid credentials."
   }
}

Also, with certain errors, the error object is returned with an attributes key with additional info. This is an example of a USER_AUTHORIZATION_PENDING error:

{
  "error": {
    "code": "USER_AUTHORIZATION_PENDING",
    "message": "The user needs to grant necessary permissions for their account.",
    "attributes": {
      "deviceNickname": "123456789"
     }
  }
}

Conflicts trying to update an item

There are 2 cases in which an item could not be updated due the state of the item:

  • Item is already updating.
  • Client update on the item is not allowed because item was updated before the client minimum frequency.

In both cases API users are going to receive a 409 status and the specific message explain why they can't update the item.