Price Service

This is the documentation for version v1 of the API. Last update on Aug 9, 2021.

Base URL
https://api.emporix.io/price-v2

Customattributes

Add a new custom attribute to a given price

Add a new custom attribute to a given price. The caller must have the price.price_manage scope assigned.

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access token.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 201 object

    The resource has been successfully created.

    • id string

      The Id of the generated resource

    • yrn string

      The yrn of the generated resource

  • 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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.variants[3].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

    Data modification failed. Unique index violation.

    • 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.variants[3].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.variants[3].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}/prices/{priceId}/customattributes
$ curl \
 -X POST https://api.emporix.io/price-v2/{tenant}/prices/{priceId}/customattributes \
 -H "Content-Type: application/json" \
 -H "Authorization: string" \
 -d '{"AlphaDisplay":"Ninety Nine"}'
Request payload example
# Headers
Authorization: string
Response example (201)
{
  "id": "string",
  "yrn": "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 1 and 36",
      "type": "invalid_header"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
  "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"
    }
  ]
}

Prices

Add a new custom attribute to a given price

Add a new custom attribute to a given price. The caller must have the price.price_manage scope assigned.

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access token.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Query parameters
  • defaultSiteValues boolean

    Flag to enable the default price feature. By default, its value is true.

    Default value is true.

  • siteCode string

    A list of site codes should be passed.

    Default value is main.

  • productId string

    A list of product id should be passed.

  • priceId string

    A list of price id should be passed.

  • currency string

    A list of currency should be passed.

  • effectiveDate string

    The date in ISO 8601 format to get the prices which are effective at the specified date.

  • itemYrn string

    A list of itemYrn's should be passed.

  • group string

    Group value for which the prices have to be retrieved.

  • 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.

  • 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.

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 was 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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.

    • 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.variants[3].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}/prices
$ curl \
 -X GET https://api.emporix.io/price-v2/{tenant}/prices \
 -H "Authorization: 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": "pageNumber",
      "message": "must be a positive number",
      "type": "invalid_query_parameter"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Create new price for a product

Create new price for a product. The caller must have the price.price_manage scope assigned.

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access token.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Body
  • type string

    Parameter related to the price type

  • dateRange object

    The date range allows you to define pricing for a specific period of time.

    • startDate Required / string

      The start date following ISO 8601 format.

    • endDate Required / string

      The end date following ISO 8601 format.

  • productId string

    The product reference or sku.

  • siteCode string

    The site which the price belongs to.

  • itemYrn string

    The Global Resource Name. The price service supports storing prices for global resource names. Use this to create price for an item. Example items are products.

  • group string

    Parameter to group the related itemYrn price documents

  • currency Required / string

    The currency code following the ISO 4217 standard.

  • originalAmount Required / number

    The original price value for a given product. If salePrice is informed, it will be applied over this amount.

    Minimum value is 0.

  • effectiveAmount number

    The effective price value for a given product. If salePrice is informed, it will be applied over this amount.

    Minimum value is 0.

  • measurementUnit object

    The measurement unit allows you to specify unit pricing information for a given measure or dimension.

    • quantity Required / number

      The unit pricing base measure attribute specifies your preference of the denominator.

      Minimum value is 0.

    • unitCode Required / string

      The unit of measurement

      Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

  • basePrice object

    The measurement unit allows you to specify unit pricing information for a given measure or dimension.

    • originalAmount number

      The original price value for a given product. If salePrice is informed, it will be applied over this amount.

      Minimum value is 0.

    • effectiveAmount number

      The effective amount that must be taken into consideration for calculation purposes.

      Minimum value is 0.

    • measurementUnit object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • quantity Required / number

        The unit pricing base measure attribute specifies your preference of the denominator.

        Minimum value is 0.

      • unitCode Required / string

        The unit of measurement

        Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

    • priceFactor number

      The factor that must be taken into consideration for the price calculation purposes.

      Minimum value is 0.

    • basePriceFactor number

      The factor that must be taken into consideration for the base price calculation purposes.

      Minimum value is 0.

  • presentationPrice object

    The measurement unit allows you to specify unit pricing information for a given measure or dimension.

    • originalAmount number

      The original price value for a given product. If salePrice is informed, it will be applied over this amount.

      Minimum value is 0.

    • effectiveAmount number

      The effective amount that must be taken into consideration for calculation purposes.

      Minimum value is 0.

    • measurementUnit object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • quantity Required / number

        The unit pricing base measure attribute specifies your preference of the denominator.

        Minimum value is 0.

      • unitCode Required / string

        The unit of measurement

        Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

    • priceFactor number

      The factor that must be taken into consideration for the price calculation purposes.

      Minimum value is 0.

    • basePriceFactor number

      The factor that must be taken into consideration for the base price calculation purposes.

      Minimum value is 0.

  • salePrice object

    The promotional price for a product. (value or % amount off)

  • wholesale object

    The wholesale price for a given quantity range.

    • minQuantity Required / number

      The minimum quantity range that this price applies to.

      Minimum value is 2.

    • maxQuantity number

      The maximum quantity range that this price applies to.

      Minimum value is 3.

