You can use either the Shipping SOAP API or Delivery Manager to generate a returns manifest.
Metapack recommends using the following Shipping SOAP API methods to generate a manifest containing all the collections that are scheduled for pickup:
Use addConsignmentsToGroup to add the collections to a "returns" manifest group.
Use either createManifest to schedule the collections for immediate pickup, or createManifestForFutureDespatch to schedule the collections for future pickup.
For information about using Delivery Manager to generate a returns manifest, refer to Generating a Returns Manifest.