Jasmin Developers - Web API Reference

GET Operations

GET SchemaAttributes (odata)

Returns a page of the list of all the entity records available.

The following elements are optional:

opts (ODataQueryOptions) OData query option.

Response:

When successful, the response body contains the list of records available. See SchemaAttributeResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /corePatterns/schemaAttributes/odata

GET SchemaAttribute by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See SchemaAttributeResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /corePatterns/schemaAttributes/{id}

GET SchemaAttribute by key

Returns the entity record that matches the specified key.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.

Response:

When successful, the response body contains the entity record. See SchemaAttributeResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /corePatterns/schemaAttributes/{schemaEntity}/{key}

POST Operations

POST CustomSchemaAttributes

Creates a new entity record.

The following elements are required:

schemaAttributeResource (ApiCustomSchemaAttributeResource) The request body should contain the entity record that should be created.
See ApiCustomSchemaAttributeResource.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiCustomSchemaAttributeResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /corePatterns/schemaAttributes

PUT Operations

PUT Set AttributeOptions SchemaAttribute

Updates the value of attribute 'AttributeOptions' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (Dictionary) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/attributeOptions

PUT Set AttributeType SchemaAttribute

Updates the value of attribute 'AttributeType' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/attributeType

PUT Set DefaultValue SchemaAttribute

Updates the value of attribute 'DefaultValue' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (object) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/defaultValue

PUT Set DefaultValueStrategy SchemaAttribute

Updates the value of attribute 'DefaultValueStrategy' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/defaultValueStrategy

PUT Set IsActive SchemaAttribute

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/isActive

PUT Set IsReadOnly SchemaAttribute

Updates the value of attribute 'IsReadOnly' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (boolean) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/isReadOnly

PUT Set IsRequired SchemaAttribute

Updates the value of attribute 'IsRequired' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/isRequired

PUT Set Key SchemaAttribute

Updates the value of attribute 'Key' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/key

PUT Set Label SchemaAttribute

Updates the value of attribute 'Label' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/label

PUT Set LookupEntity SchemaAttribute

Updates the value of attribute 'LookupEntity' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/lookupEntity

PUT Set SchemaEntity SchemaAttribute

Updates the value of attribute 'SchemaEntity' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/schemaEntity

PUT Set ValidationOptions SchemaAttribute

Updates the value of attribute 'ValidationOptions' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (Dictionary) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/validationOptions

PUT Set Visible SchemaAttribute

Updates the value of attribute 'Visible' in the specified entity record.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/schemaAttributes/{schemaEntity}/{key}/visible

DELETE Operations

DELETE SchemaAttribute by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /corePatterns/schemaAttributes/{id}

DELETE SchemaAttribute by key

Deletes the entity record that matches the specified key.

The following elements are required:

schemaEntity (string) Schema Entity.
key (string) Attribute Name.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /corePatterns/schemaAttributes/{schemaEntity}/{key}

Resources


ApiCustomSchemaAttributeResource

The following elements are required:

key (string) Attribute Name.
visible (bool) Visible.
schemaEntity (string) Schema Entity.

The following elements are optional:

label (string) Label.
attributeType (string) Attribute Type.
isRequired (bool) Is Required.
lookupEntity (string) Lookup Entity.
attributeType (AttributeType) The attribute type.
See AttributeType .
attributeOptions (ShortTextAttributeOptions|TextAttributeOptions|LongTextAttributeOptions|DecimalAttributeOptions|ViewAttributeOptions|ValueListItemAttributeOptions|MoneyAttributeOptions) The attribute type options. (Supported for ShortText, Text, LongText, Decimal, View, ValueListItem and Money attribute types).
See ShortTextAttributeOptions , TextAttributeOptions , LongTextAttributeOptions , DecimalAttributeOptions , ViewAttributeOptions , ValueListItemAttributeOptions , MoneyAttributeOptions .
validationOptions (ValidationOptions) The validation options.
See ValidationOptions .
defaultValueStrategy (DefaultValueStrategy) The default value strategy.
Supported values: "Standard", "FieldPathOtherAttributeFirstValue" or "FieldPathBindToOtherAttribute".
See DefaultValueStrategy .
defaultValue (DefaultValueStandard|DefaultValueFieldPath) The default value depends on the selected default value strategy.
See DefaultValueStandard , DefaultValueFieldPath .
isReadOnly (IsReadOnly) If the attribute is readOnly.


