The issue is likely at the call site. I suspect you're doing something like decoder.decode([sales].self, from: data), and the [sales] here is the issue because you're specifying that you have an Array of sales. I'm just guessing though as you didn't show the rest of the code
Also note that the standard notation for types in Swift is upper-cased, so to align to it you should name your types Sales and Sale (capitalised)
I have added the rest of the code in the Edit section. Does that help?
Also, thank you for letting me know about the standard notation. I have made the changes accordingly.
Yes, it was indeed what I was guessing. Your code is expecting an Array of Sales, but the example JSON you have there has only one.
Note that wrapping a type in square brackets is a short-hand for an Array of the type. i.e. [Sales] = Array<Sales>