Responses
  • 201 object

    A unique price ID is returned.

    • Location string

      The Location of the new resource which was created by the request.
      The value consists of a single absolute URI.

    • id string

      The Id of the generated resource

    • yrn string

      The yrn of the generated resource

  • 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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

    Creation failed because there was a conflict with another resource. 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.variants[3].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.

    • 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.variants[3].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}/prices
$ curl \
 -X POST https://api.emporix.io/price-v2/{tenant}/prices \
 -H "Content-Type: application/json" \
 -H "Authorization: string" \
 -d '{"productId":"53a358901b2e9dd2718b5c4e","siteCode":"main","itemYrn":"urn:yaas:hybris:product:product-variant:myshop;p1;v1","group":"p1","originalAmount":99.99,"currency":"USD","dateRange":{"startDate":"2015-01-23T22:00:00+0000","endDate":"2015-03-31T23:00:00+0000"},"salePrice":{"discountRate":20,"description":"20% OFF, Amazing!"},"wholesale":{"minQuantity":2,"maxQuantity":10}}'
Request payload example
# Headers
Authorization: string

# Payload
{
  "productId": "53a358901b2e9dd2718b5c4e",
  "siteCode": "main",
  "itemYrn": "urn:yaas:hybris:product:product-variant:myshop;p1;v1",
  "group": "p1",
  "originalAmount": 99.99,
  "currency": "USD",
  "dateRange": {
    "startDate": "2015-01-23T22:00:00+0000",
    "endDate": "2015-03-31T23:00:00+0000"
  },
  "salePrice": {
    "discountRate": 20,
    "description": "20% OFF, Amazing!"
  },
  "wholesale": {
    "minQuantity": 2,
    "maxQuantity": 10
  }
}
Response example (201)
# Headers
Location: string

# Payload
{
  "id": "53ac81fd0cce8b26b36f3492",
  "yrn": "urn:yaas:hybris:price:price:puma;53ac81fd0cce8b26b36f3492"
}
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 1 and 36",
      "type": "invalid_header"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (409)
{
  "status": 409,
  "message": "The requested resource could not be created due to server-side validation.",
  "moreInfo": "",
  "type": "conflict_resource"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Delete all the prices of the tenant

Delete all the prices of the tenant. The caller must have the price.price_delete_all scope assigned.

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access token.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 204

    All the prices have been deleted successfully.

  • 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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.

    • 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.variants[3].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}/prices
$ curl \
 -X DELETE https://api.emporix.io/price-v2/{tenant}/prices \
 -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 1 and 36",
      "type": "invalid_header"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Returns a list of all possible prices for given sites and productsDeprecated

Returns a list of all possible prices for given sites and products

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access token.

Query parameters
  • defaultSiteValues boolean

    Flag to enable the default price feature. By default, its value is true.

    Default value is true.

  • siteCode string

    A list of site codes should be passed.

    Default value is main.

  • productId string

    A list of product id should be passed.

  • priceId string

    A list of price id should be passed.

  • currency string

    A list of currency should be passed.

  • effectiveDate string

    The date in ISO 8601 format to get the prices which are effective at the specified date.

  • itemYrn string

    A list of itemYrn's should be passed.

  • group string

    Group value for which the prices have to be retrieved.

  • 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.

  • 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.

