adding a key for post id if set in api call query string