1a. Создание накладной с указанием параметров мест

Функция EDCreateWaybillWithDetails (RequestID, ClientInfo, Shipper, Consignee, Cost, Description, CostCenter, DeliveryCondition, DeliveryComment, Packages) возвращает номер накладной.

Метод рекомендуется применять клиентам, которые работают с использованием своего идентификатора места. Это позволит клиенту вести учет отправленного груза по своим номерам отправок. Обработка груза на складе МЭ может производиться по данному идентификатору клиента (штрих-коду).

Как использовать данные Отправителя и Получателя из адресной книги в этом методе можно ознакомиться здесь.

В отличие от EDCreateWaybillWithPackages, в этом методе указываются не только идентификаторы клиента (штрих-коды) каждого места, но и массогабаритные характеристики груза.

ОПИСАНИЕ ПАРАМЕТРОВ ЗАПРОСА
ПАРАМЕТРЫ ОПИСАНИЕ В WSDL ОПИСАНИЕ
RequestID minOccurs="1"
maxOccurs="1"
type="guid"
уникальный идентификатор запроса
ClientInfo minOccurs=”0
maxOccurs=”1
type=”string
идентификатор отправки клиента (максимально 50 символов)
Shipper minOccurs=”1
maxOccurs=”1
type=”tns:Address
реквизиты Отправителя
Consignee minOccurs=”1
maxOccurs=”1
type=”tns:Address
реквизиты Получателя
Cost minOccurs=”1
maxOccurs=”1
type=”decimal
объявленная ценность в рублях (не может быть отрицательной или нулевой, а также превышать 100.000.000 рублей)
Description minOccurs=”0
maxOccurs=”1
type=”string
описание груза (максимально 80 символов, не может быть пустой или незаданной строкой)
CostCenter minOccurs=”1
maxOccurs=”1
type=”int
код центра затрат
DeliveryComment minOccurs=”0
maxOccurs=”1
type=”string
комментарий к доставке
Packages minOccurs=”0
maxOccurs=”1
type=”tns:ArrayOfLWH
список мест с указанием штрих-кода и МГХ каждого места.
<soap:Body>
    <CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
      <RequestID>guid</RequestID>
      <ClientInfo>string</ClientInfo>
      <Shipper>
        <Person>string</Person>
        <Phone>string</Phone>
        <Company>string</Company>
        <Address>string</Address>
        <PostIndex>string</PostIndex>
        <CityCode>int</CityCode>
      </Shipper>
      <Consignee>
        <Person>string</Person>
        <Phone>string</Phone>
        <Company>string</Company>
        <Address>string</Address>
        <PostIndex>string</PostIndex>
        <CityCode>int</CityCode>
      </Consignee>
      <Cost>decimal</Cost>
      <Description>string</Description>
      <CostCenter>int</CostCenter>
      <DeliveryCondition>None or Promptly or Saturday or Return</DeliveryCondition>
      <DeliveryComment>string</DeliveryComment>
      <Packages>
        <LWH>
          <PackageID>string</PackageID>
          <Weight>decimal</Weight>
          <Length>int</Length>
          <Width>int</Width>
          <Height>int</Height>
        </LWH>
        <LWH>
          <PackageID>string</PackageID>
          <Weight>decimal</Weight>
          <Length>int</Length>
          <Width>int</Width>
          <Height>int</Height>
        </LWH>
      </Packages>
    </CreateWaybillWithDetails>
  </soap:Body>
ОПИСАНИЕ ПАРАМЕТРОВ ОТВЕТА
ПАРАМЕТРЫ ОПИСАНИЕ В WSDL ОПИСАНИЕ
CreateWaybillWithDetailsResult minOccurs="1"
maxOccurs="1"
type="string"
Номер накладной
<soap:Body>
    <CreateWaybillWithDetailsResponse xmlns="http://ltl-ws.major-express.ru/edclients/">
      <CreateWaybillWithDetailsResult>string</CreateWaybillWithDetailsResult>
    </CreateWaybillWithDetailsResponse>
  </soap:Body>

ДОПОЛНИТЕЛЬНЫЕ МЕТОДЫ
Для создания накладных без возвратной накладной рекомендуется использовать функцию EDCreateWaybillWithDetails_Return. В методе требуется указать реквизиты Отправителя, Получателя и Получателя возврата.

Для получения доступных кодов центров затрат предназначен метод dict_CostCenters.



ДОПОЛНИТЕЛЬНЫЕ ПРИМЕРЫ ЗАПРОСОВ

1.Создание накладной с одним грузовым местом без указания Центра затрат

1.1.Запрос cURL:


