Using Custom Fields with Kanbanize API

I’ve decided to unite the information that is already available in the Public forums into one nice and tidy article which should easily give an answer to the pretty popular question regarding Kanbanize – custom fields use via the API.

So first, the long story short is that the custom fields in Kanbanize can only be added task per task from the web interface. Note that if you make them mandatory for a board, they will be applied to each new task, but not to the ones already existing.

Once created though, the custom fields can have their value edited via the API as follows:

Creating a task:

1. You cannot add custom fields via the API

2. If a custom field is already added to a task however, you can change its value by setting the field name in the request. The name is case sensitive. Date field formats can be yyyy-mm-dd or dd.mm.yyyy

3. Mandatory fields are first added to the task, afterwards they are changed to the desired value if you have specified this in the request, else the default value is added

Updating a task:

1. If a custom field is already added to a task, you can change its value by setting the field name in the request. The name is case sensitive. Date field formats can be yyyy-mm-dd or dd.mm.yyyy

Example for task creation:

If you’ve added two custom fields called Date1 and Date2, then your Create New Task request would look like:

http://yourcompany.kanbanize.com/index.php/api/kanbanize/create_new_task/boardid/22/title/new task/description/task description/Date1/2014-07-01/Date2/2014-07-30

Same example is valid for task update.

Get task details/ Get all tasks:

1. Should return tag <CustomFields><CustomFields/> containing all custom fields for this task each item should contain: fieldid, name, type, value, mandatory (1 or 0)

Get board settings:

1. Should return tag <CustomFields><CustomFields/> containing all custom fields visible for the board, each item should contain: fieldid, name, type, value, mandatory (1 or 0), possibleValues (different than null only if it is dropdown)

Happy Kanb(API)nizing!

12 thoughts on “Using Custom Fields with Kanbanize API

  1. Sergey

    Thanks for the nice post.
    Only one small comment: API link in the first paragraph is not valid anymore

    Reply
      1. Matthieu BOZONNET

        Hi Monica,

        Thanks for your answer but what I meant was :
        – You have an existing board with several cards
        – You decide to add a new custom field to this board

        => How do you add this custom field on the existing cards ? If you have like 300 cards, it takes quite a long time to do it by hand … editing each cards… and imagine you chose to create several fields…

        Any ideas ?

        Reply
        1. Monica Georgieff

          Hi Matthieu,

          Right, I think I understand the concern now!
          In regards to custom fields, there is no way to add a new custom field in bulk.
          You would have to open up the card, make it visible in the task card itself and then fill out its value.
          However, most custom fields require that you fill out a specific value per card so you might be required to manually adjust all the cards anyway.
          If you set a default value in the custom fields panel then that might get rid of a step however, it has to suit your scenario.
          Sorry I couldn’t be of more help! Custom fields are a very customizable part of the card layout and we assume every card will need manual configuration.

          Best,

          Monica

          Reply
          1. Matthieu BOZONNET

            Hello,

            Your commercial dept. gave me the tip I needed. Using time-based runtime policies, you can create the custom fields into the cards. Then you can fill them through the API. It works great !

            Thanks for your reply.

            BR

            Matthieu

  2. Lucas

    Hello,

    is there a possibilty to add a “required option” for custom fields?
    For example: If the “required option” is set, the user has to fill out the custom field. If he doesn’t, a pop up informs him to fill out the field. Like you have it in jquery with its validation or HTML with the required tag.

    Thank your for the trouble you ‘re taking!

    BR Lucas

    Reply
    1. Alex Novkov

      Hi Lucas,

      Can you be a bit more specific about the scenario that you are having in mind? Are you relating to a situation where you are creating a card or moving one to a specific column on your board?

      Cheers,
      Alex

      Reply
      1. Lucas

        Hi Alex,
        thanks for the quick reply.
        I refer to the creation of a card. If a user is creating a new card some of the custum fields have to be filled out by the user. Otherwise the processing of the card is not possible, because the required fields are necessary for the later process. Therefore a pop up should inform the user when he doesnt fill out the required fields.

        BR Lucas

        Reply
        1. Alex Novkov

          Thank you for your suggestion. I passed it to our dev team and they agreed that it would be useful. I can’t promise you when this functionality will be added, but we will find a way to do it in the future.

          Reply
  3. James

    Some of the information here is dated. Is it still not possible to add custom fields through the API when creating a new task?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *