Skip to main content

/api/lite/cam/delivery/contracts

Запрос списка контрактов

/api/lite/cam/delivery/contracts

Метод получает список каналов доставки

Фильтрация

Для поиска только по id можно использовать параметр "id".

Пример результата запроса

{
    "contracts": [
        {
            "dlvLogin": "brocosmetics@gmail.com",
            "courierCode": "DalliService",
            "courierProduct": "1",
            "icn": null,
            "login": "login",
            "password": "pass",
            "barcodePoolId": null,
            "token": null,
            "ownerCompany": "brocosmetics@gmail.com",
            "stock": null,
            "contractId": null,
            "params": [
            	{
                    "key": "paramKey",
                    "value": "paramValue"
                }
            ],
            "cactusId": "9b051eb5-82e5-5ed9-fa72-05aace3fd685",
            "cactusName": "Dalli МСК",
            "contractType": "AGGREGATOR_CONTRACT",
            "isActive": false,
            "isPublicAvailable": true,
            "externalKey": "28c53bc2-158f-4084-96c1-70118eb86f5a",
            "contractNumber": "DalliService_1",
            "stickerFileType": null,
            "deliveryAggregator": "TEMPOLINE",
            "manager": {
                "name": null,
                "surname": null,
                "patronymic": null,
                "phone": "+71112223344",
                "rawPhone": "+7 (111) 222-33-44",
                "alternativePhone": "",
                "email": null,
                "post": null,
                "personType": "CUSTOMER",
                "address": {
                    "country": "Россия",
                    "countryCode": "RU",
                    "region": "Москва",
                    "area": null,
                    "city": "Москва",
                    "settlement": null,
                    "street": null,
                    "house": null,
                    "block": null,
                    "building": null,
                    "flat": null,
                    "fullAddress": null,
                    "fullCity": null,
                    "rawData": null,
                    "zip": null,
                    "regionFias": null,
                    "areaFias": null,
                    "cityFias": null,
                    "settlementFias": null
                }
            },
            "gatherRequestSettings": {
                "gatherType": "COURIER",
                "timetableNonMonday": false,
                "timetableNonTuesday": false,
                "timetableNonWednesday": false,
                "timetableNonThursday": false,
                "timetableNonFriday": false,
                "timetableNonSaturday": false,
                "timetableNonSunday": false,
                "timetableHolidays": null
            }
        }
    ]
}

 

Создание/редактирование контракта

/api/lite/cam/delivery/contracts

Создает контракт или редактирует существующий, если указан cactusId.

Пример запроса

{
    "dlvLogin": "brocosmetics@gmail.com",
    "courierCode": "DalliService",
    "courierProduct": "1",
    "icn": null,
    "login": "login",
    "password": "pass",
    "barcodePoolId": null,
    "token": null,
    "ownerCompany": "brocosmetics@gmail.com",
    "stock": null,
    "contractId": null,
    "params": [
        {
            "key": "paramKey",
            "value": "paramValue"
        }
    ],
    "cactusId": "9b051eb5-82e5-5ed9-fa72-05aace3fd685",
    "cactusName": "Dalli МСК",
    "contractType": "AGGREGATOR_CONTRACT",
    "isActive": false,
    "isPublicAvailable": true,
    "externalKey": "28c53bc2-158f-4084-96c1-70118eb86f5a",
    "contractNumber": "DalliService_1",
    "stickerFileType": null,
    "deliveryAggregator": "TEMPOLINE",
    "manager": {
        "name": null,
        "surname": null,
        "patronymic": null,
        "phone": "+7 (111) 222-33-44",
        "rawPhone": null,
        "alternativePhone": "",
        "email": null,
        "post": null,
        "personType": "CUSTOMER",
        "address": {
            "country": null,
            "countryCode": null,
            "region": "Москва",
            "area": null,
            "city": "Москва",
            "settlement": null,
            "street": null,
            "house": null,
            "block": null,
            "building": null,
            "flat": null,
            "fullAddress": null,
            "fullCity": null,
            "rawData": null,
            "zip": null,
            "regionFias": null,
            "areaFias": null,
            "cityFias": null,
            "settlementFias": null
        }
    },
    "gatherRequestSettings": {
        "gatherType": "COURIER",
        "timetableNonMonday": false,
        "timetableNonTuesday": false,
        "timetableNonWednesday": false,
        "timetableNonThursday": false,
        "timetableNonFriday": false,
        "timetableNonSaturday": false,
        "timetableNonSunday": false,
        "timetableHolidays": null
    }
}

Ошибка:

{
    "success": false,
    "errors": [
        {
            "code": 0,
            "message": "Текст ошибки"
        }
    ]
}

 

Удаление контракта

/api/lite/cam/delivery/contracts?id=9b051eb5-82e5-5ed9-fa72-05aace3fd685

Удаляет контракт с cactusId переданным в параметре "id"