Responses
  • 200 array[object]

    Available prices for given sites and products

    • priceId string

      The price identifier.

    • type string

      Parameter related to the price type

    • dateRange object

      The date range allows you to define pricing for a specific period of time.

      • startDate Required / string

        The start date following ISO 8601 format.

      • endDate Required / string

        The end date following ISO 8601 format.

    • productId Required / string

      The product reference or sku.

    • itemYrn string

      The Global Resource Name. The price service supports storing prices for global resource names. Use this to create price for an item. Example items are products, variants.

    • group string

      Parameter to group the related itemYrn price documents

    • siteCode string

      The site which the price belongs to.

    • yrn string

      The Price Yrn. The reference yrn for the price row.

    • currency Required / string

      The currency code following the ISO 4217 standard.

    • originalAmount Required / number

      The original price value for a given product. If salePrice is informed, it will be applied over this amount.

      Minimum value is 0.

    • effectiveAmount Required / number

      The effective amount that must be taken into consideration for calculation purposes.

      Minimum value is 0.

    • measurementUnit object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • quantity Required / number

        The unit pricing base measure attribute specifies your preference of the denominator.

        Minimum value is 0.

      • unitCode Required / string

        The unit of measurement

        Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

    • basePrice object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • originalAmount number

        The original price value for a given product. If salePrice is informed, it will be applied over this amount.

        Minimum value is 0.

      • effectiveAmount number

        The effective amount that must be taken into consideration for calculation purposes.

        Minimum value is 0.

      • measurementUnit object

        The measurement unit allows you to specify unit pricing information for a given measure or dimension.

        • quantity Required / number

          The unit pricing base measure attribute specifies your preference of the denominator.

          Minimum value is 0.

        • unitCode Required / string

          The unit of measurement

          Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

      • priceFactor number

        The factor that must be taken into consideration for the price calculation purposes.

        Minimum value is 0.

      • basePriceFactor number

        The factor that must be taken into consideration for the base price calculation purposes.

        Minimum value is 0.

    • presentationPrice object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • originalAmount number

        The original price value for a given product. If salePrice is informed, it will be applied over this amount.

        Minimum value is 0.

      • effectiveAmount number

        The effective amount that must be taken into consideration for calculation purposes.

        Minimum value is 0.

      • measurementUnit object

        The measurement unit allows you to specify unit pricing information for a given measure or dimension.

        • quantity Required / number

          The unit pricing base measure attribute specifies your preference of the denominator.

          Minimum value is 0.

        • unitCode Required / string

          The unit of measurement

          Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

      • priceFactor number

        The factor that must be taken into consideration for the price calculation purposes.

        Minimum value is 0.

      • basePriceFactor number

        The factor that must be taken into consideration for the base price calculation purposes.

        Minimum value is 0.

    • customAttributes object
    • salePrice object

      The promotional price for a product. (value or % amount off)

    • wholesale object

      The wholesale price for a given quantity range.

      • minQuantity Required / number

        The minimum quantity range that this price applies to.

        Minimum value is 2.

      • maxQuantity number

        The maximum quantity range that this price applies to.

        Minimum value is 3.

    • metadata object
      • createdAt Required / string

        value contains creation time of document

      • modifiedAt Required / string

        value contains modification time of document

      • version Required / integer

        Minimum value is 1.

  • 400 object

    Request was 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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.

    • 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.variants[3].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}/prices/allAvailable
$ curl \
 -X GET https://api.emporix.io/price-v2/{tenant}/prices/allAvailable \
 -H "Authorization: string"
Response example (200)
[
  {
    "priceId": "53ad79ddd78ee238ab44b636",
    "type": "V1NO",
    "productId": "53a358901b2e9dd2718b5c4e",
    "yrn": "urn:yaas:hybris:price:price:myshop;53ad79ddd78ee238ab44b636",
    "siteCode": "main",
    "dateRange": {
      "startDate": "2020-12-24T00:00:00Z",
      "endDate": "2039-01-01T23:59:59Z"
    },
    "currency": "EUR",
    "originalAmount": 20.4,
    "effectiveAmount": 20.4,
    "measurementUnit": {
      "quantity": 1,
      "unitCode": "H87"
    },
    "basePrice": {
      "originalAmount": 1.02,
      "effectiveAmount": 1.02,
      "measurementUnit": {
        "quantity": 1,
        "unitCode": "HLT"
      },
      "priceFactor": 1,
      "basePriceFactor": 0.05
    },
    "presentationPrice": {
      "originalAmount": 20.4,
      "effectiveAmount": 20.4,
      "measurementUnit": {
        "quantity": 10000,
        "unitCode": "MLT"
      },
      "priceFactor": 1,
      "basePriceFactor": 0.05
    },
    "customAttributes": {
      "promotionType": "REGULAR_PRICE"
    },
    "metadata": {
      "createdAt": "2020-08-31T00:07:42.518Z",
      "modifiedAt": "2020-08-31T00:07:42.518Z",
      "version": 1
    }
  },
  {
    "priceId": "53ad79ddd78ee238ab44b635",
    "type": "V3BP",
    "productId": "53a358901b2e9dd2718b5c4e",
    "yrn": "urn:yaas:hybris:price:price:myshop;53ad79ddd78ee238ab44b635",
    "siteCode": "main",
    "dateRange": {
      "startDate": "2020-09-21T00:00:00Z",
      "endDate": "2020-12-23T23:59:59Z"
    },
    "currency": "EUR",
    "originalAmount": 19.7,
    "effectiveAmount": 17.99,
    "measurementUnit": {
      "quantity": 1,
      "unitCode": "H87"
    },
    "basePrice": {
      "originalAmount": 0.99,
      "effectiveAmount": 0.9,
      "measurementUnit": {
        "quantity": 1,
        "unitCode": "HLT"
      },
      "priceFactor": 1,
      "basePriceFactor": 0.05
    },
    "presentationPrice": {
      "originalAmount": 19.7,
      "effectiveAmount": 17.99,
      "measurementUnit": {
        "quantity": 10000,
        "unitCode": "MLT"
      },
      "priceFactor": 1,
      "basePriceFactor": 0.05
    },
    "customAttributes": {
      "promotionType": "REGULAR_PRICE"
    },
    "metadata": {
      "createdAt": "2020-08-31T00:07:42.512Z",
      "modifiedAt": "2020-08-31T00:07:42.512Z",
      "version": 1
    }
  }
]
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "pageNumber",
      "message": "must be a positive number",
      "type": "invalid_query_parameter"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Returns a list of all possible prices for given sites and products

Returns a list of all possible prices for given sites and products

Body
  • productId string

    A list of productIds should be passed.

  • itemYrn string

    A list of itemYrns should be passed.

  • group string

    Group value for which the prices have to be retrieved.

  • priceId string

    A list of priceIds should be passed.

  • currency string

    A list of currencies should be passed.

  • effectiveDate string

    The date in ISO 8601 format to get the prices which are effective at the specified date.

  • siteCode string

    A list of sites which the prices belong to.

  • pageNumber integer

    The page number of the paged results.

  • pageSize integer

    The page size (max number of items on a page) of the paged results.

  • sort string

    The sorting applied to the paged results.

  • defaultSiteValues boolean

    Flag to enable the default price feature. If it is not present in the request body, it is considered as true by default.

Responses
  • 200 array[object]

    Available prices for given sites and products

    • priceId string

      The price identifier.

    • type string

      Parameter related to the price type

    • dateRange object

      The date range allows you to define pricing for a specific period of time.

      • startDate Required / string

        The start date following ISO 8601 format.

      • endDate Required / string

        The end date following ISO 8601 format.

    • productId Required / string

      The product reference or sku.

    • itemYrn string

      The Global Resource Name. The price service supports storing prices for global resource names. Use this to create price for an item. Example items are products, variants.

    • group string

      Parameter to group the related itemYrn price documents

    • siteCode string

      The site which the price belongs to.

    • yrn string

      The Price Yrn. The reference yrn for the price row.

    • currency Required / string

      The currency code following the ISO 4217 standard.

    • originalAmount Required / number

      The original price value for a given product. If salePrice is informed, it will be applied over this amount.

      Minimum value is 0.

    • effectiveAmount Required / number

      The effective amount that must be taken into consideration for calculation purposes.

      Minimum value is 0.

    • measurementUnit object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • quantity Required / number

        The unit pricing base measure attribute specifies your preference of the denominator.

        Minimum value is 0.

      • unitCode Required / string

        The unit of measurement

        Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

    • basePrice object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • originalAmount number

        The original price value for a given product. If salePrice is informed, it will be applied over this amount.

        Minimum value is 0.

      • effectiveAmount number

        The effective amount that must be taken into consideration for calculation purposes.

        Minimum value is 0.

      • measurementUnit object

        The measurement unit allows you to specify unit pricing information for a given measure or dimension.

        • quantity Required / number

          The unit pricing base measure attribute specifies your preference of the denominator.

          Minimum value is 0.

        • unitCode Required / string

          The unit of measurement

          Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

      • priceFactor number

        The factor that must be taken into consideration for the price calculation purposes.

        Minimum value is 0.

      • basePriceFactor number

        The factor that must be taken into consideration for the base price calculation purposes.

        Minimum value is 0.

    • presentationPrice object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • originalAmount number

        The original price value for a given product. If salePrice is informed, it will be applied over this amount.

        Minimum value is 0.

      • effectiveAmount number

        The effective amount that must be taken into consideration for calculation purposes.

        Minimum value is 0.

      • measurementUnit object

        The measurement unit allows you to specify unit pricing information for a given measure or dimension.

        • quantity Required / number

          The unit pricing base measure attribute specifies your preference of the denominator.

          Minimum value is 0.

        • unitCode Required / string

          The unit of measurement

          Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

      • priceFactor number

        The factor that must be taken into consideration for the price calculation purposes.

        Minimum value is 0.

      • basePriceFactor number

        The factor that must be taken into consideration for the base price calculation purposes.

        Minimum value is 0.

    • customAttributes object
    • salePrice object

      The promotional price for a product. (value or % amount off)

    • wholesale object

      The wholesale price for a given quantity range.

      • minQuantity Required / number

        The minimum quantity range that this price applies to.

        Minimum value is 2.

      • maxQuantity number

        The maximum quantity range that this price applies to.

        Minimum value is 3.

    • metadata object
      • createdAt Required / string

        value contains creation time of document

      • modifiedAt Required / string

        value contains modification time of document

      • version Required / integer

        Minimum value is 1.

  • 400 object

    Request was 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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.

    • 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.variants[3].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}/prices/allAvailable
