Overview
This service allows customers to create service tickets to report issues to a customer service agent for resolution. You can configure service ticket types for the different services you provide, such as requests for repairs, requests for servicing, and general inquiries.
When you create a service ticket, you can specify the information to collect in the tickets you customers submit. For example:
- A short description of the customer's issue or request
- The customer for whom the service ticket was opened
- The product that the request or issue relates to
Manage the service ticket resolution process with features such as:
- Built-in status management
- A transcript concept that allows customer service agents to enter additional information about the processing status
- Automatic calculation of processing times
For agent access, see the API documentation for the Service Tickets service.
API Reference
/{tenant}/serviceTickets
Service tickets
/{tenant}/serviceTickets
Retrieve a collection of service tickets for a customer.
If no query is specified, all service tickets for the customer are returned in the result collection. To filter the result collection, use the query parameter q
. To filter the result collection, use the query parameter q
. The service ticket service uses the same query syntax as the Document service. For more information on Service Tickets, see the Service Ticket documentation.
You can sort the result collection using the query parameter sort
.
Only persisted fields can be used for querying and sorting. The following fields are transient and cannot be used for formulating queries or sorting the result collection:
- Type description (
typeDescription
) - Classification description (
classification.description
) - Priority description (
priorityDescription
) - Status description (
statusDescription
) - Customer attributes: 5.1. Customer e-mail address (
customerEmail
) 5.2. Customer title (customerTitle
) 5.3. Customer first name (customerFirstName
) 5.4. Customer last name (customerLastName
) - Product attributes: 6.1. Product name (
productName
)
If you would like to query or sort by those attributes, use the following persisted attributes instead:
- Type (
type
) - Classification (
classification
) - Priority (
priority
) - Status (
status
) - Product id (
productId
)
The GET
method is paged. Use the query parameters pageNumber
to control which page is retrieved. Use the query parameter pageSize
to control the number of service tickets per page. The maximum pageSize
supported is 64
.
Create a new service ticket for the customer.
The id
of the service ticket is automatically generated by the system. It is returned in the field id
in the response body. It is also part of the response header Location
.
Upon successful creation of the service ticket, the PubSub event serviceticket-created
is raised.
get /{tenant}/serviceTickets
Retrieve a collection of service tickets for a customer.
If no query is specified, all service tickets for the customer are returned in the result collection. To filter the result collection, use the query parameter q
. To filter the result collection, use the query parameter q
. The service ticket service uses the same query syntax as the Document service. For more information on Service Tickets, see the Service Ticket documentation.
You can sort the result collection using the query parameter sort
.
Only persisted fields can be used for querying and sorting. The following fields are transient and cannot be used for formulating queries or sorting the result collection:
- Type description (
typeDescription
) - Classification description (
classification.description
) - Priority description (
priorityDescription
) - Status description (
statusDescription
) - Customer attributes: 5.1. Customer e-mail address (
customerEmail
) 5.2. Customer title (customerTitle
) 5.3. Customer first name (customerFirstName
) 5.4. Customer last name (customerLastName
) - Product attributes: 6.1. Product name (
productName
)
If you would like to query or sort by those attributes, use the following persisted attributes instead:
- Type (
type
) - Classification (
classification
) - Priority (
priority
) - Status (
status
) - Product id (
productId
)
The GET
method is paged. Use the query parameters pageNumber
to control which page is retrieved. Use the query parameter pageSize
to control the number of service tickets per page. The maximum pageSize
supported is 64
.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
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 properties used to sort the results. By default, the column values are sorted in ascending order. Can either be in the form of fieldName or fieldName:asc,fieldName:desc. If you want to sort by localized attributes, you must use the following form: fieldName.language or fieldName.language:asc,fieldName.language:desc.
Example:
size,species:asc,weight:desc
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - default: 1 - 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:
1
- pageSize: (integer - default: 16 - minimum: 1)
The number of documents being retrieved on the page.
Example:
16
HTTP status code 200
Request was successful.
Headers
- Link: required (string - repeat: true)
Link to the current page, the next page and the previous page. Marked accordingly with rel self, rel next and rel prev. The syntax must be conform to RFC-5988. The link to the current page (self) is required and must be provided always. The link to the next page (next) is optional. If not present, the next page is not available, as the current page is the last page of the result. The link to the previous page (prev) is optional. If not present, the previous page is not available, as the current page is the first page of the result.
Example:
<http://sample.com?pageNumber=2&pageSize=10>; rel="self", <http://sample.com?pageNumber=3&pageSize=10>; rel="next"
Body
Type: application/json
Example:
[
{
"id": "55473b487deefe21340ae74f",
"ticketNumber": "1000000001",
"type": "SERVICE_REQUEST",
"typeDescription": "Service Request",
"priority": "HIGH",
"priorityDescription": "High",
"classification": [
{
"classification": "BASIC_TECHNICAL_SKILLS",
"description": "Basic technical skills required"
}
],
"status": "IN_PROCESS",
"statusDescription": "In Process",
"dueAt": "2015-06-30T23:59:59.999+0000",
"processingTime": 432000,
"customerId": "C4327014826",
"customerTitle": "Mr.",
"customerFirstName": "John",
"customerLastName": "Test",
"customerEmail": "johntest@hybristest.com",
"productId": "55db7ada164e46eedf355c54",
"productName": "Test Product",
"shortDescription": "Request for regular maintenance",
"assignedTo": "mandy@hybristest.com",
"createdBy": "mandy@hybristest.com",
"modifiedBy": "mandy@hybristest.com",
"metadata": {
"createdAt": "2015-06-19T12:28:07.000+0000",
"modifiedAt": "2015-06-19T12:28:07.000+0000",
"version": 1
}
}
]
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"
}
post /{tenant}/serviceTickets
Create a new service ticket for the customer.
The id
of the service ticket is automatically generated by the system. It is returned in the field id
in the response body. It is also part of the response header Location
.
Upon successful creation of the service ticket, the PubSub event serviceticket-created
is raised.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
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": "Service ticket schema for use with POST",
"type": "object",
"properties": {
"id": {
"description": "The identifier of the created resource",
"type": "string"
},
"type": {
"type": "string",
"description": "Service ticket type"
},
"status": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Enumeration of supported service ticket statuses",
"enum": [
"OPEN",
"CONFIRMED"
],
"description": "Service ticket status"
},
"customerId": {
"type": "string",
"description": "Id of the customer the service ticket was opened for"
},
"productId": {
"type": "string",
"description": "Id of the product the ticket was opened for"
},
"shortDescription": {
"type": "string",
"description": "Short description of the ticket"
},
"createdBy": {
"type": "User who created the ticket"
},
"modifiedBy": {
"type": "User who last modified the ticket"
},
"metadata": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Document repository meta data schema",
"type": "object",
"additionalProperties": {
"anyOf": [
{
"description": "Properties of service ticket you want to store."
}
]
},
"properties": {
"version": {
"description": "Document repository version number",
"type": "integer"
},
"createdAt": {
"description": "Time the document was created at",
"type": "string",
"format": "date-time"
},
"modifiedAt": {
"description": "Time the document was last modified at",
"type": "string",
"format": "date-time"
},
"mixins": {
"description": "Mixins object. Keys in mixins can only be constructed from numbers, letters, hyphens and underscores.",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9_-]*$": {
"anyOf": [
{
"description": "URI for mixin.",
"type": "string"
},
{
"description": "Inline mixin.",
"type": "object"
}
]
}
}
}
},
"required": [
"version"
]
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the service ticket. Each attribute is a separate mixin.",
"additionalProperties": true
}
},
"required": [
"type",
"customerId"
]
}
Example:
{
"id": "55473b487deefe21340ae74f",
"type": "SERVICE_REQUEST",
"typeDescription": "Service Request",
"status": "IN_PROCESS",
"statusDescription": "In Process",
"customerId": "C4327014826",
"customerTitle": "Mr.",
"customerFirstName": "John",
"customerLastName": "Test",
"customerEmail": "johntest@hybristest.com",
"productId": "55db7ada164e46eedf355c54",
"productName": "Test Product",
"shortDescription": "Request for regular maintenance",
"createdBy": "mandy@hybristest.com",
"modifiedBy": "mandy@hybristest.com",
"metadata": {
"createdAt": "2015-06-19T12:28:07.000+0000",
"modifiedAt": "2015-06-19T12:28:07.000+0000",
"version": 1
}
}
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"
}
/{tenant}/serviceTickets/{serviceTicketId}
Service ticket
Retrieves a single service ticket. The service ticket to be retrieved is identified by its id
.
Updates a single service ticket either to OPEN or CONFIRMED
The service ticket to be updated is identified by its id
.
Note that creating a service ticket with a caller-specified id
is not allowed. Use the POST
method at the endpoint /{tenant}/serviceTickets
to create service tickets and have their id
s generated by the system.
Upon successful update of the service ticket, the PubSub event serviceticket-updated
is raised.
Deletes a single serviceTicket entity.
get /{tenant}/serviceTickets/{serviceTicketId}
Retrieves a single service ticket. The service ticket to be retrieved is identified by its id
.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
- serviceTicketId: required (string)
the id of the Service Ticket
Example:
1000000001
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
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
HTTP status code 200
serviceTicket successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service ticket schema for use with POST",
"type": "object",
"properties": {
"id": {
"description": "The identifier of the created resource",
"type": "string"
},
"type": {
"type": "string",
"description": "Service ticket type"
},
"status": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Enumeration of supported service ticket statuses",
"enum": [
"OPEN",
"CONFIRMED"
],
"description": "Service ticket status"
},
"customerId": {
"type": "string",
"description": "Id of the customer the service ticket was opened for"
},
"productId": {
"type": "string",
"description": "Id of the product the ticket was opened for"
},
"shortDescription": {
"type": "string",
"description": "Short description of the ticket"
},
"createdBy": {
"type": "User who created the ticket"
},
"modifiedBy": {
"type": "User who last modified the ticket"
},
"metadata": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Document repository meta data schema",
"type": "object",
"additionalProperties": {
"anyOf": [
{
"description": "Properties of service ticket you want to store."
}
]
},
"properties": {
"version": {
"description": "Document repository version number",
"type": "integer"
},
"createdAt": {
"description": "Time the document was created at",
"type": "string",
"format": "date-time"
},
"modifiedAt": {
"description": "Time the document was last modified at",
"type": "string",
"format": "date-time"
},
"mixins": {
"description": "Mixins object. Keys in mixins can only be constructed from numbers, letters, hyphens and underscores.",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9_-]*$": {
"anyOf": [
{
"description": "URI for mixin.",
"type": "string"
},
{
"description": "Inline mixin.",
"type": "object"
}
]
}
}
}
},
"required": [
"version"
]
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the service ticket. Each attribute is a separate mixin.",
"additionalProperties": true
}
},
"required": [
"type",
"customerId"
]
}
Example:
{
"id": "55473b487deefe21340ae74f",
"type": "SERVICE_REQUEST",
"typeDescription": "Service Request",
"status": "IN_PROCESS",
"statusDescription": "In Process",
"customerId": "C4327014826",
"customerTitle": "Mr.",
"customerFirstName": "John",
"customerLastName": "Test",
"customerEmail": "johntest@hybristest.com",
"productId": "55db7ada164e46eedf355c54",
"productName": "Test Product",
"shortDescription": "Request for regular maintenance",
"createdBy": "mandy@hybristest.com",
"modifiedBy": "mandy@hybristest.com",
"metadata": {
"createdAt": "2015-06-19T12:28:07.000+0000",
"modifiedAt": "2015-06-19T12:28:07.000+0000",
"version": 1
}
}
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 /{tenant}/serviceTickets/{serviceTicketId}
Updates a single service ticket either to OPEN or CONFIRMED
The service ticket to be updated is identified by its id
.
Note that creating a service ticket with a caller-specified id
is not allowed. Use the POST
method at the endpoint /{tenant}/serviceTickets
to create service tickets and have their id
s generated by the system.
Upon successful update of the service ticket, the PubSub event serviceticket-updated
is raised.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
- serviceTicketId: required (string)
the id of the Service Ticket
Example:
1000000001
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": "Service ticket schema for use with POST",
"type": "object",
"properties": {
"id": {
"description": "The identifier of the created resource",
"type": "string"
},
"type": {
"type": "string",
"description": "Service ticket type"
},
"status": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Enumeration of supported service ticket statuses",
"enum": [
"OPEN",
"CONFIRMED"
],
"description": "Service ticket status"
},
"customerId": {
"type": "string",
"description": "Id of the customer the service ticket was opened for"
},
"productId": {
"type": "string",
"description": "Id of the product the ticket was opened for"
},
"shortDescription": {
"type": "string",
"description": "Short description of the ticket"
},
"createdBy": {
"type": "User who created the ticket"
},
"modifiedBy": {
"type": "User who last modified the ticket"
},
"metadata": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Document repository meta data schema",
"type": "object",
"additionalProperties": {
"anyOf": [
{
"description": "Properties of service ticket you want to store."
}
]
},
"properties": {
"version": {
"description": "Document repository version number",
"type": "integer"
},
"createdAt": {
"description": "Time the document was created at",
"type": "string",
"format": "date-time"
},
"modifiedAt": {
"description": "Time the document was last modified at",
"type": "string",
"format": "date-time"
},
"mixins": {
"description": "Mixins object. Keys in mixins can only be constructed from numbers, letters, hyphens and underscores.",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9_-]*$": {
"anyOf": [
{
"description": "URI for mixin.",
"type": "string"
},
{
"description": "Inline mixin.",
"type": "object"
}
]
}
}
}
},
"required": [
"version"
]
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the service ticket. Each attribute is a separate mixin.",
"additionalProperties": true
}
},
"required": [
"type",
"customerId"
]
}
Example:
{
"id": "55473b487deefe21340ae74f",
"type": "SERVICE_REQUEST",
"typeDescription": "Service Request",
"status": "IN_PROCESS",
"statusDescription": "In Process",
"customerId": "C4327014826",
"customerTitle": "Mr.",
"customerFirstName": "John",
"customerLastName": "Test",
"customerEmail": "johntest@hybristest.com",
"productId": "55db7ada164e46eedf355c54",
"productName": "Test Product",
"shortDescription": "Request for regular maintenance",
"createdBy": "mandy@hybristest.com",
"modifiedBy": "mandy@hybristest.com",
"metadata": {
"createdAt": "2015-06-19T12:28:07.000+0000",
"modifiedAt": "2015-06-19T12:28:07.000+0000",
"version": 1
}
}
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 /{tenant}/serviceTickets/{serviceTicketId}
Deletes a single serviceTicket entity.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
- serviceTicketId: required (string)
the id of the Service Ticket
Example:
1000000001
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"
}
/{tenant}/serviceTicketTypes
Service ticket type configuration
/{tenant}/serviceTicketTypes
Retrieves a list of configured service ticket types. For more information, see the Service Ticket Types service documentation.
get /{tenant}/serviceTicketTypes
Retrieves a list of configured service ticket types. For more information, see the Service Ticket Types service documentation.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
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
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service ticket statuses schema",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service ticket status schema",
"type": "object",
"properties": {
"status": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Enumeration of supported service ticket statuses",
"enum": [
"OPEN",
"IN_PROCESS",
"COMPLETED",
"CONFIRMED"
],
"description": "Technical key of the status"
},
"description": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "localized",
"oneOf": [
{
"type": "string",
"description": "value of property in default language"
},
{
"type": "object",
"description": "value of property in specific language",
"additionalProperties": {
"type": "string"
}
}
],
"description": "Human-readable and translatable description of the status"
}
},
"required": [
"status"
]
}
}
Example:
[
{
"active": true,
"description": "General Inquiry",
"type": "GENERAL_INQUIRY"
},
{
"active": true,
"description": "Repair",
"type": "REPAIR"
},
{
"active": true,
"description": "Service Request",
"type": "SERVICE_REQUEST"
}
]
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"
}
/{tenant}/serviceTicketStatus
Service ticket statuses
/{tenant}/serviceTicketStatus
Retrieves allowed list of service ticket status. For more information, see the Service ticket statuses service documentation.
get /{tenant}/serviceTicketStatus
Retrieves allowed list of service ticket status. For more information, see the Service ticket statuses service documentation.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
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
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket Types",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service ticket type schema",
"type": "object",
"properties": {
"active": {
"type": "boolean",
"description": "Activation/deactivation flag for the ticket type"
},
"type": {
"type": "string",
"description": "Technical key of the service ticket type"
},
"description": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "localized",
"oneOf": [
{
"type": "string",
"description": "value of property in default language"
},
{
"type": "object",
"description": "value of property in specific language",
"additionalProperties": {
"type": "string"
}
}
],
"description": "Human-readable and translatable description of the service ticket type"
}
},
"required": [
"type"
]
}
}
Example:
[
{
"description": "Open",
"status": "OPEN"
},
{
"description": "Confirmed",
"status": "CONFIRMED"
}
]
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"
}
/{tenant}/interactionLogs
Interaction Logs
/{tenant}/interactionLogs
Create a new interaction log item for the customer action such as a new product registration or creation of a new service ticket.
The customerId
of the interaction log is required in order to link the interaction to the specific customer.
The id
of the service ticket is automatically generated by the system. It is returned in the field id
in the response body. It is also part of the response header Location
.
get /{tenant}/interactionLogs
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
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 properties used to sort the results. By default, the column values are sorted in ascending order. Can either be in the form of fieldName or fieldName:asc,fieldName:desc. If you want to sort by localized attributes, you must use the following form: fieldName.language or fieldName.language:asc,fieldName.language:desc.
Example:
size,species:asc,weight:desc
- q: (string)
The simple query criteria based on available fields to limit returned results or a set of modified documents.
Example:
species:dog name:"Clifford"
- pageNumber: (integer - default: 1 - 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:
1
- pageSize: (integer - default: 16 - minimum: 1)
The number of documents being retrieved on the page.
Example:
16
HTTP status code 200
Request was successful.
Headers
- Link: required (string - repeat: true)
Link to the current page, the next page and the previous page. Marked accordingly with rel self, rel next and rel prev. The syntax must be conform to RFC-5988. The link to the current page (self) is required and must be provided always. The link to the next page (next) is optional. If not present, the next page is not available, as the current page is the last page of the result. The link to the previous page (prev) is optional. If not present, the previous page is not available, as the current page is the first page of the result.
Example:
<http://sample.com?pageNumber=2&pageSize=10>; rel="self", <http://sample.com?pageNumber=3&pageSize=10>; rel="next"
Body
Type: application/json
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"description": "classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "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"
}
post /{tenant}/interactionLogs
Create a new interaction log item for the customer action such as a new product registration or creation of a new service ticket.
The customerId
of the interaction log is required in order to link the interaction to the specific customer.
The id
of the service ticket is automatically generated by the system. It is returned in the field id
in the response body. It is also part of the response header Location
.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
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": "Interaction log item schema for use with POST",
"type": "object",
"properties": {
"customerId": {
"type": "string",
"description": "Unique identifier of the customer"
},
"interactionStartedAt": {
"type": "string",
"format": "date-time",
"description": "Date and time the interaction started (in UTC)"
},
"interactionEndedAt": {
"type": "string",
"format": "date-time",
"description": "Date an time the interaction ended (in UTC)"
},
"interactionReasons": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Array of interaction reasons with technical keys and descriptions",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Interaction reason with technical key and descriptions",
"type": "object",
"properties": {
"active": {
"type": "boolean",
"description": "Activation/deactivation flag for the interaction reason"
},
"interactionReason": {
"type": "string",
"description": "Technical key of the interaction reason",
"pattern": "^[0-9a-zA-Z_]+$"
},
"description": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "localized",
"oneOf": [
{
"type": "string",
"description": "value of property in default language"
},
{
"type": "object",
"description": "value of property in specific language",
"additionalProperties": {
"type": "string"
}
}
],
"description": "Human-readable and translatable description of the interaction reason"
}
}
},
"description": "Reasons for the interaction"
},
"interactionDescription": {
"type": "string",
"description": "Free-text description of the interaction"
},
"communicationDirection": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Enumeration of supported communication directions",
"enum": [
"INBOUND",
"OUTBOUND"
],
"description": "Direction of the communication"
},
"communicationOrigin": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Enumeration of supported communication origins",
"enum": [
"STOREFRONT"
],
"description": "Origin of the communication"
},
"relatedObjects": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Related object schema",
"type": "object",
"properties": {
"objectType": {
"type": "string",
"description": "Type of the lined object"
},
"objectId": {
"type": "string",
"description": "Unique identifier of the linked object"
},
"objectName": {
"type": "string",
"description": "Human-readable name of the linked object"
},
"rootObjectId": {
"type": "string",
"description": "Unique identifer of the linked root object; used only if the linked object is part of a hierarchy"
}
},
"required": [
"objectType",
"objectId"
]
}
}
},
"required": [
"customerId"
]
}
Example:
{
"customerId": "C0750876755",
"agentId": "mandy@hybristest.com",
"agentTitle": "Ms.",
"agentFirstName": "Mandy",
"agentLastName": "Smith",
"interactionStartedAt": "2014-12-02T14:10:00.000+0000",
"interactionEndedAt": "2014-12-02T14:15:00.000+0000",
"interactionReasons": [
{
"interactionReason": "PRODUCT_INQUIRY"
}
],
"interactionDescription": "Customer called to ask about the configuration of a bike in the web shop. Assisted the customer with the configuration.",
"communicationDirection": "INBOUND",
"communicationOrigin": "STOREFRONT",
"communicationMedium": "WEBRTC_VIDEO",
"communicationSystemInteractionId": "12345000001"
}
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"
}
/{tenant}/chatTranscripts
Chat Transcripts
/{tenant}/chatTranscripts/{id}
get /{tenant}/chatTranscripts/{id}
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
The tenant string is the project's Identifier from the Builder.
Example:
myexampleshop
- id: required (string)
Example:
55473b487deefe21340ae74f
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
Chat Transcript retrieved successfully
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/schema#",
"title": "Chat Transcript Schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the chat transcript"
},
"startAt": {
"type": "string",
"format": "date-time",
"description": "Date and the time the transcript is started (in UTC)"
},
"endAt": {
"type": "string",
"format": "date-time",
"description": "Date and the time the transcript is started (in UTC)"
},
"chatterIds": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Chatter",
"type": "string",
"description": "the chatter ID of one chat transcript item"
},
"description": "chatters of the chat transcript"
},
"createdBy": {
"type": "string",
"description": "Id of the agent the chat transcript was participanted"
},
"transcript": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Chat Transcript Item",
"type": "object",
"properties": {
"createdBy": {
"type": "string",
"description": "User who created this transcript entry"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Date and time the transscript item was created (in UTC)"
},
"chatContent": {
"type": "string",
"description": "Description"
}
},
"required": [
"createdBy",
"createdAt",
"chatContent"
]
},
"description": "Transcript"
},
"metadata": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Document repository meta data schema",
"type": "object",
"properties": {
"version": {
"description": "Document repository version number",
"type": "integer"
},
"createdAt": {
"description": "Time the document was created at",
"type": "string",
"format": "date-time"
},
"modifiedAt": {
"description": "Time the document was last modified at",
"type": "string",
"format": "date-time"
}
},
"required": [
"version"
]
}
},
"required": [
"id",
"startAt",
"endAt",
"chatterIds",
"createdBy",
"transcript",
"metadata"
]
}
Example:
{
"id": "55473b487deefe21340ae74f",
"startAt": "2016-06-19T12:29:08.000+0000",
"endAt": "2016-06-19T12:30:08.000+0000",
"chatterIds": [
"C4327014826",
"agent"
],
"createdBy": "agent",
"transcript": [
{
"createdBy": "C4327014826",
"createdAt": "2016-06-19T12:28:07.000+0000",
"chatContent": "Hi"
},
{
"createdBy": "agent",
"createdAt": "2016-06-19T12:29:07.000+0000",
"chatContent": "What can i do for you?"
}
],
"metadata": {
"createdAt": "2016-06-19T12:28:07.000+0000",
"modifiedAt": "2016-06-19T12:28:07.000+0000",
"version": 1
}
}
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"
}
CECenter Mashup
Introduction
This service allows customers to create service tickets to report issues to a customer service agent for resolution.
The tutorials uses these endpoints to manage service tickets for customers in the service:
- Use
/{tenant}/serviceTicketTypes
to retrieve Service tickets types. - Use
/{tenant}/serviceTicketStatus
to retrieve Service ticket statuses. - Call
/{tenant}/serviceTickets
to get a list of service tickets and creates service ticket. An end application, such as a storefront, can use this endpoint to show service tickets for a logged in customer. - Use
/{tenant}/serviceTickets/{serviceTicketId}
to retrieve and update a specified service ticket. - Call
/{tenant}/interactionLogs
to create interaction log for actions such as product registration or a new service ticket created by the customer.
Set up the project
Follow the examples to set up and run the tutorial project.
Define variable assertion
clientId = clientIdPlaceholder;
clientSecret = clientSecretPlaceholder;
tenant = projectIdPlaceholder;
client = appIdPlaceholder;
scopesRequired = 'hybris.tenant='+tenant+' hybris.customer_read hybris.customer_create hybris.product_read_unpublished hybris.product_create hybris.product_publish hybris.serviceticket_view hybris.serviceticket_manage hybris.serviceticket_configuration_view hybris.interactionlog_manage';
token = tokenPlaceholder;
assert = chai.assert;
Get an access token
For proper authorization to perform these operations, you must provide a valid Bearer access token in your request header. To do so, 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 a product
API.createClient('productService',
'/services/product/v2/api.raml');
Please note that the product code is unique. If this code is executed more than once, ensure to edit the product code.
productResponse = productService.tenant(tenant).products.post({
"name": "Smartphone Zony Yperia X2",
"code": "SZYX",
"description": "The world's best camera and camcorder in a waterproof smartphone." ,
"published":true
}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-Type' : 'application/json',
'Content-Language' : 'en'
}
}
)
assert.equal(productResponse.status, 201);
productResponse;
productId = productResponse.body.id;
Signup a customer
API.createClient('customerService',
'/services/customer/v1/api.raml');
Please note that the email is unique. If this code is executed more than once, ensure to edit the email and retain the domain as it is.
customerResponse = customerService.tenant(tenant).signup.post({
"email": "testme@yaastest.com",
"password": "secret"
}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-Type' : 'application/json'
}
}
)
assert.equal(customerResponse.status, 201);
customerResponse;
customerId = customerResponse.body.id;
Now, get the logged in customer's access token
customerResponse = customerService.tenant(tenant).login.post({
"email": "testme@yaastest.com",
"password": "secret"
}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-Type' : 'application/json'
}
}
)
assert.equal(customerResponse.status, 200);
customerResponse;
customer_access_token = customerResponse.body.accessToken;
Create an API client for the CECenter Mashup service
API.createClient('cecenterMashup',
'/services/cecentermashup/v1/api.raml');
Get service ticket types
Send a GET request to the /{tenant}/serviceTicketTypes
endpoint to retrieve a list of pre-configured service ticket types. The service ticket types can be configured in Service ticket settings from the Builder UI.
response = cecenterMashup.tenant(tenant).serviceTicketTypes.get({}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-Type' : 'application/json'
}
}
)
assert.equal(response.status, 200);
response;
For more information, see the Service Ticket Types service documentation.
Get service ticket statuses
Send a GET request to the /{tenant}/serviceTicketStatus
endpoint to retrieve a list of pre-configured service ticket statuses. The service ticket statuses can be configured in Service ticket settings from the Builder UI.
response = cecenterMashup.tenant(tenant).serviceTicketStatus.get({}, {
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-Type' : 'application/json'
}
}
)
assert.equal(response.status, 200);
response;
For more information, see the Service Ticket Statuses service documentation.
Create a service ticket
Send a POST request to the /{tenant}/serviceTickets
endpoint to create a new service ticket. Creating a service ticket requires JSON input. Only the authenticated customer specified upon ticket creation can manage the ticket. For agent access, see the Service Ticket service documentation.
response = cecenterMashup.tenant(tenant).serviceTickets.post({
"type":"SERVICE_REQUEST",
"status":"OPEN",
"customerId":customerId,
"productId":productId,
"shortDescription":"My tv does not work",
"createdBy":"SYSTEM"
}, {
headers: {
'Authorization': 'Bearer ' + customer_access_token,
'Content-Type' : 'application/json'
}
}
)
assert.equal(response.status, 201);
response;
Get a list of service tickets
Send a GET request to the /{tenant}/serviceTickets/
endpoint to retrieve a list of service tickets. Only the authenticated customer specified in the request can view the list of service tickets. For agent access, see the Service Ticket service documentation.
To make the calls simple and the code examples clean, this example assigns the returned object to the existingServiceTicket variable.
response = cecenterMashup.tenant(tenant).serviceTickets.get({}, {
headers: {
'Authorization': 'Bearer ' + customer_access_token,
'Content-Type' : 'application/json'
}
}
)
assert.equal(response.status, 200);
existingServiceTicket = response.body[0];
existingServiceTicketId = existingServiceTicket.id;
response;
Get a service ticket by ID
Send a GET request to the /{tenant}/serviceTickets/{serviceTicketId}
endpoint to retrieve a service ticket by ID. Only the authenticated customer specified in the request can view the retrieved service ticket. For agent access, see the Service Ticket service documentation.
response = cecenterMashup.tenant(tenant).serviceTickets.serviceTicketId(existingServiceTicketId).get({}, {
headers: {
'Authorization': 'Bearer ' + customer_access_token,
'Content-Type' : 'application/json'
}
}
)
assert.equal(response.status, 200);
existingServiceTicket = response.body;
response;
Update a service ticket by ID
Send a PUT request to the /{tenant}/serviceTickets/{serviceTicketId}
to update an existing service ticket by ID. Updating a service ticket requires JSON input. Only the authenticated customer specified in the request can update the retrieved service ticket. For agent access, see the Service Ticket service documentation.
existingServiceTicket.shortDescription = "My tv remote does not work"
response = cecenterMashup.tenant(tenant).serviceTickets.serviceTicketId(existingServiceTicketId).put(existingServiceTicket, {
headers: {
'Authorization': 'Bearer ' + customer_access_token,
'Content-Type' : 'application/json'
}
}
)
assert.equal(response.status, 204);
response;
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.