As of version 2021-04 of the REST Admin API, the Checkout resource returns the application_type property for discounts that are added to a checkout. The field shows how the discount was applied. Valid values are automatic, discount_code, manual, and script.
Metafields are currently available to Products and Product Variants in the unstable API version. When the stable API version 2021-07 is released, the Metafields will also be available to Shop Collections, Customers, Blogs, Articles and Pages.