Execute a return shipment intent
Create the return shipment: books the carrier label, a real purchase on the billing profile, records the shipment on the intent (shipmentId, readable with getShipment), links it to the task and its ticket, and completes the RETURN_SHIPMENT task. A retry after a failure reuses the shipment already booked. This is the only way to complete that task: updateTaskStatus refuses it. To ship something outside an offboarding, use createShipment. Safe to retry: an intent executed earlier answers outcome: ALREADY_EXECUTED and does nothing again. Refused with INTENT_NOT_FOUND, TICKET_CLOSED, TICKET_SCHEDULED before a scheduled task wakes up, EXECUTION_IN_PROGRESS, OFFBOARDING_NOT_OPEN, RETURN_SHIPMENT_INCOMPLETE (fill the addresses, parcel, value and billing profile with updateReturnShipmentIntent), BILLING_PROFILE_NOT_FOUND, FAIL_TO_CREATE_SHIPMENT (502).
Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.