This should probably have been asked as two separate questions for the benefit of others browsing the questions.
1. The credit note structure is similar to primes or BMs, in that there'll be relevant breakdowns, source code totals, etc. See 1.5.2 of the Pax IDEC standard for an example (specifically beginning on page 266 of the untracked version 2.1) which includes said records. Also, see 1.1 (pg 8) for the overview structure.
2. The invoice type would be equal to CN whenever it's an invoice of credit notes. While "reversal due to protest" might be the most common, there are other potential reasons, such as reversal which you've caught but before a protest occurs, or any other reason you want to credit your partner money. There are a few reasons in the Credit Memo reason codes section of the ISPG (e.g. Alliance/Partner Settlement) and the ability for you to define your own codes for any other reason you might want to create a credit memo. All such credit memos would be on an invoice with the CN.
Whenever there are credit memos on the invoice, the invoice type is CN.