$ curl \
 -X POST https://api.emporix.io/price-v2/{tenant}/prices/allAvailable \
 -H "Content-Type: application/json" \
 -d '{"productId":"string","itemYrn":"string","group":"string","priceId":"string","currency":"string","effectiveDate":"string","siteCode":"string","pageNumber":42,"pageSize":42,"sort":"string","defaultSiteValues":true}'
Request payload example
{
  "productId": "string",
  "itemYrn": "string",
  "group": "string",
  "priceId": "string",
  "currency": "string",
  "effectiveDate": "string",
  "siteCode": "string",
  "pageNumber": 42,
  "pageSize": 42,
  "sort": "string",
  "defaultSiteValues": true
}
Response example (200)
[
  {
    "priceId": "53ad79ddd78ee238ab44b636",
    "type": "V1NO",
    "productId": "53a358901b2e9dd2718b5c4e",
    "yrn": "urn:yaas:hybris:price:price:myshop;53ad79ddd78ee238ab44b636",
    "siteCode": "main",
    "dateRange": {
      "startDate": "2020-12-24T00:00:00Z",
      "endDate": "2039-01-01T23:59:59Z"
    },
    "currency": "EUR",
    "originalAmount": 20.4,
    "effectiveAmount": 20.4,
    "measurementUnit": {
      "quantity": 1,
      "unitCode": "H87"
    },
    "basePrice": {
      "originalAmount": 1.02,
      "effectiveAmount": 1.02,
      "measurementUnit": {
        "quantity": 1,
        "unitCode": "HLT"
      },
      "priceFactor": 1,
      "basePriceFactor": 0.05
    },
    "presentationPrice": {
      "originalAmount": 20.4,
      "effectiveAmount": 20.4,
      "measurementUnit": {
        "quantity": 10000,
        "unitCode": "MLT"
      },
      "priceFactor": 1,
      "basePriceFactor": 0.05
    },
    "customAttributes": {
      "promotionType": "REGULAR_PRICE"
    },
    "metadata": {
      "createdAt": "2020-08-31T00:07:42.518Z",
      "modifiedAt": "2020-08-31T00:07:42.518Z",
      "version": 1
    }
  },
  {
    "priceId": "53ad79ddd78ee238ab44b635",
    "type": "V3BP",
    "productId": "53a358901b2e9dd2718b5c4e",
    "yrn": "urn:yaas:hybris:price:price:myshop;53ad79ddd78ee238ab44b635",
    "siteCode": "main",
    "dateRange": {
      "startDate": "2020-09-21T00:00:00Z",
      "endDate": "2020-12-23T23:59:59Z"
    },
    "currency": "EUR",
    "originalAmount": 19.7,
    "effectiveAmount": 17.99,
    "measurementUnit": {
      "quantity": 1,
      "unitCode": "H87"
    },
    "basePrice": {
      "originalAmount": 0.99,
      "effectiveAmount": 0.9,
      "measurementUnit": {
        "quantity": 1,
        "unitCode": "HLT"
      },
      "priceFactor": 1,
      "basePriceFactor": 0.05
    },
    "presentationPrice": {
      "originalAmount": 19.7,
      "effectiveAmount": 17.99,
      "measurementUnit": {
        "quantity": 10000,
        "unitCode": "MLT"
      },
      "priceFactor": 1,
      "basePriceFactor": 0.05
    },
    "customAttributes": {
      "promotionType": "REGULAR_PRICE"
    },
    "metadata": {
      "createdAt": "2020-08-31T00:07:42.512Z",
      "modifiedAt": "2020-08-31T00:07:42.512Z",
      "version": 1
    }
  }
]
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "pageNumber",
      "message": "must be a positive number",
      "type": "invalid_query_parameter"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Match a list of price rows in one specific currency with the correspondent ones in target currency

Match a list of price rows in one specific currency with the correspondent ones in target currency.

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access token.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Body
  • targetCurrency Required / string

    The target currency to match the prices

  • prices array[object]

    The source price rows with the quantity of each one to be considered during the match.

    • priceId Required / string

      The price identifier.

    • quantity Required / number

      The quantity to be considered for this product

      Minimum value is 0.

  • siteCode string

    A list of site codes should be passed. If it is not present in the request body, it is considered as 'main' by default.

