anchor.diff:          }
       ]
   }}
  +
   
   
   --
  
positive.code: > Accept: application/json
  < 200
  < Content-Type: application/json
   {
           "actions": {
             "actions": {
               "create": "http://example.org/actions/action"
             }
           },
           "batches": {
             "actions": {
               "create": "http://example.org/batches",
               "read": "http://example.org/batches",
               "first": "http://example.org/batches/page=1",
               "last": "http://example.org/batches/page=-1"
             }
           },
           "users": {
             "actions": {
               "create": "http://example.org/users",
               "read": "http://example.org/users",
               "first": "http://example.org/users/page=1",
               "last": "http://example.org/users/page=-1"
             }
           },
           "studies": {
             "actions": {
               "create": "http://example.org/studies",
               "read": "http://example.org/studies",
               "first": "http://example.org/studies/page=1",
               "last": "http://example.org/studies/page=-1"
             }
           },
           "orders": {
             "actions": {
               "create": "http://example.org/orders",
               "read": "http://example.org/orders",
               "first": "http://example.org/orders/page=1",
               "last": "http://example.org/orders/page=-1"
             }
           },
           "projects": {
             "actions": {
               "create": "http://example.org/projects",
               "read": "http://example.org/projects",
               "first": "http://example.org/projects/page=1",
               "last": "http://example.org/projects/page=-1"
             }
           },
           "samples": {
             "actions": {
               "create": "http://example.org/samples",
               "read": "http://example.org/samples",
               "first": "http://example.org/samples/page=1",
               "last": "http://example.org/samples/page=-1"
             }
           },
           "oligos": {
             "actions": {
               "create": "http://example.org/oligos",
               "read": "http://example.org/oligos",
               "first": "http://example.org/oligos/page=1",
               "last": "http://example.org/oligos/page=-1"
             }
           },
           "aliquots": {
             "actions": {
               "create": "http://example.org/aliquots",
               "read": "http://example.org/aliquots",
               "first": "http://example.org/aliquots/page=1",
               "last": "http://example.org/aliquots/page=-1"
             }
           },
           "flowcells": {
             "actions": {
               "create": "http://example.org/flowcells",
               "read": "http://example.org/flowcells",
               "first": "http://example.org/flowcells/page=1",
               "last": "http://example.org/flowcells/page=-1"
             }
           },
           "gels": {
             "actions": {
               "create": "http://example.org/gels",
               "read": "http://example.org/gels",
               "first": "http://example.org/gels/page=1",
               "last": "http://example.org/gels/page=-1"
             }
           },
           "labellables": {
             "actions": {
               "create": "http://example.org/labellables",
               "read": "http://example.org/labellables",
               "first": "http://example.org/labellables/page=1",
               "last": "http://example.org/labellables/page=-1"
             }
           },
           "sanger_barcodes": {
             "actions": {
               "create": "http://example.org/sanger_barcodes",
               "read": "http://example.org/sanger_barcodes",
               "first": "http://example.org/sanger_barcodes/page=1",
               "last": "http://example.org/sanger_barcodes/page=-1"
             }
           },
           "ean13_barcodes": {
             "actions": {
               "create": "http://example.org/ean13_barcodes",
               "read": "http://example.org/ean13_barcodes",
               "first": "http://example.org/ean13_barcodes/page=1",
               "last": "http://example.org/ean13_barcodes/page=-1"
             }
           },
           "barcode2_ds": {
             "actions": {
               "create": "http://example.org/barcode2_ds",
               "read": "http://example.org/barcode2_ds",
               "first": "http://example.org/barcode2_ds/page=1",
               "last": "http://example.org/barcode2_ds/page=-1"
             }
           },
           "plates": {
             "actions": {
               "create": "http://example.org/plates",
               "read": "http://example.org/plates",
               "first": "http://example.org/plates/page=1",
               "last": "http://example.org/plates/page=-1"
             }
           },
           "spin_columns": {
             "actions": {
               "create": "http://example.org/spin_columns",
               "read": "http://example.org/spin_columns",
               "first": "http://example.org/spin_columns/page=1",
               "last": "http://example.org/spin_columns/page=-1"
             }
           },
           "tubes": {
             "actions": {
               "create": "http://example.org/tubes",
               "read": "http://example.org/tubes",
               "first": "http://example.org/tubes/page=1",
               "last": "http://example.org/tubes/page=-1"
             }
           },
           "tube_racks": {
             "actions": {
               "create": "http://example.org/tube_racks",
               "read": "http://example.org/tube_racks",
               "first": "http://example.org/tube_racks/page=1",
               "last": "http://example.org/tube_racks/page=-1"
             }
           },
           "tag_groups": {
             "actions": {
               "create": "http://example.org/tag_groups",
               "read": "http://example.org/tag_groups",
               "first": "http://example.org/tag_groups/page=1",
               "last": "http://example.org/tag_groups/page=-1"
             }
           },
           "searches": {
             "actions": {
               "create": "http://example.org/searches",
               "read": "http://example.org/searches",
               "first": "http://example.org/searches/page=1",
               "last": "http://example.org/searches/page=-1"
             }
           },
           "multi_criteria_filters": {
             "actions": {
               "create": "http://example.org/multi_criteria_filters",
               "read": "http://example.org/multi_criteria_filters",
               "first": "http://example.org/multi_criteria_filters/page=1",
               "last": "http://example.org/multi_criteria_filters/page=-1"
             }
           },
           "label_filters": {
             "actions": {
               "create": "http://example.org/label_filters",
               "read": "http://example.org/label_filters",
               "first": "http://example.org/label_filters/page=1",
               "last": "http://example.org/label_filters/page=-1"
             }
           },
           "order_filters": {
             "actions": {
               "create": "http://example.org/order_filters",
               "read": "http://example.org/order_filters",
               "first": "http://example.org/order_filters/page=1",
               "last": "http://example.org/order_filters/page=-1"
             }
           },
           "batch_filters": {
             "actions": {
               "create": "http://example.org/batch_filters",
               "read": "http://example.org/batch_filters",
               "first": "http://example.org/batch_filters/page=1",
               "last": "http://example.org/batch_filters/page=-1"
             }
           },
           "uuid_resources": {
             "actions": {
               "create": "http://example.org/uuid_resources",
               "read": "http://example.org/uuid_resources",
               "first": "http://example.org/uuid_resources/page=1",
               "last": "http://example.org/uuid_resources/page=-1"
             }
           },
           "create_batches": {
             "actions": {
               "create": "http://example.org/actions/create_batch"
             }
           },
           "create_flowcells": {
             "actions": {
               "create": "http://example.org/actions/create_flowcell"
             }
           },
           "create_gels": {
             "actions": {
               "create": "http://example.org/actions/create_gel"
             }
           },
           "create_labels": {
             "actions": {
               "create": "http://example.org/actions/create_label"
             }
           },
           "create_labellables": {
             "actions": {
               "create": "http://example.org/actions/create_labellable"
             }
           },
           "create_orders": {
             "actions": {
               "create": "http://example.org/actions/create_order"
             }
           },
           "create_plates": {
             "actions": {
               "create": "http://example.org/actions/create_plate"
             }
           },
           "create_searches": {
             "actions": {
               "create": "http://example.org/actions/create_search"
             }
           },
           "create_spin_columns": {
             "actions": {
               "create": "http://example.org/actions/create_spin_column"
             }
           },
           "create_tubes": {
             "actions": {
               "create": "http://example.org/actions/create_tube"
             }
           },
           "create_tube_racks": {
             "actions": {
               "create": "http://example.org/actions/create_tube_rack"
             }
           },
           "plate_transfers": {
             "actions": {
               "create": "http://example.org/actions/plate_transfer"
             }
           },
           "tag_wells": {
             "actions": {
               "create": "http://example.org/actions/tag_wells"
             }
           },
           "transfer_plates_to_plates": {
             "actions": {
               "create": "http://example.org/actions/transfer_plates_to_plates"
             }
           },
           "transfer_tubes_to_tubes": {
             "actions": {
               "create": "http://example.org/actions/transfer_tubes_to_tubes"
             }
           },
           "transfer_wells_to_tubes": {
             "actions": {
               "create": "http://example.org/actions/transfer_wells_to_tubes"
             }
           },
           "tube_rack_moves": {
             "actions": {
               "create": "http://example.org/actions/tube_rack_move"
             }
           },
           "tube_rack_transfers": {
             "actions": {
               "create": "http://example.org/actions/tube_rack_transfer"
             }
           },
           "update_orders": {
             "actions": {
               "create": "http://example.org/actions/update_order"
             }
           },
           "update_plates": {
             "actions": {
               "create": "http://example.org/actions/update_plate"
             }
           },
           "update_tubes": {
             "actions": {
               "create": "http://example.org/actions/update_tube"
             }
           },
           "update_tube_racks": {
             "actions": {
               "create": "http://example.org/actions/update_tube_rack"
             }
           },
           "revision": 3
         }
  
  
  --
  
negative.code:     }
  }
  
  **Bulk create tubes with labels.**
  
  * `tubes` is mandatory
  
  This action creates a number of tubes with the given parameters. 
  
  The parameter of this action is an array. An element of this array contains parameters to create a tube.
  The elements can contains different parameters, so this way we could create tubes with different types and content with the use of only one action.
  
  In our examples we add labels to the created tubes, too.
  
  POST /actions/bulk_create_tube
  > Accept: application/json
  {
      "bulk_create_tube": {
          "tubes": [
              {
                  "type": "Eppendorf",
                  "max_volume": 2,
                  "aliquots": [
                      {
                          "sample_uuid": "11111111-0000-0000-0000-111111111111",
                          "type": "NA",
                          "quantity": 5
                      }
                  ],
                  "labels": {
                      "front barcode": {
                          "value": "1234-ABC",
                          "type": "ean13-barcode"
                      },
                      "back barcode": {
                          "value": "1234-ABC",
                          "type": "sanger-barcode"
                      }
                  }
              },
              {
                  "type": "Eppendorf",
                  "max_volume": 10,
                  "aliquots": [
                      {
                          "sample_uuid": "11111111-0000-0000-0000-222222222222",
                          "type": "RNA",
                          "quantity": 15
                      }
                  ]
              },
              {
                  "type": "New type",
                  "max_volume": 15,
                  "aliquots": [
                      {
                          "sample_uuid": "11111111-0000-0000-0000-333333333333",
                          "type": "DNA",
                          "quantity": 25
                      }
                  ]
              }
          ]
      }
  }
  < 200
  < Content-Type: application/json
  {
      "bulk_create_tube": {
          "actions": {
          },
          "user": "user",
          "application": "application",
          "result": {
              "tubes": [
                  {
                      "actions": {
                          "read": "http://example.org/11111111-2222-3333-4444-555555555555",
                          "create": "http://example.org/11111111-2222-3333-4444-555555555555",
                          "update": "http://example.org/11111111-2222-3333-4444-555555555555",
                          "delete": "http://example.org/11111111-2222-3333-4444-555555555555"
                      },
                      "uuid": "11111111-2222-3333-4444-555555555555",
                      "type": "Eppendorf",
                      "max_volume": 2,
                      "aliquots": [
                          {
                              "sample": {
                                  "actions": {
                                      "read": "http://example.org/11111111-0000-0000-0000-111111111111",
                                      "create": "http://example.org/11111111-0000-0000-0000-111111111111",
                                      "update": "http://example.org/11111111-0000-0000-0000-111111111111",
                                      "delete": "http://example.org/11111111-0000-0000-0000-111111111111"
                                  },
                                  "uuid": "11111111-0000-0000-0000-111111111111",
                                  "name": "Sample 1"
                              },
                              "quantity": 5,
                              "type": "NA",
                              "unit": "mole"
                          }
                      ],
                      "labels": {
                          "actions": {
                              "read": "http://example.org/11111111-2222-3333-4444-666666666666",
                              "create": "http://example.org/11111111-2222-3333-4444-666666666666",
                              "update": "http://example.org/11111111-2222-3333-4444-666666666666",
                              "delete": "http://example.org/11111111-2222-3333-4444-666666666666"
                          },
                          "uuid": "11111111-2222-3333-4444-666666666666",
                          "front barcode": {
                              "value": "1234-ABC",
                              "type": "ean13-barcode"
                          },
                          "back barcode": {
                              "value": "1234-ABC",
                              "type": "sanger-barcode"
                          }
                      }
                  },
                  {
                      "actions": {
                          "read": "http://example.org/11111111-2222-3333-4444-777777777777",
                          "create": "http://example.org/11111111-2222-3333-4444-777777777777",
                          "update": "http://example.org/11111111-2222-3333-4444-777777777777",
                          "delete": "http://example.org/11111111-2222-3333-4444-777777777777"
                      },
                      "uuid": "11111111-2222-3333-4444-777777777777",
                      "type": "Eppendorf",
                      "max_volume": 10,
                      "aliquots": [
                          {
                              "sample": {
                                  "actions": {
                                      "read": "http://example.org/11111111-0000-0000-0000-222222222222",
                                      "create": "http://example.org/11111111-0000-0000-0000-222222222222",
                                      "update": "http://example.org/11111111-0000-0000-0000-222222222222",
                                      "delete": "http://example.org/11111111-0000-0000-0000-222222222222"
                                  },
                                  "uuid": "11111111-0000-0000-0000-222222222222",
                                  "name": "Sample 1"
                              },
                              "quantity": 15,
                              "type": "RNA",
                              "unit": "mole"
                          }
                      ]
                  },
                  {
                      "actions": {
                          "read": "http://example.org/11111111-2222-3333-4444-888888888888",
                          "create": "http://example.org/11111111-2222-3333-4444-888888888888",
                          "update": "http://example.org/11111111-2222-3333-4444-888888888888",
                          "delete": "http://example.org/11111111-2222-3333-4444-888888888888"
                      },
                      "uuid": "11111111-2222-3333-4444-888888888888",
                      "type": "New type",
                      "max_volume": 15,
                      "aliquots": [
                          {
                              "sample": {
                                  "actions": {
                                      "read": "http://example.org/11111111-0000-0000-0000-333333333333",
                                      "create": "http://example.org/11111111-0000-0000-0000-333333333333",
                                      "update": "http://example.org/11111111-0000-0000-0000-333333333333",
                                      "delete": "http://example.org/11111111-0000-0000-0000-333333333333"
                                  },
                                  "uuid": "11111111-0000-0000-0000-333333333333",
                                  "name": "Sample 1"
                              },
                              "quantity": 25,
                              "type": "DNA",
                              "unit": "mole"
                          }
                      ]
                  }
              ]
          },
          "tubes": [
              {
                  "type": "Eppendorf",
                  "max_volume": 2,
                  "aliquots": [
                      {
                          "sample_uuid": "11111111-0000-0000-0000-111111111111",
                          "type": "NA",
                          "quantity": 5
                      }
                  ],
                  "labels": {
                      "front barcode": {
                          "value": "1234-ABC",
                          "type": "ean13-barcode"
                      },
                      "back barcode": {
                          "value": "1234-ABC",
                          "type": "sanger-barcode"
                      }
                  }
              },
              {
                  "type": "Eppendorf",
                  "max_volume": 10,
                  "aliquots": [
                      {
                          "sample_uuid": "11111111-0000-0000-0000-222222222222",
                          "type": "RNA",
                          "quantity": 15
                      }
                  ]
              },
              {
                  "type": "New type",
                  "max_volume": 15,
                  "aliquots": [
                      {
                          "sample_uuid": "11111111-0000-0000-0000-333333333333",
                          "type": "DNA",
                          "quantity": 25
                      }
                  ]
              }
          ]
      }
  }
  
  
  **Bulk create tube using mime-type.**
  
  You can specify the content type for bulk creation like this:
  `'Content-Type': 'application/json; bulk=true'`
  then this will be a bulk creation. 
  
  In the parameters you have to add an array of resource's parameters.
  
  You can also specify `representation=minimal` for the `Accept` header parameter. This will results a minimal JSON representation of the response JSON.
  
  `'Accept': 'application/json; representation=minimal'`
  POST /tubes
  > Accept: application/json; representation=minimal
  {
      "tubes": [
          {
              "type": "Eppendorf",
              "max_volume": 2,
              "aliquots": [
                  {
                      "sample_uuid": "11111111-0000-0000-0000-111111111111",
                      "type": "NA",
                      "quantity": 5
                  }
              ],
              "labels": {
                  "front barcode": {
                      "value": "1234-ABC",
                      "type": "ean13-barcode"
                  },
                  "back barcode": {
                      "value": "1234-ABC",
                      "type": "sanger-barcode"
                  }
              }
          },
          {
              "type": "Eppendorf",
              "max_volume": 10,
              "aliquots": [
                  {
                      "sample_uuid": "11111111-0000-0000-0000-222222222222",
                      "type": "RNA",
                      "quantity": 15
                  }
              ]
          },
          {
              "type": "New type",
              "max_volume": 15,
              "aliquots": [
                  {
                      "sample_uuid": "11111111-0000-0000-0000-333333333333",
                      "type": "DNA",
                      "quantity": 25
                  }
              ]
          }
      ]
  }
  < 200
  < Content-Type: application/json; bulk=true
  {
      "actions": {
      },
      "tubes": [
          {
              "actions": {
                  "read": "http://example.org/11111111-2222-3333-4444-555555555555",
                  "create": "http://example.org/11111111-2222-3333-4444-555555555555",
                  "update": "http://example.org/11111111-2222-3333-4444-555555555555",
                  "delete": "http://example.org/11111111-2222-3333-4444-555555555555"
              },
              "uuid": "11111111-2222-3333-4444-555555555555"
          },
          {
              "actions": {
                  "read": "http://example.org/11111111-2222-3333-4444-777777777777",
                  "create": "http://example.org/11111111-2222-3333-4444-777777777777",
                  "update": "http://example.org/11111111-2222-3333-4444-777777777777",
                  "delete": "http://example.org/11111111-2222-3333-4444-777777777777"
              },
              "uuid": "11111111-2222-3333-4444-777777777777"
          },
          {
              "actions": {
                  "read": "http://example.org/11111111-2222-3333-4444-888888888888",
                  "create": "http://example.org/11111111-2222-3333-4444-888888888888",
                  "update": "http://example.org/11111111-2222-3333-4444-888888888888",
                  "delete": "http://example.org/11111111-2222-3333-4444-888888888888"
              },
              "uuid": "11111111-2222-3333-4444-888888888888"
          }
      ],
      "size": 3
  }
  
  
  **Update a tube.** All the aliquots in the tube will be updated with 
  `aliquot_type` and `aliquot_quantity`.
  
  * `type` the actual type of the tube
  * `max_volume` the max volume a tube can hold
  * `aliquot_type` type of the aliquot (like: 'DNA', 'RNA' etc...)
  * `aliquot_quantity` volume (ul) if liquid, mass (mg) if solid
  PUT /11111111-2222-3333-4444-555555555555
  > Accept: application/json
  