首页 文章

Zoho Invoice API 无效

提问于
浏览
1

我正在尝试三个 Zoho Invoice API,但它们无法正常工作。

Invoice API 是:

  • 列表 Contacts(Get 方法)

  • 列出客户 Payments(Get 方法)

  • 创建客户 Payment(Post 方法)

  • 列表 Contacts(Get 方法)

对于列表联系人我使用了 URL 作为https://invoice.zoho.com/api/contacts/?的 authToken =&scope=invoiceapi

但我的回答是

<Response status="0">
<Code>5</Code>
<Message>
<![CDATA[ Invalid URL Passed ]]>
</Message>
</Response>
  • 列出客户 Payments(Get 方法)

对于列表客户付款,我使用了 URL 作为

https://invoice.zoho.com/api/customerpayments?的 authToken =&scope=invoiceapi

我的回答是

<Response status="0">
<Code>5</Code>
<Message>
<![CDATA[ Invalid URL Passed ]]>
</Message>
</Response>
  • 创建客户 Payment(Post 方法)

要创建客户付款,我使用创建地图字段和 Post URL 方法,如下所示

<%{
map1 = map();
    map1.put("date", "2014-3-24");
    map1.put("amount", "10100");
    map1.put("customer_id", "<my custome ID>");
    map1.put("invoice_id", "<my Invoice ID>");
    map1.put("authtoken", "<my authtoken>");
    map1.put("scope", "invoiceapi");
    post = postUrl("https://invoice.zoho.com/api/customerpayments", map1,false);
    PostResponseCode=post.get("responseCode");
    PostResponseText=post.get("responseText");%>
    <%=PostResponseCode%>
<%=PostResponseText%> <%}%>

但我的回答是

500 服务器遇到意外情况,导致无法完成请求

任何人都可以帮我这个

1 回答

  • 3

    这是来自 Zoho 发票团队的 Reshma。我们最近为 Zoho Invoice 和 Zoho Books 推出了我们的 REST API。我建议你做的是,在你的 URL 中包含标签 V3,这样 api 调用看起来如下所示:

    https://invoice.zoho.com/api/v3/entity_name?authtoken=*************&organization_id=******
    

    您可以在我们的 API 文档这里上找到大部分问题的答案。您也可以随时联系我们support@zohoinvoice.com

    如果这对您有用,请告诉我。

    此致,Reshma

相关问题