The rules are related to the fare basis code - advance purchase, minimum/maximum stay, day of week/time of day restrictions, nonrefundable or refundable, etc. The booking code, or class of service, is usually the first letter of the fare basis code. There is often more than one fare basis for a given booking code. In addition the fare basis codes often change from week to week, with different sets of rules.
Some of the letters in the code have some meaning - e.g., N or NR at the end usually means nonrefundable. Often there is a number in the code, such as 3, 7 or 14. That often indicates the advance purchase requirement. If there are different fares for different days of the week, there will usually be something in the code that reflects that, but those differ from airline to airline. For example, with two similar fares one might have an "O" and the other a "P", where O means midweek and P means weekend. (Another variation on this is the use of X or D and there are many more.)
Also, if there are multiple airports in a city and the fare basis is valid only from one city, there may be the airport code in the fare basis. For example, a fare restricted to Washington Dulles might have IAD in the fare basis.