One or more date variables are missing in `requested_dates` field.

I’m using the /project_templates/{gid}/instantiateProject endpoint, as documented here:

When I try to POST, I’m only able to use the start date value, not the due date . If I use Due date, I get the error ’ One or more date variables are missing in requested_dates field.’

This is done by referencing a GID in the requested_date object (1 is start date, 2 is due date).

This works:

{
  "data": {
    "name": "TestName1",
    "team": "x",
    "public": true,
    "requested_dates": [
      {
        "gid": "1",
        "value": "2023-02-17"
      }
    ]
  }
}

This doesn’t:

{
  "data": {
    "name": "TestName1",
    "team": "x",
    "public": true,
    "requested_dates": [
      {
        "gid": "2",
        "value": "2023-02-17"
      }
    ]
  }
}

I am not sure about the API itself in this case, but I believe you are missing an info: a template is either based on start date OR end date. This is built-in. You can change it (by editing a single date and clicking on the button in the popup there) but once defined, you can’t I believe change strategy through the API.

Does it help clarify?