-->

SMARTapi Documentation

Create / Update Sales Order Lines

Create a new salesorderline.

 

Url

https://app.inventio.it/apidemo/smartapi/?type=SALESORDERLINE-POST&token={E915CBA6-5E7C-49B6-AB9A-EFDAE9B6B17D}

Type

POST

Request

<?xml version="1.0" encoding="ISO-8859-1"?>
<postdata>
    <sales-order-line>
        <document-type>order</document-type> 
        <document-no>1004</document-no>
        <line-no>10000</line-no>
        <type>item</type>
        <no>1000</no>
        <description>Bil</description>
        <quantity>1</quantity>
        <unit-price>1250,0</unit-price>
        <currency-code>USD</currency-code>
        <line-discount-procent>15</line-discount-procent>
        <global-dimension-1>Salg</global-dimension-1>
        <global-dimension-2>Mercedes</global-dimension-2>
<location-code>Web</location-code> <variant-code>Red</variant-code> </sales-order-line> </postdata>

Response

<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
    <status>OK</status>
    <document-type>Faktura</document-type>
    <document-no>1004</document-no>
    <line-no>10000</line-no>
</root> 

Response-ERROR

<?xml version='1.0' encoding='ISO-8859-1'?>
<error>
    <message>Error message from Microsoft Dynamics NAV</message>
    <message>Feltet Department Code i tabellen Sales Line indeholder en værdi (ERROR), som ikke blev fundet i den relaterede tabel (Dimension Value).</message>

</error>