Customs procedure codes denote which procedure the goods are moving into or out of. For CDS, the codes are split into two parts. There is a single four-digit procedure code which is then combined with one or more three-digit additional procedure codes (APC).
The required links for procedure codes and additional procedure codes, for both import and exports, are accessed through the tariff: https://www.gov.uk/government/collections/uk-trade-tariff-volume-3-for-cds--2
The list of four-digit procedure codes can be found here: https://www.gov.uk/government/publications/appendix-1-de-110-requested-and-previous-procedure-codes-of-the-customs-declaration-service-cds
Select the first 2 digits, which denote the intended use, then select the procedure required. Each four-digit code has its own completion rules, stating the conditions for using that code, as well as the requirements for using that code on a customs declaration.
Once the first part of the procedure code is confirmed, then the additional procedure codes can be chosen.
Note that not all procedure codes and additional procedure codes can be used together, therefore the correlation matrix provided by HMRC should be referred to: https://www.gov.uk/government/publications/4-digit-to-3-digit-procedure-to-additional-procedure-code-correlation-matrix-for-cds
There are separate tariff sections, and a separate navigation guide, for inventory imports. This follows a similar process as standard imports for determining procedure codes. https://www.gov.uk/guidance/navigate-the-uk-trade-tariff-cds-volume-3-inventory-imports
The same process as above applies to export procedure codes and additional procedure codes. See the HMRC navigation guides and sub-chapters for information specific to exports. https://www.gov.uk/guidance/navigate-the-uk-trade-tariff-cds-volume-3-for-exports
As with imports, be aware that there are separate tariff sections and separate navigation guides for inventory exports. https://www.gov.uk/government/collections/uk-trade-tariff-volume-3-for-cds--2