I need to create a SalesOrder, ItemFulfillment, and a CashSale record in Netsuite for accounting purposes, using the REST API to represent a credit card transaction that already took place in one of our applications. The payment details use a Custom Form installed by the payment processing vendor. From Postman, I'm sending the following JSON to this endpoint: https://99990-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder
I was hoping to get the new Id from the salesOrder from this post call, so I can create a ItemFulfillment and a corresponding CashSale record. I also need to figure out how to move the orderStatus from PendingFulfillment to Billed in this process. The paymentMethod, the creditCardNumber and the CVV are not getting set/saved - perhaps there is a permissions setting that preventing from being displayed in NS? Is it possible to create a salesOrder, itemFulfillment, and cashSale all in one request?
Can anyone please help?
JSON for the salesOrder post request:
{
"billAddressList": {
"id": "10374963"
},
"currency": {
"id": 1
},
"ccapproved": true,
"customForm":{
"id":"132"
},
"custbody_fd_abp_address": "123 Rodeo Drive, Erwing, MN 55049",
"custbody_fd_abp_one_use_card": true,
"custbody_fd_abp_cvv": "123",
"custbody_fd_abp_cardholder_name": "B P TEST",
"custbody_fd_abp_cc_number": "************111",
"custbody_fd_abp_cc_number_masked": "1111",
"custbody_fd_abp_expiration_date": "05-2025",
"custbody_fd_abp_zip": "55049",
"department":"21",
"externalId": "9999993",
"entity": {
"id": "1627484"
},
"item": {
"items": [
{
"amount": 1.49,
"description": "My Application",
"item": {
"id": "84"
},
"itemSubtype": {
"id": "Sale"
},
"itemType": {
"id": "Service"
},
"line": 1,
"quantity": 1.0,
"rate": 1.49
}
]
},
"orderStatus": {
"id": "B"
},
"paymentMethod": {
"id": 5
},
"salesRep": {
"id": "151"
},
"shipDate": "2023-07-25",
"shippingAddress": {
"country": {
"id": "US"
},
"addr1": "20000 Kenbrigade Ct",
"city": "Erwing",
"state": "Minnesota",
"zip": "55049"
}
}