Create a Data Specification
POST/v1/data-specifications
Create a Data Specification
Request
- application/json
Body
The request received from the client.
Array [
- calculated
- provided
- address
- long
- boolean
- date
- dateRange
- decimal
- multiSelect
- name
- singleSelect
- text
- timeOfDay
- int
Array [
]
Array [
]
]
A name for the Data Specification.
A culture (locale) in a format "languagecode2-country/regioncode2"
e.g."en-US"
. The culture determines the
currency for the Data Specification, as well as formatting for dates and numbers.
The culture cannot be updated once the Data Specification is created.
(Optional) A description for the Data Specification.
An IANA time zone database identifier corresponding to the time
zone for date and time related properties e.g. "Australia/Sydney"
. The time zone cannot be updated once
the Data Specification is created.
properties
object[]
required
A collection of properties. Must have at least one.
The name of the property.
(Optional) The description for the property.
Is then property is queryable by a Campaign?
Visibility
Possible values: [PUBLIC
, PRIVATE
]
valueType
object
required
The value type of the property.
oneOf
calculated
object
required
A value that is calculated for a property, based on an expression.
An expression to determine the value. The expression may reference other property names.
provided
object
required
A value that is provided for a property
Whether the value is required
propertyType
object
required
The type of property.
oneOf
address
object
required
An address property that specifies address data.
Whether line 1 of the address is required
Whether line 2 of the address is required
Whether the town / city of the address is required
Whether the region of the address is required
Whether postal code of the address is required
A list of allowed two letter ISO 3166 country codes for the address. Leave empty to allow all countries.
long
object
required
A 64-bit integer property that specifies integer data between -9223372036854775808 and 9223372036854775807
(Optional) The minimum value that can be specified. If maximum value is also specified, minimum value must be less than or equal to maximum value.
(Optional) The maximum value that can be specified. If minimum value is also specified, maximum value must be greater than or equal to minimum value.
boolean
object
required
A boolean property that specifies a true
or false
value.
date
object
required
A date property that specifies a date or date with a time
Whether the date allows a time component
The allowed days
Possible values: [DAY_OF_WEEK_UNSPECIFIED
, MONDAY
, TUESDAY
, WEDNESDAY
, THURSDAY
, FRIDAY
, SATURDAY
, SUNDAY
]
(Optional) The minimum value that can be specified. If maximum value is also specified, minimum value must be less than or equal to maximum value.
(Optional) The maximum value that can be specified. If minimum value is also specified, maximum value must be greater than or equal to minimum value.
The smallest precision of time allowed
Possible values: [HOUR
, MINUTE
, HIGHEST
]
dateRange
object
required
A date range property that specifies a date range
Whether the date allows a time component
(Optional) The minimum value that can be specified. If maximum value is also specified, minimum value must be less than or equal to maximum value.
(Optional) The maximum value that can be specified. If minimum value is also specified, maximum value must be greater than or equal to minimum value.
decimal
object
required
A 128-bit decimal property that allows decimal values with precision up to 28-29 digits between -79228162514264337593543950335 and 79228162514264337593543950335
minimumValue
object
A representation of a decimal value, such as 2.5
The decimal value, as a string. The string representation consists of an optional sign, +
(U+002B
) or -
(U+002D
), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character e
(U+0065
) or E
(U+0045
) followed by one or more decimal digits.
maximumValue
object
A representation of a decimal value, such as 2.5
The decimal value, as a string. The string representation consists of an optional sign, +
(U+002B
) or -
(U+002D
), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character e
(U+0065
) or E
(U+0045
) followed by one or more decimal digits.
multiSelect
object
required
A multiple selection property that allows the multiple selection of one or more options
The minimum number of selections that must be made.
The maximum number of selections that must be made.
options
object[]
required
The options to select from
The name of the option.
The value of the option.
name
object
required
A property representing an individual's name
Whether the first name is required
Whether the last name is required
Whether the title is required
singleSelect
object
required
A multiple selection property that allows the selection of a single option
options
object[]
required
The options to select from
The name of the option.
The value of the option.
text
object
required
A text property
(Optional) The minimum length that can be specified. If maximum length is also specified, minimum length must be less than or equal to maximum length.
(Optional) The maximum length that can be specified. If minimum length is also specified, maximum length must be greater than or equal to minimum length.
(Optional) A regular expression that the value must match.
timeOfDay
object
required
A time of day property
minimumValue
object
Represents a time of day. The date and time zone are not significant
Hours of day in 24 hour format. Must be from 0 to 23
Minutes of hour of day. Must be from 0 to 59.
Seconds of minutes of the time. Must be from 0 to 59
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
maximumValue
object
Represents a time of day. The date and time zone are not significant
Hours of day in 24 hour format. Must be from 0 to 23
Minutes of hour of day. Must be from 0 to 59.
Seconds of minutes of the time. Must be from 0 to 59
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
int
object
required
A 32-bit integer property that specifies integer data between -2147483648 and 2147483647
(Optional) The minimum value that can be specified. If maximum value is also specified, minimum value must be less than or equal to maximum value.
(Optional) The maximum value that can be specified. If minimum value is also specified, maximum value must be greater than or equal to minimum value.
Responses
- 200
- default
OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
- calculated
- provided
- address
- long
- boolean
- date
- dateRange
- decimal
- multiSelect
- name
- singleSelect
- text
- timeOfDay
- int
Array [
]
Array [
]
]
dataSpecification
object
required
A Data Specification.
The Data Specification identifier.
The Organization identifier that owns this Data Specification.
A name for the Data Specification.
A culture (locale) in a format "languagecode2-country/regioncode2"
e.g. "en-US"
. The culture determines the
formatting for dates and numbers, as well as the currency.
(Optional) A description for the Data Specification.
An IANA time zone database identifier corresponding to the time
zone for date and time related properties e.g. "Australia/Sydney"
.
properties
object[]
required
A collection of properties.
The name of the property.
(Optional) The description for the property.
Is then property is queryable by a Campaign?
Visibility
Possible values: [PUBLIC
, PRIVATE
]
valueType
object
required
The value type of the property.
oneOf
calculated
object
required
A value that is calculated for a property, based on an expression.
An expression to determine the value. The expression may reference other property names.
provided
object
required
A value that is provided for a property
Whether the value is required
propertyType
object
required
The type of property.
oneOf
address
object
required
An address property that specifies address data.
Whether line 1 of the address is required
Whether line 2 of the address is required
Whether the town / city of the address is required
Whether the region of the address is required
Whether postal code of the address is required
A list of allowed two letter ISO 3166 country codes for the address. Leave empty to allow all countries.
long
object
required
A 64-bit integer property that specifies integer data between -9223372036854775808 and 9223372036854775807
(Optional) The minimum value that can be specified. If maximum value is also specified, minimum value must be less than or equal to maximum value.
(Optional) The maximum value that can be specified. If minimum value is also specified, maximum value must be greater than or equal to minimum value.
boolean
object
required
A boolean property that specifies a true
or false
value.
date
object
required
A date property that specifies a date or date with a time
Whether the date allows a time component
The allowed days
Possible values: [DAY_OF_WEEK_UNSPECIFIED
, MONDAY
, TUESDAY
, WEDNESDAY
, THURSDAY
, FRIDAY
, SATURDAY
, SUNDAY
]
(Optional) The minimum value that can be specified. If maximum value is also specified, minimum value must be less than or equal to maximum value.
(Optional) The maximum value that can be specified. If minimum value is also specified, maximum value must be greater than or equal to minimum value.
The smallest precision of time allowed
Possible values: [HOUR
, MINUTE
, HIGHEST
]
dateRange
object
required
A date range property that specifies a date range
Whether the date allows a time component
(Optional) The minimum value that can be specified. If maximum value is also specified, minimum value must be less than or equal to maximum value.
(Optional) The maximum value that can be specified. If minimum value is also specified, maximum value must be greater than or equal to minimum value.
decimal
object
required
A 128-bit decimal property that allows decimal values with precision up to 28-29 digits between -79228162514264337593543950335 and 79228162514264337593543950335
minimumValue
object
A representation of a decimal value, such as 2.5
The decimal value, as a string. The string representation consists of an optional sign, +
(U+002B
) or -
(U+002D
), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character e
(U+0065
) or E
(U+0045
) followed by one or more decimal digits.
maximumValue
object
A representation of a decimal value, such as 2.5
The decimal value, as a string. The string representation consists of an optional sign, +
(U+002B
) or -
(U+002D
), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character e
(U+0065
) or E
(U+0045
) followed by one or more decimal digits.
multiSelect
object
required
A multiple selection property that allows the multiple selection of one or more options
The minimum number of selections that must be made.
The maximum number of selections that must be made.
options
object[]
required
The options to select from
The name of the option.
The value of the option.
name
object
required
A property representing an individual's name
Whether the first name is required
Whether the last name is required
Whether the title is required
singleSelect
object
required
A multiple selection property that allows the selection of a single option
options
object[]
required
The options to select from
The name of the option.
The value of the option.
text
object
required
A text property
(Optional) The minimum length that can be specified. If maximum length is also specified, minimum length must be less than or equal to maximum length.
(Optional) The maximum length that can be specified. If minimum length is also specified, maximum length must be greater than or equal to minimum length.
(Optional) A regular expression that the value must match.
timeOfDay
object
required
A time of day property
minimumValue
object
Represents a time of day. The date and time zone are not significant
Hours of day in 24 hour format. Must be from 0 to 23
Minutes of hour of day. Must be from 0 to 59.
Seconds of minutes of the time. Must be from 0 to 59
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
maximumValue
object
Represents a time of day. The date and time zone are not significant
Hours of day in 24 hour format. Must be from 0 to 23
Minutes of hour of day. Must be from 0 to 59.
Seconds of minutes of the time. Must be from 0 to 59
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
int
object
required
A 32-bit integer property that specifies integer data between -2147483648 and 2147483647
(Optional) The minimum value that can be specified. If maximum value is also specified, minimum value must be less than or equal to maximum value.
(Optional) The maximum value that can be specified. If minimum value is also specified, maximum value must be greater than or equal to minimum value.
The date time at which the Data Specification is created.
{
"dataSpecification": {
"dataSpecificationId": "string",
"organizationId": "string",
"name": "string",
"culture": "string",
"description": "string",
"timeZone": "string",
"properties": [
{
"name": "string",
"description": "string",
"isQueryable": true,
"visibility": "PUBLIC",
"valueType": {},
"propertyType": {}
}
]
},
"timestamp": "2024-07-29T15:51:28.071Z"
}
Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
An error status code describing the response.
Enum Value | Description |
---|---|
0 | OK |
1 | Cancelled |
2 | Unknown |
3 | InvalidArgument |
4 | DeadlineExceeded |
5 | NotFound |
6 | AlreadyExists |
7 | PermissionDenied |
8 | ResourceExhausted |
9 | FailedPrecondition |
10 | Aborted |
11 | OutOfRange |
12 | Unimplemented |
13 | Internal |
14 | Unavailable |
15 | DataLoss |
16 | Unauthenticated |
Possible values: [0
, 1
, 2
, 3
, 4
, 5
, 6
, 7
, 8
, 9
, 10
, 11
, 12
, 13
, 14
, 15
, 16
]
A developer-facing error message
details
object[]
A list of messages containing details about the errors
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}