Overslaan naar hoofdinhoud

Example: Update Ticket, Add a Reply

in PHP SDK
Lijst van auteurs
Gepubliceeerd: 18 jul 2022|Laatst Gewijzigd: 18 jul 2022
<?php use Deskpro\API\DeskproClient; use Deskpro\API\Exception\APIException; include (__DIR__ . '/vendor/autoload.php'); $client = new DeskproClient('http://deskpro.company.com'); $client->setAuthKey(1, 'dev-admin-code'); try { $payload = ['department' => 5]; $resp = $client->put('/tickets/678', $payload); } catch (APIException $e) { echo $e->getMessage(); }
copy

Add a replyCopy link to Add a reply to clipboard

<?php use Deskpro\API\DeskproClient; use Deskpro\API\Exception\APIException; include (__DIR__ . '/vendor/autoload.php'); $client = new DeskproClient('http://deskpro.company.com'); $client->setAuthKey(1, 'dev-admin-code'); try { $payload = [ 'person' => 'joe@deskprodemo.com', 'message' => 'test new reply by a user' ]; $resp = $client->post('/tickets/678/messages', $payload); } catch (APIException $e) { echo $e->getMessage(); }
copy
BehulpzaamNiet nuttig
volgende paginaExample: Get Ticket
vorige paginaExample: Create Ticket

Log in of registreer om een reactie te plaatsen.