Retoure

Schlüssel Beschreibung
orderOID OID Bestellnummer pflicht
quantities Positionen optional

Anlegen einer Retoure ohne Positionen

POST Request:

{
    "dataset": [
        {
            "orderOID": 1000
        }
    ]
}

Response:

{
    "dataset": [
        {
            "dataset": {
                "orderOID": 1000,
                "quantities": [],
                "rid": 1042
            }
        }
    ],
    "sys": {
        "message": "200 OK",
        "code": 200
    }
}

Anlegen einer Retoure und einer Position mit SKU

Request:

{
    "dataset": [
        {
            "orderOID": 1000,
            "quantities": [
                {
                    "itemSKU": "4867578957529",
                    "positionCount": 1,
                    "type": 3,
                    "reason": 0,
                    "info": ""
                }
            ]
        }
    ]
}
Response:

{
    "dataset": [
        {
            "dataset": {
                "orderOID": 1000,
                "quantities": [
                    {
                        "itemIID": 10065,
                        "positionVariant": "__UNIQUE__",
                        "positionCount": 1,
                        "type": 3,
                        "reason": 0,
                        "info": "",
                        "itemSKU": "4867578957529",
                        "positionCreated": "2021-05-26T11:11:37",
                        "positionDescription": "Smartwatch Phone BLK",
                        "turnoverOID": 1043,
                        "srqid": 47
                    }
                ],
                "rid": 1043
            },
            "sys": {
                "message": "201 Created",
                "code": 201
            }
        }
    ],
    "sys": {
        "message": "201 Created",
        "code": 201
    }
}

Anlegen einer Retoure und eine Position mit IID und Variante

{
    "dataset": [
        {
            "orderOID": 1000,
            "quantities": [
                {
                   "itemIID": 10065,
                   "positionVariant": "__UNIQUE__",
                   "positionCount": 1,
                   "type": 3,
                   "reason": 0,
                   "info": ""
                }
            ]
        }
    ]
}

Anlegen einer Retoure und mehrere Positionen

{
    "dataset": [
        {
            "orderOID": 1000,
            "quantities": [
                {
                    "itemIID": 10065,
                    "positionVariant": "__UNIQUE__",
                    "positionCount": 1,
                    "type": 3,
                    "reason": 0,
                    "info": ""
                },
                {
                    "itemSKU": "4867578957530",
                    "positionCount": 1,
                    "type": 3,
                    "reason": 0,
                    "info": ""
                }
            ]
        }
    ]
}

Update

Wenn die srqid übergeben wird , ist es ein Update

{
    "dataset": [
        {
            "orderOID": 1000,
            "quantities": [
                {
                    "srqid": 2369,
                    "itemIID": 10065,
                    "positionVariant": "__UNIQUE__",
                    "positionCount": 1,
                    "type": 3,
                    "reason": 0,
                    "info": ""
                },
                {
                    "srqid": 2370,
                    "itemSKU": "4867578957530",
                    "positionCount": 1,
                    "type": 3,
                    "reason": 0,
                    "info": ""
                }
            ]
        }
    ]
}

Fehlermeldungen

Bei Fehler wird der komplette Request nicht verarbeitet.

{
    "sys": {
        "error": {
            "code": 404,
            "message": "404 Not Found"
        },
        "message": "404 Not Found",
        "code": 404
    },
    "dataset": [
        {
            "dataset": {
                "orderOID": 1000,
                "quantities": [
                    {
                        "itemIID": 10065,
                        "positionVariant": "__UNIQUE__",
                        "positionCount": 1,
                        "type": 3,
                        "reason": 0,
                        "info": "",
                        "itemSKU": "4867578957529",
                        "positionCreated": "2021-05-26T11:29:52",
                        "positionDescription": "Smartwatch Phone BLK"
                    },
                    {
                        "itemSKU": "4867578957530",
                        "positionCount": 1,
                        "type": 3,
                        "reason": 0,
                        "info": ""
                    }
                ]
            },
            "sys": {
                "error": {
                    "code": 404,
                    "message": "404 Not Found",
                    "hint": "Position mit der SKU 4867578957530 wurde nicht gefunden."
                },
                "message": "404 Not Found",
                "code": 404
            }
        }
    ]
}

Retouren Fähige Positionen auslesen

GET /api/plugin/turnover/retourablepositions/{oid}