curl -L 'https://stage-ed.major-express.ru/edclients2.asmx' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: http://ltl-ws.major-express.ru/edclients/CreateWaybillWithDetails' -H 'Authorization: Basic USERNAME:PASSWORD(b64)' -H 'Cookie: __ddg1_=o8HQAeCeEEG22MLFrngb' -d '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <soap:Body>
 <CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
 <RequestID>d4e9f0ee-5dbe-458c-b1e1-e86f21481fa3</RequestID>
 <ClientInfo>ПометкаКлиента</ClientInfo>
 <Shipper>
 <Person>Имя Отправителя</Person>
 <Phone>Телефон Отправителя</Phone>
 <Company>Организация Отправителя</Company>
 <Address>ул. Ташкентская, 14к3</Address>
 <PostIndex>109444</PostIndex>
 <CityCode>129</CityCode>
 </Shipper>
 <Consignee>
 <Person>Имя Получателя</Person>
 <Phone>Телефон Получателя</Phone>
 <Company>Организация Получателя</Company>
 <Address>ул. Ферганская, 11к1</Address>
 <PostIndex>109444</PostIndex>
 <CityCode>129</CityCode>
 </Consignee>
 <Cost>3000</Cost>
 <Description>test</Description>
 <CostCenter xsi:nil="true" />
 <DeliveryCondition>None</DeliveryCondition>
 <DeliveryComment>Тест</DeliveryComment>
 <Packages>
 <LWH>
 <PackageID>CLIENTBARCODE1</PackageID>
 <Weight>1</Weight>
 <Length>10</Length>
 <Width>20</Width>
 <Height>30</Height>
 </LWH>
 </Packages>
 </CreateWaybillWithDetails>
 </soap:Body>
</soap:Envelope>

1.2.Запрос в виде HTTP-request



POST /edclients2.asmx HTTP/1.1
Host: stage-ed.major-express.ru
Content-Type: text/xml; charset=utf-8
SOAPAction: http://ltl-ws.major-express.ru/edclients/CreateWaybillWithDetails
Authorization: Basic USERNAME:PASSWORD(b64)
Cookie: __ddg1_=o8HQAeCeEEG22MLFrngb
Content-Length: 1514

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
<xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
<xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>
<CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
<RequestID>274a3693-b4c6-43d2-b3ee-8f744e94472e</RequestID>
<ClientInfo>ПометкаКлиента</ClientInfo>
<Shipper>
<Person>Имя Отправителя</Person>
<Phone>Телефон Отправителя</Phone>
<Company>Организация Отправителя</Company>
<Address>ул. Ташкентская, 14к3</Address>
<PostIndex>109444</PostIndex>
<CityCode>129</CityCode>
</Shipper>
<Consignee>
<Person>Имя Получателя</Person>
<Phone>Телефон Получателя</Phone>
<Company>Организация Получателя</Company>
<Address>ул. Ферганская, 11к1</Address>
<PostIndex>109444</PostIndex>
<CityCode>129</CityCode>
</Consignee>
<Cost>3000</Cost>
<Description>test</Description>
<CostCenter xsi:nil="true" />
<DeliveryCondition>None</DeliveryCondition>
<DeliveryComment>Тест</DeliveryComment>
<Packages>
<LWH>
<PackageID>CLIENTBARCODE1</PackageID>
<Weight>1</Weight>
<Length>10</Length>
<Width>20</Width>
<Height>30</Height>
</LWH>
</Packages>
</CreateWaybillWithDetails>
</soap:Body>
</soap:Envelope>

2.Создание накладной с одним грузовым местом с указанием Центра затрат

2.1.Запрос cURL:
curl -L 'https://stage-ed.major-express.ru/edclients2.asmx' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: http://ltl-ws.major-express.ru/edclients/CreateWaybillWithDetails' -H 'Authorization: Basic USERNAME:PASSWORD(b64)' -H 'Cookie: __ddg1_=o8HQAeCeEEG22MLFrngb' -d '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
      <RequestID>75d1bb01-296c-463a-a391-21b79a709454</RequestID>
      <ClientInfo>ПометкаКлиента</ClientInfo>
      <Shipper>
        <Person>Имя Отправителя</Person>
        <Phone>Телефон Отправителя</Phone>
        <Company>Организация Отправителя</Company>
        <Address>ул. Ташкентская, 14к3</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Shipper>
      <Consignee>
        <Person>Имя Получателя</Person>
        <Phone>Телефон Получателя</Phone>
        <Company>Организация Получателя</Company>
        <Address>ул. Ферганская, 11к1</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Consignee>
      <Cost>3000</Cost>
      <Description>test</Description>
      <CostCenter>22</CostCenter>
      <DeliveryCondition>None</DeliveryCondition>
      <DeliveryComment>Тест</DeliveryComment>
      <Packages>
        <LWH>
          <PackageID>CLIENTBARCODE1</PackageID>
          <Weight>1</Weight>
          <Length>10</Length>
          <Width>20</Width>
          <Height>30</Height>
        </LWH>
      </Packages>
    </CreateWaybillWithDetails>
  </soap:Body>
