fbpx

< / >

Update

Update

URL:

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

Description:

The update API allows us to update records in 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 headers of the request, the following is required:

  • Wolkvox-Token 

 

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

  • operation
  • module
  • wolkvox-id
  • fields

REQUEST

KEY
DESCRIPTION
EXAMPLE
Wolkvox-Token
It is the token configured by the client on the CRM page.
{token}
Wolkvox-id
It is the ID of the record. You can find it as the last parameter in the URL.
6074xxx0801374xxxxx781025xxx7d3
operation
It is the name of the CRM operation.
{operation_name}
module
Module name that we will use for updating.
contacts
fields
It is the field we will use to update the entire form of our CRM. This should be used under the structure of an object.
{“namecontact”: “Jane Doe”}

RESPONSE

				
					<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{{wolkvox_server}}/server/API/v2/custom/update.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}",
    "wolkvox-id":"{wolkvox-id}",
    "fields":{
        "MyFirstField": "Example"
    }
}',
  CURLOPT_HTTPHEADER => array(
    'Wolkvox-Token: {Wolkvox-Token}',
    'Content-Type: application/json',
  ),
));

$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