简体   繁体   English

有没有办法以编程方式检查 Avalara API 状态?

[英]Is there a way to check the Avalara API Status in a programmatic way?

Sometimes, Avalara services might be be down due to some internal issue.有时,由于某些内部问题,Avalara 服务可能会关闭。 We check the status by visiting https://status.avalara.com/我们通过访问https://status.avalara.com/查看状态

We are building some function in the back end which needs to be triggered only when Avalara Service is down.我们正在后端构建一些仅在 Avalara 服务关闭时才需要触发的功能。 Is there any API which checks, is Avalara is Up and running?是否有任何 API 可以检查 Avalara 是否已启动并正在运行?

PS : I went through, Ping API but not confident on it. PS:我通过了, Ping API 但对它没有信心。 Is there a way I could test it?有什么方法可以测试吗?

https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Utilities/Ping/ https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Utilities/Ping/

Avalara Ping API returns Avalara Ping API 返回

PingResultModel Ping结果模型

. . So in case, if there are issues with the Avalara API - all the properties of PingResultModel will be null.因此,如果 Avalara API 出现问题 - PingResultModel 的所有属性都将为空。

So on checking the所以在检查

version版本

property of PingResultModel, we can find whether Avalara Service is up or not. PingResultModel 的属性,我们可以查看 Avalara Service 是否已启动。

PingResultModel : https://developer.avalara.com/api-reference/avatax/rest/v2/models/PingResultModel/ PingResultModel : https://developer.avalara.com/api-reference/avatax/rest/v2/models/PingResultModel/

Use GET https://sandbox-rest.avatax.com/api/v2/utilities/ping using your Account Username and Password.使用您的帐户用户名和密码使用 GET https://sandbox-rest.avatax.com/api/v2/utilities/ping

cURL:卷曲:

curl --location --request GET 'https://sandbox-rest.avatax.com/api/v2/utilities/ping' \
--header 'Authorization: Basic bXl1c2VyaWQ6bXlwYXNzd29yZA=='

Example Response:示例响应:

{
    "version": "21.7.0",
    "authenticated": true,
    "authenticationType": "UsernamePassword",
    "authenticatedUserName": "my.username",
    "authenticatedUserId": 123456,
    "authenticatedAccountId": 1100001234,
    "authenticatedCompanyId": 0
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 检查 avalara TLS 1.2 合规性 - Check avalara TLS 1.2 compliance 什么是avalara的Landed Cost API实时URL? - What is avalara's Landed Cost API Live URL? Avalara:json 日期的“DateTime”有效格式是什么? - Avalara: What is a “DateTime” valid format for the json date? Avalara:由于 JSON 转换异常,无法从 TransactionBuilder 创建 TransactionModel - Avalara: Cannot create TransactionModel from TransactionBuilder because of a JSON conversion exception Acumatica和Avalara未能获得税收 - Acumatica and Avalara and Failed to Get Taxes 如何解决安装Avalara的“您的要求无法解决为一组可安装的软件包”的问题? - How to fix “Your requirements could not be resolved to an installable set of packages” for installing Avalara? 一个Pica Avalara Avatax Magento Extension与Magento Enterprise Edition 1.13兼容,有人试图集成两者吗? - One Pica Avalara Avatax Magento Extension compatibility with Magento Enterprise Edition 1.13, has anyone tried to integrate the two yet? Suitescript 完成后触发 Avalara 运行 - Trigger Avalara to run after Suitescript completes 在Avalara集成方面需要帮助 - Need help in Avalara Integration 对Django Oscar中的所有产品征收18%税的最佳方法是什么? - What is the best way to apply 18% tax to all products in Django Oscar?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM