Introduction

Esta sección de la documentación explica como utilizar nuestro API para realizar integraciones de desarrollos a la medida con su información en InterFuerza.

The information structure is JSON, which is the most utilized in today’s APIs.  You can learn more about JSON aquí.

Token Authentication

The request authentication Token made to API are the ones obtained from the Integration Section:

Within the integrations be accessed in Conectar:

The same will show in a secure way the Authentication Token:

You can copy the token display the token, or regenerate the token in order to regenerate all the integrations.

If you regenerate the Token, it must be clear that you must update the integrations already made, for the API will begin to deny any integration that is not using the new Token.

 

Communication with the API

To cary on the communications with the API, the same is with HTTPS.  All the requests need to be sent to the following address:

https://app.interfuerza.com/api/

The same must have the following heading or HTTP Header:

X-IFX-Token: <TokenString>

Where  <TokenString> is the Token previously obtained.

Classes and Actions

Our API uses two variable sent in the POST content, the description of each one is as follows:

Clases are defined by the variable:  class

 class Descripción
GET Obtain Information.
PUT Safe New Information.
UPDATE Update existing Information.
DELETE Delete Information.

Actions are defined by the variable:  action

The action defines the action to be executed, here some examples:

 class  action Descripción
GET customers Obtains all the customers list.
PUT customer Creates a new customer.
UPDATE customer Updates a customer.
DELETE customer Deletes a customer.

An example of the JSON to be sent to consult all the customers would be:

 {"class":"GET","action":"customers"} 

In PHP CURL would be:

Ver Código

Keep in mind to replace the $access_token with your business’s Authentication Token.

Errors

Our API uses HTTP Status Code to report errors that are found in any execution.  For example, a 400 Bad Request error is reported to report an action or class, unknown by the API.

Any error will be reported by the 4xx codes and may be captured according to the chord.

 

¿Fue de ayuda este artículo?