Documentation

Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers
v7.18

Get price groups

This articles will guide you through how to retrieve price groups. Price groups are used during checkout for example when you add a product to basket.

The first thing you need to do is to attach your AccessToken token to the request's header. See Quick Start if you are not sure how to do that.

To get your price groups your request should have at least the required query parameter:

  • CultureCode e.g. en-US

There are optional query parameters as following:

  • MaxItems
  • NextPagingToken

If you are not sure what MaxItems and NexPagingToken are, take a look Here

Open the Get Price Groups request.

An example could be::

    
    curl -D- -X GET https://umbracodemo1.ucommerce.net/api/v1/price-groups?cultureCode={cultureCode}&maxItems={maxItems}&nextPagingToken={nextPagingToken} \
    -H 'Authorization: Bearer <ACCESS_TOKEN>'
    -H 'Content-Type: application/json'
    
    

If you get a successful response, the newly created basketId will be returned back to you.

Example:

    
    {
        "pagingToken": null,
        "priceGroups": [
            {   
                id: "1127af1d-32a5-6dda-bde4-500a351ff478",
                name: "EUR 15 %"
            }
        ]
    }
    
    

Possible errors that may occur:

Error Description
BadRequest (400) PriceGroup does not exist; Country does not exist; etc.
Unauthorized (401) The token has expired or was not valid
Forbidden (403) The token does not have access to this endpoint

Example:

    
    {
        "errors": [
            {
                "error-description": "Store does not exist.",
                "error": "BadRequest"
            }
        ]
    }
    
    

See Handling failures for more info.