AttributeType

The following elements are optional:

attributeType (string) The attribute type.
Supported values: "ShortText", "Text", "LongText", "Memo", "Boolean", "Number", "Decimal", "Percentage", "Date", "DateTime", "URL", "Phone", "Email", "View", "ValueListItem" or "Money".


CustomSchemaAttributeResource

The following elements are required:

schemaEntity (string) Schema Entity.
(fk) Allowed value: the natural key of a record of type SchemaEntity. These records are accessibly through the SchemaEntities service.
key (string) Attribute Name.
visible (bool) Visible.
cloneable (bool) Cloneable.
isPersonalData (bool) Is Personal Data.
isCustomAttribute (bool) Is Custom Attribute.

The following elements are optional:

name (string) Name.
description (string) Description.
attributeType (string) Attribute Type.
isNaturalKey (bool) Is Natural Key.
isDescription (bool) Is Description.
labelResourceKey (string) Label Resource Key.
isRequired (bool) Is Required.
lookupEntity (string) Lookup Entity.
(fk) Allowed value: the natural key of a record of type SchemaEntity. These records are accessibly through the SchemaEntities service.
defaultValue (string) Default Value.
persisted (bool) Persisted.
isInternal (bool) Internal.
isSystemBase (bool) System Base.
isSequenceManaged (bool) Is Sequence Managed.
localizable (bool) Localizable.
customAttributeDefinition (string) Custom Attribute Definition.
label (string) Label.
attributeType (AttributeType) The attribute type.
See AttributeType .
attributeOptions (ShortTextAttributeOptions|TextAttributeOptions|LongTextAttributeOptions|DecimalAttributeOptions|ViewAttributeOptions|ValueListItemAttributeOptions|MoneyAttributeOptions) The attribute type options. (Supported for ShortText, Text, LongText, Decimal, View, ValueListItem and Money attribute types).
See ShortTextAttributeOptions , TextAttributeOptions , LongTextAttributeOptions , DecimalAttributeOptions , ViewAttributeOptions , ValueListItemAttributeOptions , MoneyAttributeOptions .
validationOptions (ValidationOptions) The validation options.
See ValidationOptions .
defaultValueStrategy (DefaultValueStrategy) The default value strategy.
Supported values: "Standard", "FieldPathOtherAttributeFirstValue" or "FieldPathBindToOtherAttribute".
See DefaultValueStrategy .
defaultValue (DefaultValueStandard|DefaultValueFieldPath) The default value depends on the selected default value strategy.
See DefaultValueStandard , DefaultValueFieldPath .
isReadOnly (IsReadOnly) If the attribute is readOnly.


DecimalAttributeOptions

The following elements are optional:

decimalPlaces (int) Number of decimal places.
This attribute is only supported if the attributeType is "Decimal".
Example: "decimalPlaces": 2.
allowedCompanies (object) The allowed companies for the custom attribute. Example:

{ "allowedCompanies": [{ "key": "companyKey", "name": "company name" }] }

Note: If the allowedCompanies property is not sent or if it is an empty array then, all active companies are considered.



DefaultValueFieldPath

The following elements are optional:

defaultValueFieldPath (object) The default value path. The leaf property must be of the same type as the custom attribute. Example: { "entries": [ { "propertyName": "PaymentMethod" } { "propertyName": "FiscalClassification" }, { "propertyName": "Description" } ] } .


DefaultValueStandard

The following elements are optional:

defaultValueStandard (object) Used with standard default value strategy.
Supported values:
If attributeType is "ShortText", "Text", "LongText", "Memo", "URL", "Phone" or "Email": The default value is string.
If attributeType is "Boolean": The default value is a boolean true or false.
If attributeType is "Number": The default value is a int.
If attributeType is "Decimal" or "Percentage": The default value is a decimal.
If attributeType is "Date": The default value is a string "None" or "Today".
If attributeType is "DateTime": The default value is a string "None" or "Now".
If attributeType is "ValueListItem": The default value is a string that represents the value of the lookup entity.
If attributeType is "Money": The default value is a decimal.
Example: "defaultValue": 100.00.


