PUT /cards/{id}/move
Description
Moves cards to a specified position
This route deals with the HTTP PUT request sent to the cards/{id}/move
endpoint.
Path parameters
The following parameter should be included in the request URL:
Name | Type | Description |
---|---|---|
id | number | Required. The ID of the card to be moved. For moving multiple cards, set the id to 0. |
If moving multiple cards, the id
must be set to 0; otherwise, if any other value is used, only the card with that specific id will be moved.
Payload
The server expects a JSON object with these properties:
Name | Type | Description |
---|---|---|
id | number | Required. The ID of the card being moved. |
columnId | number | Required. The ID of the column where the card is placed. |
rowId | number | Required. The ID of the row where the card is placed. |
before | number | Optional. The ID of the card that the moved card should be positioned before. |
batch | object | Required for multiselect. An array of card objects being moved. |
Example:
{
"id": 4,
"columnId": 2,
"rowId": 1,
"before": "7"
}
When moving multiple cards, the batch
property should include an array of all the card objects being moved:
{
"batch": [
{
"id": 2,
"columnId": 1,
"rowId": 1,
"before": "1"
},
{
"id": 7,
"columnId": 1,
"rowId": 1,
"before": "1"
}
]
}
Response
The server responds with a JSON object containing the card ID (for single card moves) or with the ID set to 0 when multiple cards are moved.
Example:
{
"id": 4
}
{
"id": 0
}
The HTTP status code indicates the success of the request (response.status == 200) or an error (response.status == 500).
Related articles: Working with server