Ad model

Description:

The Ad model resource serve as a Schema and defines all available fields for each Ad-Type. The Ad-Models may be read programmatically, but mainly provide assistance to the developer while parsing the Ad-API.

Location:

Links to are included in the Ad-API and the Search-API. As always, prefer getting the URL from another resource over hard-coding it. Remember, REST is supposed to be hypermedia-driven.

Definition:

A schema consists of field definitions, key, type and decription.

Format:

Media type: application/vnd.finn.ad.schema.

Sample:

{
  "href": "http://api.finn.no/ad/schema/used-car",
  "fields": {
    "exterior-main-color": {
      "type": "string",
      "description": "The exterior color of the car"
    },
    "milage": {
      "type": "integer",
      "description": "The car's current milage"
    },
    "registration-fee": {
      "type": "numeric",
      "description": "The fee for a car's registration"
    },
    "registration-number": {
      "type": "string",
      "description": "The car's registration number"
    },
    "road-tax-included": {
      "type": "boolean",
      "description": "Is the road tax included in the price?"
    },
    "year": {
      "type": "numeric",
      "description": "When was the car manufactured?"
    },
    "prices": {
      "type": "complex",
      "description": "Contains the prices for the car",
      "children": {
        "net": {
          "type": "numeric",
          "description": "The price without taxes."
        },
        "main": {
          "type": "numeric",
          "description": "The price with taxes."
        }
      }
    }
  }
}
          
© 1996 - 2022 FINN.no AS