{
    "dataset": {
        "1002": {
            "erpID": "",
            "erpName": "",
            "erpNumber": "",
            "erpLastUpdate": "2020-02-20T10:56:55",
            "erpCreation": "2020-02-20T10:56:55",
            "archived": false,
            "oid": 1002,
            "orderDate": "2019-02-20T10:56:55",
            "orderState": 57,
            "orderLastStatusChange": "2019-02-20T11:06:22",
            "customerUID": 31,
            "customerNotice": "",
            "billingAddressAID": 18,
            "deliveryAddressAID": 18,
            "deliveryNotice": "",
            "paymentPID": 102,
            "assigndTickets": "",
            "resubmissionDate": "1970-01-01T12:00:00",
            "resubmissionInfo": "",
            "acquisitionPartnerID": 0,
            "acquisitionInfo": "",
            "acquisitionRedirect": null,
            "acquisitionDate": "1970-01-01T12:00:00",
            "shippingNotice": "",
            "shippingDCID": 2,
            "retoureRID": 0,
            "companySHID": 1,
            "salesmanUID": 0,
            "channelOrderID": "",
            "channelOrderState": "0",
            "channelOrderDate": null,
            "channelOrderData": {},
            "retourablePositions": {
                "dataset": [
                    {
                        "scid": 1415,
                        "parentSCID": null,
                        "customerUID": 0,
                        "customerNumber": "",
                        "customerText": "",
                        "salesmanUID": 0,
                        "orderOID": 1002,
                        "packagingItemIID": 0,
                        "positionCount": 1,
                        "positionVariant": "S",
                        "positionDescription": "",
                        "positionCreated": null,
                        "positionSerialnumber": "",
                        "positionCustom1": "",
                        "positionCustom2": "499",
                        "positionCustom3": "",
                        "positionSystemtext": "",
                        "restrictionToCount": "0",
                        "restrictionToVariant": "0",
                        "stockUpdated": "0",
                        "itemIID": 10033,
                        "itemName": "T-Shirt - dunkelrot",
                        "itemSKU": "5424155144857",
                        "itemNumber": "10033",
                        "itemDealersnumber": "",
                        "priceVat": 1900,
                        "priceGross": 499,
                        "priceNet": 419,
                        "priceDigits": 2,
                        "priceType": 0,
                        "priceCurrency": "EUR",
                        "deliveryDID": 1002,
                        "priceRecommendedGross": 0,
                        "priceRecommendedNet": 0,
                        "priceRecommended": "",
                        "pricePurchasingGross": 0,
                        "pricePurchasingNet": 0,
                        "priceBaseNet": null,
                        "priceBaseGross": null,
                        "priceBaseMeasureNormalizationFactor": null,
                        "priceBaseMesaureReference": null,
                        "priceBaseMeasureValue": null,
                        "priceExchangerateLeadCurrency": "EUR",
                        "priceExchangerateRate": 100000,
                        "priceExchangerateNet": 419,
                        "priceExchangerateGross": 499,
                        "priceExchangerateDigits": 2,
                        "validated": "1",
                        "token": null,
                        "stockLocationID": 0,
                        "itemDataSalesType": 10,
                        "itemDataSalesGroup": 1,
                        "itemDataVariants": {
                            "S": {
                                "sku": "5424155144857",
                                "variant": "S",
                                "price": 4.99,
                                "priceCurency": "EUR",
                                "availableCount": 53
                            },
                            "M": {
                                "sku": "5769864186729",
                                "variant": "M",
                                "price": 4.99,
                                "priceCurency": "EUR",
                                "availableCount": 162
                            },
                            "L": {
                                "sku": "6876634633196",
                                "variant": "L",
                                "price": 4.99,
                                "priceCurency": "EUR",
                                "availableCount": 55
                            },
                            "XL": {
                                "sku": "5591665777547",
                                "variant": "XL",
                                "price": 4.99,
                                "priceCurency": "EUR",
                                "availableCount": 183
                            }
                        }
                    },
                    {
                        "scid": 1416,
                        "parentSCID": null,
                        "customerUID": 0,
                        "customerNumber": "",
                        "customerText": "",
                        "salesmanUID": 0,
                        "orderOID": 1002,
                        "packagingItemIID": 0,
                        "positionCount": 1,
                        "positionVariant": "M",
                        "positionDescription": "",
                        "positionCreated": null,
                        "positionSerialnumber": "",
                        "positionCustom1": "",
                        "positionCustom2": "499",
                        "positionCustom3": "",
                        "positionSystemtext": "",
                        "restrictionToCount": "0",
                        "restrictionToVariant": "0",
                        "stockUpdated": "0",
                        "itemIID": 10033,
                        "itemName": "T-Shirt - dunkelrot",
                        "itemSKU": "5769864186729",
                        "itemNumber": "10033",
                        "itemDealersnumber": "",
                        "priceVat": 1900,
                        "priceGross": 499,
                        "priceNet": 419,
                        "priceDigits": 2,
                        "priceType": 0,
                        "priceCurrency": "EUR",
                        "deliveryDID": 1002,
                        "priceRecommendedGross": 0,
                        "priceRecommendedNet": 0,
                        "priceRecommended": "",
                        "pricePurchasingGross": 0,
                        "pricePurchasingNet": 0,
                        "priceBaseNet": null,
                        "priceBaseGross": null,
                        "priceBaseMeasureNormalizationFactor": null,
                        "priceBaseMesaureReference": null,
                        "priceBaseMeasureValue": null,
                        "priceExchangerateLeadCurrency": "EUR",
                        "priceExchangerateRate": 100000,
                        "priceExchangerateNet": 419,
                        "priceExchangerateGross": 499,
                        "priceExchangerateDigits": 2,
                        "validated": "1",
                        "token": null,
                        "stockLocationID": 0,
                        "itemDataSalesType": 10,
                        "itemDataSalesGroup": 1,
                        "itemDataVariants": {
                            "S": {
                                "sku": "5424155144857",
                                "variant": "S",
                                "price": 4.99,
                                "priceCurency": "EUR",
                                "availableCount": 53
                            },
                            "M": {
                                "sku": "5769864186729",
                                "variant": "M",
                                "price": 4.99,
                                "priceCurency": "EUR",
                                "availableCount": 162
                            },
                            "L": {
                                "sku": "6876634633196",
                                "variant": "L",
                                "price": 4.99,
                                "priceCurency": "EUR",
                                "availableCount": 55
                            },
                            "XL": {
                                "sku": "5591665777547",
                                "variant": "XL",
                                "price": 4.99,
                                "priceCurency": "EUR",
                                "availableCount": 183
                            }
                        }
                    }
                ]
            },
            "delivery": {
                "dataset": [
                    {
                        "did": 1002,
                        "orderOID": 1002,
                        "deliveryAddress": {
                            "contact": "Melanie Musterfrau",
                            "company": "Test GmbH",
                            "address1": "Testweg 10",
                            "address2": "",
                            "city": "Testhausen",
                            "state": "",
                            "zipcode": "87654",
                            "country": "de",
                            "description": "",
                            "type": "4",
                            "preset": "1",
                            "systemUsage": "",
                            "erpID": "",
                            "erpName": "",
                            "erpNumber": "",
                            "formOfAddress": "",
                            "salutation": "",
                            "firstname": "Melanie",
                            "name1": "Musterfrau"
                        },
                        "billingAddress": {
                            "contact": "Melanie Musterfrau",
                            "company": "Test GmbH",
                            "address1": "Testweg 10",
                            "address2": "",
                            "city": "Testhausen",
                            "state": "",
                            "zipcode": "87654",
                            "country": "de",
                            "description": "",
                            "type": "4",
                            "preset": "1",
                            "systemUsage": "",
                            "erpID": "",
                            "erpName": "",
                            "erpNumber": "",
                            "formOfAddress": "",
                            "salutation": "",
                            "firstname": "Melanie",
                            "name1": "Musterfrau"
                        },
                        "createDate": "2019-02-20T12:05:35",
                        "state": 15,
                        "billNumber": "1002-1002-31",
                        "billDate": "2019-02-20T12:05:35",
                        "paymentState": 0,
                        "archivePrintFlag": "0",
                        "serviceNumber": "",
                        "serviceCompany": 0,
                        "deliveryDate": "2019-02-20T11:06:22",
                        "shippingDCID": 0,
                        "receivingDate": null,
                        "packetNumber": "",
                        "packetNumberRetoure": "",
                        "resubmissionDate": null,
                        "resubmissionInfo": "",
                        "notice": "",
                        "traceReceivingState": 0,
                        "traceReceivingSign": "",
                        "traceReceivingDate": null,
                        "picklistID": 0,
                        "transactionTID": 0,
                        "transactionAmount": 0,
                        "signatureRequiredFlag": 0,
                        "erpID": "",
                        "erpName": "",
                        "erpNumber": "",
                        "erpLastUpdate": "2018-02-20T11:05:21",
                        "erpCreation": null
                    }
                ]
            }
        }
    },
    "sys": {
        "message": "200 OK",
        "code": 200
    }
}