Usually, the data is represented at the application level as a common infoset (e.g. XML, JSON, YAML) and requires a mechanism of data binding (using e.g. a common encoding scheme like XSD).
Although an important architectural decision, this is a separate matter from the distinction between wire protocols and programmatic APIs.
In electronics, a wire protocol is the mechanism used to transmit data from one point to another.
As the name suggests, these distributed object protocols run in different processes in one or several computers that are connected over a network.
Wire protocols provide the means for a program running under one operating system to communicate with a program running under some other operating system over a network such as an organization's intranet or the Internet.