Add an object ID param to the API caller

The API caller can receive an additional optional paramater for an object ID to add to the endpoint URL. If provided, it is validated as an interger and appended to the URL.