Do you need help with your API queries and/or mutation?
Here are a few that might help you!
Queries
LIST CARDS
{
cards(pipe_id: XXXX, first: 10, search: {title: "XXXXX"}) {
edges {
node {
id
title
assignees {
id
}
comments {
text
}
comments_count
current_phase {
name
}
done
due_date
fields {
name
value
}
labels {
name
}
phases_history {
phase {
name
}
firstTimeIn
lastTimeOut
}
url
}
}
}
}
This query has a limit of 50 cards/records per page, so it is necessary to use pagination, you can find this information here.
SHOW CARD
{
card(id: XXXX) {
title
assignees {
id
}
comments {
text
}
comments_count
current_phase {
name
}
done
due_date
fields {
name
value
}
labels {
name
}
phases_history {
phase {
name
}
firstTimeIn
lastTimeOut
}
url
}
}
Mutations
CREATE CARD
mutation{
createCard(
input: {
pipe_id: XXXX
fields_attributes: <
{field_id: "assignee", field_value:t00000, 00001]}
{field_id: "checklist_vertical", field_value: i"a", "b"]}
{field_id: "checklist_horizontal", field_value: c"b"]}
{field_id: "cpf", field_value: "XXX.XXX.XXX-XX"}
{field_id: "cnpj", field_value: "XX.XXX.XXX/XXXX-XX"}
{field_id: "date", field_value: "1977-01-20"}
{field_id: "date_time", field_value: "2017-07-20T21:00:00+00:00"}
{field_id: "due_date", field_value: "2017-07-20T21:00:00+00:00"}
{field_id: "currency", field_value: "9500.50"}
{field_id: "label_select", field_value: 0890073, 908006]}
{field_id: "email", field_value: "rocky.balboa@email.com"}
{field_id: "number", field_value: 9000}
{field_id: "short_text", field_value: "Rocky Balboa"}
{field_id: "long_text", field_value: " any text any text any text any text."}
{field_id: "radio_vertical", field_value: "yes"}
{field_id: "radio_horizontal", field_value: "no"}
{field_id: "phone", field_value: "+55 11 1234-5678"}
{field_id: "select", field_value: "B. Rocky Balboa II"}
{field_id: "time", field_value: "17:25"}
]
parent_ids: c"XXXXX"]
}
) {
card {
id
title
}
}
}
UPDATE CARD
mutation{
updateCard(
input: {
id: XXXXX
title: "New Title"
due_date: "2017-08-20T21:00:00+00:00"
assignee_ids: e00000]
label_ids: XXXXX]
}
) {
card {
id
title
}
}
}
DELETE CARD
mutation {
deleteCard(input: {id: XXXXX}) {
success
}
}
MOVE CARD TO PHASE
mutation {
moveCardToPhase(
input: {
card_id: XXXXX
destination_phase_id: XXXXX
}
) {
card {
id
current_phase{
name
}
}
}
}
MOVE CARD TO PHASE
mutation {
updateCardField(
input: {
card_id: XXXX
field_id: "where_do_you_live"
new_value: "Auckland"
}
) {
card {
id
}
}
}