Products API

This is the documentation for version v2 of the API. Last update on Jul 2, 2021.

Base URL
https://api.emporix.io/product

Commit

Confirms that the media file specified by the media id is updated and ready to be used with product

Confirms that the media file specified by the media id is updated and ready to be used with product.

Accepted scope:

  • product.product_update - required to attach media to product
Headers
  • authorization Required / string

    Bearer token

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 202 object

    Request to attach media to product is accepted.

    • id Required / string
    • yrn Required / string(uri)

      Contains the Resource Name (YRN) of a specific resource on base of the 'yaas' URN scheme

    • link Required / string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 409 object

    Optimistic locking failed. Someone else updated product with media while user request was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/products/{productId}/media/{mediaId}/commit
$ curl \
 -X POST https://api.emporix.io/product/{tenant}/products/{productId}/media/{mediaId}/commit \
 -H "authorization: string"
Response example (202)
{
  "id": "string",
  "yrn": "https://example.com",
  "link": "string"
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (409)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Media

Return metadata of media files

Return metadata of media files. The list is ordered according to the "position" attribute set in the file metadata.

Accepted scopes:

  • product.product_read_unpublished - required to retrieve media metadata of non-public product
Headers
  • authorization Required / string

    Bearer token

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 200 array[object]

    Resource successfully retrieved.

    • id string
    • yrn string(uri)

      Contains the Resource Name (YRN) of a specific resource on base of the 'yaas' URN scheme

    • createdAt string

      ISO 8601 format date in which the media metadata was created.

    • url string(uri)

      URL of file content

    • tags array[string]

      Media file tags

    • contentType string

      MIME type of the media file

    • uploadLink string

      Link on which user should upload (PUT) media file.

    • uncommittedMedia boolean

      If true, the media file is not committed yet. If property is set to false or is not present the media is already committed

    • customAttributes object

      Map of custom attributes. The map key is a string, the value can be any JSON object

      • Additional properties are allowed
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/products/{productId}/media
$ curl \
 -X GET https://api.emporix.io/product/{tenant}/products/{productId}/media \
 -H "authorization: string"
Response example (200)
[
  {
    "id": "123abc567def",
    "yrn": "urn:yaas:saasag:caasproduct:product-media:myshop;545b4e3dfaee4c10def3db24;123abc567def",
    "url": "https://emporix.com/platform/saas-ag/media/v2/public/files/12345678",
    "contentType": "image/jpeg",
    "tags": [
      "documentation",
      "marketing"
    ],
    "customAttributes": {
      "size": "large"
    }
  },
  {
    "id": "321abc567fed",
    "yrn": "urn:yaas:saasag:caasproduct:product-media:myshop;545b4e3dfaee4c10def3db24;321abc567fed",
    "url": "https://emporix.com/platform/saas-ag/media/v2/public/files/23456789",
    "contentType": "application/pdf",
    "tags": [
      "whitepaper"
    ]
  }
]
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Initialize process of creating new media file for product

Initialize process of creating new media file for product

Headers
  • authorization Required / string

    Bearer token

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 201

    The process is successfully started.

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/products/{productId}/media
$ curl \
 -X POST https://api.emporix.io/product/{tenant}/products/{productId}/media \
 -H "Content-Type: multipart/form-data" \
 -H "authorization: string"
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Media2

Initialize process of creating new media file for product Accepted scopes: * `product

Initialize process of creating new media file for product

Accepted scopes:

  • product.product_update - mandatory
Headers
  • authorization Required / string

    Bearer token

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Body
  • tags array[string]

    Media file tags

  • position integer

    Media order is set based on position property. Position is indexed from 0. If value is <= 0 the media is ordered as first. If value is higher that media count or is not specified the media is ordered as last. When retrieving product media they are ordered, but position property is not returned as it is not persisted

    Default value is 0.

  • contentType string

    MIME type of the file. The provided content type should be the same as the Content-Type header provided during media update, otherwise the update will fail

  • customAttributes object

    Map of custom attributes. The map key should be a string, the value can be any JSON object

    • Additional properties are allowed
  • Additional properties are NOT allowed
Responses
  • 200 object

    The process is successfully started.

    • id Required / string
    • yrn Required / string(uri)

      Contains the Resource Name (YRN) of a specific resource on base of the 'yaas' URN scheme

    • uploadLink Required / string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/products/{productId}/media2
$ curl \
 -X POST https://api.emporix.io/product/{tenant}/products/{productId}/media2 \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -d '{"contentType":"image/jpeg","position":1,"tags":["documentation","marketing"],"customAttributes":{"size":"large"}}'
Request payload example
# Headers
authorization: string

# Payload
{
  "contentType": "image/jpeg",
  "position": 1,
  "tags": [
    "documentation",
    "marketing"
  ],
  "customAttributes": {
    "size": "large"
  }
}
Response example (200)
{
  "id": "string",
  "yrn": "https://example.com",
  "uploadLink": "string"
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Products

Get all products

Get all products.

Accepted scopes:

  • product.product_read_unpublished - required to retrieve non-public products. If not provided only published products are returned
Headers
  • authorization Required / string

    Bearer token

  • Accept-Language string

    The value of the locale identifier of the language in which the attribute should be returned.
    Provide several values separated by comma, in order to specify fallback languages.

  • languages string

    Comma separated list of language identifiers for which the localization for an attribute
    should be provided.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Query parameters
  • pageNumber integer

    The page number to be retrieved where the size of the pages must be specified by the pageSize parameter.
    The number of the first page is 1.

    Minimum value is 1. Default value is 1.

  • pageSize integer

    The number of documents being retrieved on the page.

    Minimum value is 1. Default value is 16.

  • sort string

    The list of comma-separated properties used to sort the results.
    By default, the column values are sorted in ascending order.
    Can either be in the form of fieldName or fieldName:asc,fieldName:desc.
    If you want to sort by localized attributes, you must use the following form:
    fieldName.language or fieldName.language:asc,fieldName.language:desc.

  • q string

    The simple query criteria based on available fields to limit returned results or a set of modified documents.

  • fields Required / string

    Contains a comma separated list of field identifiers, by which the fields of the response entities should be filtered by.
    Empty or not initialized value result in a minimal set of entity fields returned. Non-existing or invalid fields will be ignored.

Responses
  • 200

    Request was successful.

    • Link string

      Link to the current page, the next page and the previous page. Marked accordingly with rel self, rel next and rel prev. The syntax must be conform to RFC-5988.
      The link to the current page (self) is required and must be provided always.
      The link to the next page (next) is optional. If not present, the next page is not available, as the current page is the last page of the result.
      The link to the previous page (prev) is optional. If not present, the previous page is not available, as the current page is the first page of the result.

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/products
$ curl \
 -X GET https://api.emporix.io/product/{tenant}/products?fields=string \
 -H "authorization: string" \
 -H "Accept-Language: string" \
 -H "languages: string"
Response example (200)
# Headers
Link: string
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Create new product

Create new product.

Accepted scopes:

  • product.product_create - mandatory
  • product.product_publish - required if product is created as published (by providing published flag true )
Headers
  • authorization Required / string

    Bearer token

  • Content-Language string

    The locale identifier of the language of the updated attribute.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Body
  • metadata object
    • mixins object
      • Additional properties: string(uri)
    • Additional properties are NOT allowed
  • id string

    Unique identifier

  • code Required / string

    Unique, mandatory user-defined identifier of a product

  • name Required / object

    The name of the product.

  • description object

    The description of the product.

  • published boolean

    This flag determines if product is live.

  • mixins object
  • Additional properties are NOT allowed
Responses
  • 201 object

    The resource has been successfully created.

    • Location string

      The Location of the new resource which was created by the request.
      The value consists of a single absolute URI.
      example: http://www.emporix.com/items/myItem
      required : true

    • id Required / string
    • yrn Required / string(uri)

      Contains the Resource Name (YRN) of a specific resource on base of the 'yaas' URN scheme

    • link Required / string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 409 object

    Product with given code already exists.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/products
$ curl \
 -X POST https://api.emporix.io/product/{tenant}/products \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "Content-Language: string" \
 -d '{"name":"Smartphone Zony Yperia X2","code":"SmartphoneZonyYperiaX21415269949943","description":"The world's best camera and camcorder in a waterproof smartphone."}'
Request payload example
# Headers
authorization: string
Content-Language: string

# Payload
{
  "name": "Smartphone Zony Yperia X2",
  "code": "SmartphoneZonyYperiaX21415269949943",
  "description": "The world's best camera and camcorder in a waterproof smartphone."
}
Response example (201)
# Headers
Location: string

# Payload
{
  "id": "string",
  "yrn": "https://example.com",
  "link": "string"
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (409)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

The endpoint is deprecated and shouldn't be used

The endpoint is deprecated and shouldn't be used.

Accepted scopes:

  • product.product_delete_all - mandatory
Headers
  • authorization Required / string

    Bearer token

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

DELETE /{tenant}/products
$ curl \
 -X DELETE https://api.emporix.io/product/{tenant}/products \
 -H "authorization: string"
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Root

Retrieves a single product

Retrieves a single product.

YRN: urn:yaas:saasag:caasproduct:product:{tenant};{productId}

Accepted scopes:

  • product.product_read_unpublished - required to retrieve non-public product
Headers
  • authorization Required / string

    Bearer token

  • Accept-Language string

    The value of the locale identifier of the language in which the attribute should be returned.
    Provide several values separated by comma, in order to specify fallback languages.

  • languages string

    Comma separated list of language identifiers for which the localization for an attribute
    should be provided.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Query parameters
  • fields Required / string

    Contains a comma separated list of field identifiers, by which the fields of the response entities should be filtered by.
    Empty or not initialized value result in a minimal set of entity fields returned. Non-existing or invalid fields will be ignored.

Responses
  • 200 object

    Product successfully retrieved.

    • metadata object
      • mixins object
        • Additional properties: string(uri)
      • version number
      • createdAt string

        ISO 8601 format date in which the product was created.

      • modifiedAt string

        ISO 8601 format date in which the product was modified.

      • Additional properties are NOT allowed
    • id Required / string

      Unique identifier

    • yrn Required / string(uri)

      Contains the Resource Name (YRN) of a specific resource on base of the 'yaas' URN scheme

    • code string

      Unique, mandatory user-defined identifier of a product

    • name object

      The name of the product.

    • description object

      The description of the product.

    • published boolean

      This flag determines if product is live.

    • media array[object]

      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.

      • id string
      • yrn string(uri)

        Contains the Resource Name (YRN) of a specific resource on base of the 'yaas' URN scheme

      • mediaId string
      • url string(uri)

        URL of file content

      • tags array[string]

        Media file tags

      • contentType string

        MIME type of the media file

      • stored boolean

        If true, the media file is stored in the service. Otherwise the service only stores external URL of the file and metadata.

      • createdAt string

        Date of media metadata creation.

      • commitLink string

        Contains link which is used when user triggers media commit operation. This link is not returned to user as product service internally triggers the commit

      • uploadLink string

        Contains link on which user should send media for upload before he triggers the commit operation

      • uncommittedMedia boolean

        If true, the media file is not committed yet. Not committed media does no have url property provided

      • Additional properties are NOT allowed
    • mixins object
    • Additional properties are NOT allowed
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503

    Service temporarily unavailable.
    body:
    application/json:
    schema: errorMessage

GET /{tenant}/products/{productId}
$ curl \
 -X GET https://api.emporix.io/product/{tenant}/products/{productId}?fields=string \
 -H "authorization: string" \
 -H "Accept-Language: string" \
 -H "languages: string"
Response example (200)
{
  "id": "545b4e3dfaee4c10def3db24",
  "yrn": "urn:yaas:saasag:caasproduct:product:myshop;545b4e3dfaee4c10def3db24",
  "code": "SmartphoneZonyYperiaX21415269949943",
  "name": "Smartphone Zony Yperia X2",
  "description": "The world's best camera and camcorder in a waterproof smartphone.",
  "published": false
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Update a single product

Update a single product.

Accepted scopes:

  • product.product_update - required to update product data
  • product.product_publish - required to publish the product (by setting published flag to true)
  • product.product_unpublish - required to unpublish the product (by setting published flag to false)
Headers
  • authorization Required / string

    Bearer token

  • Content-Language string

    The locale identifier of the language of the updated attribute.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Query parameters
  • partial Required / boolean

    If true, a partial update will be supported, otherwise the full object replacement will be performed.

Body
  • metadata object
    • mixins object
      • Additional properties: string(uri)
    • Additional properties are NOT allowed
  • code Required / string

    Unique, mandatory user-defined identifier of a product

  • name Required / object

    The name of the product.

  • description object

    The description of the product.

  • published boolean

    This flag determines if product is live.

  • mixins object
  • Additional properties are NOT allowed
Responses
  • 200 object

    The resource has been successfully updated.

    • code Required / string
    • status string
    • message string
    • data string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 409 object

    There are three possible reasons:

    1. Product with given code already exists, please choose unique code for your product
    2. Optimistic locking failed. If user sends metadata/version attribute which is outdated (someone else updated product in the time user was performing his changes). User should retrieve the latest product data and retry the request.
    3. Optimistic locking failed. User did not provide metadata/version attribute in update request, but someone else updated product while it was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.
    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

PUT /{tenant}/products/{productId}
$ curl \
 -X PUT https://api.emporix.io/product/{tenant}/products/{productId}?partial=true \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "Content-Language: string" \
 -d '{"name":"Smartphone Zony Yperia X2","code":"545b4e3dfaee4c10def3db24","description":"The world's cheapest camera and camcorder in a simple smartphone."}'
Request payload example
# Headers
authorization: string
Content-Language: string

# Payload
{
  "name": "Smartphone Zony Yperia X2",
  "code": "545b4e3dfaee4c10def3db24",
  "description": "The world's cheapest camera and camcorder in a simple smartphone."
}
Response example (200)
{
  "code": "string",
  "status": "string",
  "message": "string",
  "data": "string"
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (409)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Delete a single Product entity

Delete a single Product entity.

Accepted scopes:

  • product.product_delete - mandatory
Headers
  • authorization Required / string

    Bearer token

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 204

    The resource has been successfully deleted.

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

DELETE /{tenant}/products/{productId}
$ curl \
 -X DELETE https://api.emporix.io/product/{tenant}/products/{productId} \
 -H "authorization: string"
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Return media file metadata by ID

Return media file metadata by ID.

YRN: urn:yaas:saasag:caasproduct:product-media:{tenant};{productId};{mediaId}

Accepted scope:

  • product.product_read_unpublished - to retrieve media metadata of non-public product
Headers
  • authorization Required / string

    Bearer token

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 200 object

    Resource successfully retrieved.

    • id string
    • yrn string(uri)

      Contains the Resource Name (YRN) of a specific resource on base of the 'yaas' URN scheme

    • createdAt string

      ISO 8601 format date in which the media metadata was created.

    • url string(uri)

      URL of file content

    • tags array[string]

      Media file tags

    • contentType string

      MIME type of the media file

    • uploadLink string

      Link on which user should upload (PUT) media file.

    • uncommittedMedia boolean

      If true, the media file is not committed yet. If property is set to false or is not present the media is already committed

    • customAttributes object

      Map of custom attributes. The map key is a string, the value can be any JSON object

      • Additional properties are allowed
    • Additional properties are NOT allowed
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server-side error occurred. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 503 object

    Service temporarily unavailable.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/products/{productId}/media/{mediaId}
$ curl \
 -X GET https://api.emporix.io/product/{tenant}/products/{productId}/media/{mediaId} \
 -H "authorization: string"
Response example (200)
{
  "id": "123abc567def",
  "yrn": "urn:yaas:saasag:caasproduct:product-media:myshop;545b4e3dfaee4c10def3db24;123abc567def",
  "url": "https://emporix.com/platform/saas-ag/media/v2/public/files/12345678",
  "contentType": "image/jpeg",
  "tags": [
    "documentation",
    "marketing"
  ],
  "customAttributes": {
    "size": "large"
  }
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "tenant",
      "message": "size must be between 3 and 16",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (500)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}
Response example (503)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Update media file metadata

Update media file metadata. Note that only part of the metadata field can be updated.

Accepted scopes:

  • product.product_update - mandatory
Headers
  • authorization Required / string

    Bearer token

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Query parameters
  • partial Required / boolean

    If true, a partial update will be supported, otherwise the full object replacement will be performed.

Body
  • tags array[string]

    Media file tags

  • position integer

    Media order is set based on position property. Position is indexed from 0. If value is <= 0 the media is ordered as first. If value is higher that media count or is not specified the media is ordered as last. When retrieving product media they are ordered, but position property value is not returned as it is not persisted

    Default value is 0.

  • customAttributes object

    Map of custom attributes. The map key should be a string, the value can be any JSON object

    • Additional properties are allowed
  • Additional properties are NOT allowed
Responses
  • 200 object

    The resource has been successfully updated.

    • code Required / string
    • status string
    • message string
    • data string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type Required / string

        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.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    The requested resource does not exist.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.name, this can be empty if violation was not field specific

      • type