Calling the Dimensions API

Hi,

We currently have an integration that is working with the REST API and we are creating a Sales Invoice and Sales Invoice Line.

However, we need to set the Cost Centre on the Sales Invoice Line which is a dimension.

Having referred to the documentation below it is unclear what calls need to be made.

https://docs.microsoft.com/en-us/dynamics-nav/api-reference/v1.0/resources/dynamics_dimension

Our scenario is detailed below if someone could advise which API calls need to be made to achieve this.

Our integration will have a value for the cost centre of say 100. We then need to query via the API to see if cost centre 100 exists, if it exists we then need to get the GUID and set the GUID somewhere so that the Cost Centre is associated to the Sales Invoice Line.

Thanks

Tom