XCMG NS API


VendorBill

<h5>Brief Description</h5> <ul> <li>create or update or delete vendorbill data.</li> </ul> <h5>Request URL</h5> <ul> <li><code>https://6409627-sb2.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=650&amp;amp;deploy=1</code></li> </ul> <h5>Request Method</h5> <ul> <li>POST</li> </ul> <h5>Request Parameter Description</h5> <table> <thead> <tr> <th>Parameter</th> <th>Required</th> <th>Type</th> <th>Description</th> <th>field level</th> </tr> </thead> <tbody> <tr> <td>operateType</td> <td>True</td> <td>String</td> <td>Operate type, value: create,update,delete</td> <td>1</td> </tr> <tr> <td>docNum</td> <td>True</td> <td>String</td> <td>The document number of the Transaction</td> <td>1</td> </tr> <tr> <td>documentType</td> <td>True</td> <td>String</td> <td>The document Type of the Transaction</td> <td>1</td> </tr> <tr> <td>date</td> <td>True</td> <td>String</td> <td>The Posting date of the Transaction,format of &quot;2022/11/23&quot;</td> <td>1</td> </tr> <tr> <td>vendor</td> <td>True</td> <td>String</td> <td>A supplier of goods or services</td> <td>1</td> </tr> <tr> <td>employee</td> <td>False</td> <td>String</td> <td>The employees of the transaction</td> <td>1</td> </tr> <tr> <td>currency</td> <td>True</td> <td>String</td> <td>Currency of Transaction</td> <td>1</td> </tr> <tr> <td>exchangeRate</td> <td>True</td> <td>Number</td> <td>The exchange rate</td> <td>1</td> </tr> <tr> <td>account</td> <td>True</td> <td>String</td> <td>account of transaction</td> <td>1</td> </tr> <tr> <td>amount</td> <td>True</td> <td>Number</td> <td>The total amount of a transaction</td> <td>1</td> </tr> <tr> <td>billType</td> <td>True</td> <td>String</td> <td>&quot;Item Bill&quot; or &quot;Expense Bill&quot;</td> <td>1</td> </tr> <tr> <td>subsidiary</td> <td>True</td> <td>String</td> <td>Subsidiary,Default to:&quot;徐工俄罗斯有限责任公司(新徐俄)&quot;</td> <td>1</td> </tr> <tr> <td>department</td> <td>False</td> <td>String</td> <td>Department</td> <td>1</td> </tr> <tr> <td>fromLocation</td> <td>False</td> <td>String</td> <td>location of Transaction</td> <td>1</td> </tr> <tr> <td>associatedDoc</td> <td>False</td> <td>String</td> <td>Documents related to transaction processing</td> <td>1</td> </tr> <tr> <td>memo</td> <td>False</td> <td>String</td> <td>Memos for the transaction</td> <td>1</td> </tr> <tr> <td>saleConNum</td> <td>False</td> <td>String</td> <td>Sales Contract Number</td> <td>1</td> </tr> <tr> <td>vatInvoiceNum</td> <td>False</td> <td>String</td> <td>Vat Invoice No.</td> <td>1</td> </tr> <tr> <td>purchaseContract</td> <td>False</td> <td>String</td> <td>Purchase Contract No.</td> <td>1</td> </tr> <tr> <td>lines</td> <td>True</td> <td>Array</td> <td>line property name</td> </tr> <tr> <td>item</td> <td>False</td> <td>String</td> <td>Transaction goods or service</td> <td>2</td> </tr> <tr> <td>expenseCategory</td> <td>False</td> <td>String</td> <td>Exppense Category</td> <td>2</td> </tr> <tr> <td>quantity</td> <td>True</td> <td>Number</td> <td>The quantity of goods in the bill or invoice</td> <td>2</td> </tr> <tr> <td>unit</td> <td>False</td> <td>String</td> <td>Unit</td> <td>2</td> </tr> <tr> <td>unitPrice</td> <td>True</td> <td>Number</td> <td>Unit price of goods or service</td> <td>2</td> </tr> <tr> <td>taxRate</td> <td>True</td> <td>String</td> <td>Tax rate;such as 20%</td> <td>2</td> </tr> <tr> <td>memo</td> <td>False</td> <td>String</td> <td>Transaction line memo</td> <td>2</td> </tr> <tr> <td>fromBin</td> <td>False</td> <td>String</td> <td>bin of transaction line</td> <td>2</td> </tr> <tr> <td>serialNumber</td> <td>False</td> <td>String</td> <td>batch/serial number,If there are multiple batches/serial numbers, separate them with commas.If itemType=&quot;vehicle&quot; ,then this field is mandatory</td> <td>2</td> </tr> <tr> <td>itemType</td> <td>False</td> <td>String</td> <td>If the head field &quot;billType&quot; is &quot;Expense Bill&quot;,this field is not mandatory. if the head field &quot;billType&quot; is &quot;Item Bill&quot;,this field is mandatory and assigned according to the following rules: If the item is a whole machine, the field is &quot;vehicle&quot;. If the item is a spare part, the field is &quot;spare part&quot;.</td> <td>2</td> </tr> </tbody> </table> <h5>Samples</h5> <pre><code> { &amp;quot;operateType&amp;quot;:&amp;quot;create&amp;quot;,     &amp;quot;docNum&amp;quot;: &amp;quot;&amp;quot;,     &amp;quot;date&amp;quot;: &amp;quot;2023/02/08&amp;quot;,     &amp;quot;vendor&amp;quot;: &amp;quot;Айнабеков Ергали Абдуакасович ИП&amp;quot;, &amp;quot;employee&amp;quot;: &amp;quot;Крюков Николай Николаевич&amp;quot;, &amp;quot;currency&amp;quot;:&amp;quot;RUB&amp;quot;, &amp;quot;exchangeRate&amp;quot;:&amp;quot;1&amp;quot;,     &amp;quot;account&amp;quot;: &amp;quot;60.01&amp;quot;, &amp;quot;amount&amp;quot;: 1000,     &amp;quot;subsidiary&amp;quot;: &amp;quot;徐工俄罗斯有限责任公司(新徐俄)&amp;quot;,     &amp;quot;department&amp;quot;: &amp;quot;отдел сервисного обслуживания&amp;quot;,     &amp;quot;fromLocation&amp;quot;: &amp;quot;БП-000065&amp;quot;, &amp;quot;associatedDoc&amp;quot;:&amp;quot;&amp;quot;,     &amp;quot;memo&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;saleConNum&amp;quot;:&amp;quot;&amp;quot;, &amp;quot;vatInvoiceNum&amp;quot;:&amp;quot;&amp;quot;,     &amp;quot;lines&amp;quot;: [{         &amp;quot;item&amp;quot;: &amp;quot;ZL50RU&amp;quot;, &amp;quot;expenseCategory&amp;quot; : &amp;quot;Страхование автотранспорта&amp;quot;,         &amp;quot;quantity&amp;quot;: &amp;quot;1&amp;quot;,         &amp;quot;unit&amp;quot;: &amp;quot;PCS&amp;quot;,         &amp;quot;unitPrice&amp;quot;: 1000,         &amp;quot;taxRate&amp;quot;: &amp;quot;20%&amp;quot;,         &amp;quot;memo&amp;quot;: &amp;quot;&amp;quot;,         &amp;quot;fromBin&amp;quot;: &amp;quot;БП-000065-1&amp;quot;,         &amp;quot;serialNumber&amp;quot;: &amp;quot;XUG0050GHLCB02231&amp;quot;, &amp;quot;itemType&amp;quot;: &amp;quot;vehicle&amp;quot;     }] }</code></pre> <h5>Response Parameter Description</h5> <table> <thead> <tr> <th>Parameter</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>success</td> <td>Boolean</td> <td>true:success,false:failed</td> </tr> <tr> <td>message</td> <td>String</td> <td>errors message</td> </tr> <tr> <td>data</td> <td>Array</td> <td>Data</td> </tr> </tbody> </table> <h5>Return Samples</h5> <pre><code> // Error {     &amp;quot;success&amp;quot;: false,     &amp;quot;message&amp;quot;: &amp;quot;docNum must be filled!&amp;quot;,     &amp;quot;data&amp;quot;: [] } // Success { &amp;quot;success&amp;quot;: true, &amp;quot;message&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;data&amp;quot;: [{ &amp;quot;internalid&amp;quot; :3995 }] }</code></pre> <h5>Memo</h5> <ul> <li>For certification information, please see <a href="https://www.showdoc.com.cn/xcmgnsapi/9352531526636929">Interface Certification Information</a></li> </ul>

页面列表

ITEM_HTML