This API enables MOL users to create and manage pickup addresses that serve as collection points for third-party shipments. This API supports both creation of new addresses and updating of existing ones.
Please note that:
To create a new address: the PickupAddressId is empty or omitted
Update existing address: when PickupAddressId contains a valid address ID already existing
The first address automatically becomes default if user has no existing default
Defining the IsDefault field is mandatory and crucial in the Automatic Bulk Pickup Shipments workflow
All following fields are mandatory and must be populated:
<PickupContainer>
<TradeName>Business/Contact Name</TradeName>
<Address1>Primary Street Address</Address1>
<ZipCode>Postal Code</ZipCode>
<City>City Name</City>
<Province>State/Province Code</Province>
<Country>Country Code (ISO)</Country>
<Phone1>Primary Contact Number</Phone1>
<Email1>Primary Email Address</Email1>
<Reference>Address Reference/Description</Reference>
</PickupContainer>
The optional fields are:
<PickupAddressId>For updates only</PickupAddressId>
<Address2>Additional address line</Address2>
<Address3>Additional address line</Address3>
<Phone2>Secondary contact number</Phone2>
<Email2>Secondary email address</Email2>
<Fax>Fax number</Fax>
<RES>Residential flag (true/false)</RES>
<MMR>If the address pertains to mass retail shops(true/false)</MMR>
<LTZ>Limited traffic zone flag (true/false)</LTZ>
<IsDefault>Force as default address</IsDefault>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://www.onlinembe.eu/ws/">
<soapenv:Header/>
<soapenv:Body>
<ws:CreatePickupAddressRequest>
<RequestContainer>
<System>IT</System>
<Credentials>
<Username></Username>
<Passphrase></Passphrase>
</Credentials>
<InternalReferenceID>INTERNAL REFERENCE</InternalReferenceID>
<PickupContainer>
<!--Optional:-->
<PickupAddressId></PickupAddressId>
<TradeName>Elink customer name</TradeName>
<Address1>Elink address</Address1>
<!--Optional:-->
<Address2></Address2>
<!--Optional:-->
<Address3></Address3>
<ZipCode>20157</ZipCode>
<City>MILANO</City>
<Province>MI</Province>
<Country>IT</Country>
<Reference>Elink reference</Reference>
<Phone1>3332221111</Phone1>
<!--Optional:-->
<Phone2></Phone2>
<Email1>elinkmail@gmail.com</Email1>
<!--Optional:-->
<Email2></Email2>
<!--Optional:-->
<Fax></Fax>
<RES>false</RES>
<MMR>false</MMR>
<LTZ>true</LTZ>
<!--Optional:-->
<IsDefault>false</IsDefault>
</PickupContainer>
</RequestContainer>
</ws:CreatePickupAddressRequest>
</soapenv:Body>
</soapenv:Envelope>
To recap:
If all the mandatory data are correctly populated, the response will contain the id of the pickupAddress and its status (which will be CREATED, or UPDATED):
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns3:CreatePickupAddressResponse xmlns:ns3="https://www.onlinembe.eu/ws/">
<SuccessContainer>
<InternalReferenceID>INTERNAL REFERENCE</InternalReferenceID>
<Status>OK</Status>
<PickupAddressId>451000</PickupAddressId>
<PickupAddressStatus>UPDATED</PickupAddressStatus>
</SuccessContainer>
</ns3:CreatePickupAddressResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In particular, the pickupAddress will be created if the input field PickupAddressId is empty, otherwise, if the input PickupAddressId is populated with a pickup address id that belongs to the requestant MOL user, that pickup address will be updated. Also, if the MOL user does not have a default pickup address, the one created / updated will be automatically set as default.
If a wrong pickup address ID (which does not belong to that MOL user) is set in input, an error will occur:
"This MOL user cannot edit that pickup address"
Also, if not all the mandatory data are inserted, an error that specifies the mandatory data to be filled will be returned:
<Errors>
<Error>
<Id>5</Id>
<ErrorCode>CPR_005</ErrorCode>
<Description>These fields cannot be null: [TradeName, Address1, ZipCode, City, Province, Country, Phone1, Email1, Reference]
</Description>
</Error>
</Errors>