Overview
Use the Loyalty Email service to create and upload templates for notification emails that you can send by making a simple REST call. You can create and manage email templates for any notification purpose, including:
- Successful registration
- Order confirmation
- Account expiration
- Referral emails
- Tier upgrades
- Offers
The Loyalty Email service can send an email to individual recipients when a corresponding action triggers the service. For example, the system can:
- send a registration notification email when a customer registers for a loyalty program
- email an order confirmation, after a customer submits an order, that lists the purchased items
- send a referral email to a customer's friends when the customer registers for a loyalty program
- send a notification when a customer's account upgrades from the bronze tier to silver
- notify the customer when an account expires
- email product offers to a customer
API Reference
/content
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/content
Gets all Content from Document repository
Accepted scopes:
- 'sap.loyemail_view' - Required to get all Content
Creates a new Content in document repository based on contentType EMAIL and EMAIL_TEMPLATE
Accepted scopes:
- 'sap.loyemail_manage' - Required to post Content
get /content
Gets all Content from Document repository
Accepted scopes:
- 'sap.loyemail_view' - Required to get all Content
Headers
- Accept-Language: (string - repeat: true)
The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.
Example:
pl
- hybris-languages: (string - repeat: true)
Comma separated list of language identifiers for which the localization for an attribute should be provided.
Example:
en,pl,it
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- 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
- sort: (string)
The list of comma-separated values. Property identifiers used to sort the result. By default, the column values are sorted in ascending order. If preceded by a minus sign (-), the values are sorted in descending order.
Example:
name,-description
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:cat breed:"Norwegian Forest Cat" weight:(>3 AND <=5) age:(3,5,6) condition:exists
- 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.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "content",
"type": "object",
"description": "List of content",
"properties": {
"contentItem":{
"type": "object",
"$ref":"contentItem"
},
"contentDetail":{
"type": "object",
"oneOf": [
{"$ref": "emailTemplateHtml"},
{"$ref": "email"},
{ "$ref": "promotion" }
]
}
}
}
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": "Accept-Language",
"message": "not a language",
"type": "invalid_header"
}
]
}
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 /content
Creates a new Content in document repository based on contentType EMAIL and EMAIL_TEMPLATE
Accepted scopes:
- 'sap.loyemail_manage' - Required to post Content
Headers
- Content-Language: (string)
The locale identifier of the language of the updated attribute.
Example:
pl
- 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": "content",
"type": "object",
"description": "List of content",
"properties": {
"contentItem":{
"type": "object",
"$ref":"contentItem"
},
"contentDetail":{
"type": "object",
"oneOf": [
{"$ref": "emailTemplateHtml"},
{"$ref": "email"},
{ "$ref": "promotion" }
]
}
}
}
Example:
{
"contentItem":
{
"name":"test_template",
"contentType": "EMAIL_TEMPLATE",
"description": "test_template",
"contentStatus": "ACTIVE",
"isUsed":"false",
"refContentId":"",
"dateValidFrom": "",
"dateValidTo": "",
"createdBy": "",
"updatedBy": ""
}
,
"contentDetail": {
"file":{"en":"HTML goes here with escape sequences for special character"}
}
},
{
"contentItem":
{
"name":"test_template",
"contentType": "EMAIL",
"description": "test_template",
"isUsed":"false",
"refContentId":"",
"contentStatus": "ACTIVE",
"dateValidFrom": "",
"dateValidTo": "",
"createdBy": "",
"updatedBy": ""
}
,
"contentDetail": {
"subject": {"en":"hello"},
"body": {"en":"hello"},
"emailItem": [
{
"name": "Name of template with business value",
"description": "the purpose of my email template",
"definableAttributes": [
{
"key": "myAttribute",
"mandatory": false
}
]
}
]
}
}
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
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"
}
/content/aggr
Gets average, sum and count aggregation for content
Accepted scopes:
- 'sap.loyemail_view' - Required to gets average, sum and count aggregation for content
get /content/aggr
Gets average, sum and count aggregation for content
Accepted scopes:
- 'sap.loyemail_view' - Required to gets average, sum and count aggregation for content
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
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:cat breed:"Norwegian Forest Cat" weight:(>3 AND <=5) age:(3,5,6) condition:exists
- avg: (string)
List of comma separated attributes for Content
Example:
attribute1, attribute2
- sum: (string)
List of comma separated attributes for Content
Example:
attribute1, attribute2
HTTP status code 200
Headers
- hybris-count: (integer)
The total number of objects that fulfil the criteria.
Example:
1000
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": "totalCount",
"message": "must be a boolean",
"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"
}
/content/{contentId}
This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.
Gets a specific content based on contentId provided.
Accepted scopes:
- 'sap.loyemail_view' - Required to view Content by ID
Updates the specific content in Document Repository based on contentId and contentType
Accepted scopes:
- 'sap.loyadvocacy_manage' - Required to post Content
Deletes a specific content based on contentId provided
Accepted scopes:
- 'sap.loyemail_delete' - Required to delete Content
get /content/{contentId}
Gets a specific content based on contentId provided.
Accepted scopes:
- 'sap.loyemail_view' - Required to view Content by ID
URI Parameters
- contentId: required (string)
Headers
- Accept-Language: (string - repeat: true)
The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.
Example:
pl
- hybris-languages: (string - repeat: true)
Comma separated list of language identifiers for which the localization for an attribute should be provided.
Example:
en,pl,it
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
content successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "content",
"type": "object",
"description": "List of content",
"properties": {
"contentItem":{
"type": "object",
"$ref":"contentItem"
},
"contentDetail":{
"type": "object",
"oneOf": [
{"$ref": "emailTemplateHtml"},
{"$ref": "email"},
{ "$ref": "promotion" }
]
}
}
}
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": "Accept-Language",
"message": "not a language",
"type": "invalid_header"
}
]
}
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 /content/{contentId}
Updates the specific content in Document Repository based on contentId and contentType
Accepted scopes:
- 'sap.loyadvocacy_manage' - Required to post Content
URI Parameters
- contentId: required (string)
Headers
- Content-Language: (string)
The locale identifier of the language of the updated attribute.
Example:
pl
- 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": "content",
"type": "object",
"description": "List of content",
"properties": {
"contentItem":{
"type": "object",
"$ref":"contentItem"
},
"contentDetail":{
"type": "object",
"oneOf": [
{"$ref": "emailTemplateHtml"},
{"$ref": "email"},
{ "$ref": "promotion" }
]
}
}
}
HTTP status code 200
The resource has been successfully updated
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 /content/{contentId}
Deletes a specific content based on contentId provided
Accepted scopes:
- 'sap.loyemail_delete' - Required to delete Content
URI Parameters
- contentId: required (string)
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"
}
/send
This resourceType defines the POST method and their responses for a collection resource.
/send
Sends email to user. If it fails, it will create a PubSub topic sendEmailCreationFailed for fault tolerance
Accepted scopes:
- 'sap.loyemail_manage' - Required to post Content
post /send
Sends email to user. If it fails, it will create a PubSub topic sendEmailCreationFailed for fault tolerance
Accepted scopes:
- 'sap.loyemail_manage' - Required to post Content
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" : "Mail",
"description" : "A descriptor for an email to be sent, having typical address fields. Also specifies a Velocity template to be used for rendering of the email's contents, as well as attribute values to be passed to the template.",
"type" : "object",
"properties" : {
"toAddress" : {
"description" : "The receiver's email address.",
"type" : "string",
"format" : "email",
"maxLength" : 200
},
"toName" : {
"description" : "The receiver's name.",
"type" : "string",
"minLength" : 1,
"pattern" : "^[\\p{L}0-9\\s]*$",
"maxLength" : 100
},
"fromAddress" : {
"description" : "The sender's email address.",
"type" : "string",
"format" : "email",
"maxLength" : 200
},
"fromName" : {
"description" : "The sender's full name.",
"type" : "string",
"minLength" : 1,
"pattern" : "^[\\p{L}0-9\\s]*$",
"maxLength" : 100
},
"replyToAddress" : {
"description" : "Address that should be used to reply to the email.",
"type" : "string",
"format" : "email",
"maxLength" : 200
},
"replyToName" : {
"description" : "Full name that should be used to reply to the email.",
"type" : "string",
"minLength" : 1,
"pattern" : "^[\\p{L}0-9\\s]*$",
"maxLength" : 100
},
"templateCode" : {
"description" : "The code of the template.",
"type" : "string",
"pattern" : "^[a-zA-Z0-9][a-zA-Z0-9-_.|]*$",
"maxLength" : 36,
"minLength" : 1
},
"templateOwner" : {
"description" : "The name of the client that owns the template.",
"type" : "string",
"pattern" : "^[a-z][a-z0-9]{2,15}[.][a-z][a-z0-9-]{0,30}[a-z0-9]$",
"maxLength" : 49,
"minLength" : 6
},
"locale" : {
"description" : "Locale to use for mail rendering.",
"type" : "string",
"pattern" : "^|[a-zA-Z]{2}|[a-zA-Z]{2}_[a-zA-Z]{2}$"
},
"attributes" : {
"description" : "Attribute values passed as context variables to the Velocity template.",
"type" : "array",
"items" : {
"$schema" : "http://json-schema.org/draft-04/schema#",
"title" : "Template Attribute",
"description" : "Template attribute used as context variable for Velocity rendering of the related template.",
"type" : "object",
"properties" : {
"key" : {
"description" : "The unique key of the template attribute.",
"type" : "string",
"pattern" : "^[a-zA-Z][a-zA-Z0-9_-]*$",
"maxLength" : 36,
"minLength" : 1
},
"value" : {
"description" : "The value for the template attribute.",
"oneOf" : [ {
"type" : "number"
}, {
"type" : "boolean"
}, {
"type" : "array"
}, {
"type" : "object",
"additionalProperties" : true
}, {
"type" : "string"
} ],
"maxLength" : 10000
}
},
"required" : [ "key", "value" ]
}
}
},
"required" : [ "toAddress", "fromAddress", "templateCode","templateOwner" ]
}
Example:
{
"toAddress": "John.Smith@yaas.io",
"fromAddress": "noreply@yaas.io",
"toName": "John Smith",
"templateCode": "invite",
"templateOwner": "order",
"locale": "en",
"attributes": [
{
"key": "inviteLink",
"value": "http://www.hybris.com"
}
]
}
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
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"
}
/initialLoad
This resourceType defines the POST method and their responses for a collection resource.
/initialLoad
Upload standard system Email Template for a tenant. Use this as a fall back option only when automatic creation of default system Email Template fails for the tenant.
Accepted scopes:
- 'sap.loyemail_manage' - Required to post initailLoad
post /initialLoad
Upload standard system Email Template for a tenant. Use this as a fall back option only when automatic creation of default system Email Template fails for the tenant.
Accepted scopes:
- 'sap.loyemail_manage' - Required to post initailLoad
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" : "Read response",
"description" : "Models response of events read request",
"type" : "object",
"properties" : {
"events" : {
"description" : "Events which were read",
"type" : "array",
"minItems" : 1,
"items" : {
"type" : "object",
"properties" : {
"id" : {
"description" : "type 4 (pseudo randomly generated) UUID of the event",
"type" : "string"
},
"createdAt" : {
"description" : "the number of milliseconds since January 1, 1970, 00:00:00 GMT until date when event was received",
"type" : "number"
},
"tenant" : {
"description" : "tenant on behalf of which this event was published",
"type" : "string"
},
"sourceClient" : {
"description" : "client that published the event, e.g. 'hybris.order' if publisher is the order service",
"type" : "string"
},
"eventType" : {
"description" : "type of this event",
"type" : "string"
},
"payload" : {
"description" : "string containing event details; typically it's a JSON document string",
"type" : "string"
},
"metadata" : {
"description" : "Optional metadata describing the event. Might contain schema or version information. Has to contain string values only. The total metadata length including keys and values must not exceed 10k characters.",
"type" : "object",
"properties" : {
"schema":{
"description": "Schema location",
"type": "string"
}
}
}
},
"required" : [ "id", "createdAt", "tenant", "sourceClient", "eventType", "payload" ]
}
},
"token" : {
"description" : "encrypted token bearing info on events to be committed; will not be included in responses to auto committed read requests",
"type" : "string"
}
},
"required" : [ "events" ]
}
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
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"
}
/messagelogs
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/messagelogs
Gets all email message log files when an email is sent
Creates a new email message log file when an email is sent
get /messagelogs
Gets all email message log files when an email is sent
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- 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
- sort: (string)
The list of comma-separated values. Property identifiers used to sort the result. By default, the column values are sorted in ascending order. If preceded by a minus sign (-), the values are sorted in descending order.
Example:
name,-description
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:cat breed:"Norwegian Forest Cat" weight:(>3 AND <=5) age:(3,5,6) condition:exists
- 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.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title":"Collection of Email Message Log",
"type":"array",
"items":
{
"$ref":"messagelog"
}
}
Example:
{
"description": "New Email Message Log",
"messageId": "eff01ccfa2294a87b3e6f8bfb0aa8c99",
"createdBy": "SYSTEM",
"sentOn": 1409472603511,
"memberId": "0166bbf70336453bb1753754348bf400",
"refId": "0000-0000-0000-0000",
"updatedBy": "SYSTEM",
"messageType": "Email",
"scheduledOn": "1409472603511",
"responseDate":"1409472603511",
"responseStatus":"READ",
"messageStatus": "ACTIVE"
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
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 /messagelogs
Creates a new email message log file when an email is sent
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":"Product",
"type":"object",
"properties":{
"messageId":{
"type":"string",
"maxLength":32
},
"messageType":{
"type":"string",
"maxLength":32
},
"scheduledOn":{
"type":"string",
"format":"date-time"
},
"sentOn":{
"type":"string",
"format":"date-time"
},
"memberId":{
"type":"string",
"maxLength":32
},
"refId":{
"type":"string",
"maxLength":32
},
"description":{
"type":"string",
"maxLength":32
},
"createdBy":{
"type":"string",
"maxLength":32
},
"updatedBy":{
"type":"string",
"maxLength":32
},
"responseDate":{
"type":"string",
"format":"date-time"
},
"responseStatus":{
"enum":[
"RECIEVED",
"READ",
"ACTIVE"
],
"default":"ACTIVE"
},
"messageStatus":{
"enum":[
"ACTIVE",
"INACTIVE",
"FINISHED",
"LOCKED",
"RELEASED",
"ACTIVE"
],
"default":"ACTIVE"
}
},
"required":[
"messageType",
"memberId",
"createdBy",
"messageStatus"
]
}
Example:
{
"description": "New Email Message Log",
"messageId": "eff01ccfa2294a87b3e6f8bfb0aa8c99",
"createdBy": "SYSTEM",
"sentOn": 1409472603511,
"memberId": "0166bbf70336453bb1753754348bf400",
"refId": "0000-0000-0000-0000",
"updatedBy": "SYSTEM",
"messageType": "Email",
"scheduledOn": "1409472603511",
"responseDate":"1409472603511",
"responseStatus":"READ",
"messageStatus": "ACTIVE"
}
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
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"
}
/messagelogs/{messagelogId}
This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.
Gets a specific email message log file based on the id provided
Updates a specific email message log file based on the id provided
Deletes a specific email message log file based on the id provided
get /messagelogs/{messagelogId}
Gets a specific email message log file based on the id provided
URI Parameters
- messagelogId: required (string)
the id of the Email Message Log to work on
Example:
784hti8ey
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
messagelog successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema":"http://json-schema.org/draft-04/schema#",
"title":"Product",
"type":"object",
"properties":{
"messageId":{
"type":"string",
"maxLength":32
},
"messageType":{
"type":"string",
"maxLength":32
},
"scheduledOn":{
"type":"string",
"format":"date-time"
},
"sentOn":{
"type":"string",
"format":"date-time"
},
"memberId":{
"type":"string",
"maxLength":32
},
"refId":{
"type":"string",
"maxLength":32
},
"description":{
"type":"string",
"maxLength":32
},
"createdBy":{
"type":"string",
"maxLength":32
},
"updatedBy":{
"type":"string",
"maxLength":32
},
"responseDate":{
"type":"string",
"format":"date-time"
},
"responseStatus":{
"enum":[
"RECIEVED",
"READ",
"ACTIVE"
],
"default":"ACTIVE"
},
"messageStatus":{
"enum":[
"ACTIVE",
"INACTIVE",
"FINISHED",
"LOCKED",
"RELEASED",
"ACTIVE"
],
"default":"ACTIVE"
}
},
"required":[
"messageType",
"memberId",
"createdBy",
"messageStatus"
]
}
Example:
{
"description": "New Email Message Log",
"messageId": "eff01ccfa2294a87b3e6f8bfb0aa8c99",
"createdBy": "SYSTEM",
"sentOn": 1409472603511,
"memberId": "0166bbf70336453bb1753754348bf400",
"refId": "0000-0000-0000-0000",
"updatedBy": "SYSTEM",
"messageType": "Email",
"scheduledOn": "1409472603511",
"responseDate":"1409472603511",
"responseStatus":"READ",
"messageStatus": "ACTIVE"
}
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 /messagelogs/{messagelogId}
Updates a specific email message log file based on the id provided
URI Parameters
- messagelogId: required (string)
the id of the Email Message Log to work on
Example:
784hti8ey
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":"Product",
"type":"object",
"properties":{
"messageId":{
"type":"string",
"maxLength":32
},
"messageType":{
"type":"string",
"maxLength":32
},
"scheduledOn":{
"type":"string",
"format":"date-time"
},
"sentOn":{
"type":"string",
"format":"date-time"
},
"memberId":{
"type":"string",
"maxLength":32
},
"refId":{
"type":"string",
"maxLength":32
},
"description":{
"type":"string",
"maxLength":32
},
"createdBy":{
"type":"string",
"maxLength":32
},
"updatedBy":{
"type":"string",
"maxLength":32
},
"responseDate":{
"type":"string",
"format":"date-time"
},
"responseStatus":{
"enum":[
"RECIEVED",
"READ",
"ACTIVE"
],
"default":"ACTIVE"
},
"messageStatus":{
"enum":[
"ACTIVE",
"INACTIVE",
"FINISHED",
"LOCKED",
"RELEASED",
"ACTIVE"
],
"default":"ACTIVE"
}
},
"required":[
"messageType",
"memberId",
"createdBy",
"messageStatus"
]
}
Example:
{
"description": "New Email Message Log",
"messageId": "eff01ccfa2294a87b3e6f8bfb0aa8c99",
"createdBy": "SYSTEM",
"sentOn": 1409472603511,
"memberId": "0166bbf70336453bb1753754348bf400",
"refId": "0000-0000-0000-0000",
"updatedBy": "SYSTEM",
"messageType": "Email",
"scheduledOn": "1409472603511",
"responseDate":"1409472603511",
"responseStatus":"READ",
"messageStatus": "ACTIVE"
}
HTTP status code 200
The resource has been successfully updated
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 /messagelogs/{messagelogId}
Deletes a specific email message log file based on the id provided
URI Parameters
- messagelogId: required (string)
the id of the Email Message Log to work on
Example:
784hti8ey
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"
}
/secureMediaUri/{mediaId}
This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.
/secureMediaUri/{mediaId}
Do Not Use Accepted scopes:
- 'sap.loycard_view' - Required to get secureMediaUri
Updates a single secureMediaUri entity.
Deletes a single secureMediaUri entity.
get /secureMediaUri/{mediaId}
Do Not Use Accepted scopes:
- 'sap.loycard_view' - Required to get secureMediaUri
URI Parameters
- mediaId: required (string)
Id of the media
Example:
325436retrfdtr4e5
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
secureMediaUri successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"type" : "object",
"properties" : {
"link" : {
"type" : "string"
}
},
"required" : [ "link" ]
}
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 /secureMediaUri/{mediaId}
Updates a single secureMediaUri entity.
URI Parameters
- mediaId: required (string)
Id of the media
Example:
325436retrfdtr4e5
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#",
"type" : "object",
"properties" : {
"link" : {
"type" : "string"
}
},
"required" : [ "link" ]
}
HTTP status code 200
The resource has been successfully updated
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 /secureMediaUri/{mediaId}
Deletes a single secureMediaUri entity.
URI Parameters
- mediaId: required (string)
Id of the media
Example:
325436retrfdtr4e5
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"
}
/migration
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/migration
Get Content
Accepted scopes:
- 'sap.loyemail_view' - Required to get all Content
get /migration
Get Content
Accepted scopes:
- 'sap.loyemail_view' - Required to get all Content
Headers
- Accept-Language: (string - repeat: true)
The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.
Example:
pl
- hybris-languages: (string - repeat: true)
Comma separated list of language identifiers for which the localization for an attribute should be provided.
Example:
en,pl,it
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- 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
- sort: (string)
The list of comma-separated values. Property identifiers used to sort the result. By default, the column values are sorted in ascending order. If preceded by a minus sign (-), the values are sorted in descending order.
Example:
name,-description
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:cat breed:"Norwegian Forest Cat" weight:(>3 AND <=5) age:(3,5,6) condition:exists
- 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.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Migration",
"type": "object",
"description": "Create default data",
"properties": {
}
}
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": "Accept-Language",
"message": "not a language",
"type": "invalid_header"
}
]
}
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"
}
/loyEmailConfiguration
This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.
/loyEmailConfiguration
Gets all Loyalty Email Configuration
Accepted scopes:
- 'sap.loyemail_view' - Required to get all Loyalty Email Configuration
Creates a new Loyalty Email Configuration
Accepted scopes:
- 'sap.loyemail_manage' - Required to post Loyalty Email Configuration
get /loyEmailConfiguration
Gets all Loyalty Email Configuration
Accepted scopes:
- 'sap.loyemail_view' - Required to get all Loyalty Email Configuration
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- 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
- sort: (string)
The list of comma-separated values. Property identifiers used to sort the result. By default, the column values are sorted in ascending order. If preceded by a minus sign (-), the values are sorted in descending order.
Example:
name,-description
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:cat breed:"Norwegian Forest Cat" weight:(>3 AND <=5) age:(3,5,6) condition:exists
- 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.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title":"Loyalty Email Configuration",
"type" : "object",
"properties":
{
"emailConfigId":
{
"type":"string",
"maxLength": 32
},
"emailProvider":
{
"type":"string",
"enum":["YAAS", "MSEMAIL"]
},
"authorization":{
"type":"object",
"oneOf":[
{
"$ref":"basic"
},
{
"$ref":"apiBased"
}
]
}
},
"required":["emailProvider"]
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
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 /loyEmailConfiguration
Creates a new Loyalty Email Configuration
Accepted scopes:
- 'sap.loyemail_manage' - Required to post Loyalty Email Configuration
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":"Loyalty Email Configuration",
"type" : "object",
"properties":
{
"emailConfigId":
{
"type":"string",
"maxLength": 32
},
"emailProvider":
{
"type":"string",
"enum":["YAAS", "MSEMAIL"]
},
"authorization":{
"type":"object",
"oneOf":[
{
"$ref":"basic"
},
{
"$ref":"apiBased"
}
]
}
},
"required":["emailProvider"]
}
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
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"
}
/loyEmailConfiguration/{emailConfigId}
This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.
Gets a specific Loyalty Email Configuration based on emailConfigId provided.
Accepted scopes:
- 'sap.loyemail_view' - Required to view Content by ID
Updates the specific Loyalty Email Configuration in Document Repository based on emailConfigId
Deletes a specific Loyalty Email Configuration based on emailConfigId provided
get /loyEmailConfiguration/{emailConfigId}
Gets a specific Loyalty Email Configuration based on emailConfigId provided.
Accepted scopes:
- 'sap.loyemail_view' - Required to view Content by ID
URI Parameters
- emailConfigId: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
loyEmailConfiguration successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title":"Loyalty Email Configuration",
"type" : "object",
"properties":
{
"emailConfigId":
{
"type":"string",
"maxLength": 32
},
"emailProvider":
{
"type":"string",
"enum":["YAAS", "MSEMAIL"]
},
"authorization":{
"type":"object",
"oneOf":[
{
"$ref":"basic"
},
{
"$ref":"apiBased"
}
]
}
},
"required":["emailProvider"]
}
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 /loyEmailConfiguration/{emailConfigId}
Updates the specific Loyalty Email Configuration in Document Repository based on emailConfigId
URI Parameters
- emailConfigId: required (string)
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":"Loyalty Email Configuration",
"type" : "object",
"properties":
{
"emailConfigId":
{
"type":"string",
"maxLength": 32
},
"emailProvider":
{
"type":"string",
"enum":["YAAS", "MSEMAIL"]
},
"authorization":{
"type":"object",
"oneOf":[
{
"$ref":"basic"
},
{
"$ref":"apiBased"
}
]
}
},
"required":["emailProvider"]
}
HTTP status code 200
The resource has been successfully updated
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 /loyEmailConfiguration/{emailConfigId}
Deletes a specific Loyalty Email Configuration based on emailConfigId provided
URI Parameters
- emailConfigId: required (string)
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"
}
Error Types
For more information about error codes, see the detailed error description for each API operation in the API Reference. You can also check the standard error codes in the API best practices.
Scopes
Scopes are strings that that you can use to specify the type of access you need to resources and operations in the Loyalty Email service.
The table shows the scopes that the Loyalty Email service supports. It also names the tutorials that contain examples using the proper scopes.
Scope | Description |
---|---|
sap.loyemail_view | Use this scope to view all emails and email templates for the Loyalty Email service. |
sap.loyemail_manage | Use this scope to create and update emails and email templates. |
sap.loyemail_delete | Use this scope to delete emails and email templates. |
Perform Simple CRUD Operations on Content Object
Introduction
You can manage emails and email templates using the Loyalty Email service. This tutorial describes how to manage emails and templates using the basic create, read, update, and delete operations.
assert = chai.assert;
clientId = clientIdPlaceholder;
clientSecret = clientSecretPlaceholder;
tenant = projectIdPlaceholder;
client = appIdPlaceholder;
scopesRequired = 'hybris.tenant='+tenant+' sap.loyemail_view sap.loyemail_manage sap.loyemail_delete';
token = tokenPlaceholder;
Get an access token
To perform CRUD operations, you must have proper authorization, which requires a valid access token in the request header. 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 Loyalty Email service
API.createClient('contentService',
'/services/loyaltyemail/v1/api.raml');
Create an email template object
content_postResponse = contentService.content.post({
"contentItem":{
"contentType":"EMAIL_TEMPLATE",
"description":"TurorialCheckEmail",
"contentStatus":"ACTIVE",
"contentId":"",
"createdBy":null,
"updatedBy":null,
"name":"TurorialCheckEmail",
"isUsed":false,
"refContentId":""
},
"contentDetail":{
"file":{
"en":"\n\n\t<div align=\"center\" style=\"border: none;\">\n\ttest template \n\t</div>\t\t\n\n"
}
}
}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
Get the email template content ID
locationRef = content_postResponse.headers.location.toString();
contentId = locationRef.substring(locationRef.lastIndexOf('/')+1,locationRef.length);
Retrieve the email template object
getByContentIdRes = contentService.content.contentId(contentId).get(null, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
Update the email template object
putResponse = contentService.content.contentId(contentId).put({
"contentItem":{
"contentType":"EMAIL_TEMPLATE",
"description":"TurorialCheck",
"contentStatus":"ACTIVE",
"contentId":"",
"name":"TurorialCheck",
"isUsed":false,
"refContentId":""
},
"contentDetail":{
"file":{
"en":"\n\n\t<div align=\"center\" style=\"border: none;\">\n\ttest template \n\t</div>\t\t\n\n"
}
}
}
, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
})
Create an email object
contentEmail_Response = contentService.content.post({
"contentItem":{
"contentStatus":"ACTIVE",
"contentType":"EMAIL",
"name":"apinote1",
"dateValidFrom":"",
"dateValidTo":"",
"createdBy":"null",
"updatedBy":"null",
"isUsed":false,
"refContentId":contentId
},
"contentDetail":{
"emailItem":[
{
"name":"apinote1",
"definableAttributes":[
]
}
],
"body":{
"en":"\n\n	<div align=\"center\" style=\"border: none;\">\n	test template \n	</div>		\n\n"
},
"subject":{
"en":"apinote1"
}
}
}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
Get an email ID
locationRefEmail = contentEmail_Response.headers.location.toString();
emailContentId = locationRefEmail.substring(locationRefEmail.lastIndexOf('/')+1,locationRefEmail.length);
Retrieve the email object
getByContentIdEmailRes = contentService.content.contentId(emailContentId).get(null, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
Get an email name from the email response object
emailName = getByContentIdEmailRes.body.contentItem.name
Send an email to a recipient
sendEmail_Response = contentService.send.post({
"toAddress":"xyz@gmail.com",
"fromAddress":"noreply@yaas.io",
"templateCode":emailName,
"templateOwner":"dummy.dummy",
"locale":"en"
}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
Delete an email object
deleteEmailResponse = contentService.content.contentId(emailContentId).delete(null, {
headers: {
'Authorization': 'Bearer ' + access_token,
}
})
assert.equal(deleteEmailResponse.status, 204);
Delete an email template object
deleteEmailTemplateResponse = contentService.content.contentId(contentId).delete(null, {
headers: {
'Authorization': 'Bearer ' + access_token,
}
})
assert.equal(deleteEmailTemplateResponse.status, 204);
Get an email template by ID after deleting
getETbyIdRes = contentService.content.contentId(contentId).get(null, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
assert.equal(getETbyIdRes.status, 404);
Get an email by ID after deleting
getEmailbyIdRes = contentService.content.contentId(emailContentId).get(null, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-type' : 'application/json'
}
}
)
assert.equal(getEmailbyIdRes.status, 404);
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.