Description of Issue:
Can we use the API to get the sits based on the customer ID?
Resolution:
The example below can be used to return specific values for the customer and site by using the filter on the customer ID value.
If you need additional fields from the site record, you can add fields from the model to the select portion of the URI.
Using the GET for Customer Sites send the URI below.
{{SedonaURL}}/api/customersite?$select=CustomerSiteId,CustomerNumber,CustomerID&$filter=Customer/CustomerId eq 51008
Below is an example of the response you will receive showing the customer and site ID based on the CustomerID user in the filter.
[{"CustomerSiteId": 58218,"CustomerNumber": "47853","CustomerId": 51008},{"CustomerSiteId": 58234,"CustomerNumber": "47853","CustomerId": 51008},]
If you want to return the full model for the Customer Sites, remove the Select section of the URL.
{{SedonaURL}}/api/customersite?$filter=Customer/CustomerId eq 51008