Skip to main content
StickyF.A.Q.

API Reference > Cards

API Reference > Cards
Lais Laudari

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:[00000, 00001]}
 {field_id: "checklist_vertical", field_value: ["a", "b"]}
 {field_id: "checklist_horizontal", field_value: ["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: [890073, 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: ["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: [00000]
 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
 }
 }
}

 

 

 

Did this topic help you find an answer to your question?

6 replies

marcosmelo
Forum|alt.badge.img+18
  • Pipefy Legend
  • 1465 replies
  • October 2, 2023

👍👍👍


Ezequiel Souza
Forum|alt.badge.img+14

👍


genietim
Forum|alt.badge.img+12
  • Pipefy Legend
  • 412 replies
  • October 4, 2023

Very nice compilation.

For people getting started with GraphQL: be careful using these, there are certain things you need to change depending on the pipe structure you have. In the queries above, change anything that is like “XXX”, the numbers after id: , as well as the things after field_id: , and field_value: .


Lais Laudari

Thanks for the tips @genietim! You're great!😃


reinout
  • Regular Participant
  • 4 replies
  • December 13, 2023

How can i upload an attachment to an existing card?


genietim
Forum|alt.badge.img+12
  • Pipefy Legend
  • 412 replies
  • December 13, 2023

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings