Overview
The Engagement Center Search service is a mashup service that provides the search for the data indexed by the EngagementCenterIndexing mashup service based on elastic search.
Using this service, you can:
- Search for customers by key word.
- Search for products by key word.
- Search for sales orders by key word.
- Search for service tickets by key word.
- Search for transactions by key word.
- Search for sales orders by query parameter.
- Search for service tickets by query parameter.
- Search for products by query parameter.
For details, see the Search service.
API Reference
/{tenant}/customer/search
Search for customers.
/{tenant}/customer/search
Search for customers by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the customers that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.cecentercustomer_view
get /{tenant}/customer/search
Search for customers by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the customers that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.cecentercustomer_view
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
Stands for the "project" that requests this resource. Must match the "project" that is associated with the access token in the Authorization header.
Example:
myexampleshop
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
Query string contains single or multiple key words. If multiple key words are used, use a space to separate key words. The wildcard (*) is supported to represent one or more characters.
Example:
Tiger
- sort: (string)
Sort by fields. This can be either in the form of fieldname or fieldname:asc/fieldName:desc. The fieldName can be either an actual field within the document, or the special_score name to indicate sorting based on scores. It is possible to have several sorting parameters. How the fields are displayed on the UI depends on the order in which you put these sorting parameters.
Example:
firstName:desc,lastName:asc
- from: (string)
Starting index of the hits to be returned. Default number is 0.
- topNumberofHits: (string)
The number of hits to be returned. The default number is 10.
Example:
10
HTTP status code 200
Search customer successfully.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Customer",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"firstName": {
"type": "string"
},
"middleName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"contactEmail": {
"type": "string"
},
"contactPhone": {
"type": "string"
},
"company": {
"type": "string"
},
"preferredLanguage": {
"type": "string",
"default": "en_US"
},
"preferredCurrency": {
"type": "string",
"default": "USD"
},
"preferredSite": {
"type": "string"
}
}
}
}
Example:
[
{
"firstName": "ut1showmayTest001",
"lastName": "utest01",
"preferredLanguage": "en_US",
"preferredSite": "default",
"contactEmail": "zhang.lu012801@hybristest.com",
"preferredCurrency": "USD",
"id": "C7476731819",
"customerNumber": "C7476731819"
},
{
"firstName": "ut2ShowMayTest",
"lastName": "utest02",
"preferredLanguage": "en_US",
"preferredSite": "default",
"contactEmail": "zhang.lu01@hybristest.com",
"preferredCurrency": "USD",
"id": "C8168190369",
"customerNumber": "C8168190369"
},
{
"firstName": "ut2JialuTest01",
"lastName": "utest03",
"preferredLanguage": "en_US",
"preferredSite": "default",
"contactEmail": "zhang.lu02@hybristest.com",
"preferredCurrency": "USD",
"id": "C5168190369",
"customerNumber": "C5168190369"
},
{
"firstName": "ut2JialuTestshowMay",
"lastName": "utest04",
"preferredLanguage": "en_US",
"preferredSite": "default",
"contactEmail": "zhang.lu03@hybristest.com",
"preferredCurrency": "USD",
"id": "C4168190369",
"customerNumber": "C4168190369"
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
error
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:
error
HTTP status code 500
An internal server error occurred.
Body
Type: application/json
Schema:
error
HTTP status code 503
Service temporarily unavailable.
Body
Type: application/json
Schema:
error
/{tenant}/transaction/search
Search for transactions.
/{tenant}/transaction/search
Search for sales orders and service tickets by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the sales orders and service tickets that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.serviceticket_view
, hybris.order_read
get /{tenant}/transaction/search
Search for sales orders and service tickets by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the sales orders and service tickets that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.serviceticket_view
, hybris.order_read
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
Stands for the "project" that requests this resource. Must match the "project" that is associated with the access token in the Authorization header.
Example:
myexampleshop
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
Query string contains single or multiple key words. If multiple key words are used, use a space to separate key words. The wildcard (*) is supported to represent one or more characters.
Example:
T12345
- sort: (string)
Sort by fields. This can be either in the form of fieldname or fieldname:asc/fieldName:desc. The fieldName can be either an actual field within the document, or the special_score name to indicate sorting based on scores. It is possible to have several sorting parameters. How the fields are displayed on the UI depends on the order in which you put these sorting parameters.
Example:
firstName:desc,lastName:asc
- from: (string)
Starting index of the hits to be returned. Default number is 0.
- topNumberofHits: (string)
The number of hits to be returned. The default number is 10.
Example:
10
HTTP status code 200
Search transaction successfully.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transaction",
"type": "array",
"items": [
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"mixins": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "uri"
}
}
}
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the order. Each attribute is a separate mixin"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Unix time stamp"
},
"completed": {
"type": "string",
"format": "date-time",
"description": "Unix time stamp"
},
"status": {
"type": "string",
"description": "Values in OrderStatus.java"
},
"entries": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Actual products",
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"unitPrice": {
"type": "number",
"description": "WARNING: Beware of rounding problems in future"
},
"id": {
"type": "string"
},
"totalPrice": {
"type": "number",
"description": "Total price of all items"
},
"link": {
"type": "string",
"description": "Hypermedia reference to original product"
},
"product": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"mixins": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "uri"
}
}
}
},
"id": {
"type": "string",
"description": "Unique identifier"
},
"code": {
"type": "string",
"description": "Product stock keeping unit. If not provided, it is generated (mainly based on name)."
},
"name": {
"type": "string",
"description": "The name of the product."
},
"description": {
"type": "string",
"description": "The description of the product."
},
"published": {
"type": "boolean",
"default": false,
"description": "This flag determines if product is live."
},
"images": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the product. Each attribute is a separate mixin"
}
},
"required": [
"name"
],
"description": "Complete detail of a product"
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
},
"customer": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Customer information",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Customer id"
},
"name": {
"type": "string",
"description": "Customer name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"title": {
"type": "string"
},
"firstName": {
"type": "string",
"description": "Customer first name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"middleName": {
"type": "string"
},
"lastName": {
"type": "string",
"description": "Customer last name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"email": {
"type": "string",
"description": "Customer email"
},
"company": {
"type": "string"
}
},
"required": [
"email"
]
},
"billingAddress": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"contactName": {
"type": "string"
},
"companyName": {
"type": "string"
},
"street": {
"type": "string"
},
"streetNumber": {
"type": "string"
},
"streetAppendix": {
"type": "string"
},
"zipCode": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"contactPhone": {
"type": "string"
}
},
"required": [
"contactName",
"street",
"zipCode",
"city",
"country"
],
"description": "Billing address"
},
"shippingAddress": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"contactName": {
"type": "string"
},
"companyName": {
"type": "string"
},
"street": {
"type": "string"
},
"streetNumber": {
"type": "string"
},
"streetAppendix": {
"type": "string"
},
"zipCode": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"contactPhone": {
"type": "string"
}
},
"required": [
"contactName",
"street",
"zipCode",
"city",
"country"
],
"description": "Shipping address"
},
"totalPrice": {
"type": "number",
"description": "Total value of the entire order"
},
"currency": {
"type": "string",
"description": "Currency used for within the entire order (three letter code)",
"default": "USD"
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"payments": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "The status of payment"
},
"method": {
"type": "string",
"description": "The method of payment: STRIPE / Credit Cart / etc (currently only STRIPE)"
},
"paymentResponse": {
"type": "string",
"description": "Response string from the payment gateway API call"
},
"paidAmount": {
"type": "number",
"description": "The amount paid"
},
"currency": {
"type": "string",
"description": "Currency used for the payment (three letter code)"
}
},
"required": [
"status",
"method",
"paidAmount",
"currency"
]
}
},
"shipments": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"trackingNumber": {
"type": "string",
"description": "Tracking number of the shipment"
},
"carrier": {
"type": "string",
"description": "Shipment carrier (e.g. FEDEX, UPS, ...)"
},
"shippedDate": {
"type": "string",
"format": "date-time",
"description": "Date of shipment"
}
},
"required": [
"carrier",
"shippedDate"
]
}
},
"shipping": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The total amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"pattern": "^[a-z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
}
}
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The total amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code"
]
}
}
},
"required": [
"total"
]
}
},
"required": [
"created",
"status",
"entries",
"customer",
"totalPrice"
]
},
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket GET Schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the service ticket"
},
"ticketNumber": {
"type": "string",
"description": "Human-readable service ticket number"
},
"type": {
"type": "string",
"description": "Service ticket type"
},
"typeDescription": {
"$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 ticket type"
},
"classification": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket Classifications",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket Classification",
"type": "object",
"properties": {
"classification": {
"type": "string",
"description": "Technical key of the service ticket classification"
},
"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 classification"
}
}
},
"description": "Classification"
},
"priority": {
"enum": [
"VERY_HIGH",
"HIGH",
"MEDIUM",
"LOW"
],
"description": "Service ticket priority"
},
"priorityDescription": {
"$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 priority"
},
"status": {
"enum": [
"OPEN",
"IN_PROCESS",
"COMPLETED",
"CONFIRMED"
],
"description": "Service ticket status"
},
"statusDescription": {
"$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"
},
"dueAt": {
"type": "string",
"format": "date-time",
"description": "Date and the time the ticket is due (in UTC)"
},
"closedAt": {
"type": "string",
"format": "date-time",
"description": "Date and the time the ticket was closed (in UTC)"
},
"processingTime": {
"type": "integer",
"description": "Calculated processing time of the ticket in seconds"
},
"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"
},
"assignedTo": {
"type": "string",
"description": "Id of the user working on the service ticket"
},
"transcript": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket 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)"
},
"description": {
"type": "string",
"description": "Description"
}
}
},
"description": "Transcript"
},
"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": "metadata",
"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": [
"id"
]
}
]
}
Example:
[
{
"firstName": "checkout",
"lastName": "test",
"orderNumber": "PE0NME0N",
"totalPrice": 1090,
"created": "2015-07-22T06:14:12.797Z",
"customerEmail": "Test@test.com",
"paymentMethod": [
{
"method": "Unknown"
}
],
"currency": "USD",
"customerNumber": "C123456789",
"customerName": "checkoutBuyerXXX",
"status": "CREATED"
},
{
"id": "55473b487deefe21340ae74f",
"ticketNumber": "1000000001",
"type": "SERVICE_REQUEST",
"typeDescription": {
"en": "Service Request"
},
"priority": "HIGH",
"priorityDescription": {
"en": "High"
},
"classification": "",
"status": "IN_PROCESS",
"statusDescription": {
"en": "In Process"
},
"dueAt": "2015-06-30T23:59:59.999+0000",
"processingTime": 432000,
"customerId": "C0750876755",
"productId": "54e60e07d26ec374ee8e769f",
"shortDescription": "Request for regular maintenance",
"assignedTo": "test@test.com",
"transcript": [
{
"createdBy": "test@test.com",
"createdAt": "2015-06-19T12:28:07.000+0000",
"description": "Customer requested to perform regular maintenance of their FOCUS MARES bike"
}
],
"createdBy": "test@test.com",
"modifiedBy": "test@test.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:
error
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:
error
HTTP status code 500
An internal server error occurred.
Body
Type: application/json
Schema:
error
HTTP status code 503
Service temporarily unavailable.
Body
Type: application/json
Schema:
error
/{tenant}/product/search
Search for products.
/{tenant}/product/search
Search for products by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the products that have been successfully indexed by the Engagement Center Indexing service can be searched out.
get /{tenant}/product/search
Search for products by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the products that have been successfully indexed by the Engagement Center Indexing service can be searched out.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
Stands for the "project" that requests this resource. Must match the "project" that is associated with the access token in the Authorization header.
Example:
myexampleshop
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
Query string contains single or multiple key words. If multiple key words are used, use a space to separate key words. The wildcard (*) is supported to represent one or more characters.
Example:
p12345
- sort: (string)
Sort by fields. This can be either in the form of fieldname or fieldname:asc/fieldName:desc. The fieldName can be either an actual field within the document, or the special_score name to indicate sorting based on scores. It is possible to have several sorting parameters. How the fields are displayed on the UI depends on the order in which you put these sorting parameters.
Example:
prices.originalAmount:desc,name.en:asc
- from: (string)
Starting index of the hits to be returned. Default number is 0.
- topNumberofHits: (string)
The number of hits to be returned. The default number is 10.
Example:
10
HTTP status code 200
Search product successfully.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Product",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"mixins": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "uri"
}
}
}
},
"id": {
"type": "string",
"description": "Unique identifier"
},
"code": {
"type": "string",
"description": "Product stock keeping unit. If not provided, it is generated (mainly based on name).",
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\/\\-\\s_*]*$"
},
"name": {
"$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": "The name of the product."
},
"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": "The description of the product."
},
"published": {
"type": "boolean",
"default": false,
"description": "This flag determines if product is live."
},
"media": {
"type": "array",
"items": {
"type": "object",
"description": "Media file metadata",
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL of file content"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Media file tags"
},
"contentType": {
"type": "string",
"description": "MIME type of the media file"
},
"stored": {
"type": "boolean",
"description": "If true, the media file is stored in the service. Otherwise the service only stores external URL of the file and metadata."
},
"position": {
"type": "integer",
"description": "Position of the file in the media file list. The user is responsible for setting the value of this field appropriately. If two or more files have the same position, their order, when retrieving the file list, will be undetermined."
},
"customAttributes": {
"type": "object",
"additionalProperties": true,
"description": "Map of custom attributes. The map key should is a string, the value can be any JSON object"
}
},
"additionalProperties": false
},
"description": "Contains media information (including url). This attribute is Read-Only, to manage media collection please use the /media subresource. To get this attribute included in product please add the expand=media query param. By default this attribute is not returned with product."
},
"mixins": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
}
Example:
[
{
"id": "545b4e3dfaee4c10def3db25",
"code": "iphoneZ21415269949944",
"name": "XX iphone5s",
"description": "this is a test.",
"published": false
},
{
"id": "545b4e3dfaee4c10def3db6",
"code": "iphoneZ21415269949945",
"name": "iphone6",
"description": "this is a test.",
"published": true
},
{
"id": "545b4e3dfaee4c10def3db7",
"code": "iphoneZ21415269949946",
"name": "iphone7 test",
"description": "this is a test.",
"published": true
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
error
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:
error
HTTP status code 500
An internal server error occurred.
Body
Type: application/json
Schema:
error
HTTP status code 503
Service temporarily unavailable.
Body
Type: application/json
Schema:
error
/{tenant}/salesOrder/search
Search for sales orders.
/{tenant}/salesOrder/search
Search for sales orders by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the sales orders that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.order_read
get /{tenant}/salesOrder/search
Search for sales orders by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the sales orders that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.order_read
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
Stands for the "project" that requests this resource. Must match the "project" that is associated with the access token in the Authorization header.
Example:
myexampleshop
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
Query string contains single or multiple key words. If multiple key words are used, use a space to separate key words. The wildcard (*) is supported to represent one or more characters.
Example:
SO12345
- sort: (string)
Sort by fields. This can be either in the form of fieldname or fieldname:asc/fieldName:desc. The fieldName can be either an actual field within the document, or the special_score name to indicate sorting based on scores. It is possible to have several sorting parameters. How the fields are displayed on the UI depends on the order in which you put these sorting parameters.
Example:
created:desc,lastName:asc
- from: (string)
Starting index of the hits to be returned. Default number is 0.
- topNumberofHits: (string)
The number of hits to be returned. The default number is 10.
Example:
10
HTTP status code 200
Search sales order successfully.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Order",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"mixins": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "uri"
}
}
}
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the order. Each attribute is a separate mixin"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Unix time stamp"
},
"completed": {
"type": "string",
"format": "date-time",
"description": "Unix time stamp"
},
"status": {
"type": "string",
"description": "Values in OrderStatus.java"
},
"entries": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Actual products",
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"unitPrice": {
"type": "number",
"description": "WARNING: Beware of rounding problems in future"
},
"id": {
"type": "string"
},
"totalPrice": {
"type": "number",
"description": "Total price of all items"
},
"link": {
"type": "string",
"description": "Hypermedia reference to original product"
},
"product": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"mixins": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "uri"
}
}
}
},
"id": {
"type": "string",
"description": "Unique identifier"
},
"code": {
"type": "string",
"description": "Product stock keeping unit. If not provided, it is generated (mainly based on name)."
},
"name": {
"type": "string",
"description": "The name of the product."
},
"description": {
"type": "string",
"description": "The description of the product."
},
"published": {
"type": "boolean",
"default": false,
"description": "This flag determines if product is live."
},
"images": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the product. Each attribute is a separate mixin"
}
},
"required": [
"name"
],
"description": "Complete detail of a product"
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
},
"customer": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Customer information",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Customer id"
},
"name": {
"type": "string",
"description": "Customer name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"title": {
"type": "string"
},
"firstName": {
"type": "string",
"description": "Customer first name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"middleName": {
"type": "string"
},
"lastName": {
"type": "string",
"description": "Customer last name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"email": {
"type": "string",
"description": "Customer email"
},
"company": {
"type": "string"
}
},
"required": [
"email"
]
},
"billingAddress": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"contactName": {
"type": "string"
},
"companyName": {
"type": "string"
},
"street": {
"type": "string"
},
"streetNumber": {
"type": "string"
},
"streetAppendix": {
"type": "string"
},
"zipCode": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"contactPhone": {
"type": "string"
}
},
"required": [
"contactName",
"street",
"zipCode",
"city",
"country"
],
"description": "Billing address"
},
"shippingAddress": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"contactName": {
"type": "string"
},
"companyName": {
"type": "string"
},
"street": {
"type": "string"
},
"streetNumber": {
"type": "string"
},
"streetAppendix": {
"type": "string"
},
"zipCode": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"contactPhone": {
"type": "string"
}
},
"required": [
"contactName",
"street",
"zipCode",
"city",
"country"
],
"description": "Shipping address"
},
"totalPrice": {
"type": "number",
"description": "Total value of the entire order"
},
"currency": {
"type": "string",
"description": "Currency used for within the entire order (three letter code)",
"default": "USD"
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"payments": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "The status of payment"
},
"method": {
"type": "string",
"description": "The method of payment: STRIPE / Credit Cart / etc (currently only STRIPE)"
},
"paymentResponse": {
"type": "string",
"description": "Response string from the payment gateway API call"
},
"paidAmount": {
"type": "number",
"description": "The amount paid"
},
"currency": {
"type": "string",
"description": "Currency used for the payment (three letter code)"
}
},
"required": [
"status",
"method",
"paidAmount",
"currency"
]
}
},
"shipments": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"trackingNumber": {
"type": "string",
"description": "Tracking number of the shipment"
},
"carrier": {
"type": "string",
"description": "Shipment carrier (e.g. FEDEX, UPS, ...)"
},
"shippedDate": {
"type": "string",
"format": "date-time",
"description": "Date of shipment"
}
},
"required": [
"carrier",
"shippedDate"
]
}
},
"shipping": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The total amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"pattern": "^[a-z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
}
}
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The total amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code"
]
}
}
},
"required": [
"total"
]
}
},
"required": [
"created",
"status",
"entries",
"customer",
"totalPrice"
]
}
}
Example:
[
{
"firstName": "checkout",
"lastName": "test",
"orderNumber": "PE0NME0N",
"totalPrice": 1090,
"created": "2015-07-22T06:14:12.797Z",
"customerEmail": "unitesnoreply@hybristest",
"paymentMethod": [
{
"method": "Unknown"
}
],
"currency": "USD",
"customerNumber": "C123456789",
"customerName": "checkout test",
"status": "CREATED"
},
{
"firstName": "sdg",
"lastName": "sdgds",
"orderNumber": "Z9EB20PY",
"totalPrice": 58,
"created": "2015-07-26T15:31:38.868Z",
"customerEmail": "dunitnoreply@hybristest",
"paymentMethod": [
{
"method": "Unknown"
}
],
"currency": "USD",
"customerNumber": "C123456669",
"customerName": "sdg sdgds",
"status": "CREATED"
},
{
"firstName": "yytest",
"lastName": "uutest",
"orderNumber": "PE0POPOP",
"totalPrice": 8888,
"created": "2015-07-12T05:54:12.797Z",
"customerEmail": "unitest@hybristest",
"paymentMethod": [
{
"method": "Unknown"
}
],
"currency": "USD",
"customerNumber": "C124556789",
"customerName": "checkout test",
"status": "DECLINE"
},
{
"firstName": "lulu",
"lastName": "uutestran",
"orderNumber": "lulu123",
"totalPrice": 666,
"created": "2015-07-18T05:54:12.797Z",
"customerEmail": "noreply@hybristestlulutest",
"paymentMethod": [
{
"method": "Unknown"
}
],
"currency": "USD",
"customerNumber": "C123456777",
"customerName": "checkout test",
"status": "DECLINE"
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
error
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:
error
HTTP status code 500
An internal server error occurred.
Body
Type: application/json
Schema:
error
HTTP status code 503
Service temporarily unavailable.
Body
Type: application/json
Schema:
error
/{tenant}/serviceTicket/search
Search for service tickets.
/{tenant}/serviceTicket/search
Search for service tickets by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the service tickets that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.serviceticket_view
get /{tenant}/serviceTicket/search
Search for service tickets by key word.
If multiple key words are used, use a space to separate them.
The wildcard (*) is supported to represent one or more characters in key words.
If query parameter q
is not specified, only the latest 10 items created will be returned.
Only the service tickets that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.serviceticket_view
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
Stands for the "project" that requests this resource. Must match the "project" that is associated with the access token in the Authorization header.
Example:
myexampleshop
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: (string)
Query string contains single or multiple key words. If multiple key words are used, use a space to separate key words. The wildcard (*) is supported to represent one or more characters.
Example:
ST12345
- sort: (string)
Sort by fields. This can be either in the form of fieldname or fieldname:asc/fieldName:desc. The fieldName can be either an actual field within the document, or the special_score name to indicate sorting based on scores. It is possible to have several sorting parameters. How the fields are displayed on the UI depends on the order in which you put these sorting parameters.
Example:
priority:desc,status:asc
- from: (string)
Starting index of the hits to be returned. Default number is 0.
- topNumberofHits: (string)
The number of hits to be returned. The default number is 10.
Example:
10
HTTP status code 200
Search service ticket successfully.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ServiceTicket",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket GET Schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the service ticket"
},
"ticketNumber": {
"type": "string",
"description": "Human-readable service ticket number"
},
"type": {
"type": "string",
"description": "Service ticket type"
},
"typeDescription": {
"$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 ticket type"
},
"classification": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket Classifications",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket Classification",
"type": "object",
"properties": {
"classification": {
"type": "string",
"description": "Technical key of the service ticket classification"
},
"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 classification"
}
}
},
"description": "Classification"
},
"priority": {
"enum": [
"VERY_HIGH",
"HIGH",
"MEDIUM",
"LOW"
],
"description": "Service ticket priority"
},
"priorityDescription": {
"$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 priority"
},
"status": {
"enum": [
"OPEN",
"IN_PROCESS",
"COMPLETED",
"CONFIRMED"
],
"description": "Service ticket status"
},
"statusDescription": {
"$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"
},
"dueAt": {
"type": "string",
"format": "date-time",
"description": "Date and the time the ticket is due (in UTC)"
},
"closedAt": {
"type": "string",
"format": "date-time",
"description": "Date and the time the ticket was closed (in UTC)"
},
"processingTime": {
"type": "integer",
"description": "Calculated processing time of the ticket in seconds"
},
"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"
},
"assignedTo": {
"type": "string",
"description": "Id of the user working on the service ticket"
},
"transcript": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket 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)"
},
"description": {
"type": "string",
"description": "Description"
}
}
},
"description": "Transcript"
},
"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": "metadata",
"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": [
"id"
]
}
}
Example:
[
{
"id": "55473b487deefe21340ae74f",
"ticketNumber": "1000000001",
"type": "SERVICE_REQUEST",
"typeDescription": {
"en": "Service Request"
},
"priority": "HIGH",
"priorityDescription": {
"en": "High"
},
"classification": "",
"status": "IN_PROCESS",
"statusDescription": {
"en": "In Process"
},
"dueAt": "2015-06-30T23:59:59.999+0000",
"processingTime": 432000,
"customerId": "C0750876755",
"productId": "54e60e07d26ec374ee8e769f",
"shortDescription": "Request for regular maintenance",
"assignedTo": "test@test.com",
"transcript": [
{
"createdBy": "test@test.com",
"createdAt": "2015-06-19T12:28:07.000+0000",
"description": "Customer requested to perform regular maintenance of their FOCUS MARES bike"
}
],
"createdBy": "test@test.com",
"modifiedBy": "test@test.com",
"metadata": {
"createdAt": "2015-06-19T12:28:07.000+0000",
"modifiedAt": "2015-06-19T12:28:07.000+0000",
"version": 1
}
},
{
"id": "55473b487deefe21340ae73f",
"ticketNumber": "1000000003",
"type": "SERVICE_REQUEST",
"typeDescription": {
"en": "Service Request"
},
"priority": "HIGH",
"priorityDescription": {
"en": "High"
},
"classification": "",
"status": "IN_PROCESS",
"statusDescription": {
"en": "In Process"
},
"dueAt": "2015-05-30T23:59:59.999+0000",
"processingTime": 432000,
"customerId": "C0750876755",
"productId": "54e60e07d26ec374ee8e769f",
"shortDescription": "Request for regular maintenance",
"assignedTo": "test@test.com",
"transcript": [
{
"createdBy": "test@test.com",
"createdAt": "2015-06-19T12:28:07.000+0000",
"description": "Customer requested to perform regular maintenance of their FOCUS MARES bike"
}
],
"createdBy": "test@test.com",
"modifiedBy": "test@test.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:
error
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:
error
HTTP status code 500
An internal server error occurred.
Body
Type: application/json
Schema:
error
HTTP status code 503
Service temporarily unavailable.
Body
Type: application/json
Schema:
error
/{tenant}/salesOrder/advancedSearch
Advanced search for sales orders.
/{tenant}/salesOrder/advancedSearch
Search for sales orders using multiple query parameters.
Only in query parameters email
, fistName
and lastName
, the wildcard (*) is supported to represent one or more characters.
If no query parameter is specified, only the latest 10 items created will be returned.
Only the sales orders that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.order_read
get /{tenant}/salesOrder/advancedSearch
Search for sales orders using multiple query parameters.
Only in query parameters email
, fistName
and lastName
, the wildcard (*) is supported to represent one or more characters.
If no query parameter is specified, only the latest 10 items created will be returned.
Only the sales orders that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.order_read
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
Stands for the "project" that requests this resource. Must match the "project" that is associated with the access token in the Authorization header.
Example:
myexampleshop
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- salesOrderNumber: (string)
Filter by sales order number. You can enter multiple order numbers. Use a comma (,) to separate them.
Example:
SO12345,S678901
- firstName: (string)
Filter by first name. Enter one first name only. You can use the wildcard (*) in your search.
Example:
Tom
- lastName: (string)
Filter by last name. Enter one last name only. You can use the wildcard (*) in your search.
Example:
Smith
- email: (string)
Filter by email. Enter one email only. You can use the wildcard (*) in your search.
Example:
test@test.com
- status: (string)
Filter by sales order status. You can enter multiple order statuses. Use a comma (,) to separate them.
Example:
CREATED,DECLINE
- createdFrom: (string - minLength: 10 - maxLength: 10 - pattern: [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]))
Filter by sales order date. Start date for searching sales orders.
- createdTo: (string - minLength: 10 - maxLength: 10 - pattern: [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]))
Filter by sales order date. End date for searching sales orders.
- topNumberofHits: (string)
The number of hits to be returned The default number is 10.
Example:
10
HTTP status code 200
Search sales order successfully.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Order",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"mixins": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "uri"
}
}
}
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the order. Each attribute is a separate mixin"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Unix time stamp"
},
"completed": {
"type": "string",
"format": "date-time",
"description": "Unix time stamp"
},
"status": {
"type": "string",
"description": "Values in OrderStatus.java"
},
"entries": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Actual products",
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"unitPrice": {
"type": "number",
"description": "WARNING: Beware of rounding problems in future"
},
"id": {
"type": "string"
},
"totalPrice": {
"type": "number",
"description": "Total price of all items"
},
"link": {
"type": "string",
"description": "Hypermedia reference to original product"
},
"product": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"mixins": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "uri"
}
}
}
},
"id": {
"type": "string",
"description": "Unique identifier"
},
"code": {
"type": "string",
"description": "Product stock keeping unit. If not provided, it is generated (mainly based on name)."
},
"name": {
"type": "string",
"description": "The name of the product."
},
"description": {
"type": "string",
"description": "The description of the product."
},
"published": {
"type": "boolean",
"default": false,
"description": "This flag determines if product is live."
},
"images": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
},
"mixins": {
"type": "object",
"description": "The collection of mixins stored in the product. Each attribute is a separate mixin"
}
},
"required": [
"name"
],
"description": "Complete detail of a product"
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
},
"customer": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Customer information",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Customer id"
},
"name": {
"type": "string",
"description": "Customer name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"title": {
"type": "string"
},
"firstName": {
"type": "string",
"description": "Customer first name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"middleName": {
"type": "string"
},
"lastName": {
"type": "string",
"description": "Customer last name. Either the 'name' field or both of 'firstName' and 'lastName' fields must be provided."
},
"email": {
"type": "string",
"description": "Customer email"
},
"company": {
"type": "string"
}
},
"required": [
"email"
]
},
"billingAddress": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"contactName": {
"type": "string"
},
"companyName": {
"type": "string"
},
"street": {
"type": "string"
},
"streetNumber": {
"type": "string"
},
"streetAppendix": {
"type": "string"
},
"zipCode": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"contactPhone": {
"type": "string"
}
},
"required": [
"contactName",
"street",
"zipCode",
"city",
"country"
],
"description": "Billing address"
},
"shippingAddress": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"contactName": {
"type": "string"
},
"companyName": {
"type": "string"
},
"street": {
"type": "string"
},
"streetNumber": {
"type": "string"
},
"streetAppendix": {
"type": "string"
},
"zipCode": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"contactPhone": {
"type": "string"
}
},
"required": [
"contactName",
"street",
"zipCode",
"city",
"country"
],
"description": "Shipping address"
},
"totalPrice": {
"type": "number",
"description": "Total value of the entire order"
},
"currency": {
"type": "string",
"description": "Currency used for within the entire order (three letter code)",
"default": "USD"
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"payments": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "The status of payment"
},
"method": {
"type": "string",
"description": "The method of payment: STRIPE / Credit Cart / etc (currently only STRIPE)"
},
"paymentResponse": {
"type": "string",
"description": "Response string from the payment gateway API call"
},
"paidAmount": {
"type": "number",
"description": "The amount paid"
},
"currency": {
"type": "string",
"description": "Currency used for the payment (three letter code)"
}
},
"required": [
"status",
"method",
"paidAmount",
"currency"
]
}
},
"shipments": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"trackingNumber": {
"type": "string",
"description": "Tracking number of the shipment"
},
"carrier": {
"type": "string",
"description": "Shipment carrier (e.g. FEDEX, UPS, ...)"
},
"shippedDate": {
"type": "string",
"format": "date-time",
"description": "Date of shipment"
}
},
"required": [
"carrier",
"shippedDate"
]
}
},
"shipping": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The total amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"pattern": "^[a-z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
}
}
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The total amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"discounts": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Discount applied to entire Order or an Order Entry",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"name": {
"type": "string"
},
"discountRate": {
"type": "number"
},
"sequenceId": {
"type": "integer"
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code",
"amount",
"currency",
"sequenceId"
]
}
},
"tax": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"total": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"default": 0,
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF"
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"inclusive"
],
"description": "Actual tax amount to be charged"
},
"lines": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "The tax amount in the specified currency."
},
"currency": {
"type": "string",
"default": "USD",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CAD"
},
"code": {
"type": "string",
"description": "e.g.: VAT_DE_REGULAR"
},
"name": {
"type": "string",
"description": "e.g.: Mehrwertsteuer 19%"
},
"rate": {
"type": "number",
"description": "Percentage as a floating point value, e.g.: 0.19"
},
"sequenceId": {
"type": "integer",
"description": "Order number of the specified tax type."
},
"inclusive": {
"type": "boolean",
"default": false,
"description": "Determines if the tax is already included in the line price"
}
},
"required": [
"amount",
"currency",
"sequenceId",
"inclusive"
],
"description": "Tax data that serves as the basis to calculate taxes"
}
}
},
"required": [
"total"
]
},
"link": {
"$schema": "http://json-schema.org/schema#",
"description": "Reference to Discount resource for more information",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"type"
]
}
},
"required": [
"code"
]
}
}
},
"required": [
"total"
]
}
},
"required": [
"created",
"status",
"entries",
"customer",
"totalPrice"
]
}
}
Example:
[
{
"metadata": {
"mixins": {}
},
"siteCode": "main",
"totalPrice": 15,
"created": "2016-07-11T03:54:39.702Z",
"payments": [
{
"status": "SUCCESS",
"method": "Visa",
"paymentResponse": "ch_17RwlPCPRlpVRgUI7lTHrIi3",
"paidAmount": 15,
"currency": "USD"
}
],
"tax": {
"lines": [
{
"amount": 0.45,
"currency": "USD",
"rate": 10,
"sequenceId": 0,
"inclusive": true
},
{
"amount": 0.48,
"currency": "USD",
"code": "Add 5",
"name": "Add 5",
"rate": 5,
"sequenceId": 1,
"inclusive": true
}
],
"total": {
"amount": 0.93,
"currency": "USD",
"inclusive": true
}
},
"entries": [
{
"id": "565bc220830ed99b9c81236b",
"amount": 1,
"unitPrice": 10,
"totalPrice": 10,
"product": {
"metadata": {
"mixins": {
"inventory": "https://api.beta.yaas.io/hybris/schema/b2/hybriscommerce/inventorySchema-v1",
"taxCodes": "https://api.beta.yaas.io/hybris/schema/v1/hybriscommerce/productTaxCodeMixin-1.0.0"
}
},
"id": "HKC0PR3M",
"code": "1231231",
"name": "Test",
"description": "Test",
"published": true,
"images": [
{
"id": "565d642cdbee95dad02a44b6",
"url": "https://api.beta.yaas.io/hybris/media/v1/cecenterdevman/hybris.product/media/565d642cdbee95dad02a44b6",
"stored": false
}
],
"mixins": {
"inventory": {
"inStock": true
},
"taxCodes": {
"GE": "increase",
"main": "Add"
}
}
},
"tax": {
"lines": [
{
"amount": 0.48,
"currency": "USD",
"code": "Add 5",
"name": "Add 5",
"rate": 5,
"sequenceId": 0,
"inclusive": true
}
],
"total": {
"amount": 0.48,
"currency": "USD",
"inclusive": true
}
}
}
],
"discounts": [],
"shipping": {
"total": {
"amount": 5,
"currency": "USD"
},
"lines": [
{
"amount": 5,
"currency": "USD",
"code": "ups",
"name": "UPS",
"tax": {
"lines": [],
"total": {
"amount": 0,
"currency": "USD",
"inclusive": false
}
}
}
]
},
"shippingAddress": {
"contactName": "yao1218yo1",
"companyName": "",
"street": "No 90",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "12345",
"city": "cd",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"currency": "USD",
"id": "4I8XH8W4",
"billingAddress": {
"contactName": "yao1218yo1",
"companyName": "",
"street": "No 90",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "12345",
"city": "cd",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"customer": {
"id": "C8964256706",
"name": "yao1218 mm yo1",
"title": "MR",
"firstName": "yaoUtestii",
"middleName": "mm",
"lastName": "testUU",
"email": "yao1218yo1@hybristest.com"
},
"status": "CREATED"
},
{
"metadata": {
"mixins": {}
},
"siteCode": "main",
"totalPrice": 15,
"created": "2016-07-12T09:28:30.227Z",
"payments": [
{
"status": "SUCCESS",
"method": "Visa",
"paymentResponse": "ch_17SOS1CPRlpVRgUIKbWLHUe2",
"paidAmount": 15,
"currency": "USD"
}
],
"tax": {
"lines": [
{
"amount": 0.45,
"currency": "USD",
"rate": 10,
"sequenceId": 0,
"inclusive": true
},
{
"amount": 0.48,
"currency": "USD",
"code": "Add 5",
"name": "Add 5",
"rate": 5,
"sequenceId": 1,
"inclusive": true
}
],
"total": {
"amount": 0.93,
"currency": "USD",
"inclusive": true
}
},
"entries": [
{
"id": "565bc220830ed99b9c81236b",
"amount": 1,
"unitPrice": 10,
"totalPrice": 10,
"product": {
"metadata": {
"mixins": {
"inventory": "https://api.beta.yaas.io/hybris/schema/b2/hybriscommerce/inventorySchema-v1",
"taxCodes": "https://api.beta.yaas.io/hybris/schema/v1/hybriscommerce/productTaxCodeMixin-1.0.0"
}
},
"id": "3M4MO4CF",
"code": "1231231",
"name": "Test",
"description": "Test",
"published": true,
"images": [
{
"id": "565d642cdbee95dad02a44b6",
"url": "https://api.beta.yaas.io/hybris/media/v1/cecenterdevman/hybris.product/media/565d642cdbee95dad02a44b6",
"stored": false
}
],
"mixins": {
"inventory": {
"inStock": true
},
"taxCodes": {
"GE": "increase",
"main": "Add"
}
}
},
"tax": {
"lines": [
{
"amount": 0.48,
"currency": "USD",
"code": "Add 5",
"name": "Add 5",
"rate": 5,
"sequenceId": 0,
"inclusive": true
}
],
"total": {
"amount": 0.48,
"currency": "USD",
"inclusive": true
}
}
}
],
"discounts": [],
"shipping": {
"total": {
"amount": 5,
"currency": "USD"
},
"lines": [
{
"amount": 5,
"currency": "USD",
"code": "ups",
"name": "UPS",
"tax": {
"total": {
"amount": 0,
"currency": "USD",
"inclusive": false
}
}
}
]
},
"shippingAddress": {
"contactName": "Jim Li",
"companyName": "",
"street": "Tianfu Software Park",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "610041",
"city": "New York",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"currency": "USD",
"id": "GN3EASCC",
"billingAddress": {
"contactName": "Jim Li",
"companyName": "",
"street": "Tianfu Software Park",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "610041",
"city": "New York",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"customer": {
"id": "ANONYMOUS",
"name": "Jim Li",
"title": "MR",
"firstName": "utestJim",
"lastName": "Litestli",
"email": "Jim.Li@hybristest.com"
},
"status": "CREATED"
},
{
"metadata": {
"mixins": {}
},
"siteCode": "main",
"totalPrice": 14.47,
"created": "2016-08-15T12:53:46.374Z",
"payments": [
{
"status": "SUCCESS",
"method": "Visa",
"paymentResponse": "ch_17pHgECPRlpVRgUIHPiigQb4",
"paidAmount": 14.47,
"currency": "USD"
}
],
"tax": {
"lines": [
{
"amount": 0.44,
"currency": "USD",
"rate": 10,
"sequenceId": 0,
"inclusive": true
},
{
"amount": 0.46,
"currency": "USD",
"code": "Add 5",
"name": "Add 5",
"rate": 5,
"sequenceId": 1,
"inclusive": true
}
],
"total": {
"amount": 0.9,
"currency": "USD",
"inclusive": true
}
},
"entries": [
{
"id": "565bc220830ed99b9c81236b",
"amount": 1,
"unitPrice": 10,
"totalPrice": 10,
"product": {
"metadata": {
"mixins": {
"inventory": "https://api.beta.yaas.io/hybris/schema/b2/hybriscommerce/inventorySchema-v1",
"taxCodes": "https://api.beta.yaas.io/hybris/schema/v1/hybriscommerce/productTaxCodeMixin-1.0.0"
}
},
"id": "565bc220830ed99b9c81236b",
"code": "1231231",
"name": "Rose",
"description": "rose",
"published": true,
"images": [
{
"id": "565d642cdbee95dad02a44b6",
"url": "https://api.beta.yaas.io/hybris/media/v2/public/files/565d642cdbee95dad02a44b6",
"stored": false
}
],
"mixins": {
"inventory": {
"inStock": true
},
"taxCodes": {
"GE": "increase",
"main": "Add"
}
}
},
"tax": {
"lines": [
{
"amount": 0.46,
"currency": "USD",
"code": "Add 5",
"name": "Add 5",
"rate": 5,
"sequenceId": 0,
"inclusive": true
}
],
"total": {
"amount": 0.46,
"currency": "USD",
"inclusive": true
}
}
}
],
"discounts": [
{
"code": "TOTAL",
"amount": 0.5,
"currency": "USD",
"sequenceId": 1
}
],
"shipping": {
"total": {
"amount": 5,
"currency": "USD"
},
"lines": [
{
"amount": 5,
"currency": "USD",
"code": "ups",
"name": "UPS",
"tax": {
"total": {
"amount": 0,
"currency": "USD",
"inclusive": false
}
}
}
]
},
"shippingAddress": {
"contactName": "Heather",
"companyName": "",
"street": "wuhou",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "12345",
"city": "chengdu",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"currency": "USD",
"id": "3P7VSFLD",
"billingAddress": {
"contactName": "Heather",
"companyName": "",
"street": "wuhou",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "12345",
"city": "chengdu",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"customer": {
"id": "C3340402036",
"name": "Heather Mo",
"title": "MS",
"firstName": "Heather",
"lastName": "Mo",
"email": "heather@hybristest.com"
},
"status": "CREATED"
},
{
"metadata": {
"mixins": {}
},
"siteCode": "main",
"totalPrice": 15,
"created": "2016-07-13T03:54:39.702Z",
"payments": [
{
"status": "SUCCESS",
"method": "Visa",
"paymentResponse": "ch_17RwlPCPRlpVRgUI7lTHrIi3",
"paidAmount": 15,
"currency": "USD"
}
],
"tax": {
"lines": [
{
"amount": 0.45,
"currency": "USD",
"rate": 10,
"sequenceId": 0,
"inclusive": true
},
{
"amount": 0.48,
"currency": "USD",
"code": "Add 5",
"name": "Add 5",
"rate": 5,
"sequenceId": 1,
"inclusive": true
}
],
"total": {
"amount": 0.93,
"currency": "USD",
"inclusive": true
}
},
"entries": [
{
"id": "565bc220830ed99b9c81236b",
"amount": 1,
"unitPrice": 10,
"totalPrice": 10,
"product": {
"metadata": {
"mixins": {
"inventory": "https://api.beta.yaas.io/hybris/schema/b2/hybriscommerce/inventorySchema-v1",
"taxCodes": "https://api.beta.yaas.io/hybris/schema/v1/hybriscommerce/productTaxCodeMixin-1.0.0"
}
},
"id": "565bc220830ed99b9c81236b",
"code": "1231231",
"name": "Test",
"description": "Test",
"published": true,
"images": [
{
"id": "565d642cdbee95dad02a44b6",
"url": "https://api.beta.yaas.io/hybris/media/v1/cecenterdevman/hybris.product/media/565d642cdbee95dad02a44b6",
"stored": false
}
],
"mixins": {
"inventory": {
"inStock": true
},
"taxCodes": {
"GE": "increase",
"main": "Add"
}
}
},
"tax": {
"lines": [
{
"amount": 0.48,
"currency": "USD",
"code": "Add 5",
"name": "Add 5",
"rate": 5,
"sequenceId": 0,
"inclusive": true
}
],
"total": {
"amount": 0.48,
"currency": "USD",
"inclusive": true
}
}
}
],
"discounts": [],
"shipping": {
"total": {
"amount": 5,
"currency": "USD"
},
"lines": [
{
"amount": 5,
"currency": "USD",
"code": "ups",
"name": "UPS",
"tax": {
"lines": [],
"total": {
"amount": 0,
"currency": "USD",
"inclusive": false
}
}
}
]
},
"shippingAddress": {
"contactName": "yao1218yo1",
"companyName": "",
"street": "No 90",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "12345",
"city": "cd",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"currency": "USD",
"id": "4I8XH8WW",
"billingAddress": {
"contactName": "yao1218yo1",
"companyName": "",
"street": "No 90",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "12345",
"city": "cd",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"customer": {
"id": "C8964256706",
"name": "yao1218 mm yo1",
"title": "MR",
"firstName": "uTest",
"middleName": "testmm",
"lastName": "testll",
"email": "yao1218yo1@hybristest.com"
},
"status": "DECLINE"
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
error
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:
error
HTTP status code 500
An internal server error occurred.
Body
Type: application/json
Schema:
error
HTTP status code 503
Service temporarily unavailable.
Body
Type: application/json
Schema:
error
/{tenant}/serviceTicket/advancedSearch
Advanced search for service tickets.
/{tenant}/serviceTicket/advancedSearch
Search for service tickets using multiple query parameters.
Only in query parameters fistName
and lastName
, the wildcard (*) is supported to represent one or more characters.
If no query parameter is specified, only the latest 10 items created will be returned.
Only the service tickets that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.serviceticket_view
get /{tenant}/serviceTicket/advancedSearch
Search for service tickets using multiple query parameters.
Only in query parameters fistName
and lastName
, the wildcard (*) is supported to represent one or more characters.
If no query parameter is specified, only the latest 10 items created will be returned.
Only the service tickets that have been successfully indexed by the Engagement Center Indexing service can be searched out.
Required scope: hybris.serviceticket_view
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
Stands for the "project" that requests this resource. Must match the "project" that is associated with the access token in the Authorization header.
Example:
myexampleshop
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- ticketNumber: (string)
Filter by service ticket number. You can enter multiple service ticket numbers. Use a comma (,) to separate them.
Example:
1000000205,1000000109
- type: (string)
Filter by service ticket type. You can enter multiple service ticket types. Use a comma (,) to separate them.
Example:
service_request,repair
- priority: (string)
Filter by service ticket priority. You can enter multiple service ticket priorities. Use a comma (,) to separate them.
Example:
high,medium
- status: (string)
Filter by service ticket status. You can enter multiple service ticket statuses.Use a comma (,) to separate them.
Example:
open,in_process
- customerId: (string)
Filter by customer ID number. You can enter multiple customer ID numbers. Use a comma (,) to separate them.
Example:
c0750876755,c6526854992
- firstName: (string)
Filter by first name. Enter one first name only. You can use the wildcard (*) in your search.
Example:
Tom
- lastName: (string)
Filter by last name. Enter one last name only. You can use the wildcard (*) in your search.
Example:
Smith
- createdFrom: (string - minLength: 10 - maxLength: 10 - pattern: [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]))
Filter by service ticket date. Start date for searching service tickets.
- email: (string)
Filter by email. You can enter multiple emails. Use a comma (,) to separate them.
Example:
test01@hybristest.com,test02@hybristest.com
- productId: (string)
Filter by product ID number. You can enter multiple id numbers. Use a comma (,) to separate them.
Example:
54edbc234c6e41e122d15b3a,54eabc862c6a41e472d15f3a
- createdTo: (string - minLength: 10 - maxLength: 10 - pattern: [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]))
Filter by service ticket date. End date for searching service tickets.
- topNumberofHits: (string)
The number of hits to be returned The default number is 10.
Example:
10
HTTP status code 200
Search service ticket successfully.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ServiceTicket",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket GET Schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the service ticket"
},
"ticketNumber": {
"type": "string",
"description": "Human-readable service ticket number"
},
"type": {
"type": "string",
"description": "Service ticket type"
},
"typeDescription": {
"$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 ticket type"
},
"classification": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket Classifications",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket Classification",
"type": "object",
"properties": {
"classification": {
"type": "string",
"description": "Technical key of the service ticket classification"
},
"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 classification"
}
}
},
"description": "Classification"
},
"priority": {
"enum": [
"VERY_HIGH",
"HIGH",
"MEDIUM",
"LOW"
],
"description": "Service ticket priority"
},
"priorityDescription": {
"$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 priority"
},
"status": {
"enum": [
"OPEN",
"IN_PROCESS",
"COMPLETED",
"CONFIRMED"
],
"description": "Service ticket status"
},
"statusDescription": {
"$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"
},
"dueAt": {
"type": "string",
"format": "date-time",
"description": "Date and the time the ticket is due (in UTC)"
},
"closedAt": {
"type": "string",
"format": "date-time",
"description": "Date and the time the ticket was closed (in UTC)"
},
"processingTime": {
"type": "integer",
"description": "Calculated processing time of the ticket in seconds"
},
"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"
},
"assignedTo": {
"type": "string",
"description": "Id of the user working on the service ticket"
},
"transcript": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Service Ticket 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)"
},
"description": {
"type": "string",
"description": "Description"
}
}
},
"description": "Transcript"
},
"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": "metadata",
"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": [
"id"
]
}
}
Example:
[
{
"id": "55473b487deefe21340ae74f",
"ticketNumber": "1000000001",
"type": "SERVICE_REQUEST",
"typeDescription": {
"en": "Service Request"
},
"priority": "HIGH",
"priorityDescription": {
"en": "High"
},
"classification": "",
"status": "IN_PROCESS",
"statusDescription": {
"en": "In Process"
},
"dueAt": "2016-06-1T23:59:59.999+0000",
"processingTime": 432000,
"customerFirstName": "JohnUTestXX",
"customerEmail": "johntest@hybristest.com",
"customerId": "C0750876755",
"modifiedBy": "test@test.com",
"customerLastName": "Test",
"productId": "54e60e07d26ec374ee8e769f",
"shortDescription": "Request for regular maintenance",
"assignedTo": "test@test.com",
"transcript": [
{
"createdBy": "test@test.com",
"createdAt": "2016-06-01T12:28:07.000+0000",
"description": "Customer requested to perform regular maintenance of their FOCUS MARES bike"
}
],
"createdBy": "test@test.com",
"metadata": {
"createdAt": "2016-07-10T12:28:07.000+0000",
"modifiedAt": "2016-08-01T12:28:07.000+0000",
"version": 1
}
},
{
"ticketNumber": "1000000002",
"metadata": {
"createdAt": "2016-07-26T09:42:27.781+0000",
"mixins": {
"collectors_info": "https://devportal.yaas.io/services/document/latest/download/comicCollectorValue_v1.json"
},
"modifiedAt": "2016-07-26T09:42:27.781+0000",
"version": 1
},
"productId": "5797307a042d5a001de805ce",
"typeDescription": {
"de": "Serviceanfrage",
"en": "Service Request"
},
"shortDescription": "Request for regular maintenance",
"classification": "",
"priority": "MEDIUM",
"type": "SERVICE_REQUEST",
"assignedTo": "mandy@hybristest.com",
"processingTime": 0,
"dueAt": "2015-06-30T23:59:59.999+0000",
"mixins": {
"collectors_info": {
"CollectorsValue": {
"usd": 30.99,
"eur": 23.99
}
}
},
"statusDescription": {
"de": "In Bearbeitung",
"en": "In Process"
},
"transcript": [
{
"createdAt": "2016-06-19T12:28:07.000+0000",
"createdBy": "mandy@hybristest.com",
"description": "Customer requested to perform regular maintenance of their FOCUS MARES bike"
}
],
"createdBy": "mandy@hybristest.com",
"priorityDescription": {
"de": "Hoch",
"en": "High"
},
"customerFirstName": "uTestlulu",
"customerEmail": "johnutest@hybristest.com",
"customerId": "C5793971272",
"modifiedBy": "mandy@hybristest.com",
"customerLastName": "Testlu",
"id": "57973083042d5a001de805d0",
"status": "OPEN"
},
{
"ticketNumber": "1000000003",
"metadata": {
"createdAt": "2016-07-26T09:42:24.880+0000",
"mixins": {
"collectors_info": "https://devportal.yaas.io/services/document/latest/download/comicCollectorValue_v1.json"
},
"modifiedAt": "2016-07-30T09:42:24.880+0000",
"version": 1
},
"productId": "5797307a042d5a001de805ce",
"typeDescription": {
"de": "Serviceanfrage",
"en": "Service Request"
},
"shortDescription": "Request for regular maintenance",
"classification": "",
"priority": "HIGH",
"type": "SERVICE_REQUEST",
"assignedTo": "mandy@hybristest.com",
"processingTime": 0,
"dueAt": "2015-06-30T23:59:59.999+0000",
"mixins": {
"collectors_info": {
"CollectorsValue": {
"usd": 30.99,
"eur": 23.99
}
}
},
"statusDescription": {
"de": "In Bearbeitung",
"en": "In Process"
},
"transcript": [
{
"createdAt": "2016-06-11T12:28:07.000+0000",
"createdBy": "mandy@hybristest.com",
"description": "Customer requested to perform regular maintenance of their FOCUS MARES bike"
}
],
"createdBy": "mandy@hybristest.com",
"priorityDescription": {
"de": "Hoch",
"en": "High"
},
"customerFirstName": "kkutestkk",
"customerEmail": "johntest@hybristest.com",
"customerId": "C5793971272",
"modifiedBy": "mandy@hybristest.com",
"customerLastName": "Testuuu",
"id": "57973080ed673c001df9591f",
"status": "IN_PROCESS"
},
{
"ticketNumber": "1000000004",
"metadata": {
"createdAt": "2016-07-25T09:42:21.141+0000",
"modifiedAt": "2016-07-26T09:42:21.141+0000",
"version": 1
},
"productId": "5797307a042d5a001de805ce",
"typeDescription": {
"de": "Serviceanfrage",
"en": "Service Request"
},
"shortDescription": "Request for regular maintenance",
"classification": "",
"priority": "HIGH",
"type": "REPAIR",
"assignedTo": "mandy@hybristest.com",
"processingTime": 0,
"dueAt": "2015-06-30T23:59:59.999+0000",
"statusDescription": {
"de": "In Bearbeitung",
"en": "In Process"
},
"transcript": [
{
"createdAt": "2015-06-19T12:28:07.000+0000",
"createdBy": "mandy@hybristest.com",
"description": "Customer requested to perform regular maintenance of their FOCUS MARES bike"
}
],
"createdBy": "mandy@hybristest.com",
"priorityDescription": {
"de": "Hoch",
"en": "High"
},
"customerFirstName": "Johnutestyy",
"customerEmail": "johntest@hybristest.com",
"customerId": "C5793971272",
"modifiedBy": "mandy@hybristest.com",
"customerLastName": "Testyy",
"id": "5797307ded673c001df9591e",
"status": "IN_PROCESS"
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
error
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:
error
HTTP status code 500
An internal server error occurred.
Body
Type: application/json
Schema:
error
HTTP status code 503
Service temporarily unavailable.
Body
Type: application/json
Schema:
error
/{tenant}/product/advancedSearch
Advanced search for products.
/{tenant}/product/advancedSearch
Search for products using multiple query parameters.
For query parameter q
, you can enter key words for search. If multiple key words are used, use a space to separate them. The wildcard (*) is supported to represent one or more characters in key words.
If no query parameter is specified, only the latest 10 items created will be returned.
Only the products that have been successfully indexed by the Engagement Center Indexing service can be searched out.
get /{tenant}/product/advancedSearch
Search for products using multiple query parameters.
For query parameter q
, you can enter key words for search. If multiple key words are used, use a space to separate them. The wildcard (*) is supported to represent one or more characters in key words.
If no query parameter is specified, only the latest 10 items created will be returned.
Only the products that have been successfully indexed by the Engagement Center Indexing service can be searched out.
URI Parameters
- tenant: required (string - minLength: 3 - maxLength: 16 - pattern: [a-z][a-z0-9]+)
Stands for the "project" that requests this resource. Must match the "project" that is associated with the access token in the Authorization header.
Example:
myexampleshop
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- q: required (string)
Search product by key words. You can use the wildcard (*) in your search.
Example:
p12345
- language: (string)
The language of hits to return The default language is English.
Example:
en
- fields: (string)
The default fields to use in the query You can enter multiple fields. Use a comma (,) to separate them. Default fields are code and name.
Example:
code,name
- default_operator: (string)
The operator can be AND or OR. The default operator is OR.
Example:
OR
- topNumberofHits: (string)
The number of hits to be returned The default number is 10.
Example:
10
- unpublishIncluded: (boolean)
If the search result includes the unpublish products. The default value is false.
HTTP status code 200
Search product successfully.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Product",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"mixins": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "uri"
}
}
}
},
"id": {
"type": "string",
"description": "Unique identifier"
},
"code": {
"type": "string",
"description": "Product stock keeping unit. If not provided, it is generated (mainly based on name).",
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\/\\-\\s_*]*$"
},
"name": {
"$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": "The name of the product."
},
"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": "The description of the product."
},
"published": {
"type": "boolean",
"default": false,
"description": "This flag determines if product is live."
},
"media": {
"type": "array",
"items": {
"type": "object",
"description": "Media file metadata",
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL of file content"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Media file tags"
},
"contentType": {
"type": "string",
"description": "MIME type of the media file"
},
"stored": {
"type": "boolean",
"description": "If true, the media file is stored in the service. Otherwise the service only stores external URL of the file and metadata."
},
"position": {
"type": "integer",
"description": "Position of the file in the media file list. The user is responsible for setting the value of this field appropriately. If two or more files have the same position, their order, when retrieving the file list, will be undetermined."
},
"customAttributes": {
"type": "object",
"additionalProperties": true,
"description": "Map of custom attributes. The map key should is a string, the value can be any JSON object"
}
},
"additionalProperties": false
},
"description": "Contains media information (including url). This attribute is Read-Only, to manage media collection please use the /media subresource. To get this attribute included in product please add the expand=media query param. By default this attribute is not returned with product."
},
"mixins": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"name"
]
}
}
Example:
[
{
"id": "545b4e3dfaee4c10def3db25",
"code": "iphoneZ21415269949944",
"name": "XX iphone5s",
"description": "this is a test.",
"published": false
},
{
"id": "545b4e3dfaee4c10def3db6",
"code": "iphoneZ21415269949945",
"name": "iphone6",
"description": "this is a test.",
"published": true
},
{
"id": "545b4e3dfaee4c10def3db7",
"code": "iphoneZ21415269949946",
"name": "iphone7 test",
"description": "this is a test.",
"published": true
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
error
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:
error
HTTP status code 500
An internal server error occurred.
Body
Type: application/json
Schema:
error
HTTP status code 503
Service temporarily unavailable.
Body
Type: application/json
Schema:
error
Scopes
The table below shows the scopes that the Engagement Center Search service supports.
SCOPE | DESCRIPTION |
---|---|
hybris.serviceticket_view | Provide read-only access to service tickets |
hybris.order_read | Provide read-only access to sales orders |
hybris.cecentercustomer_view | Provide read-only access to Engagement Center customers |
For more information about scopes, authorization, and authentication procedures for YaaS services, see Scopes and Authorization.
Search Indexing Data
Based on Elasticsearch, the Engagement Center Search service offers full-text search and matching. For example, you can split the most frequently searched data of a customer and create an index for the customer. This helps to improve the data search performance. You can only search for the data indexed by the Engagement Center Indexing service.
Quick Search
You can do a quick search which calling the persistence search API, a kind of simple proxy that exposes Elasticsearch , without any additional validation added. Quick search is more flexible and general than advanced search. Quick search offers full-text search for the indexed data of customers, transactions, products, sales orders and service tickets.
The parameter q of quick search APIs maps to the query string query of Elasticsearch, which enables you to run queries on any field in your index. Use a space to separate multiple query fields. By default, the logic operator for these multiple query fields is or
. You can also define the logic as or
and and
. If you do not assign the key word to any field, the service searches all fields of the indexed data to find a match.
For more information about the query-string search, see Query String Query.
For more information about quick search, see Quick Search Practices.
Advanced Search
Use the advanced search for complex and special search queries. You need to specify multiple query parameters to run an advanced search. The service only returns results that conform to all query parameters.
Use multiple query parameters to search for service tickets. You can use wildcard query for parameters, including email, firstName, and lastName. Use?
for any character. Use *
for zero or extra characters. You can use multiple values for parameters, including salesOrderNumber and status. Use a comma to separate the multiple values. Both the salesOrderNumber and status support exact term query.
Use multiple query parameters to search for sales orders. You can use wildcard query for parameters, including firstName and lastName. Use?
for any character. Use *
for zero or extra characters. You can use multiple values for parameters, including ticketNumber, type, priority, status, customerId and productId. Use a comma to separate the multiple values. All of the fields ticketNumber, type, priority, status, customerId and productId support exact term query.
Use multiple query parameters to search for products. Default value of fields are code
and name
. You can specify multiple fields for this parameter and use a comma to separate these fields.The parameter language indicates which language of name
and description
you want to query. If you specify multiple languages, use a comma to separate them. Default language is English. The parameter q is the query string and only supports wildcard matching. By default, The service adds *
at the beginning and the end of the value of q. Use and
for the parameter default_operator to search for products when all the fields need to match the query string. Otherwise, use or
. The default value for the logic operator is or
.
For more information, see Advanced Search Practices .
Quick Search Practices
Customer quick search
The example below shows how to use quick search for customers.
Request
- Method: GET
- Request URL:
https://api.beta.yaas.io/hybris/cecentersearch/v1/{tenant}/customer/search
- Headers
- Authorization: This includes a valid OAuth2 access token. To access this method, the access token must be issued for the requested tenant and have the scope hybris.cecentercustomer_view.
- URI Parameters
- {tenant}: The name of the current tenant.
- Query Parameters
- q: Use the query to search for specific results.
- Set the value of q to search for all the customers that contain the query value. The query analyzes the value with the standard analyzer to offer full-text search and matching .
For example: q=hello world
The service returns all the customers that contain the word hello or world . - When you query an exact-value field, such as contactEmail or contactPhone, the query searches for the exact value you specified rather than analyzing the query string .
For example:q=contactEmail:markus@hybristest.com
- Use
?
for any character. Use*
for zero or extra characters .
For example: q=*t?t*
- Use a space to separate multiple query fields. By default, the logic for those multiple query fields is
or
.
For example: q=lastName:*test* firstName:*ran*
- Use a space to separate multiple query fields. You can define the logic as
and
.
For example: q=(lastName:*test* firstName:*ran*) AND middleName:test
Equals to:q=(lastName:*test* OR firstName:*ran*) AND middleName:test
- Set the value of q to search for all the customers that contain the query value. The query analyzes the value with the standard analyzer to offer full-text search and matching .
- score: Sort by fields. This can be either in the form of fieldname or fieldname:asc/fieldName:desc. The fieldName can either be an actual field within the document, or the special_score name to indicate sorting based on scores. It’s is possible to combine several sorting parameters. How the fields are displayed on the UI depends on the order in which you arrange these sorting parameters .
For example:customerNumber:asc,id:desc
- from: Starting index of the hits to be returned. Default number is 0 .
For Example:0
- topNumberofHits: The number of hits to be returned. The default number is 10 .
For Example:10
- q: Use the query to search for specific results.
Response
The successful response returns a 200
status code. An example JSON content including the customers looks similar to the following:
[
{
"lastName": "test",
"preferredLanguage": "en_US",
"metadata": {
"mixins": {}
},
"preferredCurrency": "USD",
"formattedPhone": "",
"active": true,
"customerNumber": "C4404911050",
"title": "MR",
"firstName": "test",
"preferredSite": "default",
"middleName": "test",
"company": "",
"id": "C4404911050",
"contactPhone": "test"
},
{
"lastName": "Test",
"preferredLanguage": "en_US",
"metadata": {
"mixins": {}
},
"contactEmail": "markus@hybristest.com",
"preferredCurrency": "USD",
"active": true,
"customerNumber": "C6355920174",
"title": "MR",
"firstName": "test Markus Test Frank test",
"preferredSite": "default",
"middleName": "test test test test",
"company": "",
"id": "C6355920174",
"contactPhone": ""
}
]
Advanced Search Practices
Search for service tickets by using multiple query parameters.
Request
- Method: GET
- Request URL:
https://api.beta.yaas.io/hybris/cecentersearch/v1/{tenant}/serviceTicket/advancedSearch
- Headers
- Authorization: This includes a valid OAuth2 access token. To access this method, the access token must be issued for the requested tenant and have the scope hybris.serviceticket_view.
- URI Parameters
- {tenant}: The name of the current tenant.
- Query Parameters
- createdFrom: Filter by service ticket date. Start date for searching service tickets. String matching [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]), 10-10 characters.
Example:2015-06-01
- createdTo: Filter by service ticket date. End date for searching service tickets. String matching [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]), 10-10 characters.
Example:2016-06-30
- customerId: Filter by customer ID number. You can enter multiple customer ID numbers. Use a comma to separate them.
Example:C6705827626,C6705827627
- email: Filter by email. You can enter multiple emails. Use a comma to separate them.
Example:coco0202003@hybristes.com,coco.tao@hybristest.com
- firstName: Filter by first name. Enter one first name only. Use
*
in your search.
Example:*coco*
- lastName: Filter by last name. Enter one last name only. Use
?
in your search.
Example:*c?co*
- priority: Filter by service ticket priority. You can enter multiple service ticket priorities. Use a comma to separate them.
Example:high,medium
- productId: Filter by product ID number. You can enter multiple id numbers. Use a comma to separate them .
Example:565bc220830ed99b9c81236b,565bc220830ed99b9c81236b
- status: Filter by service ticket status. You can enter multiple service ticket statuses. Use a comma to separate them.
Example:open,in_process
- ticketNumber: Use the query to search for specific results .
Example: 1000000001,1000000109` - topNumberofHits: The number of hits to be returned The default number is 10.
Example:10
- type: Filter by service ticket type. You can enter multiple service ticket types. Use a comma to separate them.
Example:service_request,repair
- createdFrom: Filter by service ticket date. Start date for searching service tickets. String matching [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]), 10-10 characters.
Response
The successful response returns a 200
status code. An example JSON content including the service tickets looks similar to the following:
[
{
"ticketNumber": "1000000001",
"metadata": {
"createdAt": "2016-04-29T06:43:15.024+0000",
"modifiedAt": "2016-04-29T06:43:15.024+0000",
"version": 1
},
"productId": "565bc220830ed99b9c81236b",
"typeDescription": {
"de": "Serviceanfrage",
"en": "Service Request"
},
"shortDescription": "Request for regular maintenance",
"classification": [
{
"classification": "BASIC_TECHNICAL_SKILLS",
"description": {
"de": "Technische Grundkenntnisse erforderlich",
"en": "Basic technical skills required"
}
}
],
"priority": "HIGH",
"type": "SERVICE_REQUEST",
"processingTime": 15644054,
"dueAt": "2015-06-30T23:59:59.999+0000",
"statusDescription": {
"de": "In Bearbeitung",
"en": "In Process"
},
"createdBy": "coco.tao@hybristest.com",
"priorityDescription": {
"de": "Hoch",
"en": "High"
},
"customerFirstName": "coco0202002acd",
"customerEmail": "coco0202003@hybristes.com",
"customerId": "C6705827626",
"modifiedBy": "coco.tao@hybristest.com",
"customerLastName": "coco0202002cascd",
"id": "5723028300e879001dd95706",
"status": "IN_PROCESS"
}
]
Search for sales orders by using multiple query parameters.
Request
- Method: GET
- Request URL:
https://api.beta.yaas.io/hybris/cecentersearch/v1/{tenant}/salesOrder/advancedSearch
- Headers
- Authorization: This includes a valid OAuth2 access token. To access this method, the access token must be issued for the requested tenant and have the scope hybris.order_read.
- URI Parameters
- {tenant}: Name of the current tenant
- Query Parameters
- createdFrom: Filter by service ticket date. Start date for searching service tickets. string matching [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]), 10-10 characters.
Example:2015-06-01
- createdTo: Filter by service ticket date. End date for searching service tickets. string matching [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]), 10-10 characters.
Example:2016-06-30
- salesOrderNumber: Filter by Sales Order number. You can enter multiple order numbers. Use a comma to separate them.
Example:06X301M0,0IF64HDK
- email: Filter by email address. Enter one email address only. Use
*
in your search.
Example:*wang@hybristest*
- firstName: Filter by first name. Enter one first name only. Use
*
in your search.
Example:*ka*
- lastName: Filter by last name. Enter one last name only. Use
?
in your search.
Example:wa?g
- status: Filter by service ticket status. You can enter multiple service ticket statuses. Use a comma to separate them.
Example:CREATED,DECLINE
- topNumberofHits: The number of hits to be returned. The default number is 10.
Example:10
- createdFrom: Filter by service ticket date. Start date for searching service tickets. string matching [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]), 10-10 characters.
Response
The successful response returns a 200
status code. An example JSON content including the sales orders looks similar to the following:
[
{
"metadata": {
"mixins": {}
},
"siteCode": "main",
"totalPrice": 117.76,
"created": "2016-05-16T10:27:34.898Z",
"payments": [
{
"status": "SUCCESS",
"method": "Visa",
"paymentResponse": "ch_18BiwkCPRlpVRgUIYO40B01k",
"paidAmount": 117.76,
"currency": "USD"
}
],
"tax": {
"lines": [
{
"amount": 10.71,
"currency": "USD",
"rate": 10,
"sequenceId": 0,
"inclusive": true
}
],
"total": {
"amount": 10.71,
"currency": "USD",
"inclusive": true
}
},
"subTotalPrice": 107.76,
"entries": [
{
"id": "56603b6c0bce9f7a85ebc49b",
"amount": 8,
"unitPrice": 13.47,
"totalPrice": 107.76,
"product": {
"metadata": {
"mixins": {
"inventory": "https://api.beta.yaas.io/hybris/schema/b2/hybriscommerce/inventorySchema-v1",
"taxCodes": "https://api.beta.yaas.io/hybris/schema/v1/hybriscommerce/productTaxCodeMixin-1.0.0"
}
},
"id": "56603b6c0bce9f7a85ebc49b",
"code": "H18",
"name": "H18",
"description": "H18e",
"published": true,
"images": [
{
"id": "5698db97650ec1adb4da3af2",
"url": "https://api.beta.yaas.io/hybris/media/v2/public/files/5698db97650ec1adb4da3af2",
"stored": false
}
],
"mixins": {
"inventory": {
"inStock": true
},
"taxCodes": {
"GE": "increase"
}
}
},
"tax": {
"lines": [
{
"amount": 9.8,
"currency": "USD",
"rate": 10,
"sequenceId": 0,
"inclusive": true
}
],
"total": {
"amount": 9.8,
"currency": "USD",
"inclusive": true
}
}
}
],
"discounts": [],
"shipping": {
"total": {
"amount": 10,
"currency": "USD"
},
"lines": [
{
"amount": 10,
"currency": "USD",
"code": "fd",
"name": "Fedex",
"tax": {
"total": {
"amount": 0,
"currency": "USD",
"inclusive": false
}
}
}
]
},
"shippingAddress": {
"contactName": "kaka",
"companyName": "",
"street": "tianfu",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "61400",
"city": "chengdu",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"currency": "USD",
"id": "0IF64HDK",
"billingAddress": {
"contactName": "kaka",
"companyName": "",
"street": "tianfu",
"streetNumber": "",
"streetAppendix": "",
"zipCode": "61400",
"city": "chengdu",
"country": "US",
"state": "AL",
"contactPhone": ""
},
"customer": {
"id": "C2531014710",
"name": "kakaa 4121 wang",
"title": "MR",
"firstName": "kakaa",
"middleName": "4121",
"lastName": "wang",
"email": "kaka4121wang@hybristest.com"
},
"status": "CREATED"
}
]
Search for products by using multiple query parameters.
Request
- Method: GET
- Request URL:
https://api.beta.yaas.io/hybris/cecentersearch/v1/{tenant}/product/advancedSearch
- URI Parameters
- {tenant}: Name of the current tenant.
- Headers
- Authorization: This includes a valid OAuth2 access token. To access this method, the access token must be issued for the requested tenant.
- Query Parameters
- q: Search for products by key words. Use
*
in your search. Add*
to the beginning and end of the value of q. For example:test
Equals to:*test*
- language: The language of hits to be returned. The default language is English. You can use multiple languages for the name and description fields. If the value of fields include name or description, the query searches for the corresponding language you specified. You can specify multiple languages and use a comma to separate them. The relationship of multiple languages is logic
or
.
For example:en,de
- fields: The default fields to use in the query. You can enter multiple fields. Use a comma to separate them. Default fields are
code
andname
.
For Example:code,name
You can else specified the field like this:mixins.ssrvcext.isRegisterable
- default_operator: Use the logic
and
oror
for the operator to specify the relationship of the multiple fields to query. The default operator logic isor
.
For Example:or
- topNumberofHits: The number of hits to be returned. The default number is 10.
For Example:10
- unpublishIncluded: To include the unpublished products or not. The default value is
false
.
For Example:false
- q: Search for products by key words. Use
Response
The successful response returns a 200
status code. An example JSON content including the service tickets looks similar to the following:
[
{
"mixins": {
"productbundle": {
"bundleAspectId": "5354FC1D-7B85-4877-89AF-5F450884890A"
},
"productsubscription": {
"subscriptionAspectId": "5354FC1D-7B85-4877-89AF-5F450884890A"
}
},
"code": "june1",
"name": {
"en": "june1"
},
"description": {
"en": "The world's best camera and camcorder in a waterproof smartphone."
},
"id": "581ad171d3e735001d171be1",
"published": true,
"prices": [
{
"priceId": "581af477d726d5001d8493e2",
"originalAmount": 222,
"effectiveAmount": 222,
"currency": "USD"
}
]
}
]
Error Types
For information about error codes, see the API Reference.
Glossary
Term | Description |
---|---|
analysis | The process of converting full text to terms. |
elasticsearch | An approach that offers full-text search and matching. |
mapping | The process of establishing a one-to-one correspondence between a single source item and a single destination item. |
term | An exact value that is indexed in Elasticsearch. |
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.