Prices assigned to price lists

Retrieving all prices assigned to a price list

get

Retrieves all prices assigned to a specified price list. You can filter the results with query parameters.

Required scopes

  • price.pricelist_read

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
priceListIdstringRequired

Price list's unique identifier, generated when the price list is created.

Query parameters
pageNumberinteger · min: 1Optional

Page number to be retrieved. The number of the first page is 1.

Note: If the pageNumber parameter is passed, size of the pages must be specified in the pageSize parameter.

Default: 1
pageSizeinteger · min: 1Optional

Number of items to be retrieved per page.

Default: 60
sortstringOptional

List of properties used to sort the results, separated by colons. The order of properties indicates their priority in sorting.

Possible values:

  • {fieldName}
  • {fieldName}:asc
  • {fieldName}:desc

Note: If you want to sort the results by localized properties, the possible values are:

  • {fieldName}.{language}
  • {fieldName}.{language}:asc
  • {fieldName}.{language}:desc

If the sorting direction is not specified, the fields are sorted in ascending order.

Example: name,code:desc
priceModelIdstringOptional

ID of the price model to which the retrieved prices should be assigned.

itemIdstringOptional

IDs of products for which prices should be retrieved.

itemTypestringOptional

Item types for which prices should be retrieved. Possible values:

  • PRODUCT

  • SKU

    Note: The SKU value is a preview value - the system does not fully operate on the SKU concept yet.

Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as a map of single translation, where the key is a language code and the value is in a respective language.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved as maps of single translation, where the key is a language code and the value is in a respective language. The endpoint will asume that the localized fields are provided in the default language defined in the Configuration Service.
X-Total-CountbooleanOptional

Flag indicating whether the total count of retrieved items should be returned.

Default: false
Responses
200
The request was successful. A list of prices is returned.
application/json
get
GET /price/{tenant}/price-lists/{priceListId}/prices HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "example-priceListPrice-id-1",
    "itemId": {
      "itemType": "PRODUCT",
      "id": "53a358901b2e9dd2718b5c4e"
    },
    "priceModelId": "6245a8f578a8576e338fa9c3",
    "tierValues": [
      {
        "priceValue": 15.99
      },
      {
        "priceValue": 14.99
      },
      {
        "priceValue": 13.99
      }
    ],
    "metadata": {
      "version": 1,
      "createdAt": "2022-03-31T13:18:02.379Z",
      "modifiedAt": "2022-03-31T13:18:02.379Z"
    }
  },
  {
    "id": "example-priceListPrice-id-2",
    "itemId": {
      "itemType": "PRODUCT",
      "id": "53a358901b2e9dd2718b5c4f"
    },
    "priceModelId": "6245a8f578a8576e338fa9c4",
    "tierValues": [
      {
        "priceValue": 20.99
      },
      {
        "priceValue": 12.99
      }
    ],
    "metadata": {
      "version": 1,
      "createdAt": "2022-03-31T13:18:02.379Z",
      "modifiedAt": "2022-03-31T13:18:02.379Z"
    }
  }
]

Adding a new price to a price list

post

Creates a new price for a specified price list.

Required scopes

  • price.pricelist_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
priceListIdstringRequired

Price list's unique identifier, generated when the price list is created.

Body
all ofOptional
and
anyOptional
and
Responses
201
The request was successful. The price has been created and added to the price list.
application/json
post
POST /price/{tenant}/price-lists/{priceListId}/prices HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 185

{
  "itemId": {
    "itemType": "PRODUCT",
    "id": "53a358901b2e9dd2718b5c4e"
  },
  "priceModelId": "6245a8f578a8576e338fa9c3",
  "tierValues": [
    {
      "priceValue": 15.99
    },
    {
      "priceValue": 14.99
    },
    {
      "priceValue": 13.99
    }
  ]
}
{
  "id": "6245a8f578a8576e338fa9c2"
}

Creating multiple prices for a price list

post

Creates multiple prices for a specified price list.

Response for a particular price will be returned at the same position (index) at which that price is located in the request body.

Required scopes

  • price.pricelist_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
priceListIdstringRequired

Price list's unique identifier, generated when the price list is created.

Bodyall of[]
itemsall ofOptional
and
anyOptional
and
Responses
207
Multiple status response. The details are provided in a form of a list of responses within the body.
application/json
post
POST /price/{tenant}/price-lists/{priceListId}/prices/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 373

[
  {
    "itemId": {
      "itemType": "PRODUCT",
      "id": "53a358901b2e9dd2718b5c4e"
    },
    "priceModelId": "6245a8f578a8576e338fa9c3",
    "tierValues": [
      {
        "priceValue": 15.99
      },
      {
        "priceValue": 14.99
      },
      {
        "priceValue": 13.99
      }
    ]
  },
  {
    "itemId": {
      "itemType": "PRODUCT",
      "id": "53a358901b2e9dd2718b5c4f"
    },
    "priceModelId": "6245a8f578a8576e338fa9c3",
    "tierValues": [
      {
        "priceValue": 20.99
      },
      {
        "priceValue": 18.99
      },
      {
        "priceValue": 16.99
      }
    ]
  }
]
[
  {
    "index": 0,
    "id": "62d65a15088ed94ebf093d7d",
    "code": 201,
    "status": "Created"
  },
  {
    "index": 1,
    "id": "62d65a15088ed94ebf093d8d",
    "code": 201,
    "status": "Created"
  }
]

Upserting multiple prices in a price list

put

Updates or creates multiple prices in a specified price list.

