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)
curl -X GET https://xmlagri.qcone.com/api/v1/organisations.xml --user :api_key
<?xml version="1.0" encoding="UTF-8"?> <organisations> <organisation> <id>1</id> <customerId>ABC123</customerId> <name>Name of the company</name> <countryCode>GB</countryCode> <isActive>false</isActive> </organisation> </organisations>
curl -X GET https://xmlagri.qcone.com/api/v1/organisations/1.xml --user :api_key
<?xml version="1.0" encoding="UTF-8"?> <organisation> <id>1</id> <customerId>ABC123</customerId> <name>Name of the company</name> <countryCode>GB</countryCode> <isActive>false</isActive> </organisation>
curl -X POST https://xmlagri.qcone.com/api/v1/organisations.xml \ --user :api_key \ --data '<?xml version="1.0" encoding="UTF-8"?> <organisation> <customerId>ABC123</customerId> <name>Name of the company</name> <countryCode>GB</countryCode> <isActive>false</isActive> </organisation>'
<?xml version="1.0" encoding="UTF-8"?> <organisation> <id>19167</id> <customerId>ABC123</customerId> <name>Name of the company</name> <countryCode>GB</countryCode> <isActive>false</isActive> </organisation>
Param name | Description |
---|---|
code optional |
Customer Code Validations:
|
name required |
Name of the organisation Validations:
|
countryCode optional |
Code of the organisation's country - ISO 3166/alpha2 Validations:
|
isActive optional |
True when organisation has to have access to QCOne. False when no access is needed Validations:
|
email optional |
Email of the admin account of the organisation. Required when isActive is True Validations:
|
notificationEmailCode optional |
Single notification mail code Validations:
|
curl -X PATCH https://xmlagri.qcone.com/api/v1/organisations/19167.xml \ --user :api_key \ --data '<?xml version="1.0" encoding="UTF-8"?> <organisation> <customerId>ABC123</customerId> <name>Name of the company</name> <countryCode>GB</countryCode> <isActive>false</isActive> </organisation>'
<?xml version="1.0" encoding="UTF-8"?> <organisation> <id>19167</id> <customerId>ABC123</customerId> <name>Name of the company</name> <countryCode>GB</countryCode> <isActive>false</isActive> </organisation>
Param name | Description |
---|---|
code optional |
Customer Code Validations:
|
name required |
Name of the organisation Validations:
|
countryCode optional |
Code of the organisation's country - ISO 3166/alpha2 Validations:
|
isActive optional |
True when organisation has to have access to QCOne. False when no access is needed Validations:
|
email optional |
Email of the admin account of the organisation. Required when isActive is True Validations:
|
notificationEmailCode optional |
Single notification mail code Validations:
|