Responses
  • 200 array[object]

    The prices were successfully matched.

    • priceId string

      The price identifier.

    • type string

      Parameter related to the price type

    • dateRange object

      The date range allows you to define pricing for a specific period of time.

      • startDate Required / string

        The start date following ISO 8601 format.

      • endDate Required / string

        The end date following ISO 8601 format.

    • productId Required / string

      The product reference or sku.

    • itemYrn string

      The Global Resource Name. The price service supports storing prices for global resource names. Use this to create price for an item. Example items are products, variants.

    • group string

      Parameter to group the related itemYrn price documents

    • siteCode string

      The site which the price belongs to.

    • yrn string

      The Price Yrn. The reference yrn for the price row.

    • currency Required / string

      The currency code following the ISO 4217 standard.

    • originalAmount Required / number

      The original price value for a given product. If salePrice is informed, it will be applied over this amount.

      Minimum value is 0.

    • effectiveAmount Required / number

      The effective amount that must be taken into consideration for calculation purposes.

      Minimum value is 0.

    • measurementUnit object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • quantity Required / number

        The unit pricing base measure attribute specifies your preference of the denominator.

        Minimum value is 0.

      • unitCode Required / string

        The unit of measurement

        Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

    • basePrice object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • originalAmount number

        The original price value for a given product. If salePrice is informed, it will be applied over this amount.

        Minimum value is 0.

      • effectiveAmount number

        The effective amount that must be taken into consideration for calculation purposes.

        Minimum value is 0.

      • measurementUnit object

        The measurement unit allows you to specify unit pricing information for a given measure or dimension.

        • quantity Required / number

          The unit pricing base measure attribute specifies your preference of the denominator.

          Minimum value is 0.

        • unitCode Required / string

          The unit of measurement

          Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

      • priceFactor number

        The factor that must be taken into consideration for the price calculation purposes.

        Minimum value is 0.

      • basePriceFactor number

        The factor that must be taken into consideration for the base price calculation purposes.

        Minimum value is 0.

    • presentationPrice object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • originalAmount number

        The original price value for a given product. If salePrice is informed, it will be applied over this amount.

        Minimum value is 0.

      • effectiveAmount number

        The effective amount that must be taken into consideration for calculation purposes.

        Minimum value is 0.

      • measurementUnit object

        The measurement unit allows you to specify unit pricing information for a given measure or dimension.

        • quantity Required / number

          The unit pricing base measure attribute specifies your preference of the denominator.

          Minimum value is 0.

        • unitCode Required / string

          The unit of measurement

          Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

      • priceFactor number

        The factor that must be taken into consideration for the price calculation purposes.

        Minimum value is 0.

      • basePriceFactor number

        The factor that must be taken into consideration for the base price calculation purposes.

        Minimum value is 0.

    • customAttributes object
    • salePrice object

      The promotional price for a product. (value or % amount off)

    • wholesale object

      The wholesale price for a given quantity range.

      • minQuantity Required / number

        The minimum quantity range that this price applies to.

        Minimum value is 2.

      • maxQuantity number

        The maximum quantity range that this price applies to.

        Minimum value is 3.

    • metadata object
      • createdAt Required / string

        value contains creation time of document

      • modifiedAt Required / string

        value contains modification time of document

      • version Required / integer

        Minimum value is 1.

  • 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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 exception occurred which prevented it from correctly returning the result.

    • 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.variants[3].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}/prices/matchCurrency
$ curl \
 -X POST https://api.emporix.io/price-v2/{tenant}/prices/matchCurrency \
 -H "Content-Type: application/json" \
 -H "Authorization: string" \
 -d '{"targetCurrency":"CAD","siteCode":"main","prices":[{"priceId":"53a82dcf0cce8b26b36f1eb7","quantity":1},{"priceId":"53a85cfc0cce8b26b36fc3pa","quantity":5}]}'
Request payload example
# Headers
Authorization: string

# Payload
{
  "targetCurrency": "CAD",
  "siteCode": "main",
  "prices": [
    {
      "priceId": "53a82dcf0cce8b26b36f1eb7",
      "quantity": 1
    },
    {
      "priceId": "53a85cfc0cce8b26b36fc3pa",
      "quantity": 5
    }
  ]
}
Response example (200)
[
  {
    "priceId": "55e065dde88eb171a35dc664",
    "metadata": {
      "createdAt": "2015-08-28T13:45:01.651Z",
      "modifiedAt": "2015-08-28T13:45:01.651Z",
      "version": 1
    },
    "productId": "53a358901b2e9dd2718b5c4e",
    "yrn": "urn:yaas:hybris:price:price:myshop;55e065dde88eb171a35dc664",
    "originalAmount": 55.5,
    "effectiveAmount": 55.5,
    "currency": "USD"
  },
  {
    "priceId": "55e065dde88eb171a35dc665",
    "yrn": "urn:yaas:hybris:price:price:myshop;55e065dde88eb171a35dc665",
    "metadata": {
      "createdAt": "2015-08-28T13:45:01.651Z",
      "modifiedAt": "2015-08-28T13:45:01.651Z",
      "version": 1
    },
    "itemYrn": "urn:yaas:hybris:product:product-variant:myshop;53a358901b2e9dd2718b5c4e;53a358901b2e9dd2718b5c4ev1",
    "group": "urn:yaas:hybris:product:product:myshop;53a358901b2e9dd2718b5c4e",
    "originalAmount": 10,
    "effectiveAmount": 10,
    "currency": "USD"
  }
]
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 1 and 36",
      "type": "invalid_header"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. 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"
    }
  ]
}