</soap:Envelope>

2.2.Запрос в виде HTTP-request
POST /edclients2.asmx HTTP/1.1
Host: stage-ed.major-express.ru
Content-Type: text/xml; charset=utf-8
SOAPAction: http://ltl-ws.major-express.ru/edclients/CreateWaybillWithDetails
Authorization: USERNAME:PASSWORD(b64)
Cookie: __ddg1_=o8HQAeCeEEG22MLFrngb
Content-Length: 1514

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
      <RequestID>1b9c99a6-3760-4418-b329-2ba3c73bb06b</RequestID>
      <ClientInfo>ПометкаКлиента</ClientInfo>
      <Shipper>
        <Person>Имя Отправителя</Person>
        <Phone>Телефон Отправителя</Phone>
        <Company>Организация Отправителя</Company>
        <Address>ул. Ташкентская, 14к3</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Shipper>
      <Consignee>
        <Person>Имя Получателя</Person>
        <Phone>Телефон Получателя</Phone>
        <Company>Организация Получателя</Company>
        <Address>ул. Ферганская, 11к1</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Consignee>
      <Cost>3000</Cost>
      <Description>test</Description>
      <CostCenter>22</CostCenter>
      <DeliveryCondition>None</DeliveryCondition>
      <DeliveryComment>Тест</DeliveryComment>
      <Packages>
        <LWH>
          <PackageID>CLIENTBARCODE1</PackageID>
          <Weight>1</Weight>
          <Length>10</Length>
          <Width>20</Width>
          <Height>30</Height>
        </LWH>
      </Packages>
    </CreateWaybillWithDetails>
  </soap:Body>
</soap:Envelope>

3.Создание многоместной накладной без указания Центра затрат

3.1.Запрос cURL:
curl -L 'https://stage-ed.major-express.ru/edclients2.asmx' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: http://ltl-ws.major-express.ru/edclients/CreateWaybillWithDetails' -H 'Authorization: Basic USERNAME:PASSWORD(b64)' -H 'Cookie: __ddg1_=o8HQAeCeEEG22MLFrngb' -d '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
      <RequestID>1da675d8-af2b-48c0-8a07-ff9d75385606</RequestID>
      <ClientInfo>ПометкаКлиента</ClientInfo>
      <Shipper>
        <Person>Имя Отправителя</Person>
        <Phone>Телефон Отправителя</Phone>
        <Company>Организация Отправителя</Company>
        <Address>ул. Ташкентская, 14к3</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Shipper>
      <Consignee>
        <Person>Имя Получателя</Person>
        <Phone>Телефон Получателя</Phone>
        <Company>Организация Получателя</Company>
        <Address>ул. Ферганская, 11к1</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Consignee>
      <Cost>3000</Cost>
      <Description>test</Description>
      <CostCenter xsi:nil="true" />
      <DeliveryCondition>None</DeliveryCondition>
      <DeliveryComment>Тест</DeliveryComment>
      <Packages>
        <LWH>
          <PackageID>CLIENTBARCODE1</PackageID>
          <Weight>1</Weight>
          <Length>10</Length>
          <Width>20</Width>
          <Height>30</Height>
        </LWH>
        <LWH>
          <PackageID>CLIENTBARCODE2</PackageID>
          <Weight>1</Weight>
          <Length>11</Length>
          <Width>22</Width>
          <Height>33</Height>
        </LWH>
      </Packages>
    </CreateWaybillWithDetails>
  </soap:Body>
</soap:Envelope>

3.2.Запрос в виде HTTP-request
POST /edclients2.asmx HTTP/1.1
Host: stage-ed.major-express.ru
Content-Type: text/xml; charset=utf-8
SOAPAction: http://ltl-ws.major-express.ru/edclients/CreateWaybillWithDetails
Authorization: Basic USERNAME:PASSWORD(b64)
Cookie: __ddg1_=o8HQAeCeEEG22MLFrngb
Content-Length: 1708

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
      <RequestID>04beb5fc-e04a-4217-8ec2-ad3265538e04</RequestID>
      <ClientInfo>ПометкаКлиента</ClientInfo>
      <Shipper>
        <Person>Имя Отправителя</Person>
        <Phone>Телефон Отправителя</Phone>
        <Company>Организация Отправителя</Company>
        <Address>ул. Ташкентская, 14к3</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Shipper>
      <Consignee>
        <Person>Имя Получателя</Person>
        <Phone>Телефон Получателя</Phone>
        <Company>Организация Получателя</Company>
        <Address>ул. Ферганская, 11к1</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Consignee>
      <Cost>3000</Cost>
      <Description>test</Description>
      <CostCenter xsi:nil="true" />
      <DeliveryCondition>None</DeliveryCondition>
      <DeliveryComment>Тест</DeliveryComment>
      <Packages>
        <LWH>
          <PackageID>CLIENTBARCODE1</PackageID>
          <Weight>1</Weight>
          <Length>10</Length>
          <Width>20</Width>
          <Height>30</Height>
        </LWH>
        <LWH>
          <PackageID>CLIENTBARCODE2</PackageID>
          <Weight>1</Weight>
          <Length>11</Length>
          <Width>22</Width>
          <Height>33</Height>
        </LWH>
      </Packages>
    </CreateWaybillWithDetails>
  </soap:Body>