DefaultValueStrategy

The following elements are optional:

defaultValueStrategy (object) The default value strategy.
Supported values: "Standard", "FieldPathOtherAttributeFirstValue" or "FieldPathBindToOtherAttribute".


LongTextAttributeOptions

The following elements are required:

serviceUrl (string) The service URL (Requires https and json format).
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Supported variable subtitution are:
  • "{model.[attrName]}": Model attribute variable subtitution where attrName is a supported model attribute name
  • "{appContext.tenantKey}": Application context tenant key
  • "{appContext.organizationKey}": Application context organization key
  • "{value}": the text typed in the typeahead control
  • "{api}": Replaced by api/{appContext.tenantKey}/{appContext.organizationKey}
  • "{app}": Replaced by app/{appContext.tenantKey}/{appContext.organizationKey}

Examples:
"serviceUrl": http://restcountries.eu/rest/v2/name/$value$
"serviceUrl": /api/$appContext.tenantKey$/$appContext.organizationKey$/salesCore/customerParties/odata?$select=Name,PartyKey&$filter=substringof('$value$',PartyKey).
jsonPath (string) The json path to locate the item list to be used for typeahead.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "jsonPath": $.items[*].
valueAttributeName (string) The json key to match the attribute to be used as value.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "valueAttributeName": myKey.
includeHeaders (boolean) Indicates if the http application headers should be used on service invocation. Useful for internal services.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "includeHeaders": true.
restrictValue (boolean) Indicates that the selected value must exist in the service returned items.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "restrictValue": true.

The following elements are optional:

fieldType (string) The field Type (only avalaible for "ShortText", "Text" and "LongText" attribute types).
Supported values: "Normal" or "WebServiceTypeahead".
Example: "fieldType": "Normal".
descriptionAttributeName (string) The json key to match the attribute to be used as description.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "descriptionAttributeName": myKey.
allowedCompanies (object) The allowed companies for the custom attribute. Example:

{ "allowedCompanies": [{ "key": "companyKey", "name": "company name" }] }

Note: If the allowedCompanies property is not sent or if it is an empty array then, all active companies are considered.



MoneyAttributeOptions

The following elements are optional:

currencyPropertyName (string) The currency property name (key).
allowedCompanies (object) The allowed companies for the custom attribute. Example:

{ "allowedCompanies": [{ "key": "companyKey", "name": "company name" }] }

Note: If the allowedCompanies property is not sent or if it is an empty array then, all active companies are considered.



ShortTextAttributeOptions

The following elements are required:

serviceUrl (string) The service URL (Requires https and json format).
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Supported variable subtitution are:
  • "{model.[attrName]}": Model attribute variable subtitution where attrName is a supported model attribute name
  • "{appContext.tenantKey}": Application context tenant key
  • "{appContext.organizationKey}": Application context organization key
  • "{value}": the text typed in the typeahead control
  • "{api}": Replaced by api/{appContext.tenantKey}/{appContext.organizationKey}
  • "{app}": Replaced by app/{appContext.tenantKey}/{appContext.organizationKey}

Examples:
"serviceUrl": http://restcountries.eu/rest/v2/name/$value$
"serviceUrl": /api/$appContext.tenantKey$/$appContext.organizationKey$/salesCore/customerParties/odata?$select=Name,PartyKey&$filter=substringof('$value$',PartyKey).
jsonPath (string) The json path to locate the item list to be used for typeahead.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "jsonPath": $.items[*].
valueAttributeName (string) The json key to match the attribute to be used as value.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "valueAttributeName": myKey.
includeHeaders (boolean) Indicates if the http application headers should be used on service invocation. Useful for internal services.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "includeHeaders": true.
restrictValue (boolean) Indicates that the selected value must exist in the service returned items.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "restrictValue": true.

The following elements are optional:

fieldType (string) The field Type (only avalaible for "ShortText", "Text" and "LongText" attribute types).
Supported values: "Normal" or "WebServiceTypeahead".
Example: "fieldType": "Normal".
descriptionAttributeName (string) The json key to match the attribute to be used as description.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "descriptionAttributeName": myKey.
allowedCompanies (object) The allowed companies for the custom attribute. Example:

