Hello, there,
If I make a query in Subscription to get all open invoices, I get a list with the open invoices, but some of my
user defined
fields are missing in the delivery of the data. See
Screendumps
.
If I call up the details of each open invoice, the missing user fields are also supplied.
It looks to me like this is a bug in the API.
Or is there a way to specify which additional fields you would like to receive in the reply?
Request a list of 2 invoices:
curl_setopt_array($curl, array(
CURLOPT_URL => "https://abo.xxxx.de/api/v1/invoices?filter_by=Status.Unpaid&page=20&per_page=2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Zoho-authtoken xxxxx",
"Cache-Control: no-cache",
"Postman-Token: xxxxx",
"X-com-zoho-subscriptions-organizationid: 123123123"
),
));
Answer:
...
'cf_zahlungsart_lastschrift' => string 'true' (length=4)
'cf_zahlungsart_rechnung' => string 'false' (length=5)
'cf_reverse_charge_verfahren' => string 'false' (length=5)
'cf_kunden_ust_idnr' => string 'xxx' (length=12)
'customer_custom_fields' => string '' (length=0)
...
Request a detail recordset:
curl_setopt_array($curl, array(
CURLOPT_URL => "https://abo.xxxx.de/api/v1/invoices/".$value['invoice_id'],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Zoho-authtoken xxxxx",
"Cache-Control: no-cache",
"Postman-Token: xxxxx",
"X-com-zoho-subscriptions-organizationid: 123123123"
),
));
Answer:
'custom_field_hash' =>
array (size=8)
'cf_zahlungsart_lastschrift' => string 'true' (length=4)
'cf_zahlungsart_rechnung' => string 'false' (length=5)
'cf_reverse_charge_verfahren' => string 'false' (length=5)
'cf_bank' => string 'xxxx' (length=13)
'cf_kontoinhaber' => string 'xxxx' (length=14)
'cf_iban' => string 'xxxx' (length=22)
'cf_bic' => string 'xxxx' (length=11)
'cf_kunden_ust_idnr' => string 'xxxx' (length=11)
The following fields are not provided with the first request:
'cf_bank' => string 'xxxx' (length=13)
'cf_kontoinhaber' => string 'xxxx' (length=14)
'cf_iban' => string 'xxxx' (length=22)
'cf_bic' => string 'xxxx' (length=11)
Thanks for the help.
Daniel