</soap:Envelope>

4. Создание многоместной накладной с указанием Центра затрат

4.1.Запрос cURL:
curl -L 'https://stage-ed.major-express.ru/edclients2.asmx' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: http://ltl-ws.major-express.ru/edclients/CreateWaybillWithDetails' -H 'Authorization: Basic USERNAME:PASSWORD(b64)' -H 'Cookie: __ddg1_=o8HQAeCeEEG22MLFrngb' -d '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
      <RequestID>63e39fb0-ff60-4308-b913-8efccef902bd</RequestID>
      <ClientInfo>ПометкаКлиента</ClientInfo>
      <Shipper>
        <Person>Имя Отправителя</Person>
        <Phone>Телефон Отправителя</Phone>
        <Company>Организация Отправителя</Company>
        <Address>ул. Ташкентская, 14к3</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Shipper>
      <Consignee>
        <Person>Имя Получателя</Person>
        <Phone>Телефон Получателя</Phone>
        <Company>Организация Получателя</Company>
        <Address>ул. Ферганская, 11к1</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Consignee>
      <Cost>3000</Cost>
      <Description>test</Description>
      <CostCenter>22</CostCenter>
      <DeliveryCondition>None</DeliveryCondition>
      <DeliveryComment>Тест</DeliveryComment>
      <Packages>
        <LWH>
          <PackageID>CLIENTBARCODE1</PackageID>
          <Weight>1</Weight>
          <Length>10</Length>
          <Width>20</Width>
          <Height>30</Height>
        </LWH>
        <LWH>
          <PackageID>CLIENTBARCODE2</PackageID>
          <Weight>1</Weight>
          <Length>11</Length>
          <Width>22</Width>
          <Height>33</Height>
        </LWH>
      </Packages>
    </CreateWaybillWithDetails>
  </soap:Body>
</soap:Envelope>

4.2.Запрос в виде HTTP-request
POST /edclients2.asmx HTTP/1.1
Host: stage-ed.major-express.ru
Content-Type: text/xml; charset=utf-8
SOAPAction: http://ltl-ws.major-express.ru/edclients/CreateWaybillWithDetails
Authorization: Basic USERNAME:PASSWORD(b64)
Cookie: __ddg1_=o8HQAeCeEEG22MLFrngb
Content-Length: 1708

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <CreateWaybillWithDetails xmlns="http://ltl-ws.major-express.ru/edclients/">
      <RequestID>0d5f8dc0-855a-4099-a9bb-256b2a54e9c2</RequestID>
      <ClientInfo>ПометкаКлиента</ClientInfo>
      <Shipper>
        <Person>Имя Отправителя</Person>
        <Phone>Телефон Отправителя</Phone>
        <Company>Организация Отправителя</Company>
        <Address>ул. Ташкентская, 14к3</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Shipper>
      <Consignee>
        <Person>Имя Получателя</Person>
        <Phone>Телефон Получателя</Phone>
        <Company>Организация Получателя</Company>
        <Address>ул. Ферганская, 11к1</Address>
        <PostIndex>109444</PostIndex>
        <CityCode>129</CityCode>
      </Consignee>
      <Cost>3000</Cost>
      <Description>test</Description>
      <CostCenter>22</CostCenter>
      <DeliveryCondition>None</DeliveryCondition>
      <DeliveryComment>Тест</DeliveryComment>
      <Packages>
        <LWH>
          <PackageID>CLIENTBARCODE1</PackageID>
          <Weight>1</Weight>
          <Length>10</Length>
          <Width>20</Width>
          <Height>30</Height>
        </LWH>
        <LWH>
          <PackageID>CLIENTBARCODE2</PackageID>
          <Weight>1</Weight>
          <Length>11</Length>
          <Width>22</Width>
          <Height>33</Height>
        </LWH>
      </Packages>
    </CreateWaybillWithDetails>
  </soap:Body>
</soap:Envelope>