Apple does provide 1-year warranty for their products, but in some countries you may have the option to file for a consumer law claim. For products that are meant to last longer than 2 years you can actually get it repaired for free within 5-years of the purchase date in some countries. Apple have to follow these rules, and they usually do that.
Here is a list of countries and their specific laws, https://www.apple.com/legal/warranty/statutoryrights.html
What you need to file a consumer law claim
You need to have a few things in order to get this through the Apple system.
- Copy of original receipt with the products serial number written on the receipt. If the receipt is from the Apple Store everything should be OK. If you have a receipt from a third party vendor, and the serial number is not written on it. You need to write it down on the receipt by hand.
- The product should have no physical damage. If the casing is cracked, or damaged. You may have difficulties getting the consumer law claim approved.
- Make sure the problem with your device is actually hardware related. Make sure you have re-installed software, tried resetting and done everything software wise before you apply for a consumer law claim. You dont want Apple to return your product telling you to re-install macOS. Make sure you have done some troubleshooting yourself first.
- Have the receipt ready, and the product. Contact the place you bought the product from and tell them you want to file a consumer law claim, tell them you have the receipt and that you have read on Apples own website (link above) that this should be covered by your countries laws. If someone tells you: sorry, the warranty is expired. Tell them, I know, I am filing for a consumer law claim, not warranty. That should get things rolling!