Authentication

The API key for the connecting user can be provided in one of the following ways:

  • As password of the Basic HTTP Authorization header of the request (with empty username).

  • As content of the user element (child of the root element) of the XML in the request. (Unless it concerns a GET request)


GET /api/v1/varieties.xml
Returns a list of all varieties

Example request to server

curl -X GET https://xmlagri.qcone.com/api/v1/varieties.xml --user :api_key

Example request to server for specific product

curl -i -X GET https://xmlagri.qcone.com/api/v1/varieties.xml?product_id=4 --user :api_key

Example response from server

<?xml version="1.0" encoding="UTF-8"?>
<varieties>
  <variety>
    <id>1</id>
    <name>August Glo</name>
    <product_id>88</product_id>
  </variety>
  <variety>
    <id>2</id>
    <name>Alpine</name>
    <product_id>88</product_id>
  </variety>
</varieties>

Params

Param name Description
product_id
optional

Filter by product_id

Validations:

  • Must be a number.