Wondering about best practices + considerations for naming the fields/parameters within the Request and Response objects for a given call.
Context: developing a RESTful API that involves rental property listings. A partner service using this API can create a new listing by invoking our CREATE_LISTING call, which has a Request Object with 30+ data fields such as startDate, endDate, propertyAddress, amount, renterName, ownerName, etc.
Many if not all of these fields also appear within the Response Object, e.g. startDate. Question: for the fields/parameters that *are* contained in *both* objects:
(a) should they have the same name in both Request and Response, or
(b) should we give them slightly different names, e.g. startDate and start_date, with the thought being that it makes it a little easier for a developer to know whether the field/parameter is associated with the Request or with the Response.
Thoughts and/or pointers to existing resources/articles covering this topic appreciated... thanks!
BTW... is the most appropriate term 'fields' or 'parameters' or something else, for referring to the individual data elements that comprise the Request / Response object? thanks again!