Update a trait

patchhttps://api.faraday.ai/v1/traits/{trait_id}

Update the configuration of a trait

Authentication

Bearer Authentication

Provide your API key in the Authorization header. You can find your API key in the Settings page of the dashboard.

Authorization: Bearer YOUR_TOKEN

path parameters

trait_idstring<uuid>required

The UUID of a trait

Example: "5e0dfa56-2d52-4c06-a870-bc79c71e86a3"

Responses

200Information about the Trait
archived_atstring<date-time>

(For user traits only) If not null, this resource will no longer receive updates, but will still be visable.

breaksarray[number]

For continuous data types, list of reasonable cutoff values.

Example: [1,2,3,4,5,6,7,8,9,10,15,20,25,30,35,40,45,50]
categoriesarray[string]

For STRING type, list of allowed values.

Example:
[
  "Large families",
  "Single suburbanites",
  "Single urbanites",
  "Small families",
  "Upper middle class small families"
]
categorystring

A broad category describing the flavor of this Trait.

Allowed values: fig/demography, fig/environment, fig/geography, fig/identity, fig/lifestyle, fig/life_event, fig/property, fig/reachability, fig/society, fig/financial, user_defined
coveragenumber

The percentage (0.1 meaning 10%) of the population for which we know the trait value.

Example: 0.5
created_atstring<date-time>required

When this resource was created.

deprecatedboolean

(For Faraday traits only) This trait will no longer receive updated data. Please use the updated version of the trait instead, if available.

Information about this field.

Example: "The number of baths in the house."
emitted_by_datasetsarray[object]
Items of array[object]

The name of a column in the dataset. Required if no value is used.

Example: "skus"
Match pattern: ^[_a-zA-Z0-9][_a-zA-Z0-9 :/-]*$
dataset_idstring<uuid>required

The dataset the column comes from.

formatstring

Additional context for the column's data that isn't captured by its data type. For example, a 'revenue' column's data type would likely be 'int64', but format specifies if this number represents 'doll...

Allowed values: currency_cents, currency_dollars, mm_dd_yy_slash, mm_dd_yyyy_slash, mm_dd_yy_dash, mm_dd_yyyy_dash, yyyy_mm_dd_slash, yy_mm_dd_slash, yyyy_mm_dd_dash, yy_mm_dd_dash, yyyymmdd, yyyymm, yyyy_mm_dash, yyyy_mm_slash, dd_mm_yyyy_slash, dd_mm_yy_slash, dd_mm_yyyy_dash, dd_mm_yy_dash, date_iso8601, date_month_day_fullyear, date_month_day_shortyear, date_month_day_fullyear_hours_minutes, date_month_day_fullyear_hours_minutes_seconds, date_seconds_since_epoch_utc, date_milliseconds_since_epoch_utc, list_comma_separated, list_semicolon_separated, list_single_value, static_date_iso8601
null_valuesarray[string]

A list of values that should be treated as null.

transformation_tabledictionary[string, object]

A mapping of values as they appear in the dataset to how they should be used in models, where the key is what appears in the dataset and value is how it should be interpretted. This is used when multi...

valueone of 3 types

A static value for this trait. Required if no column_name is used.

Properties of one of 3 types
One of:
boolean
idstring<uuid>required

A unique ID for this resource.

literatestring

A more human-consumable version of the name of this field.

Example: "Number of baths"

A mapping of the input values used in modeling, to how they should be displayed in reports.

namestringrequired

How to refer to this Trait in other API calls to Faraday.

Example: "favorite_color"
Match pattern: ^[_a-z][_a-z0-9]*$
permissionsarray[string]

What the account is able to use this trait for. Contact support to change access.

precisionstring

Precision refers to the specificity used to assign a trait. For example, 'person' precision indicates a trait specific to an individual, such as a preference for baseball, while 'address' precision pe...

Example: "person"
Allowed values: person, address, postcode, geom
resource_typestringrequired

The type of a resource which is available via the REST SDK.

Example: "scopes"
Allowed values: accounts, cohorts, connections, datasets, market_opportunity_analyses, outcomes, persona_sets, places, recommenders, scopes, streams, targets, traits

A string describing the nature of data represented by the trait.

categorical: the field contains one value of a bounded set. Example "favorite_color": one of "red", "blue", or "yellow".
multicategori...

Allowed values: categorical, multicategorical, ordinal, nominal
statusstringrequired

The current state of this resource and any updates.

Example: "pending"
Allowed values: new, starting, running, ready, error
tierstring

A broad category describing the flavor of a trait.

