Skip to main content

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:

NameTypeDescription
idnumberRequired. The ID of the card to be moved. For moving multiple cards, set the id to 0.
info

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:

NameTypeDescription
idnumberRequired. The ID of the card being moved.
columnIdnumberRequired. The ID of the column where the card is placed.
rowIdnumberRequired. The ID of the row where the card is placed.
beforenumberOptional. The ID of the card that the moved card should be positioned before.
batchobjectRequired 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:

Response to the request for the single card operation
{
"id": 4
}
Response to the request for the multiple cards operation
{
"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