Get a pet parent record by ID
1 min
GET
/api/v1/pet-parents/{id}
Query Parameters
- includestringDescription
Responses
200
- object
- dataPetParent
- idintegerExample
- namestringExample
- last_namestringExample
- emailstringExample
- phonestringExampleDescription
- secondary_phonestringExampleDescription
- chatUidstringExample
- has_appbooleanExample
- has_app_datestringExample
- enable_chat_without_appboolean
- created_atstring<date-time>Example
- updated_atstring<date-time>Example
- addressstringExample
- address_2string
- citystringExample
- birthdatestring<date>Example
- observationsstringExample
- cnpstringExample
- chip_numberstringExample
- discountsDiscount[]
- idintegerExample
- namestringExample
- descriptionstringExample
- discountintegerExample
- discount_typeintegerDescription
- enabledbooleanExample
- address_meta_dataobject
- zip_codestringExample
- citystringExample
- streetstringExample
- street_numberstringExample
- regionstringExample
- region_short_codestringExample
- country_idintegerExample
- latitudestringExample
- longitudestringExample
- address_2string
- current_client_idintegerExample
curl
curl --request GET \
--url /api/v1/pet-parents/{id} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/api/v1/pet-parents/{id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/api/v1/pet-parents/{id}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/v1/pet-parents/{id}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// successful operation
{
"data": {
"id": 1,
"name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "+19772480544",
"secondary_phone": "+19772480544",
"chatUid": "cjfiem-c9hg-apzm-23sod",
"has_app": true,
"has_app_date": "2020-06-12 15:45:43",
"enable_chat_without_app": false,
"created_at": "2020-06-12 15:45:43",
"updated_at": "2020-06-12 15:45:43",
"address": "Flowers St. 300, Palo Alto, 123456, USA",
"address_2": "",
"city": "Buenos Aires",
"birthdate": "1990-04-04",
"observations": "happy",
"cnp": "1234567890123",
"chip_number": "99281028",
"discounts": [
{
"id": 10,
"name": "digitail disc10",
"description": "digitail disc10",
"discount": 10,
"discount_type": 0,
"enabled": true
}
],
"address_meta_data": {
"zip_code": "123456",
"city": "Palo Alto",
"street": "Flowers St.",
"street_number": "1990",
"region": "California",
"region_short_code": "CA",
"country_id": 6,
"latitude": "37.4419",
"longitude": "122.1430",
"address_2": ""
},
"current_client_id": 30
}
}