Version is Ambiguous

Decisions, decisions...

Purple gradient wave Purple wave used to give a visual break between the header and body of the page.

Summary

Multiple different versions of the API have been specified and as such Youmanage is unable to determine which one to use.  This error can also occur if multiple API version headers are sent with different versions. 

curl -H "x-api-version:0.1" -H "x-api-version:1.0" -H "Authorization: ApiKey {ApiKey}" https://api.youmanage.co.uk/Companies

{
  "error": {
    "code": "YM0074",
    "reference": "https://developer.youmanage.co.uk/api/errors/ym0074",
    "target": "Version",
    "message": "Multiple different versions were requested",
    "details": null
  }
}

  

Solution

Ensure the correct version is included only once in the API version header before making the request again.

curl -H "x-api-version:0.1" -H "Authorization: ApiKey {ApiKey}" https://api.youmanage.co.uk/Companies

[
  {
    "id": 2,
    "name": "Fictional Data Limited",
    "enabled": true
  }
]

For more information on selecting a version see our guide on versioning.