Reputation: 11
I’m using PHP CodeIgniter 3 to interact with the NetSuite API to create vendors. While the API request succeeds and the vendor is created, the address is not saved in the "Address Book" section of NetSuite
Expected Behavior:
The vendor’s address should appear in NetSuite under the "AddressBook" section. Here is my oracle guide fro vendor as my reference https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2024.2/index.html#/definitions/vendor-addressBook-addressBookAddress
Actual Behavior:
The vendor is created, but the address does not appear in NetSuite.
Question:
Additional Context:
The NetSuite API documentation mentions an override
parameter. I tried including it but still had no success.
I verified that other fields like companyName
and phone
are saved correctly.
I’m using CodeIgniter 3 for this implementation.
Here’s the relevant payload I’m sending:
$payload = [
"companyName" => "Vendor Test for Address 103",
"subsidiary" => $info['primary_subsidiary_id'],
"category" => $info['product_category_id'],
"defaultShippingAddress" => "9161",
"email" => $info['supplier_email_address'],
"phone" => "0917223333",
"isperson" => $info['type'] == 1 ? false : true,
"firstname" => $firstname,
"lastname" => $lastname,
"printOnCheckAs" => $info['print_check_on_as'],
"custentity4" => 1,
"defaultAddress" => "B13 L7 Walnt Street Calendola Village San Pedro, Laguna PH WF2",
"addressBookCollection" => [
"items" => [
[
"addressBookElement" => [
"defaultBilling" => "T",
"defaultShipping" => "F",
"addressBookAddress_text" => "1234 Main St San Pedro, Laguna 4023 PH WF2!",
"addressBookAddress" => [
"addr1" => "1234 Main St",
"addr2" => "Suite 101",
"city" => "Los Angeles",
"state" => "CA",
"zip" => "90001"
]
]
]
]
]
];
Upvotes: 1
Views: 11