AppStoreConnect API - How to set pricing

I am trying to use the AppStoreConnect API to set the price of an app. In the documentation (here) it suggests that it is possible to set the price using the API.

"To set a price for your app using App Store Connect API, create a relationship between the apps resource and appPrices"

However it links to the instructions on how to set a price using the AppStoreConnect web site.

Looking at the website it appears that the pricing is being set by sending a PATCH to the app record itself but on the API this results in a 405 (METHOD_NOT_ALLOWED)

Is it possible to set a price using the API, and if so what endpoint should I be sending to?

Okay I have combined my solutions for FastLane on an answer here. Thank you @GrayDev

AppStoreConnect API - How to set pricing
 
 
Q