Create a PetParent
1 min
POST
https://developer.digitail.io/api/v1/pet-parents
Body Parameters
- bodyobjectrequired
- clinic_idintegerExampleDescription
- namestringrequiredExample
- last_namestringrequiredExample
- emailstringExample
- passwordstringExampleDescription
- phonestringrequiredExampleDescription
- secondary_phonestringExampleDescription
- google_place_idstring
- addressstringExample
- address2stringExample
- citystringExample
- birthdatestringExample
- zip_codestringExample
- streetstringExample
- street_numberstringExample
- regionstringExample
- region_short_codestringExample
- country_idstringExample
- latitudestringExample
- longitudestringExample
- cnpstringExample
- terms_and_conditionsbooleanrequiredExample
- observationsstringExample
- tag_idsinteger[]
- enable_chat_without_appboolean
- referral_source_typestring<google_search | social_media | referral | walk_in | local_event | paid_ad | blog | signage | walk_by | online_reviews | vet_referral | other>Allowedgoogle_searchsocial_mediareferralwalk_inlocal_eventpaid_adblogsignagewalk_byonline_reviewsvet_referralother
- referral_source_detailsstring
- avatarstring<binary>Formatbinary
Responses
201
- object
- dataobjectDescription
- idintegerExample
- namestringExample
- last_namestringExample
- emailstringExample
- phonestringExampleDescription
- secondary_phonestringExampleDescription
- chatUidstringExample
- has_appintegerExample
- has_app_datestringExample
- enable_chat_without_appintegerExample
- created_atstringExample
- updated_atstringExample
- addressstringExample
- address_2string
- citystringExample
- birthdatestring<date-time>ExampleFormatdate-time
- observationsstringExample
- cnpstringExample
- chip_numberstringExample
- discountsobject[]
- idintegerExample
- namestringExample
- descriptionstringExample
- discountintegerExample
- discount_typeintegerDescriptionAllowed01
- apply_on_cogsboolean
- discount_productsnumberExample
- discount_type_productsintegerDescriptionAllowed01
- discount_servicesnumberExample
- discount_type_servicesintegerDescriptionAllowed01
- enabledbooleanExample
- address_meta_dataobject
- zip_codestringExample
- citystringExample
- streetstringExample
- street_numberstringExample
- regionstringExample
- region_short_codestringExample
- country_idintegerExample
- latitudestringExample
- longitudestringExample
- address_2string
- current_client_idintegerExample
- clientsobject[]
- idintegerExample
- clinic_idintegerExample
- referral_source_typestring<google_search | social_media | referral | walk_in | local_event | paid_ad | blog | signage | walk_by | online_reviews | vet_referral | other | group_clinic>DescriptionAllowedgoogle_searchsocial_mediareferralwalk_inlocal_eventpaid_adblogsignagewalk_byonline_reviewsvet_referralothergroup_clinic
- referral_source_detailsstring
- preferencesobject
curl
curl --request POST \
--url https://developer.digitail.io/api/v1/pet-parents \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"name": "John",
"last_name": "Doe",
"phone": "+16175551212",
"terms_and_conditions": true
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"name": "John",
"last_name": "Doe",
"phone": "+16175551212",
"terms_and_conditions": true
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://developer.digitail.io/api/v1/pet-parents", 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("https://developer.digitail.io/api/v1/pet-parents")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"name": "John",
"last_name": "Doe",
"phone": "+16175551212",
"terms_and_conditions": true
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://developer.digitail.io/api/v1/pet-parents"
payload = json.dumps({
"name": "John",
"last_name": "Doe",
"phone": "+16175551212",
"terms_and_conditions": True
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
201
// 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": 1,
"has_app_date": "2020-06-12 15:45:43",
"enable_chat_without_app": 1,
"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,
"apply_on_cogs": false,
"discount_products": 10,
"discount_type_products": 0,
"discount_services": 10,
"discount_type_services": 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,
"clients": [
{
"id": 1,
"clinic_id": 1,
"referral_source_type": "",
"referral_source_details": ""
}
],
"preferences": {}
}
}