<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yume.cloud/v1/crm/requests/schedules/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client' => [
'name' => '<string>',
'phone' => '<string>',
'avatar' => '<string>',
'signed' => true,
'sign_date' => '2023-12-25',
'sign_expires' => '2023-12-25',
'email' => '[email protected]',
'extra' => '<unknown>'
],
'rent_start' => '2023-11-07T05:31:56Z',
'rent_end' => '2023-11-07T05:31:56Z',
'rent_fact_start' => '2023-11-07T05:31:56Z',
'rent_fact_end' => '2023-11-07T05:31:56Z',
'price' => '<string>',
'price_discount' => '<string>',
'price_inventory' => '<string>',
'price_service' => '<string>',
'discount_amount' => '<string>',
'discount_inventory_amount' => '<string>',
'discount_service_amount' => '<string>',
'paid_amount' => '<string>',
'penalty_amount' => '<string>',
'rental_point' => 123,
'deleted' => true,
'plus_id' => 0,
'extra' => '<unknown>',
'autorenewal' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}