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í.
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.
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:
The same must have the following heading or HTTP Header:
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
|PUT||Safe New Information.|
|UPDATE||Update existing Information.|
Actions are defined by the variable: action
The action defines the action to be executed, here some examples:
|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:
In PHP CURL would be:
Keep in mind to replace the $access_token with your business’s Authentication Token.
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.