Netsuite REST API - 在客户记录上设置税务登记号

问题描述 投票:0回答:2

看起来如此简单的事情令人遗憾的是令人头痛,并希望有人能指导我做错了什么。

我正在使用 NetSuite REST API 创建客户,并在发出请求时尝试设置税务登记号。请求似乎成功了,因为除了这一字段之外,所有内容都创建成功。

这是我正在使用的有效负载:

{
 "isperson": false,
 "companyname":"Homer Simpson LTD",
 "externalId": "Homer-UK3-Simpson-LTD",
 "subsidiary": "4",
 "email": "[email protected]",
 "phone": "01254354278",
 "taxRegistration": {
     "items": [
         {
            "address": "123 testing this out",
            "refName":"DEFAULT_TAX_001",
            "nexusCountry":{
                "id":"GB",
                "refName": "United Kingdom"
            },  
            "taxRegistrationNumber": "0125448653"
         }
     ]
 },
 "addressBook": {
        "items": [
            {
                "addressBookAddress": {
                    "zip": "RG7 5TT",
                    "city": "London",
                    "addr1": "5000 HELLO Close",
                    "state": "Berkshire",
                    "country": {
                        "id": "GB",
                        "refName": "United Kingdom"
                    },
                    "override": true
                }
                
            }
        ]
    }
}

有什么想法吗?我正在尝试根据通过以下方式找到的 REST API 使用“customer-taxRegistrationCollection”:https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2023.1/index.html# /定义/客户税注册集合

谢谢, 阿里夫

netsuite netsuite-rest-api
2个回答
0
投票

我已经与 Netsuite 进行了一次非常类似的通话,他们确认您必须安装 Suitetax 才能正常工作。 从安装2023.1开始就出现这个问题


0
投票

您有解决方案吗? 实际上,这适用于启用 suiteTax 的帐户,但我们还需要默认的税务注册号。 我们尝试使用taxRegistrationList创建客户,然后取回客户以获取添加的taxRegistrationNumbers的ID,并使用它尝试通过设置setDefaultTaxReg来更新客户,但客户没有使用DefaultTaxReg进行更新。有人对这个问题有任何想法吗?

Customer cust = (Customer) nsClient.getRecord("145997",RecordType.customer);

cust.setDefaultTaxReg(NetSuiteUtil.getRecordRef(String.valueOf(cust.getTaxRegistrationList().getCustomerTaxRegistration(0).getId())));

nsClient.updateRecord(cust);

© www.soinside.com 2019 - 2024. All rights reserved.