GET: Paginated Animals
https://api.husbandry.pro/v1/api.php/animals
Scope: animal.read
Response
{
"data": [
{
"animal_type": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"common_name": "Ball Python",
"scientific_name": "Python regius",
"picture": "https://husbandry.pro/.../63fe01c1b6d2a_Grey-Grey.png"
},
"dam_genetics": [
{
"name": "Pinstripe",
"trait": "Inc/Dominant"
}
],
"dam_id": "",
"date_acquired": "2021-01-14",
"descriptor": "Fire Leopard het Clown",
"display_currency": "1",
"fed_notification_type": "1",
"fed_week_days": "",
"feeder": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "FT Feeder Rat",
"size": "Weaned",
"weight": "70",
"cost": "2.20"
},
"feeding_intervals": "7",
"feeding_notify": "0",
"feeding_qty": "1",
"full_dob": "",
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"is_for_sale": "0",
"is_proven_breeder": "0",
"maturity": "Adult Beast",
"my_id": "HP-0018",
"name": "",
"notes": "",
"photos": [],
"rack": {
"name": "ARS",
"row": "3",
"column": "2"
},
"sex": "F",
"sire_genetics": [
{
"name": "Leopard",
"trait": "Inc/Dominant"
},
{
"name": "Fire",
"trait": "Inc/Dominant"
},
{
"name": "Blade",
"trait": "Inc/Dominant"
},
{
"name": "Clown",
"trait": "Recessive"
}
],
"sire_id": "",
"source": "Acquired",
"status": "active",
"supplier_info": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]"
},
"tags": []
},
{
"animal_type": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"common_name": "Ball Python",
"scientific_name": "Python regius",
"picture": "https://husbandry.pro/.../63fe01c1b6d2a_Grey-Grey.png"
},
"custom_status_notes": "",
"dam_genetics": [
{
"name": "Desert Ghost [het]",
"trait": "Recessive"
}
],
"dam_id": "HP-001",
"date_acquired": "2021-01-14",
"descriptor": "Lemonblast het DG",
"display_currency": "1",
"fed_notification_type": 1,
"fed_week_days": ["sunday", "monday"],
"feeder": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "FT Feeder Rat",
"size": "Weaned",
"weight": "70",
"cost": "2.20"
},
"feeding_intervals": 7,
"feeding_notify": 0,
"feeding_qty": 1,
"full_dob": "2020-10-20",
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"is_for_sale": "0",
"is_proven_breeder": "0",
"maturity": "Adult Beast",
"my_id": "HP-0019",
"name": "Royal Python",
"notes": "important notes here..",
"photos": [
"https://husbandry.pro/.../63fe01c1b6d2a_Grey-Grey.png"
],
"rack": {
"name": "ARS",
"row": "5",
"column": "2"
},
"sex": "F",
"sire_genetics": [
{
"name": "Pastel",
"trait": "Inc/Dominant"
},
{
"name": "Pinstripe",
"trait": "Inc/Dominant"
},
{
"name": "Desert Ghost",
"trait": "Recessive"
}
],
"sire_id": "HP-2033",
"source": "Acquired",
"status": "On Loan",
"supplier_info": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]"
},
"tags": [
"Python",
"Royal"
]
}
],
"offset": 20,
"limit": 10,
"total": 50
}
Params
Field |
Type |
Description |
user_keys developer-api |
string or array |
32 characters long authorization key received from husbandry users.
it should be string or array
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
]
|
sort_field |
string |
`name` default sort field
[
'my_id',
'feeding_qty',
'feeding_intervals',
'feeding_notify',
'fed_notification_type',
'name',
'sex',
'source',
'descriptor',
'full_dob',
'date_acquired',
'is_for_sale',
'sale_price',
'pricing_notes',
'buyer_notes',
'is_proven_breeder',
'notes',
'maturity',
'hold_customer',
'hold_notes',
'sold_date',
'sold_amount',
'sold_customer',
'sold_notes',
'display_currency',
'status',
'custom_status_notes'
]
|
sort_dir |
string |
`asc` default sort order
[
'asc',
'desc'
]
|
limit |
number |
default limit is `100` |
page |
number |
paginated data |
animal_type |
string or array |
filter records by animal type |
status |
string or array |
filter records by status |
is_for_sale |
number |
filter sale record. either 0 or 1 |
Definition
Field |
Type |
Description |
animal_type |
object |
Field |
Type |
Description |
ids |
uuid |
unique identifier of animal type |
common_name |
string |
animal type common name |
scientific_name |
string |
animal type scientific name |
picture |
string |
full url of animal type picture |
|
dam_genetics |
array |
Field |
Type |
Description |
name |
string |
- |
trait |
string |
- |
|
dam_id |
string |
|
date_acquired |
date |
Y-m-d format |
descriptor |
string |
|
fed_notification_type |
string |
if `feeding_notify` is `true`
[
"Interval Days",
"Week Days"
]
|
fed_week_days |
array |
if `feeding_notify` is `true` & `fed_notification_type` is `Week Days`
[
"Monday",
"Tuesday",
"WednesDay",
"Thursday",
"Friday",
"Saturday",
"Sunday"
]
|
feeder |
object |
Field |
Type |
Description |
ids |
uuid |
unique identifier of feeder |
name |
string |
- |
size |
string |
- |
weight |
double |
- |
cost |
double |
- |
|
feeding_intervals |
number |
if `feeding_notify` is `true`
Number of feeding intervals
|
feeding_notify |
number |
Feeding notification status (1 for true, 0 for false) |
feeding_qty |
number |
Feeding quantity |
full_dob |
date |
Animal Dob |
hold_info |
object |
if animal status `hold`
Field |
Type |
Description |
hold_notes |
string |
|
hold_customer |
string |
|
|
ids |
uuid |
Unique identifier for the data |
is_for_sale |
number |
For sale status (1 for true, 0 for false) |
is_proven_breeder |
number |
Proven breeder status (1 for true, 0 for false) |
maturity |
string |
|
my_id |
string |
User defined unique identifier for the animal |
name |
string |
Name of the animal |
notes |
string |
Note of the animal |
photos |
array |
Array of URLs for photos |
rack |
object |
Field |
Type |
Description |
name |
string |
Name of the rack |
row |
number |
Row number of the rack |
column |
number |
Column number of the rack |
|
sale_info |
object |
if `is_for_sale` is `true`
Field |
Type |
Description |
sale_price |
double |
- |
pricing_notes |
string |
- |
buyer_notes |
string |
- |
|
sex |
string |
[
"M",
"F",
"U"
]
|
sire_genetics |
array |
Field |
Type |
Description |
name |
string |
- |
trait |
string |
- |
|
sire_id |
string |
|
sold_info |
object |
if animal status `sold`
Field |
Type |
Description |
sold_date |
date |
|
sold_amount |
double |
|
sold_customer |
string |
|
sold_notes |
string |
|
|
source |
string |
[
"Produced",
"Acquired"
]
|
supplier_info |
object |
Field |
Type |
Description |
first_name |
string |
|
last_name |
string |
|
email |
string |
|
sold_notes |
string |
|
|
status |
string |
[
"inactive",
"active",
"hold",
"archived",
"sold",
"sold-archived"
]
|
tags |
array |
|
user developer-api |
object |
Field |
Type |
Description |
first_name |
string |
|
last_name |
string |
|
email |
string |
|
business_name |
string |
|
|
Errors
Code |
Message |
access_denied |
The resource owner or authorization server denied the request. |
insufficient_scope |
The requested scope is insufficient for accessing the requested resource. |
GET: Single Animal
https://api.husbandry.pro/v1/api.php/animal/{:ids}
Response
{
"animal_type": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"common_name": "Ball Python",
"scientific_name": "Python regius",
"picture": "https://husbandry.pro/.../63fe01c1b6d2a_Grey-Grey.png"
},
"dam_genetics": [
{
"name": "Pinstripe",
"trait": "Inc/Dominant"
}
],
"dam_id": "",
"date_acquired": "2021-01-14",
"descriptor": "Fire Leopard het Clown",
"display_currency": "1",
"fed_notification_type": "1",
"fed_week_days": "",
"feeder": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "FT Feeder Rat",
"size": "Weaned",
"weight": "70",
"cost": "2.20"
},
"feeding_intervals": "7",
"feeding_notify": "0",
"feeding_qty": "1",
"full_dob": "",
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"is_for_sale": "0",
"is_proven_breeder": "0",
"maturity": "Adult Beast",
"my_id": "HP-0018",
"name": "",
"notes": "",
"photos": [],
"rack": {
"name": "ARS",
"row": "3",
"column": "2"
},
"sex": "F",
"sire_genetics": [
{
"name": "Leopard",
"trait": "Inc/Dominant"
},
{
"name": "Fire",
"trait": "Inc/Dominant"
},
{
"name": "Blade",
"trait": "Inc/Dominant"
},
{
"name": "Clown",
"trait": "Recessive"
}
],
"sire_id": "",
"source": "Acquired",
"status": "active",
"supplier_info": {
"ids": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]"
},
"tags": []
}