Response for a particular price will be returned at the same position (index) at which that price is located in the request body.

Required scopes

  • price.pricelist_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
priceListIdstringRequired

Price list's unique identifier, generated when the price list is created.

Bodyall of[]
itemsall ofOptional
and
and
anyOptional
and
and
Responses
207
Multiple status response. The details are provided in a form of a list of responses within the body.
application/json
put
PUT /price/{tenant}/price-lists/{priceListId}/prices/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 493

[
  {
    "id": "example-priceListPrice-id-1",
    "itemId": {
      "itemType": "PRODUCT",
      "id": "53a358901b2e9dd2718b5c4e"
    },
    "priceModelId": "6245a8f578a8576e338fa9c3",
    "tierValues": [
      {
        "priceValue": 15.99
      },
      {
        "priceValue": 14.99
      },
      {
        "priceValue": 13.99
      }
    ],
    "metadata": {
      "version": 1
    }
  },
  {
    "id": "example-priceListPrice-id-2",
    "itemId": {
      "itemType": "PRODUCT",
      "id": "53a358901b2e9dd2718b5c4f"
    },
    "priceModelId": "6245a8f578a8576e338fa9c3",
    "tierValues": [
      {
        "priceValue": 20.99
      },
      {
        "priceValue": 18.99
      },
      {
        "priceValue": 16.99
      }
    ],
    "metadata": {
      "version": 1
    }
  }
]
[
  {
    "index": 0,
    "id": "62d65a15088ed94ebf093d7d",
    "code": 204,
    "status": "No Content"
  },
  {
    "index": 1,
    "id": "62d65a15088ed94ebf093d8d",
    "code": 204,
    "status": "No Content"
  }
]

Deleting multiple prices from a price list

delete

Deletes multiple prices from a specified price list.

To indicate which prices should be deleted from the price list, you need to put their IDs in an array of strings and send it through the request body. The request body should look like this: ["exampleID1", "exampleID2"]

Required scopes

  • price.pricelist_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
priceListIdstringRequired

Price list's unique identifier, generated when the price list is created.

Responses
204
Price list's prices have successfully been deleted.
delete
DELETE /price/{tenant}/price-lists/{priceListId}/prices/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Retrieving a price list's price details

get

Retrieves details for a specified price that belongs to a price list.

Required scopes

  • price.pricelist_read

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
priceListIdstringRequired

Price list's unique identifier, generated when the price list is created.

priceIdstringRequired

Price list price's unique identifier, generated when the price list's price is created.

Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as a map of single translation, where the key is a language code and the value is in a respective language.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved as maps of single translation, where the key is a language code and the value is in a respective language. The endpoint will asume that the localized fields are provided in the default language defined in the Configuration Service.
Responses
200
The request was successful. The price list's price is returned.
application/json
Responseall of
and
and
get
GET /price/{tenant}/price-lists/{priceListId}/prices/{priceId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "example-priceListPrice-id-1",
  "itemId": {
    "itemType": "PRODUCT",
    "id": "53a358901b2e9dd2718b5c4e"
  },
  "priceModelId": "6245a8f578a8576e338fa9c3",
  "tierValues": [
    {
      "priceValue": 15.99
    },
    {
      "priceValue": 14.99
    },
    {
      "priceValue": 13.99
    }
  ],
  "metadata": {
    "version": 1,
    "createdAt": "2022-03-31T13:18:02.379Z",
    "modifiedAt": "2022-03-31T13:18:02.379Z"
  }
}

Upserting a price in a price list

put

Updates a specified price list's price, or creates a new price in a price list if a price with the specified id doesn't exist yet.

Required scopes

  • price.pricelist_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
priceListIdstringRequired

Price list's unique identifier, generated when the price list is created.

priceIdstringRequired

Price list price's unique identifier, generated when the price list's price is created.

Header parameters
Content-LanguagestringOptional

List of languages in which localized fields in the request body are provided.

  • If the Content-Language header is set to *, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the Content-Language header is set to a specific language, then the localized fields should be provided as a map of single translation, where the key is a language code and the value is in a respective language.
  • If the Content-Language header is empty, then the localized fields should be provided as maps of single translation, where the key is a language code and the value is in a respective language. The endpoint will asume that the localized fields are provided in the default language defined in the Configuration Service.

Note: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request will be rejected.

Body
all ofOptional
and
and
anyOptional
and
and
Responses
201
The resource has been created.
application/json
put
PUT /price/{tenant}/price-lists/{priceListId}/prices/{priceId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 245

{
  "id": "example-priceListPrice-id-1",
  "itemId": {
    "itemType": "PRODUCT",
    "id": "53a358901b2e9dd2718b5c4e"
  },
  "priceModelId": "6245a8f578a8576e338fa9c3",
  "tierValues": [
    {
      "priceValue": 25.99
    },
    {
      "priceValue": 24.99
    },
    {
      "priceValue": 23.99
    }
  ],
  "metadata": {
    "version": 1
  }
}
{
  "id": "12345678-1234-1234-1234-123456789012"
}

Deleting a price from a price list

delete

Deletes a specified price list's price.

Required scopes

  • price.pricelist_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
priceListIdstringRequired

Price list's unique identifier, generated when the price list is created.

priceIdstringRequired

Price list price's unique identifier, generated when the price list's price is created.

Responses
204
The request was successful. The price has been deleted from the price list.
delete
DELETE /price/{tenant}/price-lists/{priceListId}/prices/{priceId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Was this helpful?