The ship's agent collected the ship's papers and cleared them at the dock office.
From the thisisbristol.co.uk
All of the ship's papers were missing, except for the captain's logbook.
From the en.wikipedia.org
The pirates set sail for China and, repainting and refitting the ship within two days, arrived in Beihai where they used forged papers to sell the ship's cargo of sugar.