Bestellung

Name der API

URL: /api/legacy/order

Methode: GET | PUT | DELETE | POST

Öffentlich: ja | nein


URL-Parameter

parameter (Types)

Beschreibung


Daten

```

7ffbd5bf-e2dc-475c-9e34-1e66d6f15a58 ```

-------------------

**Rückgabewert**

* Erfolgsfall

  **Code**: `200 OK`

  > Beschreibung

* Fehlerfall

  **Code**: `404 Not Found` | `500 Server failure`

  > Beschreibung

-------------------

**Beispielaufruf**

```javascript
fetch('/', {
    method: 'POST',
    mode: 'cors',
    redirect: 'follow',
    headers: new Headers({
        'Content-Type': 'application/javascript'
    })
})
.then(function(response) {
    /* handle response */
})
.catch(function(error) {
    /* handle error */
});
```
Name der API

Beschreibung

Beschreibung


URL: /api/legacy/order

Methode: POST

Öffentlich: ja


URL-Parameter

parameter (Types)

Beschreibung


Daten

json { "companyOrderID": "0001/01/61", "notice": "Das ist eine Kassen Bestellung", "shid": 1, "dcid": 1, "payments": [ { "type": 20, "owner": "", "number": "", "option1": "", "option2": "", "option3": "", "state": "" } ], "user": { "uid" : 33 "userName": "[email protected]", "formOfAddress": "Herr", "letterFormOfAddress": "Sehr geehrter Herr", "birthday": "1977-01-04 00:00:00", "custom1": "Das ist eine Information", "custom2": "Das ist eine Beschreibung", "phone": "02562 165984", "email": "[email protected]", "title": "Dr.", "firstName": "Max", "surName": "Müller" }, "sellTo": { "aid": 263, "company": "schukai GmbH", "address1": "Münchenerstrasse 563", "address2": "", "zip": "80331", "city": "München", "country": "de" }, "shipTo": { "aid": 264, "company": "schukai GmbH", "title": "Dr.", "firstName": "Max", "surName": "Müller", "address1": "Packstation 123", "address2": "1326586948", "zip": "82290", "city": "Landsberied", "country": "de" }, "positions": [ { "iid": "10056", "optional": "40", "name": "T-Shirt", "itemNumber": "3265-632", "ean": "3625896514756", "customerNumber": "", "count": 1, "gross": 4995, "net": 4197, "currency": "EUR", "vat": 1900, "priceType": "", "custom1": "", "custom2": "", "custom3": "", "customized": "", "description": "", "salesman": 126 } ], "sys": { "reserverStockPositions": false, "createDelivery": true, "createEdiOrder": true } }

16e86023-393e-4b09-a118-9e564c82d428 json { "dataset": [ { "companyOrderID": "0001/1/26562", "notice": "Das ist eine Kassen Bestellung", "shid": 1, "payments": [], "user": { "userName": "POS_0001/1/26562", "formOfAddress": "", "letterFormOfAddress": "", "birthday": "", "custom1": "", "custom2": "", "company": "" }, "sellTo": { "company": "schukai GmbH", "address1": "Münchenerstrasse 563", "address2": "", "zip": "80331", "city": "München", "country": "de" }, "positions": [ { "iid": "10083", "optional": "S", "ean": "9815675981834", "count": 1, "gross": 999, "net": 839, "currency": "EUR", "vat": 1900, "priceType": "", "custom1": "", "custom2": "", "custom3": "", "name": "T-Shirt - Leopard", "itemNumber": "10083", "salesman": 1 } ] }, { "companyOrderID": "undefined/1/26562", "notice": "Das ist eine Kassen Bestellung", "shid": 1, "payments": [], "user": { "userName": "POS_undefined/1/26562", "formOfAddress": "", "letterFormOfAddress": "", "birthday": "", "custom1": "", "custom2": "", "company": "" }, "sellTo": { "company": "schukai GmbH", "address1": "Münchenerstrasse 563", "address2": "", "zip": "80331", "city": "München", "country": "de" }, "positions": [ { "iid": "10083", "optional": "S", "ean": "9815675981834", "count": 1, "gross": 999, "net": 839, "currency": "EUR", "vat": 1900, "priceType": "", "custom1": "", "custom2": "", "custom3": "", "name": "T-Shirt - Leopard", "itemNumber": "10083", "salesman": 1 } ] }, { "companyOrderID": "0001/1/26561", "notice": "Das ist eine Kassen Bestellung", "shid": 1, "payments": [], "user": { "userName": "POS_0001/1/26561", "formOfAddress": "", "letterFormOfAddress": "", "birthday": "", "custom1": "", "custom2": "", "company": "" }, "sellTo": { "company": "schukai GmbH", "address1": "Münchenerstrasse 563", "address2": "", "zip": "80331", "city": "München", "country": "de" }, "positions": [ { "iid": "10083", "optional": "S", "ean": "9815675981834", "count": 1, "gross": 999, "net": 839, "currency": "EUR", "vat": 1900, "priceType": "", "custom1": "", "custom2": "", "custom3": "", "name": "T-Shirt - Leopard", "itemNumber": "10083", "salesman": 1 } ] } ] } -------------------

**Rückgabewert**

* Erfolgsfall

  **Code**: `200 OK`

  > Beschreibung

* Fehlerfall

  **Code**: `404 Not Found` | `500 Server failure`

  > Beschreibung

-------------------

**Beispielaufruf**

```javascript
fetch(url, {
    method: 'POST',
    body: JSON.stringify(self.order),
    headers: new Headers({
        'Content-Type': 'application/json'
    })
}).then(function(response) {
    if(response.status===201) {
        /** Bestellung wurde erfolgreich angelegt */
    }
}).catch(function(error) {
    /** handle error */
});
```

Kommentare