> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.odr.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.odr.io/_mcp/server.

# /record/{record_uuid}/{field_uuid}/value

POST https://record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value
Content-Type: application/json

## Update Field Value

Updates the stored value for a specific field on a given record. This endpoint supports multiple datatypes that use the `value` parameter, including Short Text, Long Text, Integer, Decimal, and Paragraph/Markdown fields.

***

### HTTP Method & URL

```
POST {{url}}/record/{record_uuid}/{field_uuid}/value
```

***

### Path Parameters

| Parameter     | Type          | Description                                                       |
| ------------- | ------------- | ----------------------------------------------------------------- |
| `record_uuid` | string (UUID) | The unique identifier of the record to update.                    |
| `field_uuid`  | string (UUID) | The unique identifier of the field whose value should be updated. |

***

### Authentication

This endpoint requires a **Bearer token**. The token is set automatically via a pre-request script using the following environment variables:

| Variable  | Description                            |
| --------- | -------------------------------------- |
| `apiuser` | The API username used to authenticate. |
| `apipass` | The API password used to authenticate. |
| `url`     | The base URL of the ODR API.           |

The pre-request script exchanges these credentials for a JWT, which is then attached as the `Authorization: Bearer <token>` header on the request.

***

### Request Body

**Content-Type:** `application/json`

```json
{
    "value": "123445"
}
```

| Field   | Type   | Required | Description                                                                                                                                                                                                                     |
| ------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | The new value to store in the field. The format depends on the target datatype (e.g., a numeric string for Integer/Decimal fields, plain text for Short/Long Text). To **clear** an existing value, pass an empty string: `""`. |

***

### Supported Datatypes

This endpoint applies to any field that stores its data using the `value` parameter, including:

* **Short Text**
* **Long Text**
* **Integer**
* **Decimal**
* **Paragraph** (plain text)
* **Markdown**

***

### Response Behavior

| Scenario                              | Expected Response                                                                                                                          |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Successful update                     | `200 OK` — The field value has been updated on the record.                                                                                 |
| Invalid `record_uuid` or `field_uuid` | `404 Not Found` — The specified record or field does not exist.                                                                            |
| Unauthorized / missing token          | `401 Unauthorized` — The Bearer token is missing, expired, or invalid.                                                                     |
| Malformed request body                | `400 Bad Request` — The request body is missing or not valid JSON.                                                                         |
| Datatype mismatch                     | `400 Bad Request` — The provided value is incompatible with the field's datatype (e.g., passing a non-numeric string to an Integer field). |

Reference: https://docs.odr.io/odr-search-api-v-4/record-record-uuid-field-uuid-value

## Request

### Body (application/json)

This endpoint expects an object.

- `value` (string, required)

## Response

### 200

OK

- `database_uuid` (string, required)
- `internal_id` (integer, required)
- `record_name` (string, required)
- `record_uuid` (string, required)
- `template_uuid` (string, required)
- `metadata_for_uuid` (string, required)
- `_record_metadata` (object, required)
  - `_create_date` (string, required)
  - `_update_date` (string, required)
  - `_create_auth` (string, required)
  - `_public_date` (string, required)
- `fields` (list of object, required)
  - `field_name` (string, required)
  - `field_uuid` (string, required)
  - `template_field_uuid` (string, required)
  - `id` (integer, required)
  - `_field_metadata` (object, required)
    - `_public_date` (string, required)
  - `value` (integer, required)
- `records` (list of any, required)

## Examples

**Request**

```json
{
  "value": "123445"
}
```

**Response**