Retrieve prices

Retrieve prices (or a single price) for a list of products.

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access token.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Body
  • productId string

    A list of productIds should be passed.

  • itemYrn string

    A list of itemYrns should be passed.

  • group string

    Group value for which the prices have to be retrieved.

  • priceId string

    A list of priceIds should be passed.

  • currency string

    A list of currencies should be passed.

  • effectiveDate string

    The date in ISO 8601 format to get the prices which are effective at the specified date.

  • siteCode string

    A list of sites which the prices belong to.

  • pageNumber integer

    The page number of the paged results.

  • pageSize integer

    The page size (max number of items on a page) of the paged results.

  • sort string

    The sorting applied to the paged results.

  • defaultSiteValues boolean

    Flag to enable the default price feature. If it is not present in the request body, it is considered as true by default.

Responses
  • 200
  • 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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}/prices/search
$ curl \
 -X POST https://api.emporix.io/price-v2/{tenant}/prices/search \
 -H "Content-Type: application/json" \
 -H "Authorization: string" \
 -d '{"productId":"string","itemYrn":"string","group":"string","priceId":"string","currency":"string","effectiveDate":"string","siteCode":"string","pageNumber":42,"pageSize":42,"sort":"string","defaultSiteValues":true}'
Request payload example
# Headers
Authorization: string

# Payload
{
  "productId": "string",
  "itemYrn": "string",
  "group": "string",
  "priceId": "string",
  "currency": "string",
  "effectiveDate": "string",
  "siteCode": "string",
  "pageNumber": 42,
  "pageSize": 42,
  "sort": "string",
  "defaultSiteValues": true
}
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 1 and 36",
      "type": "invalid_header"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}

Root

Get a specific price by price ID

Get a specific price by price ID.

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access 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

    The request has succeeded. Returns the price, currency, product ID specific to the price ID.

    • priceId string

      The price identifier.

    • type string

      Parameter related to the price type

    • dateRange object

      The date range allows you to define pricing for a specific period of time.

      • startDate Required / string

        The start date following ISO 8601 format.

      • endDate Required / string

        The end date following ISO 8601 format.

    • productId Required / string

      The product reference or sku.

    • itemYrn string

      The Global Resource Name. The price service supports storing prices for global resource names. Use this to create price for an item. Example items are products, variants.

    • group string

      Parameter to group the related itemYrn price documents

    • siteCode string

      The site which the price belongs to.

    • yrn string

      The Price Yrn. The reference yrn for the price row.

    • currency Required / string

      The currency code following the ISO 4217 standard.

    • originalAmount Required / number

      The original price value for a given product. If salePrice is informed, it will be applied over this amount.

      Minimum value is 0.

    • effectiveAmount Required / number

      The effective amount that must be taken into consideration for calculation purposes.

      Minimum value is 0.

    • measurementUnit object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • quantity Required / number

        The unit pricing base measure attribute specifies your preference of the denominator.

        Minimum value is 0.

      • unitCode Required / string

        The unit of measurement

        Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

    • basePrice object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • originalAmount number

        The original price value for a given product. If salePrice is informed, it will be applied over this amount.

        Minimum value is 0.

      • effectiveAmount number

        The effective amount that must be taken into consideration for calculation purposes.

        Minimum value is 0.

      • measurementUnit object

        The measurement unit allows you to specify unit pricing information for a given measure or dimension.

        • quantity Required / number

          The unit pricing base measure attribute specifies your preference of the denominator.

          Minimum value is 0.

        • unitCode Required / string

          The unit of measurement

          Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

      • priceFactor number

        The factor that must be taken into consideration for the price calculation purposes.

        Minimum value is 0.

      • basePriceFactor number

        The factor that must be taken into consideration for the base price calculation purposes.

        Minimum value is 0.

    • presentationPrice object

      The measurement unit allows you to specify unit pricing information for a given measure or dimension.

      • originalAmount number

        The original price value for a given product. If salePrice is informed, it will be applied over this amount.

        Minimum value is 0.

      • effectiveAmount number

        The effective amount that must be taken into consideration for calculation purposes.

        Minimum value is 0.

      • measurementUnit object

        The measurement unit allows you to specify unit pricing information for a given measure or dimension.

        • quantity Required / number

          The unit pricing base measure attribute specifies your preference of the denominator.

          Minimum value is 0.

        • unitCode Required / string

          The unit of measurement

          Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

      • priceFactor number

        The factor that must be taken into consideration for the price calculation purposes.

        Minimum value is 0.

      • basePriceFactor number

        The factor that must be taken into consideration for the base price calculation purposes.

        Minimum value is 0.

    • customAttributes object
    • salePrice object

      The promotional price for a product. (value or % amount off)

    • wholesale object

      The wholesale price for a given quantity range.

      • minQuantity Required / number

        The minimum quantity range that this price applies to.

        Minimum value is 2.

      • maxQuantity number

        The maximum quantity range that this price applies to.

        Minimum value is 3.

    • metadata object
      • createdAt Required / string

        value contains creation time of document

      • modifiedAt Required / string

        value contains modification time of document

      • version Required / integer

        Minimum value is 1.

  • 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.variants[3].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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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

    Evaluated request scopes in access token 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.variants[3].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.variants[3].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.

    • 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.variants[3].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}/prices/{priceId}