{ "allowedCompanies": [{ "key": "companyKey", "name": "company name" }] }

Note: If the allowedCompanies property is not sent or if it is an empty array then, all active companies are considered.



TextAttributeOptions

The following elements are required:

serviceUrl (string) The service URL (Requires https and json format).
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Supported variable subtitution are:
  • "{model.[attrName]}": Model attribute variable subtitution where attrName is a supported model attribute name
  • "{appContext.tenantKey}": Application context tenant key
  • "{appContext.organizationKey}": Application context organization key
  • "{value}": the text typed in the typeahead control
  • "{api}": Replaced by api/{appContext.tenantKey}/{appContext.organizationKey}
  • "{app}": Replaced by app/{appContext.tenantKey}/{appContext.organizationKey}

Examples:
"serviceUrl": http://restcountries.eu/rest/v2/name/$value$
"serviceUrl": /api/$appContext.tenantKey$/$appContext.organizationKey$/salesCore/customerParties/odata?$select=Name,PartyKey&$filter=substringof('$value$',PartyKey).
jsonPath (string) The json path to locate the item list to be used for typeahead.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "jsonPath": $.items[*].
valueAttributeName (string) The json key to match the attribute to be used as value.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "valueAttributeName": myKey.
includeHeaders (boolean) Indicates if the http application headers should be used on service invocation. Useful for internal services.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "includeHeaders": true.
restrictValue (boolean) Indicates that the selected value must exist in the service returned items.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "restrictValue": true.

The following elements are optional:

fieldType (string) The field Type (only avalaible for "ShortText", "Text" and "LongText" attribute types).
Supported values: "Normal" or "WebServiceTypeahead".
Example: "fieldType": "Normal".
descriptionAttributeName (string) The json key to match the attribute to be used as description.
This attribute is only supported if the fieldType is "WebServiceTypeahead".
Example: "descriptionAttributeName": myKey.
allowedCompanies (object) The allowed companies for the custom attribute. Example:

{ "allowedCompanies": [{ "key": "companyKey", "name": "company name" }] }

Note: If the allowedCompanies property is not sent or if it is an empty array then, all active companies are considered.



ValidationOptions

The following elements are optional:

format (string) The format type.
Supported values:
If attributeType is "ShortText", "Text", "LongText" or "Memo" the supported format is "None", "Pattern", "UpperCase", "LowerCase", "ValidCharacters" or "InvalidCharacters".
If attributeType is "Boolean", "Number", "Decimal", "Percentage", "Date" or "DateTime": Not supported.
If attributeType is "URL", "Phone" or "Email" the supported format is "None" or "Pattern".
Example: "format": "Pattern".
regex (string) Regex to apply to custom attribute.
Required if format is "Pattern".
Example: "regex": "^.*@Company.com$".
regexErrorMessage (string) Error message for regex.
Required if format is "Pattern".
Example: "regexErrorMessage": "The value must end in @Company.com".
minimum (int) Minimum value.
Supported if attributeType is "ShortText", "Text", "LongText", "Memo", "Number", "Decimal" and "Percentage".
Not supported if attributeType is Boolean, Date, DateTime, URL, Phone or Email.
Example: "minimum": 0.
maximum (int) Maximum value.
Supported if attributeType is "ShortText", "Text", "LongText", "Memo", "Number", "Decimal" and "Percentage".
Not supported if attributeType is Boolean, Date, DateTime, URL, Phone or Email.
Example: "maximum": 100.


ValueListItemAttributeOptions

The following elements are optional:

naturalKey (string) The natural key of the entity that is the source (the lookup).
allowedCompanies (object) The allowed companies for the custom attribute. Example:

{ "allowedCompanies": [{ "key": "companyKey", "name": "company name" }] }

Note: If the allowedCompanies property is not sent or if it is an empty array then, all active companies are considered.



ViewAttributeOptions

The following elements are optional:

naturalKey (string) The natural key of the entity that is the source (the lookup).
allowedCompanies (object) The allowed companies for the custom attribute. Example:

{ "allowedCompanies": [{ "key": "companyKey", "name": "company name" }] }

Note: If the allowedCompanies property is not sent or if it is an empty array then, all active companies are considered.