fbpx

< / >

Insert

Edit Cases and Their Attachments

URL:

https://{{Wolkvox_Server}}/server/API/v2/cases/updateCaseAttachment.php

Description:

The following API configuration allows you to edit cases and their list of attachments in base64.

How does it work?

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

The following headers are required in the request:

  • Wolkvox-Token: {{token}}
  • Content-Type: application/json

– The following fields are required in the request body:

  • operation
  • wolkvox-id
  • responsible
  • owner
  • contact
  • status
  • priority
  • case-type
  • description
  • form
  • attachments

REQUEST

KEY
DESCRIPTION
EXAMPLE
Wolkvox-Server
Server nomenclature of the operation.
‘https://wolkvox_server.crmvox.com/server/API/v2/cases/updateCaseAttachment.php’
Wolkvox-Token
Token generated in the CRM module where you will consume the API.
‘Wolkvox-Token: token’
operation
It is the name of the CRM operation.
“operation”: “TheOperationName”
wolkvox-id
Case identification code.
“wolkvox-id”: “Case ID”
responsible
Case responsible.
“responsible”: “agent10@mymodule”
status
Edit the case status.
“status”: “open”
priority
Edit the case priority.
“priority”: “low”
case-type
Edit the case type.
“case-type”: “Request”
owner
Case owner.
“owner”: “ADMIN_@mymodule”
contact
Related contact.
“contact”: “[email protected]
description
This is a case description.
“description”: “This is a case description”
form
This field is used to specify additional details of the case. You can change the values of these additional fields.
“form”:{ “additional-field”: “This is an additional field created in the CRM.” }
attachments
Edit the list of attached files in the case.
“attachments”:[ ]

REQUEST

				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{{Wolkvox-Server}}/server/API/v2/cases/updateCaseAttachment.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}}",
    "wolkvox-id":"{{wolkvox-id}}",
    "responsible": "{{responsible}}",
    "status": "{{status}}",
    "priority":"{{priority}}",
    "case-type": "{{request}}",
    "owner": "{{owner}}",
    "contact": "{{contact}}",
    "description": "{{description}}",
    "form":{
    },
    "attachments":[]
}',
  CURLOPT_HTTPHEADER => array(
    'Wolkvox-Token: {{token}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
				
			

RESPONSE

				
					{
    "code": 200,
    "error": "null",
    "msg": "Succesfully update record",
    "data": {
        "wolkvox_id": " ",
        "idPrefijo": " "
    }
}
				
			
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