fbpx

< / >

Insert

Insert

URL:

https://{{wolkvox_server}}/server/API/v2/custom/insert.php

Description:

The insert API allows us to insert records into the configured modules of our CRM by sending parameters.

How it works?:

This API works through a POST request, which requires the following fields for its proper functioning:

In the request headers, the following is required:

  • Wolkvox-Token 

 

– In the body of the request, the following is required:

  • operation
  • module
  • fields

REQUEST

KEY
DESCRIPTION
EXAMPLE
Wolkvox-Token
It is the token configured by the client on the CRM page.
{token}
operation
It is the name of the CRM operation.
{operation_name}
fields
It is the field we will use to insert the entire form of our CRM. This should be used under the structure of an object.
{“namecontact”: “Jhon Doe”}
module
The name of the module we will use for insertion.
contacts

RESPONSE

				
					<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{{wolkvox_server}}/server/API/v2/custom/insert.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "operation":"{operation}",
    "module":"{module}",
    "fields":{}
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Wolkvox-Token: {Wolkvox_Token}'
 
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
				
			
Possible error codes

Usamos cookies, se continuar a navegar assumimos que concorda. Pode ler mais sobre a utilização de cookies nas nossas políticas de privacidade e tratamento de dados pessoais

We use cookies, if you continue browsing we will assume that you agree. You can read more about the use of cookies in our privacy policies and treatment of personal data