Creating a function with the API

Functions let you interact with your connected tool’s API to retrieve specific information before send a request (webhook) to K inventory. For example, they can retrieve a category or product identifier and include it in your queries.

 

This feature is not available on the Mobile version.

 

You must create a connection for each tool you wish to interact with K inventory.

 

1. In the left-hand menu, click on the Settings.

 

2. In the Automation section , click on Functions.

 

api k inventory menuAutomation menu

 

3. Click on the Create function.

 

Tool-based function creation in K inventoryCreate a function

 

4. Go to Informationto create your new function:

  • Query name
  • Connection: Select a connection previously created in Connection automation
  • Method:Select the appropriate HTTP method for your request
  • URL: Enter the URL to connect to your tool. TheURL must point to the specific resource you are targeting (e.g. /products/{product_id} ).
  • Returned value: Property to be retrieved (example: entries.0.values.Request ID)

 

List of available methods in relation to your data (interventions, references, files, etc.) :

  • GET Retrieve information from the server
  • POST Create a new resource on the server
  • PATCH Partially update an existing resource on the server
  • DELETE Delete a resource on the server

 

5. Go to HeadersIf necessary, add headers specific to your request in addition to those already defined in the connection (optional):

  • Key : Content-Type
  • Value: Json

Setting up a connection

 

List of communication modes :

  • Jso
  • XML
  • Files: Text, Excel

 

6. In Corps queryselect the K inventory data you wish to include in your new feature.

 

7. Save your changes with the Save.

 

To continue browsing, here are a few articles related to this page: