anchor.diff:  }}
   
   
  +**Create an new empty tube and add label(s) to it.**
  +
  +* `labels` contains a hash of the label(s) information to add to the resource (in our case to the tube).
  +
  +POST /tubes
  +> Accept: application/json
  +{
  +    "tube": {
  +        "labels": {
  +            "front barcode": {
  +                "value": "1234-ABC",
  +                "type": "ean13-barcode"
  +            },
  +            "back barcode": {
  +                "value": "1234-ABC",
  +                "type": "sanger-barcode"
  +            }
  +        }
  +    }
  +}
  +< 200
  +< Content-Type: application/json
  +{
  +    "tube": {
  +        "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": null,
  +        "max_volume": null,
  +        "aliquots": [],
  +        "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"
  +            }
  +        }
  +    }
  +}
  +
  +
   **Bulk create tubes**
   
   * `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.
  +
   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
  -                }
  -            ]
  -        },
  -        {
  -            "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": {
  +        "tubes": [
  +            {
  +                "type": "Eppendorf",
  +                "max_volume": 2,
  +                "aliquots": [
  +                    {
  +                        "sample_uuid": "11111111-0000-0000-0000-111111111111",
  +                        "type": "NA",
  +                        "quantity": 5
  +                    }
  +                ]
  +            },
  +            {
  +                "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
   {
  
positive.code:                                     "delete": "http://example.org/11111111-0000-0000-0000-222222222222"
                                  },
                                  "uuid": "11111111-0000-0000-0000-222222222222",
                                  "name": null
                              },
                              "quantity": 15,
                              "type": "RNA",
  
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
  