Apprecio API icon

Apprecio API

Interactúa con la API de Apprecio

Overview

The Apprecio API node's "Acumulación de Puntos" operation allows you to add ("acumular") a specified number of points to an existing user in the Apprecio system, identified by their user ID. This is useful for loyalty programs, gamification systems, or any scenario where users earn points based on actions or transactions.

Example use cases:

  • Awarding points to customers after a purchase.
  • Adding bonus points during promotional campaigns.
  • Integrating with other n8n workflows to automate point accumulation based on external triggers.

Properties

Name Type Meaning
ID Usuario String The unique identifier of the user to receive points. Required.
Puntos Number The amount of points to accumulate for the user. Required.

Output

The node returns the response from the Apprecio API as a JSON object. The exact structure depends on the API's response, but typically includes information about the success or failure of the operation and may include updated user data or status messages.

Example output (structure may vary):

{
  "success": true,
  "message": "Puntos acumulados correctamente",
  "data": {
    "id_usuario": "12345",
    "puntos_acumulados": 100,
    "saldo_actual": 500
  }
}

If the API call fails, the output will contain an error message.

Dependencies

  • External Service: Requires access to the Apprecio API endpoint.
  • Credentials: Needs apprecioApi credentials configured in n8n, including:
    • apiUrl (optional, defaults to https://apiv2.dcanje.com/api)
    • publicToken
    • privateToken
  • Environment: No special environment variables required beyond n8n credential setup.

Troubleshooting

Common issues:

  • Missing or invalid credentials: Ensure that publicToken and privateToken are correctly set in the n8n credentials.
  • Invalid user ID or points value: Make sure "ID Usuario" exists in Apprecio and "Puntos" is a valid number.
  • API errors: If the API returns an error, the node will throw an error with the message from the API.

Error messages and resolutions:

  • La operación acumulacionPuntos no está soportada: Double-check the operation name; this should not occur if using the UI.
  • Error de la API de Apprecio: ...: Indicates a problem returned by the Apprecio API (e.g., invalid parameters, user not found). Review the error message for details.
  • No se recibió respuesta de la API de Apprecio: Network issue or the API is down. Check connectivity and API status.
  • Error al realizar la solicitud: ...: General request error, possibly due to network or configuration issues.

Links and References

Discussion