<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{tenant}.getomneo.com/api/v3/statuses/{status}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'sort_order' => 123,
'description' => '<string>',
'short_description' => '<string>',
'long_description' => '<string>',
'terms_conditions' => '<string>',
'icon' => '<string>',
'image_url' => '<string>',
'earn_instructions' => '<string>',
'internal_notes' => '<string>',
'colour' => '<string>',
'text_colour' => '<string>',
'code' => '<string>',
'group_name' => '<string>',
'group_handle' => '<string>',
'timezone' => '<string>',
'period' => 123,
'absolute_expiry' => '<string>',
'primary_colour' => '<string>',
'secondary_colour' => '<string>',
'custom_fields' => [
[
'namespace' => '<string>',
'handle' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}