I am trying to access the idHTTP Delphi in a json server without success. I've tried all the alternatives and always got the same error: "HTTP / 1.1 401 Unauthorized".
我尝试在没有成功的json服务器中访问idHTTP Delphi。我已经尝试了所有的选项,并且总是得到相同的错误:“HTTP / 1.1 401未经授权”。
JSON format for testing:
JSON格式的测试:
{"http":{"method":"POST","header":"access_token:55b3ce85b47629eeee778c0f0c9be450f1b1bc84cc377975f2d3d0d3808a4636", "content":"name=TEST&email=teste@uol.com&phone=1147001211&mobilePhone=11992329909&address=Rua+Jose+Ricardo &addressNumber=55&province=Test¬ificationDisabled=True&city=Sao+Paulo&state=SP&country=Brasil&postalCode=05567210 &cpfCnpj=11111111111&personType=FISICA"}}
{“http”:{“方法”:“文章”,“标题”:“access_token:55 b3ce85b47629eeee778c0f0c9be450f1b1bc84cc377975f2d3d0d3808a4636”、“内容”:“name =测试电子邮件= teste@uol.com&phone = 1147001211手机= 1147001211及地址= Rua +穆+里卡多&addressNumber = 55省= Test¬ificationDisabled =真正的城市中=圣+ paulo州= SP&country = Brasil&postalCode = 05567210 &cpfCnpj = 05567210 &persontype =运动" } }
Url for testing:
Url进行测试:
http://homolog.asaas.com/api/v2/customers
http://homolog.asaas.com/api/v2/customers
Procedure for testing:
程序测试:
procedure TForm4.Button2Click(Sender: TObject);
var
sResponse: string;
EnvStr : TStringList;
begin
EnvStr := TStringList.Create;
EnvStr.AddStrings(Memo.Lines);
try
idHTTP.Request.ContentType := 'application/json';
idHTTP.Request.Method:='POST';
idHTTP.Request.AcceptCharSet := 'utf-8';
try
sResponse := idHTTP.Post(EditURL.Text,EnvStr);
except
on E: Exception do
ShowMessage('Error on request: '#13#10 + e.Message);
end;
finally
MemoRet.Lines.Clear;
MemoRet.Lines.add(sResponse);
end;
end;
The same format sent in PHP works perfectly, but with idHTTP returns the error: "HTTP / 1.1 401 Unauthorized".
同样的格式在PHP中是完美的,但是使用idHTTP返回错误:“HTTP / 1.1 401未经授权”。
PHP works perfectly
PHP是完美的
<?php
$api_url = "http://homolog.asaas.com/api/v2";
$api_key = "55b3ce85b47629eeee778c0f0c9be450f1b1bc84cc377975f2d3d0d3808a4636";
$url_cus = $api_url."/customers";
$param = array(
'name' => utf8_encode('Test'),
'email' => 'test@uol.com.br',
'phone' => '1147001211',
'mobilePhone' => '11992329909',
'address' => utf8_encode('Rua Jose Ricardo'),
'addressNumber' => '55',
'province' => 'Test',
'notificationDisabled' => 'True',
'city' => 'Sao Paulo',
'state' =>'SP',
'country' => 'Brasil',
'postalCode' => '05567210',
'cpfCnpj' => '11111111111',
'personType' => 'FISICA'
);
$req = http_build_query($param);
$ctx = stream_context_create(
array(
"http" => array(
"method" => "POST",
"header" => "access_token: $api_key",
"content" => $req
)
)
);
$res = file_get_contents($url_cus, true, $ctx);
//PHP Object
$obj = json_decode($res);
//get id of register
$id=utf8_decode("$obj->id");
// return result
// return $id;
?>
1 个解决方案
#1
1
I am trying to access the idHTTP Delphi in a json server without success.
我尝试在没有成功的json服务器中访问idHTTP Delphi。
You are not posting the JSON data correctly. You cannot use a TStringList
, as that version of TIdHTTP.Post()
is meant for posting HTML webforms, which you are not posting. You need to post the JSON data using a TStream
instead, eg:
您没有正确地发布JSON数据。您不能使用TStringList,因为该版本的TIdHTTP.Post()是用来发布HTML webforms的,而您并没有发布。您需要使用TStream来发布JSON数据,例如:
procedure TForm4.Button2Click(Sender: TObject);
var
sResponse: string;
EnvStr : TStringStream;
begin
EnvStr := TStringStream.Create(Memo.Text, TEncoding.UTF8);
try
idHTTP.Request.ContentType := 'application/json';
try
sResponse := idHTTP.Post(EditURL.Text, EnvStr);
except
on E: Exception do
ShowMessage('Error on request: '#13#10 + e.Message);
end;
finally
EnvStr.Free;
MemoRet.Text := sResponse;
end;
I've tried all the alternatives and always got the same error: "HTTP / 1.1 401 Unauthorized".
我已经尝试了所有的选项,并且总是得到相同的错误:“HTTP / 1.1 401未经授权”。
Usually that means the server is asking for authentication credentials, which you are not providing. However, in this situation, there is no WWW-Authenticate
header present in the server's response to provide challenge information, which is in clear violation of the HTTP protocol spec.
通常,这意味着服务器请求身份验证凭证,而您没有提供。但是,在这种情况下,在服务器响应中没有WWW-Authenticate头来提供质询信息,这显然违反了HTTP协议规范。
The same format sent in PHP works perfectly
在PHP中发送的格式也很完美。
Then you need to use a packet sniffer, such as Wireshark, to capture the HTTP requests being generated by PHP and TIdHTTP
and then compare them for any differences that you can then code into TIdHTTP
as needed.
然后,您需要使用数据包嗅探器(如Wireshark)来捕获由PHP和TIdHTTP生成的HTTP请求,然后将它们与您可以根据需要编码到TIdHTTP中的任何差异进行比较。
Update: based on your PHP code, I can now see that your Delphi code is trying to POST
a JSON formatted string, but your PHP code is instead POST
ing an HTML webform containing name=value
pairs in application/x-www-form-urlencoded
format. There is no JSON involved in the request at all. Only the response is using JSON.
更新:根据您的PHP代码,我现在可以看到您的Delphi代码正在尝试发布一个JSON格式的字符串,但是您的PHP代码却在应用程序/x-www-form-urlencode格式发布了一个包含name=值对的HTML webform。请求中没有涉及到JSON。只有响应使用JSON。
Looking back at it now, the PHP code is acting on simply arrays, not on real JSON. I think you got confused between the two, because the representation of the array data looks like JSON but it is actually not. If you read the PHP documentation, http_build_query()
simply returns a string representing an HTTP url query string, and then stream_context_create()
is creating a stream based on an array of HTTP context options, where the query string is set as the content
option, and then file_get_contents()
is sending a request based on those options - in this case an HTTP POST
request with an access_token
header and the query string as the message body. Since no Content-Type
header is being specified, it defaults to application/x-www-form-urlencoded
.
现在回过头来看,PHP代码只在数组上执行,而不是在真正的JSON上。我认为你会混淆这两个,因为数组数据的表示看起来像JSON,但实际上不是。如果你阅读PHP文档,http_build_query()返回一个字符串代表一个HTTP url查询字符串,然后stream_context_create()创建一个流基于数组的HTTP上下文选项,设置为查询字符串的内容选择,file_get_contents()发送请求,然后基于这些选项——在这种情况下一个HTTP POST请求access_token头和查询字符串消息体。由于没有指定内容类型标头,所以它默认为应用程序/x-www-form-urlencode。
To POST
an application/x-www-form-urlencoded
request with TIdHTTP
, you were actually on the right track by using a TStringList
with TIdHTTP.Post()
, but you were populating the TStringList
with the wrong kind of data, and you were not sending the access_token
header containing your authentication credentials.
要将应用程序/x-www-form- uri编码的请求与TIdHTTP一起发布,您实际上是使用了一个TStringList和TIdHTTP. POST(),但是您使用错误的数据填充了TStringList,并且您没有发送包含身份验证凭据的access_token头。
The following Delphi code works when I test it:
下面的Delphi代码在我测试时工作:
procedure TForm4.Button2Click(Sender: TObject);
var
sResponse: string;
EnvStr : TStringList;
begin
EnvStr := TStringList.Create;
try
EnvStr.Add('name=TEST');
EnvStr.Add('email=teste@uol.com');
EnvStr.Add('phone=1147001211');
EnvStr.Add('mobilePhone=11992329909');
EnvStr.Add('address=Rua Jose Ricardo ');
EnvStr.Add('addressNumber=55');
EnvStr.Add('province=Test');
EnvStr.Add('notificationDisabled=True');
EnvStr.Add('city=Sao Paulo');
EnvStr.Add('state=SP');
EnvStr.Add('country=Brasil');
EnvStr.Add('postalCode=05567210 ');
EnvStr.Add('cpfCnpj=11111111111');
EnvStr.Add('personType=FISICA');
Http.Request.CustomHeaders.Values['access_token'] := '55b3ce85b47629eeee778c0f0c9be450f1b1bc84cc377975f2d3d0d3808a4636';
try
sResponse := idHTTP.Post(EditURL.Text, EnvStr);
except
on E: Exception do
ShowMessage('Error on request: '#13#10 + e.Message);
end;
finally
EnvStr.Free;
MemoRet.Text := sResponse;
end;
end;
Response received:
接收到的响应:
{"object":"customer","id":"cus_B5HmHFQSMZKD","name":"TEST","email":"teste@uol.com","company":null,"phone":"1147001211","mobilePhone":"11992329909","address":"Rua Jose Ricardo","addressNumber":"55","complement":null,"province":"Test","postalCode":"05567210","cpfCnpj":"11111111111","personType":"FISICA","deleted":false,"notificationDisabled":true,"city":null,"state":"null","country":"Brasil","foreignCustomer":false,"subscriptions":{"object":"list","hasMore":false,"limit":100,"offset":0,"data":[]},"payments":{"object":"list","hasMore":false,"limit":100,"offset":0,"data":[]},"notifications":{"object":"list","hasMore":false,"limit":100,"offset":0,"data":[{"object":"notification","id":"not_oZV4SlDvdjHf","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":true,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_RECEIVED","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_xNHXDZb4QHqP","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":true,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_OVERDUE","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_yt4BTyQsaRM1","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_DUEDATE_WARNING","scheduleOffset":10,"deleted":false},{"object":"notification","id":"not_LX1vanmAsBy9","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_DUEDATE_WARNING","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_AyYUHDExa5Zk","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_CREATED","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_b6NUt9qYZrM2","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_UPDATED","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_Z4e4SHdXsJaA","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"SEND_LINHA_DIGITAVEL","scheduleOffset":0,"deleted":false}]}}
{“对象”:“客户”,“id”:“cus_B5HmHFQSMZKD”、“名称”:“测试”,“电子邮件”:“teste@uol.com”,“公司”:空,“电话”:“1147001211”,“手机”:“11992329909”、“地址”:“Rua穆里卡多”、“addressNumber”:“55”、“补”:空,“省”:“测试”、“postalCode”:“05567210”、“cpfCnpj”:“11111111111”、“personType”:“运动”、“删除”:假的,”notificationDisabled”:真的,“城市”:空,“州”:“空”、“国家”:“巴西”、“foreignCustomer”:假的,“订阅”:{“对象”:“名单”,“hasMore”:假的,“限制”:100年,“抵消”:0,“数据”:[]},“支付”:{“对象”:“名单”,“hasMore”:假的,“限制”:100年,“抵消”:0,“数据”:[]},“通知”:{“对象”:“名单”,“hasMore”:假的,“限制”:100年,“抵消”:0,“数据”:[{“对象”:“通知”、“id”:“not_oZV4SlDvdjHf”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:真的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“PAYMENT_RECEIVED”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_xNHXDZb4QHqP”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:真的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“付款_OVERDUE”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_yt4BTyQsaRM1”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“PAYMENT_DUEDATE_WARNING”、“scheduleOffset”:10“删除”:假},{“对象”:“通知”、“id”:“not_LX1vanmAsBy9”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,”emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“PAYMENT_DUEDATE_WARNING”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_AyYUHDExa5Zk”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“PAYMENT_CREATED”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_b6NUt9qYZrM2”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,”emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,”smsEnabledForCustomer”:真的,“事件”:“PAYMENT_UPDATED”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_Z4e4SHdXsJaA”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“SEND_LINHA_DIGITAVEL”、“scheduleOffset”:0,“删除”:假}]} }
#1
1
I am trying to access the idHTTP Delphi in a json server without success.
我尝试在没有成功的json服务器中访问idHTTP Delphi。
You are not posting the JSON data correctly. You cannot use a TStringList
, as that version of TIdHTTP.Post()
is meant for posting HTML webforms, which you are not posting. You need to post the JSON data using a TStream
instead, eg:
您没有正确地发布JSON数据。您不能使用TStringList,因为该版本的TIdHTTP.Post()是用来发布HTML webforms的,而您并没有发布。您需要使用TStream来发布JSON数据,例如:
procedure TForm4.Button2Click(Sender: TObject);
var
sResponse: string;
EnvStr : TStringStream;
begin
EnvStr := TStringStream.Create(Memo.Text, TEncoding.UTF8);
try
idHTTP.Request.ContentType := 'application/json';
try
sResponse := idHTTP.Post(EditURL.Text, EnvStr);
except
on E: Exception do
ShowMessage('Error on request: '#13#10 + e.Message);
end;
finally
EnvStr.Free;
MemoRet.Text := sResponse;
end;
I've tried all the alternatives and always got the same error: "HTTP / 1.1 401 Unauthorized".
我已经尝试了所有的选项,并且总是得到相同的错误:“HTTP / 1.1 401未经授权”。
Usually that means the server is asking for authentication credentials, which you are not providing. However, in this situation, there is no WWW-Authenticate
header present in the server's response to provide challenge information, which is in clear violation of the HTTP protocol spec.
通常,这意味着服务器请求身份验证凭证,而您没有提供。但是,在这种情况下,在服务器响应中没有WWW-Authenticate头来提供质询信息,这显然违反了HTTP协议规范。
The same format sent in PHP works perfectly
在PHP中发送的格式也很完美。
Then you need to use a packet sniffer, such as Wireshark, to capture the HTTP requests being generated by PHP and TIdHTTP
and then compare them for any differences that you can then code into TIdHTTP
as needed.
然后,您需要使用数据包嗅探器(如Wireshark)来捕获由PHP和TIdHTTP生成的HTTP请求,然后将它们与您可以根据需要编码到TIdHTTP中的任何差异进行比较。
Update: based on your PHP code, I can now see that your Delphi code is trying to POST
a JSON formatted string, but your PHP code is instead POST
ing an HTML webform containing name=value
pairs in application/x-www-form-urlencoded
format. There is no JSON involved in the request at all. Only the response is using JSON.
更新:根据您的PHP代码,我现在可以看到您的Delphi代码正在尝试发布一个JSON格式的字符串,但是您的PHP代码却在应用程序/x-www-form-urlencode格式发布了一个包含name=值对的HTML webform。请求中没有涉及到JSON。只有响应使用JSON。
Looking back at it now, the PHP code is acting on simply arrays, not on real JSON. I think you got confused between the two, because the representation of the array data looks like JSON but it is actually not. If you read the PHP documentation, http_build_query()
simply returns a string representing an HTTP url query string, and then stream_context_create()
is creating a stream based on an array of HTTP context options, where the query string is set as the content
option, and then file_get_contents()
is sending a request based on those options - in this case an HTTP POST
request with an access_token
header and the query string as the message body. Since no Content-Type
header is being specified, it defaults to application/x-www-form-urlencoded
.
现在回过头来看,PHP代码只在数组上执行,而不是在真正的JSON上。我认为你会混淆这两个,因为数组数据的表示看起来像JSON,但实际上不是。如果你阅读PHP文档,http_build_query()返回一个字符串代表一个HTTP url查询字符串,然后stream_context_create()创建一个流基于数组的HTTP上下文选项,设置为查询字符串的内容选择,file_get_contents()发送请求,然后基于这些选项——在这种情况下一个HTTP POST请求access_token头和查询字符串消息体。由于没有指定内容类型标头,所以它默认为应用程序/x-www-form-urlencode。
To POST
an application/x-www-form-urlencoded
request with TIdHTTP
, you were actually on the right track by using a TStringList
with TIdHTTP.Post()
, but you were populating the TStringList
with the wrong kind of data, and you were not sending the access_token
header containing your authentication credentials.
要将应用程序/x-www-form- uri编码的请求与TIdHTTP一起发布,您实际上是使用了一个TStringList和TIdHTTP. POST(),但是您使用错误的数据填充了TStringList,并且您没有发送包含身份验证凭据的access_token头。
The following Delphi code works when I test it:
下面的Delphi代码在我测试时工作:
procedure TForm4.Button2Click(Sender: TObject);
var
sResponse: string;
EnvStr : TStringList;
begin
EnvStr := TStringList.Create;
try
EnvStr.Add('name=TEST');
EnvStr.Add('email=teste@uol.com');
EnvStr.Add('phone=1147001211');
EnvStr.Add('mobilePhone=11992329909');
EnvStr.Add('address=Rua Jose Ricardo ');
EnvStr.Add('addressNumber=55');
EnvStr.Add('province=Test');
EnvStr.Add('notificationDisabled=True');
EnvStr.Add('city=Sao Paulo');
EnvStr.Add('state=SP');
EnvStr.Add('country=Brasil');
EnvStr.Add('postalCode=05567210 ');
EnvStr.Add('cpfCnpj=11111111111');
EnvStr.Add('personType=FISICA');
Http.Request.CustomHeaders.Values['access_token'] := '55b3ce85b47629eeee778c0f0c9be450f1b1bc84cc377975f2d3d0d3808a4636';
try
sResponse := idHTTP.Post(EditURL.Text, EnvStr);
except
on E: Exception do
ShowMessage('Error on request: '#13#10 + e.Message);
end;
finally
EnvStr.Free;
MemoRet.Text := sResponse;
end;
end;
Response received:
接收到的响应:
{"object":"customer","id":"cus_B5HmHFQSMZKD","name":"TEST","email":"teste@uol.com","company":null,"phone":"1147001211","mobilePhone":"11992329909","address":"Rua Jose Ricardo","addressNumber":"55","complement":null,"province":"Test","postalCode":"05567210","cpfCnpj":"11111111111","personType":"FISICA","deleted":false,"notificationDisabled":true,"city":null,"state":"null","country":"Brasil","foreignCustomer":false,"subscriptions":{"object":"list","hasMore":false,"limit":100,"offset":0,"data":[]},"payments":{"object":"list","hasMore":false,"limit":100,"offset":0,"data":[]},"notifications":{"object":"list","hasMore":false,"limit":100,"offset":0,"data":[{"object":"notification","id":"not_oZV4SlDvdjHf","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":true,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_RECEIVED","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_xNHXDZb4QHqP","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":true,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_OVERDUE","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_yt4BTyQsaRM1","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_DUEDATE_WARNING","scheduleOffset":10,"deleted":false},{"object":"notification","id":"not_LX1vanmAsBy9","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_DUEDATE_WARNING","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_AyYUHDExa5Zk","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_CREATED","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_b6NUt9qYZrM2","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"PAYMENT_UPDATED","scheduleOffset":0,"deleted":false},{"object":"notification","id":"not_Z4e4SHdXsJaA","customer":"cus_B5HmHFQSMZKD","enabled":true,"emailEnabledForProvider":false,"smsEnabledForProvider":false,"emailEnabledForCustomer":true,"smsEnabledForCustomer":true,"event":"SEND_LINHA_DIGITAVEL","scheduleOffset":0,"deleted":false}]}}
{“对象”:“客户”,“id”:“cus_B5HmHFQSMZKD”、“名称”:“测试”,“电子邮件”:“teste@uol.com”,“公司”:空,“电话”:“1147001211”,“手机”:“11992329909”、“地址”:“Rua穆里卡多”、“addressNumber”:“55”、“补”:空,“省”:“测试”、“postalCode”:“05567210”、“cpfCnpj”:“11111111111”、“personType”:“运动”、“删除”:假的,”notificationDisabled”:真的,“城市”:空,“州”:“空”、“国家”:“巴西”、“foreignCustomer”:假的,“订阅”:{“对象”:“名单”,“hasMore”:假的,“限制”:100年,“抵消”:0,“数据”:[]},“支付”:{“对象”:“名单”,“hasMore”:假的,“限制”:100年,“抵消”:0,“数据”:[]},“通知”:{“对象”:“名单”,“hasMore”:假的,“限制”:100年,“抵消”:0,“数据”:[{“对象”:“通知”、“id”:“not_oZV4SlDvdjHf”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:真的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“PAYMENT_RECEIVED”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_xNHXDZb4QHqP”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:真的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“付款_OVERDUE”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_yt4BTyQsaRM1”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“PAYMENT_DUEDATE_WARNING”、“scheduleOffset”:10“删除”:假},{“对象”:“通知”、“id”:“not_LX1vanmAsBy9”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,”emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“PAYMENT_DUEDATE_WARNING”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_AyYUHDExa5Zk”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“PAYMENT_CREATED”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_b6NUt9qYZrM2”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,”emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,”smsEnabledForCustomer”:真的,“事件”:“PAYMENT_UPDATED”、“scheduleOffset”:0,“删除”:假},{“对象”:“通知”、“id”:“not_Z4e4SHdXsJaA”,“客户”:“cus_B5HmHFQSMZKD”、“启用”:真的,“emailEnabledForProvider”:假的,“smsEnabledForProvider”:假的,“emailEnabledForCustomer”:真的,“smsEnabledForCustomer”:真的,“事件”:“SEND_LINHA_DIGITAVEL”、“scheduleOffset”:0,“删除”:假}]} }