I am creating a new transaction object and purchasing the shipping label with one API call using shippo.transaction.create({...}). My user can request 1 or more of the same label at the same time. How can I include the number of labels they requested in the same PDF? I really don't want to do it in a batch since this is much quicker and straight-forward.
I have tried looping through
shippo.transaction.create(
{
shipment: shipment,
carrier_account: carrierAccount.object_id,
servicelevel_token: shipDetails.shippingMethod,
label_file_type: 'PDF',
})
but only ever get 1 back in return. This PDF will be either emailed or printed directly by the user.
As far as I understand, we don't have an option to download/aggregate multiple labels into one PDF file via API/SDK.
Batch API can be used to group the purchased labels. This API will aggregate the label into one single PDF as well.
You can read about this further here: https://goshippo.com/docs/batch/
I am checking with my team as well. I will edit/add a comment if I find a workaround or an alternate solution.