```json
{
  "database_uuid": "ddc5e9ba834ad596cc31aebb1225",
  "internal_id": 781070,
  "record_name": "R260016",
  "record_uuid": "c00710bb4560d99280ee6b86a5fd",
  "template_uuid": "60231f230a3c7b73e0f0d1f1deea",
  "metadata_for_uuid": "",
  "_record_metadata": {
    "_create_date": "2026-04-04 00:48:02",
    "_update_date": "2026-06-26 04:39:44",
    "_create_auth": "Hexiong Yang",
    "_public_date": "2026-04-04 00:48:02"
  },
  "fields": [
    {
      "field_name": "Sample ID",
      "field_uuid": "b5973a5ac47ec4afd1db49e2b00f",
      "template_field_uuid": "3e2259d0039f2c5cc912b8f92681",
      "id": 7068,
      "_field_metadata": {
        "_public_date": "2024-02-07 16:30:03"
      },
      "value": 123445
    },
    {
      "field_name": "RRUFF ID",
      "field_uuid": "ee88404d73886150b59dd07cbb12",
      "template_field_uuid": "d0e7a8e1e42d8159008116130e86",
      "id": 7069,
      "_field_metadata": {
        "_public_date": "2024-02-07 16:30:03"
      },
      "value": 1
    },
    {
      "field_name": "Sample Status",
      "field_uuid": "e4bd3c7024d12f5c80da99fffd63",
      "template_field_uuid": "040f8debf923926eef9b426521ad",
      "id": 7070,
      "_field_metadata": {
        "_public_date": "string"
      },
      "value": 1
    },
    {
      "field_name": "Sample Source",
      "field_uuid": "56b4777019c9a0f4e692586f0d87",
      "template_field_uuid": "bc3190833be270253bbcb9a05515",
      "id": 7071,
      "_field_metadata": {
        "_public_date": "2024-02-07 16:30:03"
      },
      "value": 1
    },
    {
      "field_name": "Sample Owned by",
      "field_uuid": "e2b22fc6abedceff7684aa6005ce",
      "template_field_uuid": "e2023d57291bc73f14bf5539b880",
      "id": 7073,
      "_field_metadata": {
        "_public_date": "2024-02-07 16:30:04"
      },
      "value": 1
    },
    {
      "field_name": "Sample Description",
      "field_uuid": "e742f7288df2b103b29ebab58faa",
      "template_field_uuid": "52f39016c205f376373237b1d82a",
      "id": 7074,
      "_field_metadata": {
        "_public_date": "2024-02-07 16:30:04"
      },
      "value": 1
    },
    {
      "field_name": "Sample Locality",
      "field_uuid": "9ad6f78291e867858e8c84b6fba4",
      "template_field_uuid": "1eb33d935bd18e9a71cc11a8218d",
      "id": 7075,
      "_field_metadata": {
        "_public_date": "2024-02-07 16:30:04"
      },
      "value": 1
    }
  ],
  "records": []
}
```

**SDK Code**

```python /record/{record_uuid}/{field_uuid}/value_example
import requests

url = "https://https/record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value"

payload = { "value": "123445" }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript /record/{record_uuid}/{field_uuid}/value_example
const url = 'https://https/record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"value":"123445"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go /record/{record_uuid}/{field_uuid}/value_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value"

	payload := strings.NewReader("{\n  \"value\": \"123445\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby /record/{record_uuid}/{field_uuid}/value_example
require 'uri'
require 'net/http'

url = URI("https://https/record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"value\": \"123445\"\n}"

response = http.request(request)
puts response.read_body
```

```java /record/{record_uuid}/{field_uuid}/value_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value")
  .header("Content-Type", "application/json")
  .body("{\n  \"value\": \"123445\"\n}")
  .asString();
```

```php /record/{record_uuid}/{field_uuid}/value_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value', [
  'body' => '{
  "value": "123445"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp /record/{record_uuid}/{field_uuid}/value_example
using RestSharp;

var client = new RestClient("https://https/record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"value\": \"123445\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift /record/{record_uuid}/{field_uuid}/value_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["value": "123445"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/record/c00710bb4560d99280ee6b86a5fd/b5973a5ac47ec4afd1db49e2b00f/value")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```