Probably more info than you want to know, but sometimes facts (rather than conjecture/assumptions) are a good thing to have when dealing with airlines...
I had to go read up on what the companion fare is on Alaskan; it looks like it is a discounted fare for a companion (my Delta certificate is for a free companion, so a little different). Answers to airline questions aren't always as simple as they might seem to be, so it's always nice to have access to the terms and conditions ("small print") of any given offer. Sadly, the FAQ for the companion fare on the Alaskan Airlines website indicates that the terms/conditions of the offer are reachable only through a link to the companion fare code in your online wallet. So, I don't have access to that.
If I click on the link Tom provided above, it states (emphasis mine)...
When your plans change within the first 24 hours following your ticket
purchase, here’s what you need to know:
If you need to cancel your flights, we will refund you the cost of
your unused tickets.
If you need to change* your flights, you can do
so one time without paying any change fees.
So... if they've refunded you the money you paid ("the cost"), they have met the letter-of-the-law obligation of their refund policy. There is no reference to making you whole or refunding discount codes, companion airfare codes/certificates, etc. (see below for more on this).
A good place to look outside of airline websites when there are issues related to airlines is the FlyerTalk forum, which is populated by frequent flyers who tend to have far more experience with these things than the average RS forum member.
There is a "Bank of America Mileage Plan Visa Companion Fare FAQ" thread with a sticky that includes the forum's collective knowledge of the general rules. It indicates that refunds forfeit the companion fare but rebooking/changes do not. Apparently, the strategy that preserves the companion fare is to change/rebook the itinerary instead of canceling it (see above... Alaska does not charge a change fee until after 24 hours, so this could be done only for any cost difference in fares).
Flyertalk also has a thread about what happens to discount codes when an itinerary is canceled within 24 hours. There is debate (and no definitive answer) about what happens. There is reference to the Dept of Transportation's Guidance on the 24-Hour Reservation Requirement, which states the following:
For any online cancellation that is covered by the 24-hour reservation
requirement, in deciding whether to pursue enforcement action, the
Enforcement Office considers it to be a violation of 14 CFR
259.5(b)(4) and an unfair and deceptive practice for a carrier not to offer consumers the option of receiving a full refund in the original
form of payment before the cancellation request is submitted.
The question on the forum is whether the companion fare code is a "form of payment" (refundable according to the guidance document) or a discount from the airline (not addressed by the guidance document).
(Continued below)