# Load dynamic options for a setting select field

Invokes the app serverless function configured on the field's optionsSource and returns options for SINGLE_SELECT / MULTI_SELECT fields. Uses the draft settingsSchema from the installer UI so credentials entered in other fields are available to the loader.

Endpoint: POST /api/v2/apps/{uuid}/settings-schema/options
Version: 2.0
Security: bearerAuth

## Path parameters:

  - `uuid` (string, required)
    UUID of the application

## Request fields (application/json):

  - `fieldName` (string, required)
    Name of the setting field to load options for.

  - `query` (string)
    Optional search query typed by the installer.

  - `settingsSchema` (array, required)
    Current draft settings schema with values from the installer UI.

  - `settingsSchema.name` (string)

  - `settingsSchema.label` (string)

  - `settingsSchema.type` (string)

  - `settingsSchema.required` (boolean)

  - `settingsSchema.helpText` (string)

  - `settingsSchema.options` (array)

  - `settingsSchema.options.name` (string)

  - `settingsSchema.options.label` (string)

  - `settingsSchema.options.helpText` (string)

  - `settingsSchema.options.preview` (string)

  - `settingsSchema.optionsSource` (object)

  - `settingsSchema.optionsSource.type` (string)

  - `settingsSchema.optionsSource.serverlessFunctionUuid` (string)

  - `settingsSchema.optionsSource.serverlessFunctionName` (string)

  - `settingsSchema.optionsSource.dependsOn` (array)

  - `settingsSchema.optionsSource.searchable` (boolean)

  - `settingsSchema.optionsSource.minQueryLength` (integer)

  - `settingsSchema.actionSource` (object)

  - `settingsSchema.actionSource.type` (string)

  - `settingsSchema.actionSource.serverlessFunctionUuid` (string)

  - `settingsSchema.actionSource.serverlessFunctionName` (string)

  - `settingsSchema.actionSource.enqueue` (boolean)

  - `settingsSchema.defaultValue` (any)

  - `settingsSchema.hidden` (boolean)

  - `settingsSchema.advanced` (boolean)

  - `settingsSchema.filterTraits` (array)

  - `settingsSchema.visibleWhen` (array)

  - `settingsSchema.visibleWhen.field` (string)

  - `settingsSchema.visibleWhen.operator` (string)

  - `settingsSchema.visibleWhen.value` (any)

  - `settingsSchema.itemFields` (array)

  - `settingsSchema.min` (integer)

  - `settingsSchema.max` (integer)

  - `settingsSchema.itemLabel` (string)

  - `settingsSchema.value` (any)

  - `settingsSchema.hasValue` (boolean)

  - `settingsSchema.mappingValue` (object)

  - `settingsSchema.mappingValue.objectName` (string)

  - `settingsSchema.mappingValue.targetKind` (string)

  - `settingsSchema.mappingValue.items` (array)

  - `settingsSchema.mappingValue.items.fieldLabel` (string)

  - `settingsSchema.mappingValue.items.fieldName` (string)

  - `settingsSchema.mappingValue.items.fieldHelpText` (string)

  - `settingsSchema.mappingValue.items.isRequired` (boolean)

  - `settingsSchema.mappingValue.items.allowedPropertyTypes` (array)

  - `settingsSchema.mappingValue.items.allowedPropertyFormats` (array)

  - `settingsSchema.mappingValue.items.propertyName` (string)

  - `settingsSchema.mappingValue.items.recordUuid` (string)

  - `settingsSchema.mappingValue.recordTarget` (boolean)

  - `settingsSchema.valueScope` (string)

  - `settingsSchema.action` (boolean)

  - `appBarUuid` (string)
    When loading options for an app bar field, the app bar UUID.

  - `recordUuid` (string)
    Record in context when the options field is on an action dialog.

  - `object` (string)
    Object name in context when the options field is on an action dialog.

## Response 200 fields (application/json):

  - `message` (string)
    Example: "Success"

  - `data` (object)

## Response 400 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 401 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 403 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 404 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 500 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 502 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"


