Verkäufe übermitteln (Transaktion B2BSale, Operation: SaleTransmitB2B)
Ein Verkauf soll übermittelt werden. Hierzu werden an die Adresse https://b2b.beispielserver.com/
mittels der POST-Methode des HTTP-Protokolls folgende Daten vom Medientyp application/xml
übertragen:
<?xml version="1.0" encoding="utf-8"?>
<SaleTransmitB2BRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="urn:veloconnect:sale-B2B-1.6">
<BuyersID xmlns="urn:veloconnect:transaction-1.0">B127645</BuyersID>
<Credential xmlns="urn:veloconnect:transaction-1.0">
<Password>secret</Password>
</Credential>
<IsTest xmlns="urn:veloconnect:transaction-1.0">true</IsTest>
<CreateDate>2021-04-28T10:50:42.3168812+02:00</CreateDate>
<SaleTransmitB2BLine>
<ID>72458d29-2c31-4b99-8df5-9d25e3eadbdb</ID>
<SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0">
<ID>12345</ID>
</SellersItemIdentification>
<BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0">
<ID>111</ID>
</BuyersItemIdentification>
<QuantityFraction>1</QuantityFraction>
<SaleDate>2021-04-28T10:40:42.3168812+02:00</SaleDate>
<DocumentNumber>R23466</DocumentNumber>
<SalesPriceGross amountCurrencyID="EUR">99.95</SalesPriceGross>
<SalesPriceNet amountCurrencyID="EUR">83.99</SalesPriceNet>
<PostalCode>84034</PostalCode>
<SerialNumbers>
<SerialID kind="FrameNumber">ABC34656XYZ04</SerialID>
</SerialNumbers>
<SalesChannel>RETAIL</SalesChannel>
</SaleTransmitB2BLine>
<SaleTransmitB2BLine>
<ID>d870ee25-c1b2-4d90-84ac-704ae5be8cb3</ID>
<SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0">
<ID>6789</ID>
</SellersItemIdentification>
<BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0">
<ID>112</ID>
</BuyersItemIdentification>
<QuantityFraction>1</QuantityFraction>
<SaleDate>2021-04-28T10:45:42.3168812+02:00</SaleDate>
<DocumentNumber>R23467</DocumentNumber>
<SalesPriceGross amountCurrencyID="EUR">199.95</SalesPriceGross>
<SalesPriceNet amountCurrencyID="EUR">168.03</SalesPriceNet>
<PostalCode>84032</PostalCode>
<SerialNumbers>
<SerialID kind="FrameNumber">ABC56834XYZ12</SerialID>
</SerialNumbers>
<SalesChannel>RETAIL</SalesChannel>
</SaleTransmitB2BLine>
<SaleTransmitB2BLine>
<ID>37de3bd2-d958-4e7f-8400-f51fe810c16d</ID>
<SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0">
<ID>5789</ID>
</SellersItemIdentification>
<BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0">
<ID>222</ID>
</BuyersItemIdentification>
<QuantityFraction>0.01</QuantityFraction>
<SaleDate>2021-04-28T10:46:42.3168812+02:00</SaleDate>
<DocumentNumber>R23467</DocumentNumber>
<SalesPriceGross amountCurrencyID="EUR">9.95</SalesPriceGross>
<SalesPriceNet amountCurrencyID="EUR">8.36</SalesPriceNet>
<PostalCode>84032</PostalCode>
<SalesChannel>RETAIL</SalesChannel>
</SaleTransmitB2BLine>
</SaleTransmitB2BRequest>
Die Antwort des Servers sieht beispielsweise so aus:
<?xml version="1.0" encoding="utf-8"?>
<SaleTransmitB2BResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:veloconnect:sale-B2B-1.6">
<BuyersID xmlns="urn:veloconnect:transaction-1.0">B127645</BuyersID>
<ResponseCode xmlns="urn:veloconnect:transaction-1.0">200</ResponseCode>
<TransactionID xmlns="urn:veloconnect:transaction-1.0">44f80ce3-05c1-4a28-b981-8b4a0794a7a4</TransactionID>
<StatusCode xmlns="urn:veloconnect:transaction-1.0">84</StatusCode>
<IsTest xmlns="urn:veloconnect:transaction-1.0">true</IsTest>
</SaleTransmitB2BResponse>
Hieran ist folgendes zu erkennen:
Die erzeugte Transaktionsinstanz hat die TransactionID
44f80ce3-05c1-4a28-b981-8b4a0794a7a4
.Die Transaktion befindet sich im Zustand 84, d.h. der Import läuft.