I have a c# project and looking to make use of an api. The documentation is here if interested: link
When I want to have a list of all "Customers" from the api, which has some required properties:
attention.self, currency, customerContact.self, customerGroup, customerGroup.self, defaultDeliveryLocation.self, invoices.self, layout.self, name, paymentTerms, paymentTerms.self, salesPerson.self, self, templates.self, totals.self, vatZone, vatZone.self
I have a custom object which is identical in naming as the required properties. The object is complex as it have references to objects like "attention, customerContact, customerGroup, paymentTerms.." just like the documentation states.
Now the endpoint I have to use is "\customers" with a Get, so I have to parameterize the properties.
I have searched for a solution to convert a complex object into a uri like "?name=Mike¤cy=USD&..", but unfortunately I only found a solution which could make a custom object with only simple types to a formatted parameter string.
So I gave up and tried to write my own hardcoded url string for now, but how do I get complex objects into the url query, like "attention.self"?
Would "?attention.self=Something&.." make the api translate it so that it knows "attention" is another object and "self" is a property on that?
And any advice on how to do this more optimized would be great.