If you didn’t order your lumber by “grade”, then you don’t have much to complain about.
If you ordered 27-2x4’s and you got 27-2x4’s, then they fulfilled the order correctly.
The lowest “grade” of lumber is “Economy”. (It’s even lower than “Utility”.) It allows twisted material, deformed material, etc., just about everything you described that was in your order. (See West Coast Lumbermen’s Association, paragraph 122.) This grade of lumber is often used for blocking, temporary braces, etc.
However, the lowest grade of “framing lumber” (2x width, studs, joists, etc.) ALLOWED BY CODE is “No. 3. However, “Standard & Better” or “No. 2 & Better” is the most common AND is often identified as “Construction” grade, when it’s stresses graded. (See ICC Section 2308 for framing and Table 2308.7.2(6) for joists.)
If I were you, I’d contact the lumberyard and let them know it doesn’t meet code, because the salesman knew IT WAS TO BE USED FOR AN ADDITION TO YOUR HOUSE, and you are returning the load and would like the correct framing lumber “grade” (“Standard & Better” or “No. 2& Better” or “Construction” grade. I would stay away from “No. 3”.) The price might be about 15% higher, but the delivery price should remain the same and you should be credited for 100% of the last order, including the delivery charge.
Btw, each piece of lumber should be grade stamped” or a separate certified letter should accompany the load. If you don’t know how to read the grade stamps, ask the salesman to show you. (Ask to see “Select Structural” lumber so you know the difference and so the salesman can’t B.S. you.)
Btw, don’t let the salesman tell you “Economy” grade or “Utility” grade is just another term for “No. 3”. It’s not.
If you live in a seismically active area or a high wind area, this is even more important to get the correct framing.