前言
Dynadot是通过ICANN认证的域名注册商,自2002年成立以来,服务于全球108个国家和地区的客户,为数以万计的客户提供简洁,优惠,安全的域名注册以及管理服务。
Dynadot平台操作教程索引(包括域名邮箱,解析,建站,优惠长期更新)
Dynadot.com提供的API是专为效率而构建的高级域名管理和获取工具包。在Dynadot平台上,我们提供了50多个命令来设置,管理,注册和竞标域名。
在具体的功能API代码前,请阅读关于Dynadot的API使用须知。
使用Dynadot API,可以查看当前用户在Dynadot平台的历史交易名单信息。
命令参数
如果发送查询Dynadot历史订单的命令,则须包含下列参数:
订购列表请求参数 | 解释 |
search_by | 您可以从以下列表中选择一个值来代表您的搜索类型:date_range、domain、order_id |
start_date | 您的查询开始日期的格式为yyyy/MM/dd |
end_date | 您的查询的结束日期格式为yyyy/MM/dd |
payment_method | 您可以从以下列表中选择多个值来表示您的付款方式: none_balance account_balance credit_card money_order paypal moneybookers bank_wire alipay payflow_credit_card2(已不再使用) wechat_pay ecash bank_transfer apple_pay checking_account sale union_pay paypal_account mercado_pago payoneer 但请使用逗号来分隔多个值,例如:account_balance,credit_card。 |
在成功发送查看域名历史订单信息的命令之后,返回的结果将以XML、CSV或是JSON格式的标签返回,其中XML的结果标签所代表含义由下图所示:
XML结果标签 | 解释 |
<OrderListResponse></OrderListResponse> | 响应的根节点 |
<OrderListHeader></OrderListHeader> | 订购清单标题 |
<ResponseCode></ResponseCode> | 如果操作成功,则为成功的"0",失败的"-1" |
<Status></Status> | 请求状态 |
<Error></Error> | 请求的错误信息仅在状态为“错误”时使用 |
<OrderListContent></OrderListContent> | 订购清单标题 |
<OrderList></OrderList> | 包含多个订单日志数据集 |
<OrderItem></OrderItem> | 包含单个订单日志数据 |
<OrderItemDomain></OrderItemDomain> | 包含按照此顺序的域名 |
<OrderId></OrderId> | 包含订单的ID |
<SubmittedDate></SubmittedDate> | 包含订单提交的日期 |
<Cost></Cost> | 包含订单的成本 |
<Status></Status> | 包含订单状态 |
示例
此处,使用API查询用户在dynadot的历史交易信息。
将高级域API请求发送到以下URL:https://api.dynadot.com/api3.xml。
在网页中,其显示样式如下:(示例为实际操作。)
Request (XML format)
https://api.dynadot.com/api3.xml?key=[API Key]&command=order_list&search_by=date_range&start_date=2024/01/01&end_date=2024/01/31&payment_method=account_balance,credit_card
Response (XML format)
<?xml version="1.0" encoding="UTF-8"?>
<OrderListResponse><OrderListHeader><ResponseCode>0</ResponseCode><Status>success</Status></OrderListHeader><OrderListContent><OrderList><Order><OrderId>123456</OrderId><SubmittedDate>1725514506547</SubmittedDate><Currency>USD</Currency><PaymentMethod>Account Balance</PaymentMethod><TotalCost>$8.00</TotalCost><TotalPaid>$8.00</TotalPaid><Status>Problem</Status><OrderItem><ItemType>Domain Registration</ItemType><Name>test.com</Name><Duration>1</Duration><Cost>2.99</Cost><Status>Completed</Status></OrderItem><OrderItem><ItemType>Domain Renewal</ItemType><Name>test1.ac</Name><Duration>1</Duration><Cost>3.99</Cost><Status>Completed</Status></OrderItem><OrderItem><ItemType>Domain Transfer</ItemType><Name>test2.de</Name><Duration>1</Duration><Cost>4.99</Cost><Status>Completed</Status></OrderItem><OrderItem><ItemType>Domain Registration</ItemType><Name>test3.gg</Name><Duration>1</Duration><Cost>5.99</Cost><Status>Completed</Status></OrderItem><OrderItem><ItemType>Domain Renewal</ItemType><Name>test4.uk</Name><Duration>1</Duration><Cost>6.99</Cost><Status>Completed</Status></OrderItem><OrderItem><ItemType>Domain Transfer</ItemType><Name>test5.net</Name><Duration>1</Duration><Cost>7.99</Cost><Status>Completed</Status></OrderItem></Order><Order><OrderId>123457</OrderId><SubmittedDate>1725514506547</SubmittedDate><Currency>EUR</Currency><PaymentMethod>Paypal</PaymentMethod><TotalCost>$100.00</TotalCost><TotalPaid>$100.00</TotalPaid><Status>Submitted</Status></Order></OrderList></OrderListContent>
</OrderListResponse>
Request (JSON format)
https://api.dynadot.com/api3.json?key=[API Key]&command=order_list&search_by=date_range&start_date=2024/01/01&end_date=2024/01/31&payment_method=account_balance,credit_card
Response (JSON format)
{"OrderListResponse": {"ResponseCode": 0,"Status": "success","OrderList": [{"OrderId": "123456","SubmittedDate": "2024/09/04","Currency": "USD","PaymentMethod": "Account Balance","TotalCost": "$8.00","TotalPaid": "$8.00","Status": "Problem","ItemList": [{"ItemType": "Domain Registration","Name": "test.com","Duration": 1,"Cost": "2.99","Status": "Completed"},{"ItemType": "Domain Renewal","Name": "test1.ac","Duration": 1,"Cost": "3.99","Status": "Completed"},{"ItemType": "Domain Transfer","Name": "test2.de","Duration": 1,"Cost": "4.99","Status": "Completed"},{"ItemType": "Domain Registration","Name": "test3.gg","Duration": 1,"Cost": "5.99","Status": "Completed"},{"ItemType": "Domain Renewal","Name": "test4.uk","Duration": 1,"Cost": "6.99","Status": "Completed"},{"ItemType": "Domain Transfer","Name": "test5.net","Duration": 1,"Cost": "7.99","Status": "Completed"}]},{"OrderId": "123457","SubmittedDate": "2024/09/04","Currency": "EUR","PaymentMethod": "Paypal","TotalCost": "$100.00","TotalPaid": "$100.00","Status": "Submitted","ItemList": []}]}}
XML格式
JSON格式