Overview
Use the Template service to manage two types of templates in the Customer Journey Manager application:
- Activity: Use the Activity Template to define an activity to complete a Journey. For example, define a Facebook campaign that captures the number of likes on a page.
- Stage: Use the Stage Template to define a collection of activities. You can customize an existing stage template by adding more activities to it based on your needs.
Use the Template service to perform these tasks:
- Create an activity template or a stage template.
- Use the pre-defined activity templates such as Facebook, Google Adwords, Email, Trigger, and Custom Activity.
- Use the pre-defined stage templates such as acquire, engage, and retain.
- Export custom activity and stage templates.
- Import custom activity and stage templates.
Use a standard REST call to perform all operations related to creating, deleting, viewing, and updating templates.
API Reference
/activities
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/activities
Retrieves a list of activity templates.
Accepted scopes:
- hybris.template_view – Required to retrieve activity templates
Creates an activity template.
Accepted scopes:
- hybris.template_manage – Required to create an activity template
get /activities
Retrieves a list of activity templates.
Accepted scopes:
- hybris.template_view – Required to retrieve activity templates
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- totalCount: (boolean)
This parameter requests to return the total number of object in the collection fulfilling the criteria together with the response. This number will be returned in the 'hybris-count' header.
Example:
true
- sort: (string)
The list of comma-separated properties used to sort the results. By default, the column values are sorted in ascending order. Can either be in the form of fieldName or fieldName:asc,fieldName:desc. If you want to sort by localized attributes, you must use the following form: fieldName.language or fieldName.language:asc,fieldName.language:desc.
Example:
size,species:asc,weight:desc
- fields: (string)
Contains a comma separated list of field identifiers, by which the fields of the response entities should be filtered by. Empty or not initialized value result in a minimal set of entity fields returned. Non-existing or invalid fields will be ignored.
Example:
code,name,description
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Resource successfully retrieved.
Headers
- hybris-count: (integer)
The total number of objects that fulfil the criteria.
Example:
1000
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of Template",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Template",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"sourceSystemId": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"type": {
"type": "string",
"maxLength": 32
},
"group": {
"type": "string",
"enum": [
"FACEBOOK",
"TRIGGERBASED",
"PAIDSEARCH",
"EMAIL",
"MOBILE",
"EXTERNAL",
"CUSTOM",
"OTHERS"
]
},
"custom": {
"type": "boolean"
},
"iconUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"backgroundColor": {
"type": "string",
"minLength": 1,
"maxLength": 7
},
"entitySourceConfiguration": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Entity Source Configuration",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"responseMapping": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Response mapping",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"entityName": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"additionalDetails": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"required": [
"entityId",
"entityName"
]
}
},
"draftNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"activeNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"required": [
"serviceEndpoint",
"responseMapping"
]
}
},
"metricSourceConfigurations": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metric Source Configuration",
"type": "object",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"metricProperties": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Property",
"type": "object",
"properties": {
"property": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"propertyDescription": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"property",
"propertyDescription"
]
}
}
},
"required": [
"serviceEndpoint",
"metricProperties"
]
}
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
}
},
"required": [
"name",
"templateStatus"
]
}
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
post /activities
Creates an activity template.
Accepted scopes:
- hybris.template_manage – Required to create an activity template
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Template",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"sourceSystemId": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"type": {
"type": "string",
"maxLength": 32
},
"group": {
"type": "string",
"enum": [
"FACEBOOK",
"TRIGGERBASED",
"PAIDSEARCH",
"EMAIL",
"MOBILE",
"EXTERNAL",
"CUSTOM",
"OTHERS"
]
},
"custom": {
"type": "boolean"
},
"iconUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"backgroundColor": {
"type": "string",
"minLength": 1,
"maxLength": 7
},
"entitySourceConfiguration": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Entity Source Configuration",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"responseMapping": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Response mapping",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"entityName": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"additionalDetails": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"required": [
"entityId",
"entityName"
]
}
},
"draftNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"activeNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"required": [
"serviceEndpoint",
"responseMapping"
]
}
},
"metricSourceConfigurations": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metric Source Configuration",
"type": "object",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"metricProperties": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Property",
"type": "object",
"properties": {
"property": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"propertyDescription": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"property",
"propertyDescription"
]
}
}
},
"required": [
"serviceEndpoint",
"metricProperties"
]
}
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
}
},
"required": [
"name",
"templateStatus"
]
}
Example:
{
"backgroundColor": "#3B5999",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Facebook Campaign",
"entitySourceConfiguration": {
"activeNavigationUrl": "/sap/bc/ui5_ui5/sap/CUAN_NAV_TO/index.html?sap-client=100&sap-language=EN&id=$entityId$#INITIATIVE_TI?CUAN_TI_F_INI_MKT_AUTOMATION",
"draftNavigationUrl": "/sap/bc/ui5_ui5/sap/CUAN_NAV_TO/index.html?sap-client=100&sap-language=EN&id=$entityId$#INITIATIVE_TI?CUAN_TI_F_INI_GENERAL_INFORMATION",
"responseMapping": {
"additionalDetails": {},
"entityId": "InitiativeId",
"entityName": "Name"
},
"serviceEndpoint": "/cjm?campaignType=FB&requestType=CAMPAIGN"
},
"iconUrl": "https://api.beta.yaas.io/hybris/media/v2/public/files/57bbe4f5a4b777001db6966e",
"metricSourceConfigurations": [
{
"metricProperties": [
{
"property": "UniqueImpressions",
"propertyDescription": "No. of people reached"
},
{
"property": "Clicks",
"propertyDescription": "No. of clicks"
}
],
"serviceEndpoint": "/cjm?campaignType=FB&requestType=METRIC"
}
],
"modifiedBy": "System",
"name": "Facebook",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "FB",
"group": "FACEBOOK"
}
HTTP status code 201
The collection resource has been successfully created.
Headers
- Location: required (string)
The Location of the new resource which was created by the request. The value consists of a single absolute URI.
Example:
http://www.hybris.com/items/myItem
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be created due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/activities/{templateId}
This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.
Retrieves an activity template.
Accepted scopes:
- hybris.template_view – Required to retrieve an activity template
Updates an existing activity template.
Accepted scopes:
- hybris.template_manage – Required to update an activity template
Deletes an existing activity template.
Accepted scopes:
- hybris.template_delete – Required to delete an activity template
get /activities/{templateId}
Retrieves an activity template.
Accepted scopes:
- hybris.template_view – Required to retrieve an activity template
URI Parameters
- templateId: required (string)
the id of the template
Example:
template123
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
activity successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Template",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"sourceSystemId": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"type": {
"type": "string",
"maxLength": 32
},
"group": {
"type": "string",
"enum": [
"FACEBOOK",
"TRIGGERBASED",
"PAIDSEARCH",
"EMAIL",
"MOBILE",
"EXTERNAL",
"CUSTOM",
"OTHERS"
]
},
"custom": {
"type": "boolean"
},
"iconUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"backgroundColor": {
"type": "string",
"minLength": 1,
"maxLength": 7
},
"entitySourceConfiguration": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Entity Source Configuration",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"responseMapping": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Response mapping",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"entityName": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"additionalDetails": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"required": [
"entityId",
"entityName"
]
}
},
"draftNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"activeNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"required": [
"serviceEndpoint",
"responseMapping"
]
}
},
"metricSourceConfigurations": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metric Source Configuration",
"type": "object",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"metricProperties": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Property",
"type": "object",
"properties": {
"property": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"propertyDescription": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"property",
"propertyDescription"
]
}
}
},
"required": [
"serviceEndpoint",
"metricProperties"
]
}
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
}
},
"required": [
"name",
"templateStatus"
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
put /activities/{templateId}
Updates an existing activity template.
Accepted scopes:
- hybris.template_manage – Required to update an activity template
URI Parameters
- templateId: required (string)
the id of the template
Example:
template123
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- patch: (boolean)
If true, a partial update will be supported, otherwise the full object replacement will be performed.
Example:
true
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Template",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"sourceSystemId": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"type": {
"type": "string",
"maxLength": 32
},
"group": {
"type": "string",
"enum": [
"FACEBOOK",
"TRIGGERBASED",
"PAIDSEARCH",
"EMAIL",
"MOBILE",
"EXTERNAL",
"CUSTOM",
"OTHERS"
]
},
"custom": {
"type": "boolean"
},
"iconUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"backgroundColor": {
"type": "string",
"minLength": 1,
"maxLength": 7
},
"entitySourceConfiguration": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Entity Source Configuration",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"responseMapping": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Response mapping",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"entityName": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"additionalDetails": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"required": [
"entityId",
"entityName"
]
}
},
"draftNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"activeNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"required": [
"serviceEndpoint",
"responseMapping"
]
}
},
"metricSourceConfigurations": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metric Source Configuration",
"type": "object",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"metricProperties": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Property",
"type": "object",
"properties": {
"property": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"propertyDescription": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"property",
"propertyDescription"
]
}
}
},
"required": [
"serviceEndpoint",
"metricProperties"
]
}
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
}
},
"required": [
"name",
"templateStatus"
]
}
Example:
{
"backgroundColor": "#3B5999",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Facebook Campaign",
"entitySourceConfiguration": {
"activeNavigationUrl": "/sap/bc/ui5_ui5/sap/CUAN_NAV_TO/index.html?sap-client=100&sap-language=EN&id=$entityId$#INITIATIVE_TI?CUAN_TI_F_INI_MKT_AUTOMATION",
"draftNavigationUrl": "/sap/bc/ui5_ui5/sap/CUAN_NAV_TO/index.html?sap-client=100&sap-language=EN&id=$entityId$#INITIATIVE_TI?CUAN_TI_F_INI_GENERAL_INFORMATION",
"responseMapping": {
"additionalDetails": {},
"entityId": "InitiativeId",
"entityName": "Name"
},
"serviceEndpoint": "/cjm?campaignType=FB&requestType=CAMPAIGN"
},
"iconUrl": "https://api.beta.yaas.io/hybris/media/v2/public/files/57bbe4f5a4b777001db6966e",
"metricSourceConfigurations": [
{
"metricProperties": [
{
"property": "UniqueImpressions",
"propertyDescription": "No. of people reached"
},
{
"property": "Clicks",
"propertyDescription": "No. of clicks"
}
],
"serviceEndpoint": "/cjm?campaignType=FB&requestType=METRIC"
}
],
"modifiedBy": "System",
"name": "Facebook",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "FB",
"group": "FACEBOOK"
}
HTTP status code 200
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be updated due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
delete /activities/{templateId}
Deletes an existing activity template.
Accepted scopes:
- hybris.template_delete – Required to delete an activity template
URI Parameters
- templateId: required (string)
the id of the template
Example:
template123
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 204
The resource has been successfully deleted.
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/activities/{templateId}/metricProperties
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
Retrieves a list of activity metric properties.
Accepted scopes:
- hybris.template_view – Required to retrieve activity metric properties
get /activities/{templateId}/metricProperties
Retrieves a list of activity metric properties.
Accepted scopes:
- hybris.template_view – Required to retrieve activity metric properties
URI Parameters
- templateId: required (string)
the id of the template
Example:
template123
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of activity metric",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Property",
"type": "object",
"properties": {
"property": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"propertyDescription": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"property",
"propertyDescription"
]
}
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/import
/import
Imports templates.
Accepted scopes:
- hybris.template_manage – Required to import templates
post /import
Imports templates.
Accepted scopes:
- hybris.template_manage – Required to import templates
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Import Templates",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SOURCE_SYSTEM",
"ACTIVITY_TEMPLATE",
"STAGE_TEMPLATE"
]
},
"stages": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of Stages",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Stage",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"activities": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"minItems": 1
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"custom": {
"type": "boolean"
}
},
"required": [
"name"
]
}
},
"activities": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of Template",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Template",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"sourceSystemId": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"type": {
"type": "string",
"maxLength": 32
},
"group": {
"type": "string",
"enum": [
"FACEBOOK",
"TRIGGERBASED",
"PAIDSEARCH",
"EMAIL",
"MOBILE",
"EXTERNAL",
"CUSTOM",
"OTHERS"
]
},
"custom": {
"type": "boolean"
},
"iconUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"backgroundColor": {
"type": "string",
"minLength": 1,
"maxLength": 7
},
"entitySourceConfiguration": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Entity Source Configuration",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"responseMapping": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Response mapping",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"entityName": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"additionalDetails": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"required": [
"entityId",
"entityName"
]
}
},
"draftNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"activeNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"required": [
"serviceEndpoint",
"responseMapping"
]
}
},
"metricSourceConfigurations": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metric Source Configuration",
"type": "object",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"metricProperties": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Property",
"type": "object",
"properties": {
"property": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"propertyDescription": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"property",
"propertyDescription"
]
}
}
},
"required": [
"serviceEndpoint",
"metricProperties"
]
}
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
}
},
"required": [
"name",
"templateStatus"
]
}
},
"sourceSystems": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of Source Systems",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Source System",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"systemName": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"hostName": {
"type": "string",
"format": "uri"
},
"authInfo": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Authentication Details",
"properties": {
"authType": {
"type": "string",
"enum": [
"OAUTH",
"BASIC"
]
},
"oauth": {
"type": "object",
"oneOf": [
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Client Credentials",
"type": "object",
"properties": {
"clientId": {
"type": "string",
"minLength": 3,
"encrypted": "true"
},
"clientSecret": {
"type": "string",
"minLength": 8,
"encrypted": "true"
}
},
"required": [
"clientId",
"clientSecret"
]
},
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Token",
"type": "object",
"properties": {
"accessToken": {
"type": "string",
"minLength": 8,
"encrypted": "true"
}
},
"required": [
"accessToken"
]
}
]
},
"basic": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Basic Credentials",
"type": "object",
"properties": {
"userName": {
"type": "string",
"minLength": 3,
"encrypted": "true"
},
"password": {
"type": "string",
"minLength": 8,
"encrypted": "true"
}
},
"required": [
"userName",
"password"
]
}
},
"required": [
"authType"
]
},
"systemStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"apiType": {
"type": "string",
"enum": [
"REST",
"ODATA"
]
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
},
"certificate": {
"type": "string",
"minLength": 128,
"description": "Base64 URL encoded string",
"encrypted": "true"
},
"additionalDetails": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"systemName",
"hostName",
"authInfo",
"systemStatus"
]
}
}
}
}
Example:
{
"type": "STAGE_TEMPLATE",
"activities": [
{
"backgroundColor": "#3B5999",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Facebook Campaign",
"iconUrl": "https://api.stage.yaas.io/hybris/media/v2/public/files/5791d08b200682001d2784c7",
"id": "1",
"metricSourceConfigurations": [
{
"metricProperties": [
{
"property": "UniqueImpressions",
"propertyDescription": "No. of people reached"
},
{
"property": "Clicks",
"propertyDescription": "No. of clicks"
}
],
"serviceEndpoint": "/sap/opu/odata/sap/CUAN_CAMPAIGN_SUCCESS_SRV/CampaignAggregatedSuccessDataSet?$filter=CampaignId eq '$entityId$'&$select=UniqueImpressions,Clicks&$format=json"
}
],
"modifiedBy": "System",
"name": "Facebook",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "FB",
"group": "FACEBOOK"
},
{
"backgroundColor": "#093D39",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Google Adwords Campaign",
"iconUrl": "https://api.stage.yaas.io/hybris/media/v2/public/files/5791d0be200682001d2784c8",
"id": "2",
"metricSourceConfigurations": [
{
"metricProperties": [
{
"property": "Impressions",
"propertyDescription": "Impressions"
},
{
"property": "Clicks",
"propertyDescription": "Clicks"
},
{
"property": "ClickThroughRate",
"propertyDescription": "Click through rate"
}
],
"serviceEndpoint": "/sap/opu/odata/sap/CUAN_CAMPAIGN_SUCCESS_SRV/CampaignAggregatedSuccessDataSet?$filter=CampaignId eq '$entityId$'&$select=Impressions,Clicks,ClickThroughRate&$format=json"
}
],
"modifiedBy": "System",
"name": "Google Adwords",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "PS",
"group": "PAIDSEARCH"
},
{
"backgroundColor": "#D50F25",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Enter Description",
"iconUrl": "https://api.stage.yaas.io/hybris/media/v2/public/files/5791d0f9af140b001dac4439",
"id": "5",
"modifiedBy": "System",
"name": "Google+",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "DE2",
"group": "OTHERS"
}
],
"sourceSystems": [
{
"authInfo": {
"authType": "OAUTH",
"oauth": {
"clientId": "CLIENT_ID",
"clientSecret": "CLIENT_SECRET"
}
},
"description": "Hybris Marketing Onpremise system",
"hostName": "https://host:port",
"id": "1",
"systemName": "SAP Hybris Marketing",
"systemStatus": "ACTIVE"
}
],
"stages": [
{
"activities": [
"1",
"2",
"5"
],
"createdBy": "System",
"description": "Engage with customers for increase in revenue",
"id": "2",
"modifiedBy": "System",
"name": "Engage",
"templateStatus": "ACTIVE"
}
]
}
HTTP status code 201
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
/export
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/export
Export templates
Accepted scopes:
- hybris.template_manage - Required to export templates
get /export
Export templates
Accepted scopes:
- hybris.template_manage - Required to export templates
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- ids: (string)
The ID of the template in coma seperated format
Example:
1,2,3
- isStage: (boolean)
ID of stage or activity template
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Export activity collection",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SOURCE_SYSTEM",
"ACTIVITY_TEMPLATE",
"STAGE_TEMPLATE"
]
},
"stages": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of Stages",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Stage",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"activities": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"minItems": 1
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"custom": {
"type": "boolean"
}
},
"required": [
"name"
]
}
},
"activities": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of Template",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Template",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"sourceSystemId": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"type": {
"type": "string",
"maxLength": 32
},
"group": {
"type": "string",
"enum": [
"FACEBOOK",
"TRIGGERBASED",
"PAIDSEARCH",
"EMAIL",
"MOBILE",
"EXTERNAL",
"CUSTOM",
"OTHERS"
]
},
"custom": {
"type": "boolean"
},
"iconUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"backgroundColor": {
"type": "string",
"minLength": 1,
"maxLength": 7
},
"entitySourceConfiguration": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Entity Source Configuration",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"responseMapping": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Response mapping",
"properties": {
"entityId": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"entityName": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"additionalDetails": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"required": [
"entityId",
"entityName"
]
}
},
"draftNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"activeNavigationUrl": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"required": [
"serviceEndpoint",
"responseMapping"
]
}
},
"metricSourceConfigurations": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metric Source Configuration",
"type": "object",
"properties": {
"serviceEndpoint": {
"type": "string",
"minLength": 5,
"maxLength": 2000
},
"metricProperties": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Activity Property",
"type": "object",
"properties": {
"property": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"propertyDescription": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"property",
"propertyDescription"
]
}
}
},
"required": [
"serviceEndpoint",
"metricProperties"
]
}
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
}
},
"required": [
"name",
"templateStatus"
]
}
},
"sourceSystems": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of Source Systems",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Source System",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"systemName": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"hostName": {
"type": "string",
"format": "uri"
},
"authInfo": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Authentication Details",
"properties": {
"authType": {
"type": "string",
"enum": [
"OAUTH",
"BASIC"
]
},
"oauth": {
"type": "object",
"oneOf": [
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Client Credentials",
"type": "object",
"properties": {
"clientId": {
"type": "string",
"minLength": 3,
"encrypted": "true"
},
"clientSecret": {
"type": "string",
"minLength": 8,
"encrypted": "true"
}
},
"required": [
"clientId",
"clientSecret"
]
},
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Token",
"type": "object",
"properties": {
"accessToken": {
"type": "string",
"minLength": 8,
"encrypted": "true"
}
},
"required": [
"accessToken"
]
}
]
},
"basic": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Basic Credentials",
"type": "object",
"properties": {
"userName": {
"type": "string",
"minLength": 3,
"encrypted": "true"
},
"password": {
"type": "string",
"minLength": 8,
"encrypted": "true"
}
},
"required": [
"userName",
"password"
]
}
},
"required": [
"authType"
]
},
"systemStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"apiType": {
"type": "string",
"enum": [
"REST",
"ODATA"
]
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
},
"certificate": {
"type": "string",
"minLength": 128,
"description": "Base64 URL encoded string",
"encrypted": "true"
},
"additionalDetails": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"systemName",
"hostName",
"authInfo",
"systemStatus"
]
}
}
}
}
Example:
{
"activities": [
{
"backgroundColor": "#3B5999",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Facebook Campaign",
"iconUrl": "https://api.stage.yaas.io/hybris/media/v2/public/files/5791d08b200682001d2784c7",
"id": "1",
"metricSourceConfigurations": [
{
"metricProperties": [
{
"property": "UniqueImpressions",
"propertyDescription": "No. of people reached"
},
{
"property": "Clicks",
"propertyDescription": "No. of clicks"
}
],
"serviceEndpoint": "/sap/opu/odata/sap/CUAN_CAMPAIGN_SUCCESS_SRV/CampaignAggregatedSuccessDataSet?$filter=CampaignId eq '$entityId$'&$select=UniqueImpressions,Clicks&$format=json"
}
],
"modifiedBy": "System",
"name": "Facebook",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "FB",
"group": "FACEBOOK"
},
{
"backgroundColor": "#093D39",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Google Adwords Campaign",
"iconUrl": "https://api.stage.yaas.io/hybris/media/v2/public/files/5791d0be200682001d2784c8",
"id": "2",
"metricSourceConfigurations": [
{
"metricProperties": [
{
"property": "Impressions",
"propertyDescription": "Impressions"
},
{
"property": "Clicks",
"propertyDescription": "Clicks"
},
{
"property": "ClickThroughRate",
"propertyDescription": "Click through rate"
}
],
"serviceEndpoint": "/sap/opu/odata/sap/CUAN_CAMPAIGN_SUCCESS_SRV/CampaignAggregatedSuccessDataSet?$filter=CampaignId eq '$entityId$'&$select=Impressions,Clicks,ClickThroughRate&$format=json"
}
],
"modifiedBy": "System",
"name": "Google Adwords",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "PS",
"group": "PAIDSEARCH"
},
{
"backgroundColor": "#0CA3D0",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Email campaign",
"iconUrl": "https://api.stage.yaas.io/hybris/media/v2/public/files/5791d049af140b001dac4438",
"id": "3",
"metricSourceConfigurations": [
{
"metricProperties": [
{
"property": "RateOfUnopenedMessages",
"propertyDescription": "No. of sent vs clicked"
},
{
"property": "NoOfTotalClicks",
"propertyDescription": "No. of clicks"
},
{
"property": "RateOfOpenedMessages",
"propertyDescription": "No. of open rate"
}
],
"serviceEndpoint": "/sap/opu/odata/sap/CUAN_CAMPAIGN_METRICS_SRV/CUAN_CAMPAIGN_METRICS_Q001Results?$filter=CampaignId eq '$entityId$'&$select=RateOfUnopenedMessages,NoOfTotalClicks,RateOfOpenedMessages&$format=json"
}
],
"modifiedBy": "System",
"name": "Email Campaign",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "A1",
"group": "EXTERNAL"
},
{
"backgroundColor": "#74C67C",
"category": "Marketing",
"createdBy": "System",
"custom": false,
"description": "Enter Description",
"iconUrl": "https://api.stage.yaas.io/hybris/media/v2/public/files/5791d171200682001d2784ca",
"id": "4",
"modifiedBy": "System",
"name": "Print Advertisement",
"sourceSystemId": "1",
"templateStatus": "ACTIVE",
"type": "DE1",
"group": "OTHERS"
}
],
"sourceSystems": [
{
"authInfo": {
"authType": "OAUTH",
"oauth": {
"clientId": "CLIENT_ID",
"clientSecret": "CLIENT_SECRET"
}
},
"description": "Hybris Marketing Onpremise system",
"hostName": "https://host:port",
"id": "1",
"systemName": "SAP Hybris Marketing",
"systemStatus": "ACTIVE"
}
],
"stages": [
{
"activities": [
"1",
"2",
"3",
"4"
],
"createdBy": "System",
"description": "run various campaign to acquire customers",
"id": "1",
"modifiedBy": "System",
"name": "Acquire",
"templateStatus": "ACTIVE"
}
],
"type": "STAGE_TEMPLATE"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/stages
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/stages
Retrieves a list of stage templates.
Accepted scopes:
- hybris.template_view – Required to retrieve stage templates
Creates a stage template.
Accepted scopes:
- hybris.template_manage – Required to create a stage template
get /stages
Retrieves a list of stage templates.
Accepted scopes:
- hybris.template_view – Required to retrieve stage templates
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- totalCount: (boolean)
This parameter requests to return the total number of object in the collection fulfilling the criteria together with the response. This number will be returned in the 'hybris-count' header.
Example:
true
- sort: (string)
The list of comma-separated properties used to sort the results. By default, the column values are sorted in ascending order. Can either be in the form of fieldName or fieldName:asc,fieldName:desc. If you want to sort by localized attributes, you must use the following form: fieldName.language or fieldName.language:asc,fieldName.language:desc.
Example:
size,species:asc,weight:desc
- fields: (string)
Contains a comma separated list of field identifiers, by which the fields of the response entities should be filtered by. Empty or not initialized value result in a minimal set of entity fields returned. Non-existing or invalid fields will be ignored.
Example:
code,name,description
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - minimum: 1)
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
Example:
5
- pageSize: (integer - minimum: 1)
The number of records retrieved at one time.
Example:
45
HTTP status code 200
Resource successfully retrieved.
Headers
- hybris-count: (integer)
The total number of objects that fulfil the criteria.
Example:
1000
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Collection of Stages",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Stage",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"activities": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"minItems": 1
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"custom": {
"type": "boolean"
}
},
"required": [
"name"
]
}
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "q",
"message": "not a valid query",
"type": "invalid_query_parameter"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
post /stages
Creates a stage template.
Accepted scopes:
- hybris.template_manage – Required to create a stage template
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Stage",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"activities": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"minItems": 1
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"custom": {
"type": "boolean"
}
},
"required": [
"name"
]
}
Example:
{
"name": "Acquire",
"id": 1,
"description": "run various campaign to acquire customers",
"createdBy": "abc.xyz@sap.com",
"modifiedBy": "System",
"activities": [
"1",
"2",
"3"
],
"templateStatus": "ACTIVE",
"custom": true
}
HTTP status code 201
The collection resource has been successfully created.
Headers
- Location: required (string)
The Location of the new resource which was created by the request. The value consists of a single absolute URI.
Example:
http://www.hybris.com/items/myItem
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be created due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/stages/{templateId}
This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.
Retrieves a stage template.
Accepted scopes:
- hybris.template_view – Required to retrieve a stage template
Updates a stage template.
Accepted scopes:
- hybris.template_manage – Required to update a stage template
Deletes a stage template.
Accepted scopes:
- hybris.template_delete – Required to delete a stage template
get /stages/{templateId}
Retrieves a stage template.
Accepted scopes:
- hybris.template_view – Required to retrieve a stage template
URI Parameters
- templateId: required (string)
the id of the template
Example:
template123
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
stage successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Stage",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"activities": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"minItems": 1
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"custom": {
"type": "boolean"
}
},
"required": [
"name"
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
put /stages/{templateId}
Updates a stage template.
Accepted scopes:
- hybris.template_manage – Required to update a stage template
URI Parameters
- templateId: required (string)
the id of the template
Example:
template123
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- patch: (boolean)
If true, a partial update will be supported, otherwise the full object replacement will be performed.
Example:
true
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Stage",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 250
},
"activities": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 36
},
"minItems": 1
},
"createdBy": {
"type": "string",
"maxLength": 32
},
"modifiedBy": {
"type": "string",
"maxLength": 32
},
"templateStatus": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"custom": {
"type": "boolean"
}
},
"required": [
"name"
]
}
Example:
{
"name": "Acquire",
"id": 1,
"description": "run various campaign to acquire customers",
"createdBy": "abc.xyz@sap.com",
"modifiedBy": "System",
"activities": [
"1",
"2",
"3"
],
"templateStatus": "ACTIVE",
"custom": true
}
HTTP status code 200
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be updated due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
delete /stages/{templateId}
Deletes a stage template.
Accepted scopes:
- hybris.template_delete – Required to delete a stage template
URI Parameters
- templateId: required (string)
the id of the template
Example:
template123
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 204
The resource has been successfully deleted.
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/initialLoad
/initialLoad
Creates default templates on subscription to Customer Journey Manager package.
Accepted scopes:
- hybris.template_manage – Required to create default templates
post /initialLoad
Creates default templates on subscription to Customer Journey Manager package.
Accepted scopes:
- hybris.template_manage – Required to create default templates
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Initial Load",
"type": "object",
"properties": {
"tenant": {
"type": "string",
"minLength": 3,
"maxLength": 32
},
"language": {
"type": "string",
"enum": [
"en",
"de"
]
},
"required": [
"tenant",
"language"
]
}
}
Example:
{
"tenant": "myexampleshop",
"language": "EN"
}
HTTP status code 201
Body
Type: application/json
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
Scopes in Template Service
Scopes prevent unauthorized access to the Template service.
The Template service supports these scopes:
Scope | Description |
---|---|
hybris.template_view | Use this scope to view template. |
hybris.template_manage | Use this scope to create and modify existing template. |
hybris.template_delete | Use this scope to delete existing template. |
Perform Simple CRUD Operations in the Template Service
Manage your Customer Journey Manager Activity Templates and Stage Templates using the Template service. To perform the basic create, retrieve, update, and delete (CRUD) operations that the Template service supports, you must have proper authorization, which requires that the header carries the correct access token. The examples in this tutorial lead you through those operations, showing what you need to provide to the methods, and the responses you receive in return.
clientId = clientIdPlaceholder;
clientSecret = clientSecretPlaceholder;
tenant = projectIdPlaceholder;
client = appIdPlaceholder;
scopesRequired = 'hybris.tenant='+tenant+' hybris.template_view hybris.template_manage hybris.template_delete';
access_token = tokenPlaceholder;
Get an access token
To perform any operation, you need an access token. To obtain an access token, create an API Client for the OAuth2 service:
API.createClient('oAuth2Service',
'/services/oauth2/v1/api.raml');
Now, get the token:
AccessToken = oAuth2Service.token.post({
'client_id' : clientId,
'client_secret': clientSecret,
'grant_type' : 'client_credentials',
'token_type': 'Bearer',
'scope': scopesRequired
});
access_token = AccessToken.body.access_token;
Create an API client for the Template service
API.createClient('Template',
'/services/template/v1/api.raml');
Create a template object
Use the POST method to create a template.
The example below illustrates how you create an activity template.
template_obj = Template.activities.post({
"backgroundColor":"#3B5999",
"category":"Marketing",
"createdBy":"System",
"custom":false,
"description":"Facebook Campaign",
"iconUrl":"https://api.beta.yaas.io/hybris/media/v2/public/files/57bbe4f5a4b777001db6966e",
"name":"Facebook",
"sourceSystemId":"1",
"templateStatus":"ACTIVE",
"type":"FB"
}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
Retrieve the template object
Use the GET method to retrieve the activity template you created.
template_obj = Template.activities.get(null, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
Update the template object
Use the PUT method to update an existing activity template.
id=template_obj.body[0].id;
Template.activities.templateId(id).put({
"backgroundColor":"#3B5999",
"category":"Marketing",
"createdBy":"System",
"custom":false,
"description":"Facebook Campaign created by tutorial",
"iconUrl":"https://api.beta.yaas.io/hybris/media/v2/public/files/57bbe4f5a4b777001db6966e",
"name":"Facebook",
"sourceSystemId":"1",
"templateStatus":"ACTIVE",
"type":"FB"
}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
},
query: {
'partial' : true
}
})
Retrieve the template object and verify update
Get the activity template to ensure that it was updated.
Template.activities.templateId(id).get(null, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
Glossary
Term | Description |
---|---|
Activity | A distinct task done to achieve a business goal. |
Activity Template | Reusable artifact that is used to create an activity in a stage. |
Stage | Collection of activities in a journey, grouped as a logical unit. |
Stage Template | Reusable artifact that is used to create a stage in a journey. |
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.