import requests import json url = "<https://xxxxx...
# general
y
import requests import json url = "https://xxxxx-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/vendor" payload = json.dumps({ "companyName": "Test Telecom", "currency": { "id": "1" }, "custentity_11724_pay_bank_fees": False, "custentity_2663_eft_file_format": { "id": "1", "refName": "ABA" }, "custentity_2663_payment_method": True, "custentity_eft_payment_method": False, "custentity_pr_payinpayroll": False, "custentity_pr_payroll_vendor": False, "custentity_pr_uk_offpayrollworker": False, "customForm": { "id": "77" }, "defaultAddress": "2Easy Telecom Australia", "email": "yogi@xxxxx.com", "emailPreference": { "id": "DEFAULT" }, "emailTransactions": True, "entityId": "2Easy Telecom-CORR - Direct Debit", "faxTransactions": False, "id": "945353", "isInactive": False, "isJobResourceVend": False, "isPerson": False, "legalName": "2Easy Telecom", "payablesAccount": { "id": "1621", }, "phone": "1000 726 470", "prepaymentBalance": 0, "printTransactions": False, "subsidiary": { "id": "215" } }) headers = { ....} response = requests.request("POST", url, headers=headers, data=payload) print(response.text) error: { "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1", "title": "Bad Request", "status": 400, "o:errorDetails": [ { "detail": "Error while accessing a resource. Please enter value(s) for: Payroll Balance Sheet Account, Payroll Vendor Category.", "o:errorCode": "USER_ERROR" } ] }
t
What's your query, @Yogi? Those fields are Infinet Fields, as is that error. I work for Infinet.
y
Hi @Tristan Day, nice to meet you here.. I want to create vendors using rest web service and I am getting error in that, is there any way to fix this error in the thread
s
#C2K2RJNAC
y
Yes, I am using suitetalkapi
t
@Yogi you just need to set that field to any value (as it isn't a payroll vendor it will never get used), or I think you can set a flag to "ignoremandatory"
s
my point was to post this in the channel called suitetalkapi as that room is specifically for this sort of topic.
y
@Shawn Talbert I got it now, I have joined that group. and will post in that group in future