$ curl \
 -X GET https://api.emporix.io/price-v2/{tenant}/prices/{priceId} \
 -H "Authorization: string"
Response example (200)
{
  "currency": "USD",
  "priceId": "53ad79ddd78ee238ab44b635",
  "yrn": "urn:yaas:hybris:price:price:myshop;53ad79ddd78ee238ab44b635",
  "originalAmount": 10,
  "effectiveAmount": 6,
  "productId": "53a358901b2e9dd2718b5c4e",
  "siteCode": "main",
  "itemYrn": "urn:yaas:hybris:product:product:myshop;53a358901b2e9dd2718b5c4e;53a358901b2e9dd2718b5c4ev1",
  "group": "p1",
  "measurementUnit": {
    "quantity": 1,
    "unitCode": "kg"
  },
  "dateRange": {
    "startDate": "2015-01-23T22:00:00+0000",
    "endDate": "2015-01-25T23:00:00+0000"
  },
  "salePrice": {
    "discountRate": 40,
    "description": "40% OFF, Amazing!"
  },
  "wholesale": {
    "minQuantity": 2,
    "maxQuantity": 10
  },
  "metadata": {
    "createdAt": "2015-01-23T22:00:00+0000",
    "modifiedAt": "2015-02-23T22:00:00+0000",
    "version": 1
  }
}
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 1 and 36",
      "type": "invalid_header"
    }
  ]
}
Response example (401)
{
  "status": 401,
  "message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
  "type": "insufficient_credentials",
  "moreInfo": ""
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 404,
  "message": "The requested URI does not map to a single element resource.",
  "moreInfo": "",
  "type": "element_resource_non_existing"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Modify an existing price by its price ID for a given product

Modify an existing price by its price ID for a given product. The caller must have the price.price_manage scope assigned.

Headers
  • Authorization Required / string

    Bearer token
    Used to send a valid OAuth2 access 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
  • productId string

    The product reference or sku.

  • siteCode string

    The site which the price belongs to.

  • itemYrn string

    The Global Resource Name. The price service supports storing prices for global resource names. Use this to create price for an item. Example items are products, variants.

  • group string

    Parameter to group the related itemYrn price documents

  • originalAmount number

    The original price value for a given product. If salePrice is informed, it will be applied over this amount.

    Minimum value is 0.

  • currency string

    The currency code following the ISO 4217 standard.

  • measurementUnit object

    The measurement unit allows you to specify unit pricing information for a given measure or dimension.

    • quantity Required / number

      The unit pricing base measure attribute specifies your preference of the denominator.

      Minimum value is 0.

    • unitCode Required / string

      The unit of measurement

      Values are kg, g, mg, l, ml, lb, qt, qtr, gal, pt, oz, MTR, XRO, MLT, LTR, H87, KGM, GRM, HLT, DL, DAG, and RO.

  • dateRange object

    The date range allows you to define pricing for a specific period of time.

    • startDate Required / string

      The start date following ISO 8601 format.

    • endDate Required / string

      The end date following ISO 8601 format.

  • salePrice object

    The promotional price for a product. (value or % amount off)

  • wholesale object

    The wholesale price for a given quantity range.

    • minQuantity Required / number

      The minimum quantity range that this price applies to.

      Minimum value is 2.

    • maxQuantity number

      The maximum quantity range that this price applies to.

      Minimum value is 3.

Responses
  • 200

    The price has been successfully modified.

  • 400

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

  • 401 object

    Given request is unauthorized. Bad or expired token. Reauthenticate
    the user. 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.variants[3].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