Resources
Resources are the entities or items that can be retrieved and manipulated via the API.
Typical resources are Postal Address, Catalog and Variable that are connected together in a graph such that a postal address holds a catalog of variables that can be purchased.
Example JSON for Postal Address
A Postal Address contains a link to a catalog
:
{
"@id" : "https://api.whenfresh.com/world/gb/addresses/8e05h·0",
"label" : "1 Spa Mews",
"@type" : "PostalAddress",
"catalog" : {
"@type" : "Catalog",
"@id" : "https://api.whenfresh.com/world/gb/addresses/8e05h·0/catalog"
}
}
Example JSON for Catalog
A Catalog contains a list of variables
:
{
"@type" : "Catalog",
"variables" : [
{
"variableId" : "https://api.whenfresh.com/variable/WhenFresh/Property Market/Property Attribute/Property Last Listed as Rented/provenance/Zoopla/Property Attribute",
"price" : {
"currency" : "GBP",
"value" : 0.03
},
"@type" : "https://api.whenfresh.com/variable/WhenFresh/Property Market/Property Attribute/Property Last Listed as Rented"
},
{
"@type" : "https://api.whenfresh.com/variable/WhenFresh/Bedrooms/Property Attribute/Bedroom Count Band",
"price" : {
"value" : 0.03,
"currency" : "GBP"
},
"variableId" : "https://api.whenfresh.com/variable/WhenFresh/Bedrooms/Property Attribute/Bedroom Count Band/provenance/Zoopla/Property Attribute"
},
{
"variableId" : "https://api.whenfresh.com/variable/WhenFresh/Property Market/Property Attribute/Property Last Listed as To Rent/provenance/Zoopla/Property Attribute",
"price" : {
"currency" : "GBP",
"value" : 0.03
},
"@type" : "https://api.whenfresh.com/variable/WhenFresh/Property Market/Property Attribute/Property Last Listed as To Rent"
},
],
"@id" : "https://api.whenfresh.com/world/GB/addresses/8e05p·0/catalog",
"@context" : "https://api.whenfresh.com/.hydra/context.jsonld"
}