To create the flexible return the ShipmentRequest - One Shot Pickup is used.
In order to mark the created shipment as a return, we added two new fields within the ShipmentRequest with the one shot pickup, specifically for the flexible return.
These two new fields are:
<IsEcommerceReturn>
<IsEcommerceReturnOriginalTracking>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.onlinembe.eu/ws/">
<SOAP-ENV:Body>
<ns2:ShipmentRequest xmlns:ns2="http://www.onlinembe.eu/ws/">
<RequestContainer>
<System>IT</System>
<Credentials>
<Username></Username>
<Passphrase></Passphrase>
</Credentials>
<InternalReferenceID>test</InternalReferenceID>
<Sender>
<Name>Return Sender</Name>
<CompanyName>Sender company</CompanyName>
<Address>Sender Address</Address>
<Phone>3331112222</Phone>
<ZipCode>12345</ZipCode>
<City>CITY</City>
<State></State>
<Country>XX</Country>
<Email>xxx@mail.com</Email>
</Sender>
<Recipient>
<Name>Return RecipienT</Name>
<CompanyName>Recipient company</CompanyName>
<Address>Recipient address</Address>
<Phone>3331112222</Phone>
<ZipCode>11111</ZipCode>
<City>CITY</City>
<State></State>
<Country>XX</Country>
<Email>yyyy@mail.com</Email>
</Recipient>
<Shipment>
<IsEcommerceReturn>true</IsEcommerceReturn>
<IsEcommerceReturnOriginalTracking>XX0000-0L-0000001111</IsEcommerceReturnOriginalTracking>
<ShipperType>COURIERLDV</ShipperType>
<Description>Merce</Description>
<Service>SSE</Service>
<PackageType>GENERIC</PackageType>
<Referring>Original: XX0000-0L-0000001111</Referring>
<Items>
<Item>
<Weight>2.0</Weight>
<Dimensions>
<Lenght>2.0</Lenght>
<Height>1.0</Height>
<Width>1.0</Width>
</Dimensions>
</Item>
</Items>
<Products>
<Product>
<SkuCode>Art.002</SkuCode>
<Description>Plates (2 kg)</Description>
<Quantity>1.0</Quantity>
</Product>
</Products>
</Shipment>
<Pickup>
<PickupData>
<Notes>note pickup</Notes>
<Date>2025-08-04</Date>
<PreferredFrom>10:00</PreferredFrom>
<PreferredTo>12:00</PreferredTo>
<AlternativeFrom>14:00</AlternativeFrom>
<AlternativeTo>16:00</AlternativeTo>
</PickupData>
</Pickup>
</RequestContainer>
</ns2:ShipmentRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The field <IsEcommerceReturn> can be true or false. When it is set at true, it will mark the shipment as a return.
The field <IsEcommerceReturnOriginalTracking> must be filled out with the MBE tracking Number of the original shipment; moreover, this field links this return shipment with the original one.
This ShipmentRequest can also have filled out the following already existing fields:
<Referring> field, in which the user can put the following information
The order number of the original shipment;
The MBE tracking number of the original shipment;
<Products> field, in which the user can put the information of the SKU Code of the original shipment's goods.
<Pickup> field must be field out in order to have the information for the pickup request.
If there are no errors within the MOL user settings and within the one-shot pickup ShipmentRequest, then the flexible return is correctly created.
This flexible return created will be a closed shipment, it will have a waybill and a pickup time and day.
If MOL settings are not correct, here following there is an example of an error that might occur:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns3:ShipmentRequestResponse xmlns:ns3="http://www.onlinembe.eu/ws/">
<RequestContainer>
<InternalReferenceID>test</InternalReferenceID>
<Status>ERROR</Status>
<Errors>
<Error>
<Id>5</Id>
<ErrorCode>SR_005</ErrorCode>
<Description>User not enabled on return shipment</Description>
</Error>
</Errors>
</RequestContainer>
</ns3:ShipmentRequestResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>