You must first understand colour spaces in detail and how they are used and their affect on the PDF. The API does not help you with these things. Once you understand colour spaces, you can easily use the API to create colours in any of the 11 colour space families (well, in 10 of them, patterns are not easy). You can use DeviceN or Separation, but what makes them not too easy is that you need to understand (a) the purpose of tint transforms (b) the internal structure of PDF function dictionaries (c) how to create a function dictionary to implement the desired tint transforms.
You will not find examples of most things, but continued return to the documentation (both plug-in API and 32000-1) should usually yield results.
As you will see in 32000-1, there is no central list of spot colorants used in a PDF. The list of colorants simply comes from the colour spaces used throughout all pages, form XObjects, patterns and type 3 fonts, and you can freely add more colours. However, it is very bad practice to add new spot colorants with different properties, so a good implementation will start with an analysis of the whole file to discover if the colorant is used, and how it is defined.