You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Xero Invoice/:id/Email端点发送PDF附件并抄送发件人?

关于Xero Invoice/:id/Email端点的PDF附件及发件人副本功能

可以通过API实现这两个需求,具体操作如下:

1. 附加PDF发票作为附件

调用Invoice/:id/Email端点时,在请求体中添加AttachPDF参数并设置为true,系统会自动将发票PDF作为附件包含在邮件中。示例请求体结构如下:

{
  "To": "customer@example.com",
  "Subject": "Your Invoice",
  "Body": "Please find your invoice attached.",
  "AttachPDF": true
}

2. 向发件人发送副本

在请求体中添加SendMeACopy参数并设置为true,即可触发给当前授权用户的邮箱发送邮件副本的功能。结合PDF附件的完整请求体示例:

{
  "To": "customer@example.com",
  "Subject": "Your Invoice",
  "Body": "Please find your invoice attached.",
  "AttachPDF": true,
  "SendMeACopy": true
}

这两个参数的说明在官方文档中未明确高亮,但实际调用时完全支持,和UI端的功能逻辑一致。

内容的提问来源于stack exchange,提问作者Joseph

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 07:34:51