Trello REST API - Checkitem update member
Asked by David Bakkers:

Does anyone know the correct method of updating the member for a checkitem on a card? The Trello REST API docucmentation doesn't yet describe how to do this.

I've tried doing a PUT request to the correct endpoint for the checklist, like this:

```
https://api.trello.com/1/cards/{id}/checkItem/{idCheckItem}?due={yyyy-mm-ddThh:mm:ss.000Z}&idMember={idMember}&key={key}&token={token}
```

The due date is correctly set, but the member never gets set and the REST API reports no errors.

If I do a GET request to see what the current field values are for that checkitem, the JSON response is:
> {  
> "idChecklist": "5fb5af30a002b753bdfa5755",  
> "state": "incomplete",  
> "id": "5fb5af96581f6180fb36d8a2",  
> "name": "The checkitem name",  
> "nameData": null,  
> "pos": 101034,  
> "due": "2021-02-12T07:00:00.000Z",  
> **"idMember": null**   
> }

If then I manually set the member using the web interface, then send that GET request again for the same checkitem, I can see the member is now set:
> {  
> "idChecklist": "5fb5af30a002b753bdfa5755",  
> "state": "incomplete",  
> "id": "5fb5af96581f6180fb36d8a2",  
> "name": "The checkitem name",  
> "nameData": null,  
> "pos": 101034,  
> "due": "2021-02-12T07:00:00.000Z",  
> **"idMember": 5f67d7cdb2916e4b3f4fcc7e**   
> }


Answers:
author: David Bakkers
body: Problem resolved to faulty code. Two REST API endpoints exist for updating member for checkitem


author: milynnus
body: [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)

Bottomline. No business class, the fields are not updated. Am I right?

comments: author: David Bakkers
body: Yes. You are right.


author: milynnus
body: [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)

The api appears to be different from the documentation

PUT /1/cards/{idCard}/checklist/{idChecklist}/checkItem/{idCheckItem}

because due and member is specific to Advanced Checklist no info is provided there. I recall be able to do both by unpacking a python wrapper update both.

comments: author: David Bakkers
body: Are you saying members cannot be added to checkitems via the endpoint I've used and must be added via the endpoint you've shown above? I tried that too and also got the same result.

Can you please provide an example of the Put method (ie the URL and Body of the request) you used to add a member to a checkitem.

Thanks,


author: milynnus
body: [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)

The api was taken from Trello documentation page which I observed to be different. I will need to dig up my notes.


author: milynnus
body: [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)

![EDDDD094-98A5-4AD0-B6DF-1754126FF32E.jpeg](https://community.atlassian.com/t5/image/serverpage/image-id/129864i3E8A9BF59FDC4BA8/image-size/large?v=v2&px=999 "EDDDD094-98A5-4AD0-B6DF-1754126FF32E.jpeg")

I recall unpacking from this python function for member.


author: milynnus
body: [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)

Not so good news. I coded a test program. It seems that it does not work for idMember as well a due. Could it be that I am no longer on Business Class trial?


author: David Bakkers
body: OK, I've found how to do it. It's done by doing a Put request to either the endpoint for the checkItem in the card OR the checkitem in the checklist in the card.

This is one method:

```
PUT /1/cards/{id}/checkItem/{idCheckItem}?due={yyyy-mm-ddThh:mm:ss.000Z}&idMember={idMember}&key={key}&token={token}
```

<br />

This is the other:

```
PUT /1/cards/{id}/checkList/{idCheckList}/checkItem/{idCheckItem}?due={yyyy-mm-ddThh:mm:ss.000Z}&idMember={idMember}&key={key}&token={token}
```

If you prefer, you can define the due, idMember, key and token values in a JSON formatted body of the request instead of within the URL.

When I used these methods with Postman, they worked fine. When I used my code (PowerShell), it didn't work.

It turned out to be an obscure aberration in the PS code itself that, once I fixed it, the request worked fine.


author: milynnus
body: [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)

Congrats.

That final API is exactly the same as the one I tested. Out of curiosity, are you on Business Class?


author: David Bakkers
body: I, personally, am not on Business Class. But, I also have access to Trello via an Enterprise level license via some others that I'm working for, so I used their Trello instance to double check everything is working correctly and also see the results via the web interface.

It's a bit misleading that the REST API will not give you any errors if you set the due date and member for a checkitem if you don't have Business Class or higher, so you are fooled into thinking everything has worked. However, when you check the value of the due date and member after setting them, they are still 'null'.


author: milynnus
body: [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)

I am back on this again. I do not have business class. So are you saying that if API runs clean, the update is actual successful except that when you try to retrieve it back it will show None? or null?


author: David Bakkers
body: Sort of; it depends on what you mean by 'cleanly'.

* If by 'cleanly' you mean "no errors", then yes, it's clean
* If by cleanly you mean "the value is set and no errors", then no, it's not clean

If you *don't* have Business Class, you can use the REST API to ***TRY*** to set or update the value, and get no error, but in reality, the value doesn't get set to anything, it stays as null / none.

It would be better if the REST API gave an error and at least told you that your license level doesn't allow setting that value, or something similar.


Tags: rest-api