How to do it...

You need to define the type of the field that contains an IP address as ip.

Using the preceding order example, we can extend it by adding the customer IP with the following:

"customer_ip": {
"type": "ip"
}

The IP must be in the standard point notation form, as follows:

"customer_ip":"19.18.200.201"