The Custom Fields API is a way to attach custom data to items. This API provides means to manage your custom fields.
GET /api/data/v3/fields?page-token={page-token}&limit={limit}
Optional Query Parameters:
page-token
- (string) A page token to fetch an additional or previous page of resultslimit
- (int) How many results to return. Minimum: 1, Maximum: 1000, Default: 20Response:
{
"fields": [
{
"id": "5de700b219b0e84945469242fa23b6f4",
"name": "thename",
"description": "some description",
"display_order": 1,
"data_type": "string",
"created_at": "2019-12-04T00:41:22.416234Z",
"updated_at": "2019-12-04T00:41:22.416234Z"
}
],
"next_page": "",
"previous_page": ""
}
fields
- (array) An array of field objects:id
- (string) The id of the fieldname
- (string) The name of the fielddescription
- (string) The description of the fielddisplay_order
- (integer) The order the field will display on item detail and search results pagesdata_type
- (string) The data type of the fieldcreated_at
- (string) The timestamp when the field was createdupdated_at
- (string) The timestamp when the field was last updatednext_page
- A page token that can be used to retrieve the next page of fields. If this is an empty string, there are no additional results to return.previous_page
- A page token that can be used to retrieve the previous page of fields. If this is an empty string, there are no earlier results available.Status codes:
POST /api/data/v3/fields
{
"description": "The description",
"name": "The name",
"data_type": "string"
}
name
- (string) The name of the fielddescription
- (string) The description of the fielddata_type
- (string) The data type of the field. One of bool
, date
, number
, string
Response:
{
"id": "5de700b219b0e84945469242fa23b6f4",
"name": "thename",
"description": "some description",
"display_order": 1,
"data_type": "string",
"created_at": "2019-12-04T00:41:22.416234Z",
"updated_at": "2019-12-04T00:41:22.416234Z"
}
id
- (string) The id of the fieldname
- (string) The name of the fielddescription
- (string) The description of the fielddisplay_order
- (integer) The order the field will display on item detail and search results pagesdata_type
- (string) The data type of the fieldcreated_at
- (string) The timestamp when the field was createdupdated_at
- (string) The timestamp when the field was last updateStatus codes:
PATCH /api/data/v3/fields/{id}
{
"description": "The description",
"name": "The name",
}
name
- (string) Optional. The name of the fielddescription
- (string) Optional. The description of the fieldNOTE: Only the name and description of a field are mutable.
Response:
{
"id": "5de700b219b0e84945469242fa23b6f4",
"name": "thename",
"description": "some description",
"display_order": 1,
"data_type": "string",
"created_at": "2019-12-04T00:41:22.416234Z",
"updated_at": "2019-12-04T00:41:22.416234Z"
}
id
- (string) The id of the fieldname
- (string) The name of the fielddescription
- (string) The description of the fielddisplay_order
- (integer) The order the field will display on item detail and search results pagesdata_type
- (string) The data type of the fieldcreated_at
- (string) The timestamp when the field was createdupdated_at
- (string) The timestamp when the field was last updateStatus codes:
GET /api/data/v3/fields/{id}
Response:
{
"id": "5de700b219b0e84945469242fa23b6f4",
"name": "thename",
"description": "some description",
"display_order": 1,
"data_type": "string",
"created_at": "2019-12-04T00:41:22.416234Z",
"updated_at": "2019-12-04T00:41:22.416234Z"
}
id
- (string) The id of the fieldname
- (string) The name of the fielddescription
- (string) The description of the fielddisplay_order
- (integer) The order the field will display on item detail and search results pagesdata_type
- (string) The data type of the fieldcreated_at
- (string) The timestamp when the field was createdupdated_at
- (string) The timestamp when the field was last updateStatus codes:
DELETE /api/data/v3/fields/{id}
Status codes:
PUT /api/data/v3/fields/order
{
"fields": [
{ "id": "field3", "order": 1 },
{ "id": "field2", "order": 2 },
{ "id": "field1", "order": 3 }
]
}
Optional Query Parameters:
page-token
- (string) A page token to fetch an additional or previous page of resultslimit
- (int) How many results to return. Minimum: 1, Maximum: 1000, Default: 20Response:
{
"fields": [
{ "id": "field3", "order": 1 },
{ "id": "field2", "order": 2 },
{ "id": "field1", "order": 3 }
]
}
fields
- (array) An array of field objects:id
- (string) The id of the fieldorder
- (integer) The order the field should display on item detail and search results pagesStatus codes:
This documentation is generated from the latest version of GrayMeta Platform. For documentation relevant to your own deployed version, please use the documentation inside the application.
© 2021 GrayMeta, Inc.