PUT /cards/{id}/move
Description
Moves cards to a specified position
The route handles the HTTP PUT request made to the cards/{id}/move
path.
Path parameters
The next parameter is sent in the request line:
Name | Type | Description |
---|---|---|
id | number | Required. The ID of the card to be moved. In case multiple cards are requested to be moved, the id should be set to 0 |
When you move multiple cards, make sure that the id
is set to 0, otherwise (if set to another value), only one card (with this specified id value) will be moved.
Payload
The server expects to receive a json object with the next properties:
Name | Type | Description |
---|---|---|
id | number | Required. The ID of the moved card. |
columnId | number | Required. The ID of the column where the card is moved to. |
rowId | number | Required. The ID of the row where the card is moved to. |
before | number | Optional. The ID of the card before which the moved card should be placed. |
batch | object | Required for multiselect. An array of cards objects that are moved. |
Example:
{
"id": 4,
"columnId": 2,
"rowId": 1,
"before": "7"
}
In case multiple cards are moved, the batch
property should contain an array of all cards objects that are moved:
{
"batch": [
{
"id": 2,
"columnId": 1,
"rowId": 1,
"before": "1"
},
{
"id": 7,
"columnId": 1,
"rowId": 1,
"before": "1"
}
]
}
Response
The server returns a json object with a card ID (if one card is moved) or with the ID set to 0 for the operation on multiple cards.
Example:
{
"id": 4
}
{
"id": 0
}
The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
Related articles: Working with server