# Jira number custom field: set, read and search via API

URL: https://goingstellar.ro/reference/jira-fields/number-field/

The number field takes a JSON number. A numeric string is refused in the same way as text. The field is found in JQL with comparison operators, by display name or by its customfield id.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| PUT | `/rest/api/3/issue/{issueIdOrKey}` | Sets or changes the value. |
| GET | `/rest/api/3/issue/{issueIdOrKey}` | Reads the stored value. |
| POST | `/rest/api/3/issue` | Creates a work item with values. |
| POST | `/rest/api/3/search/jql` | Finds work items by value. |

## Examples

### PUT /rest/api/3/issue/{issueIdOrKey}

Writes 3.5 and reads the number back.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10171": 3.5
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10171'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10171',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10171'},
    json={'fields': {'customfield_10171': 3.5}},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "key": "ZZREF-6",
 "fields": {
  "customfield_10171": 3.5
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### PUT /rest/api/3/issue/{issueIdOrKey}

The string "3.5" is rejected even though it is numeric.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10171": "3.5"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10171'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10171',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10171'},
    json={'fields': {'customfield_10171': '3.5'}},
)
print(r.status_code, r.text)
```

Response: HTTP 400

```
{
 "errorMessages": [],
 "errors": {
  "customfield_10171": "Specify a number for the custom field (below 100,000,000,000,000)"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### PUT /rest/api/3/issue/{issueIdOrKey}

Text gives the same message.

```bash
curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10171": "three"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10171'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=customfield_10171',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'customfield_10171'},
    json={'fields': {'customfield_10171': 'three'}},
)
print(r.status_code, r.text)
```

Response: HTTP 400

```
{
 "errorMessages": [],
 "errors": {
  "customfield_10171": "Specify a number for the custom field (below 100,000,000,000,000)"
 }
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### POST /rest/api/3/issue

Sets a number at create time next to other custom fields.

```bash
curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "project": {
      "key": "ZZREF"
    },
    "issuetype": {
      "name": "Task"
    },
    "summary": "Created with custom fields",
    "customfield_10162": "on create",
    "customfield_10164": {
      "value": "Blue"
    },
    "customfield_10171": 7,
    "customfield_10169": "2026-12-01"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/issue',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'fields': {'project': {'key': 'ZZREF'},
                     'issuetype': {'name': 'Task'},
                     'summary': 'Created with custom fields',
                     'customfield_10162': 'on create',
                     'customfield_10164': {'value': 'Blue'},
                     'customfield_10171': 7,
                     'customfield_10169': '2026-12-01'}},
)
print(r.status_code, r.text)
```

Response: HTTP 201

```
{
 "id": "10789",
 "key": "ZZREF-10",
 "self": "https://your-domain.atlassian.net/rest/api/3/issue/10789"
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### POST /rest/api/3/search/jql

Compares the field with a number using the > operator.

```bash
curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "jql": "project = ZZREF AND \"zz-ref number\" > 3",
  "fields": [
    "summary"
  ],
  "maxResults": 2
}' \
  'https://your-domain.atlassian.net/rest/api/3/search/jql'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/search/jql',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'jql': 'project = ZZREF AND "zz-ref number" > 3', 'fields': ['summary'], 'maxResults': 2},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "issues": [
  {
   "key": "ZZREF-10"
  },
  {
   "key": "ZZREF-6"
  }
 ],
 "isLast": true
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### POST /rest/api/3/search/jql

The customfield id works as the JQL field name.

```bash
curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "jql": "project = ZZREF AND customfield_10171 = 3.5",
  "fields": [
    "summary"
  ],
  "maxResults": 2
}' \
  'https://your-domain.atlassian.net/rest/api/3/search/jql'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/search/jql',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'jql': 'project = ZZREF AND customfield_10171 = 3.5',
          'fields': ['summary'],
          'maxResults': 2},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "issues": [
  {
   "key": "ZZREF-6"
  }
 ],
 "isLast": true
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- Type key com.atlassian.jira.plugin.system.customfieldtypes:float, searcher key com.atlassian.jira.plugin.system.customfieldtypes:exactnumber, schema type number, display name "Number Field".
- 3.5 answered 200 and read back as 3.5.
- "3.5" and "three" both gave 400 "Specify a number for the custom field (below 100,000,000,000,000)".
- The value 7 was stored through the create call, and a > 3 filter returned both work items that held a value above 3.

## Pitfalls

- Quoted numbers from a spreadsheet or form fail; convert them before the request.
- The message states an upper bound of 100,000,000,000,000, so very large values need a different field type.
- The searcher is exactnumber, but comparison operators such as > worked in the run.

## Questions and answers

### Can I send a number as a string?

No. A numeric string was refused with a 400 asking for a number.

## Related

- [Short text (textfield)](https://goingstellar.ro/reference/jira-fields/text-field/)
- [Date picker](https://goingstellar.ro/reference/jira-fields/date-picker-field/)
- [timetracking](https://goingstellar.ro/reference/jira-fields/timetracking-field/)
- [JQL on custom fields](https://goingstellar.ro/reference/jira-fields/jql-on-custom-fields/)
- [Reading field values: names, schema, v2 and v3](https://goingstellar.ro/reference/jira-fields/reading-field-values/)

## Sources

- [Issues (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/)
- [Issue fields (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/)
- [Issue search (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/)

