The method adopts the same parameters as parcel saving. It does not, however, perform a save but rather verifies the correctness of data together with the recipient’s address and requirements of fields.
Method name:
public ParcelResultApiBean validateParcel(ParcelApiBean parcelApiBean, String apiKey)
throws MeestException;
Validation includes:
Required fields and correct address of the recipient:
- recipentAddress.cityIdRef if city exists
- if filled in recipentAddress.street.name, if it exists, if unique
- recipentAddress.name
- recipentAddress.country
- recipentAddress.house
- recipentAddress.phone
Required fields and correctness of fields of the parcel and option of delivery:
- parcelNumberInternal
- deliveryTypeEnum
- divisionIdRef jeśli wybrany SERVICE_POINT,POSTAL_SERVICE_APT
- weight of the parcel at the delivery point possible message parcel.weight.is.greater.than.selected.division.weight
- weight
- value
- summa.cod.eur
- summa.cod.uah
- receiver.name
- receiver.email
- currency
Required fields and correctness of parcel’s items
- name
- nameUk
- productEan
- productSize
- weight
- count
- value
- valueUah
- country.code
- custom.code
Example of use:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:log="http://logic.meestgroup.com/"> <soapenv:Header/> <soapenv:Body> <log:validateParcel> <arg0> <barCode></barCode> <currencyName>EUR</currencyName> <deliveryNumber></deliveryNumber> <deliveryTypeEnum>COURRIER</deliveryTypeEnum> <divisionIDRRef></divisionIDRRef> <errorDescription></errorDescription> <note></note> <parcelDocumentsLink></parcelDocumentsLink> <parcelNumber></parcelNumber> <parcelNumberInternal>37507/269/01</parcelNumberInternal> <parcelPositionApiBeans> <count>10</count> <countryCode>CN</countryCode> <customCode>84713000</customCode> <name>Планшетный ПК ASUS Fonepad 7 (FE170CG-1A017A) 3G Black</name> <nameUk>Tablet ASUS FE170CG Z2520/7"/1GB/8GB/3G/GPS/BT/Android 4.3</nameUk> <value>1230.00</value> <valueUah>12300.00</valueUah> <weight>0.794</weight> <productEan>000342273448794</productEan> <productSize>XXL</productSize> </parcelPositionApiBeans> <parcelStatusEnum></parcelStatusEnum> <receiverName>Мороз Юрій Вікторович</receiverName> <receiverEmail>tomasz.drzazga@gmail.com</receiverEmail> <recipentAddress> <apartment></apartment> <city>Львов</city> <cityIdRef>0xb11200215aee3ebe11df749b62c3d54a</cityIdRef> <country>Украина</country> <district></district> <house>147</house> <name>Мороз Юрій Вікторович</name> <notice></notice> <phone>0937393962</phone> <postCode>79000</postCode> <postOffice>Львов</postOffice> <province></province> <street>Зелена</street> </recipentAddress> <summaCodEur>1230.00</summaCodEur> <summaCodUah>12300.00</summaCodUah> <value>123.93</value> <weight>0.794</weight> <zaUa>00193668</zaUa> </arg0> <arg1>apiKey</arg1> </log:validateParcel> </soapenv:Body> </soapenv:Envelope>
Service response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:validateParcelResponse xmlns:ns2="http://logic.meestgroup.com/"> <return> <apiStatusEnum>OK</apiStatusEnum> <barCode/> </return> </ns2:validateParcelResponse> </soap:Body> </soap:Envelope>