Skip to main content

Get a Custom Field

GET 

https://useast.api.elasticpath.com/v2/settings/extensions/custom-apis/:custom_api_id/fields/:custom_field_id

Get a Custom Field

Request

Path Parameters

    custom_api_id stringrequired

    The id of the Custom API.

    Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    custom_field_id uuidrequired

    The id of the Custom Field.

    Example: 859aeba1-03c2-4822-bd4c-89afce93d7eb

Responses

OK

Schema
    data objectrequired
    field_typerequired

    Possible values: [boolean, float, integer, string]

    iduuid

    The unique identifier of the Custom Field.

    typestring

    Specifies the type of the resource object, use custom_field for Custom Field.

    namestring

    Specifies the name of this Custom Field.

    Possible values: non-empty and <= 255 characters

    descriptionstring

    Specifies the description for this Custom API.

    Possible values: <= 255 characters

    slugstring

    Specifies a slug that must be unique within the scope of the Custom API. This slug will be value as the key in the JSON Object in all entries.

    Possible values: non-empty and <= 63 characters

    field_typestring

    Specifies the type of the field. This field cannot be updated.

    Possible values: [string, integer, boolean, float]

    use_as_url_slugboolean

    Enabling this field will mean Custom API Entries created in this Custom API will use this value in the URL instead of the id attribute. In order to set this field, the field must be a string, and unique, not allow null values, no entries have been created yet, and this field cannot be set to true on another custom field. This field cannot be updated. In addition to any validation rules you create, the values must be Unreserved URL Characters (i.e., be alpha-numeric, or one of -, ., _ or ~).

    presentation object
    sort_orderinteger

    Specifies the order of the field in the User Interface.

    Possible values: <= 1000

    Default value: 0
    Example: 10
    links object
    selfuri
    meta object
    timestamps objectrequired
    updated_atstringrequired

    Specifies the date the entity is created.

    Example: 2017-01-10T11:41:19.244Z
    created_atstringrequired

    Specifies the date the entity is last updated.

    Example: 2017-01-10T11:41:19.244Z
    validation object
    boolean object
    allow_null_valuesboolean | null

    When set to true, this allows null values for that field on Custom API Entries. When set to false, storing null values is not permitted.

    Default value: true
    immutableboolean | null

    When set to true, prevents changing the field.

    Default value: false

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://useast.api.elasticpath.com/v2/settings/extensions/custom-apis/:custom_api_id/fields/:custom_field_id");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://useast.api.elasticpath.com
Auth
Parameters
— pathrequired
— pathrequired
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.