Allowed values: standard, premium
typestring

What type of data this field contains.

Example: "string"
Allowed values: boolean, long, double, string, date
unitstring

For numeric types, in what units is the data stored.

Example: "dollars"
updated_atstring<date-time>required

When this resource was last updated.

400The request was invalid.
errorstringrequired

A Faraday error code.

Some possible values include:

Generic HTTP Errors

  • BAD_REQUEST: The request could not be validated.
  • FORBIDDEN: You do not have permission to access the specified resour...
Example: "ERROR_TYPE"
Allowed values: BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT
idstring<uuid>required

A unique ID for this error. Please include this in bug reports.

Example: "082f9513-901c-4308-8081-902a8fe22d7e"
notestringrequired

A human-readable description of the error.

Example: "An error occurred"
validationErrorsarray[object]

JSON Schema validation errors, if any.

Items of array[object]
contextobjectrequired

More information about the error.

Properties of object
errorTypestringrequired

The type of validation error which occurred.

messagestringrequired

A human-readable error message.

pathstringrequired

The location in the document that failed validation.

A suggestion for fixing this error.

401No API key was supplied.
errorstringrequired

A Faraday error code.

Some possible values include:

Generic HTTP Errors

  • BAD_REQUEST: The request could not be validated.
  • FORBIDDEN: You do not have permission to access the specified resour...
Example: "ERROR_TYPE"
Allowed values: BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT
idstring<uuid>required

A unique ID for this error. Please include this in bug reports.

Example: "082f9513-901c-4308-8081-902a8fe22d7e"
notestringrequired

A human-readable description of the error.

Example: "An error occurred"
validationErrorsarray[object]

JSON Schema validation errors, if any.

Items of array[object]
contextobjectrequired

More information about the error.

Properties of object
errorTypestringrequired

The type of validation error which occurred.

messagestringrequired

A human-readable error message.

pathstringrequired

The location in the document that failed validation.

A suggestion for fixing this error.

403Access to this resource was forbidden.
errorstringrequired

A Faraday error code.

Some possible values include:

Generic HTTP Errors

  • BAD_REQUEST: The request could not be validated.
  • FORBIDDEN: You do not have permission to access the specified resour...
Example: "ERROR_TYPE"
Allowed values: BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT
idstring<uuid>required

A unique ID for this error. Please include this in bug reports.

Example: "082f9513-901c-4308-8081-902a8fe22d7e"
notestringrequired

A human-readable description of the error.

Example: "An error occurred"
validationErrorsarray[object]

JSON Schema validation errors, if any.

Items of array[object]
contextobjectrequired

More information about the error.

Properties of object
errorTypestringrequired

The type of validation error which occurred.

messagestringrequired

A human-readable error message.

pathstringrequired

The location in the document that failed validation.

A suggestion for fixing this error.

404The requested resource ID was not found.
errorstringrequired

A Faraday error code.

Some possible values include:

Generic HTTP Errors

  • BAD_REQUEST: The request could not be validated.
  • FORBIDDEN: You do not have permission to access the specified resour...
Example: "ERROR_TYPE"
Allowed values: BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT
idstring<uuid>required

A unique ID for this error. Please include this in bug reports.

Example: "082f9513-901c-4308-8081-902a8fe22d7e"
notestringrequired

A human-readable description of the error.

Example: "An error occurred"
validationErrorsarray[object]

JSON Schema validation errors, if any.

Items of array[object]
contextobjectrequired

More information about the error.

Properties of object
errorTypestringrequired

The type of validation error which occurred.

messagestringrequired

A human-readable error message.

pathstringrequired

The location in the document that failed validation.

A suggestion for fixing this error.

500An internal server error occurred.
errorstringrequired

A Faraday error code.

Some possible values include:

Generic HTTP Errors

  • BAD_REQUEST: The request could not be validated.
  • FORBIDDEN: You do not have permission to access the specified resour...
Example: "ERROR_TYPE"
Allowed values: BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT
idstring<uuid>required

A unique ID for this error. Please include this in bug reports.

Example: "082f9513-901c-4308-8081-902a8fe22d7e"
notestringrequired

A human-readable description of the error.

Example: "An error occurred"
validationErrorsarray[object]

JSON Schema validation errors, if any.

Items of array[object]
contextobjectrequired

More information about the error.

Properties of object
errorTypestringrequired

The type of validation error which occurred.

messagestringrequired

A human-readable error message.

pathstringrequired

The location in the document that failed validation.

A suggestion for fixing this error.

Tags

traits