Skip to content

Instantly share code, notes, and snippets.

@thhermansen
Last active September 30, 2015 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thhermansen/1730187 to your computer and use it in GitHub Desktop.
Save thhermansen/1730187 to your computer and use it in GitHub Desktop.
Order Export
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://users.example.com">
<env:Body>
<order>
<!--
The total amount can be used to verify that
sums calculated by Thalamus and NAV are in sync
-->
<totalAmount>21.0</totalAmount>
<!--invisoRef is also known as SO# in NAV-->
<invisoRef>123</invisoRef>
<customer>
<no>100000</no>
<contactName>Thorbjørn Hermansen</contactName>
<customerRef>Meglers referanse her</customerRef>
</customer>
<!--
Address to the estate.
Country will most likely be blank as it defaults to Norway(?)
-->
<estateAddress>
<street1>Karl Johans gate 13</street1>
<street2 />
<zipCode>0054</zipCode>
<postalArea>Oslo</postalArea>
<country />
</estateAddress>
<invoiceRecipient>
<!-- invoice recipient element might *one* of the following: -->
<!-- EITHER: When the recipient ID is known to Thalamus (has been invoiced before) we'll send the id/no -->
<no>2</no>
<!-- OR: When the recipient new, we'll send over the data so a new customer can be created -->
<type>privat</type>
<name1>Dr. Camilla Solheim</name1>
<name2></name2>
<!--
invoiceEmail may contain an email. If given it should placed in
the following database column in NAV: "Cust. Inv. Email Address"
(under fanen Kommunikasjon på Kundekortet).
-->
<invoiceEmail>invoice@example.com</invoiceEmail>
<contactInformation>
<email>th@skalar.no</email>
<telephone>22 22 22 22</telephone>
<mobile>40451388</mobile>
<fax>22 22 22 23</fax>
</contactInformation>
<address>
<street1>Karl Johans gate 13</street1>
<street2></street2>
<zipCode>0054</zipCode>
<postalArea>Oslo</postalArea>
<country />
</address>
</invoiceRecipient>
<invoiceLines>
<invoiceLine>
<type>text</type>
<content>Ordre #1</content>
</invoiceLine>
<invoiceLine>
<type>item_line</type>
<description />
<itemUnit />
<itemVariant>PRODUKT</itemVariant>
<quantity>1.0</quantity>
<unitPrice>20.0</unitPrice>
<!-- Discount is given either as percentage or as amount (in this example it could have been given as 10.00) -->
<discountPercentage>50</discountPercentage>
<discountAmount></discountAmount>
</invoiceLine>
<!-- ... might multiple lines related to Order #1 -->
<invoiceLine>
<type>text</type>
<content>Ordre #2</content>
</invoiceLine>
<invoiceLine>
<type>item_line</type>
<itemNo>FT-020</itemNo>
<description />
<itemUnit />
<itemVariant>PRODUKT</itemVariant>
<quantity>2</quantity>
<unitPrice>5.5</unitPrice>
<discountPercentage></discountPercentage>
<discountAmount></discountAmount>
</invoiceLine>
<!-- ... might multiple lines related to Order #2 -->
</invoiceLines>
</order>
</env:Body>
</env:Envelope>
<Soap:Envelope xmlns:Soap="http://schemas.xmlsoap.org/soap/envelope/">
<Soap:Body>
<OrderResult xmlns="urn:microsoft-dynamics-schemas/orders">
<OrderResult>
<success>true</success>
<orderId>1</orderId>
<invoiceRecipientNo>2</invoiceRecipientNo>
</OrderResult>
</OrderResult>
</Soap:Body>
</Soap:Envelope>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment