Brief Description
- create or update or delete invoice data.
Request URL
https://6409627-sb2.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=648&deploy=1
Request Method
Request Parameter Description
Parameter |
Required |
Type |
Description |
field leval |
operateType |
True |
String |
Operate type, value: create,update,delete |
1 |
docNum |
True |
String |
The document number of the Transaction |
1 |
date |
True |
String |
The Posting date of the Transaction,format of "2022/11/23" |
1 |
dueDate |
False |
String |
The due date of the Transaction,format of "2022/11/23" |
1 |
customer |
True |
String |
A customer who receives goods or services |
1 |
employee |
False |
String |
The employees of the transaction |
1 |
currency |
True |
String |
Currency of Transaction |
1 |
exchangeRate |
True |
Number |
The exchange rate |
1 |
account |
True |
String |
account of transaction |
1 |
subsidiary |
True |
String |
Subsidiary |
1 |
department |
False |
String |
Department |
1 |
fromLocation |
False |
String |
location of Transaction |
1 |
associatedDoc |
False |
String |
The purchase order number associated with the bill |
1 |
memo |
False |
String |
Memos for the transaction |
1 |
saleConNum |
False |
String |
Sales Contract Number |
1 |
vatInvoiceNum |
False |
String |
Vat Invoice No. |
1 |
vatRate |
False |
String |
Vat rate;for example 20% |
1 |
amount |
True |
Number |
The total amount of a transaction |
1 |
lines |
True |
Array |
line property name |
item |
True |
String |
Transaction goods or service |
2 |
quantity |
True |
Number |
The quantity of goods in the bill or invoice |
2 |
unit |
True |
String |
Unit |
2 |
unitPrice |
True |
Number |
Unit price of goods or service |
2 |
taxRate |
True |
String |
Tax rate;such as 20% |
2 |
memo |
False |
String |
Transaction line memo |
2 |
fromBin |
False |
String |
bin of transaction line |
2 |
serialNumber |
True |
String |
batch/serial number,If there are multiple batches/serial numbers, separate them with commas |
2 |
Samples
{
"operateType":"create",
"docNum": "invoice1",
"date": "2022/11/29",
"dueDate": "",
"customer": "cus1",
"employee": "",
"currency":"CNY",
"exchangeRate":1,
"account": "acc1",
"subsidiary": "徐工",
"department": "",
"fromLocation": "",
"associatedDoc":"assdoc1",
"memo": "",
"saleConNum":"",
"vatInvoiceNum":"",
"vatRate":"20%",
"amount":"1000",
"lines": [{
"item": "item1",
"quantity": 2,
"unit": "PCS",
"unitPrice": 1000,
"taxRate": "20%",
"memo": "",
"fromBin": "",
"serialNumber": "202212122,202212121"
}]
}
Response Parameter Description
Parameter |
Type |
Description |
success |
Boolean |
true:success,false:failed |
message |
String |
errors message |
data |
Array |
Data |
Return Samples
// Error
{
"success": false,
"message": "docNum must be filled!",
"data": []
}
// Success
{
"success": true,
"message": "",
"data": [{
"internalid" :3995
}]
}
Memo