Glue API: Retrieve abstract product prices

Edit on GitHub

This endpoint allows retrieving detailed information about the prices of abstract products.

Installation

For detailed information on the modules that provide the API functionality and related installation instructions, see Install the Product Glue API

Retrieve prices of an abstract product

To retrieve prices of an abstract product, send the request:


GET/abstract-products/{{abstract_product_sku}}/abstract-product-prices


PATH PARAMETER DESCRIPTION
{{abstract_product_sku}} SKU of an abstract product to retrieve the prices of.

Request

REQUEST USAGE
GET http://glue.mysprykershop.com/abstract-products/001/abstract-product-prices Retrieve the price of the 001 product.
GET http://glue.mysprykershop.com/abstract-products/001/abstract-product-prices?currency=CHF&priceMode=GROSS_MODE Retrieve the gross price of the 001 product in Swiss Franc.
STRING PARAMETER DESCRIPTION EXEMPLARY VALUES
currency Defines the currency to retrieve the price in. USD, EUR, CHF
priceMode Defines the price mode to retrieve the price in. GROSS_MODE, NET_MODE

Response

Response sample: retrieve default prices of an abstract product
{
    "data": [
        {
            "type": "abstract-product-prices",
            "id": "001",
            "attributes": {
                "price": 9999,
                "prices": [
                    {
                        "priceTypeName": "DEFAULT",
                        "netAmount": null,
                        "grossAmount": 9999,
                        "currency": {
                            "code": "EUR",
                            "name": "Euro",
                            "symbol": "€"
                        }
                    },
                    {
                        "priceTypeName": "ORIGINAL",
                        "netAmount": null,
                        "grossAmount": 12564,
                        "currency": {
                            "code": "EUR",
                            "name": "Euro",
                            "symbol": "€"
                        }
                    }
                ]
            },
            "links": {
                "self": "http://glue.mysprykershop.com/abstract-products/001/abstract-product-prices"
            }
        }
    ],
    "links": {
        "self": "http://glue.mysprykershop.com/abstract-products/001/abstract-product-prices"
    }
}
Response sample: retrieve default and volume prices of an abstract product
{
    "data": [
        {
            "type": "abstract-product-prices",
            "id": "093",
            "attributes": {
                "price": 24899,
                "prices": [
                    {
                        "priceTypeName": "DEFAULT",
                        "netAmount": null,
                        "grossAmount": 24899,
                        "currency": {
                            "code": "EUR",
                            "name": "Euro",
                            "symbol": "€"
                        },
                        "volumePrices": [
                            {
                                "netAmount": 150,
                                "grossAmount": 165,
                                "quantity": 5
                            },
                            {
                                "netAmount": 145,
                                "grossAmount": 158,
                                "quantity": 10
                            },
                            {
                                "netAmount": 140,
                                "grossAmount": 152,
                                "quantity": 20
                            }
                        ]
                    }
                ]
            },
            "links": {
                "self": "https://glue.mysprykershop.com/abstract-products/093/abstract-product-prices"
            }
        }
    ],
    "links": {
        "self": "https://glue.mysprykershop.com/abstract-products/093/abstract-product-prices"
    }
}
Response sample: retrieve a gross price in Swiss Franc of an abstract product
   {
   "data": [
       {
           "type": "abstract-product-prices",
           "id": "001",
           "attributes": {
               "price": 11499,
               "prices": [
                   {
                       "priceTypeName": "DEFAULT",
                       "netAmount": null,
                       "grossAmount": 11499,
                       "currency": {
                           "code": "CHF",
                           "name": "Swiss Franc",
                           "symbol": "CHF"
                       }
                   },
                   {
                       "priceTypeName": "ORIGINAL",
                       "netAmount": null,
                       "grossAmount": 14449,
                       "currency": {
                           "code": "CHF",
                           "name": "Swiss Franc",
                           "symbol": "CHF"
                       }
                   }
               ]
           },
           "links": {
               "self": "http://glue.mysprykershop.com/abstract-products/001/abstract-product-prices"
           }
       }
   ],
   "links": {
       "self": "http://glue.mysprykershop.com/abstract-products/001/items?currency=CHF&priceMode=GROSS_MODE"
   }
}

RESOURCE ATTRIBUTE TYPE DESCRIPTION
abstract-product-prices price Integer Price to pay for that product in cents.
abstract-product-prices priceTypeName String Price type.
abstract-product-prices netAmount Integer Net price in cents.
abstract-product-prices grossAmount Integer Gross price in cents.
abstract-product-prices currency.code String Currency code.
abstract-product-prices currency.name String Currency name.
abstract-product-prices currency.symbol String Currency symbol.
abstract-product-prices volumePrices Array An array of objects defining the volume prices for the abstract product.
abstract-product-prices netAmount Integer Net price in cents.
abstract-product-prices grossAmount Integer Gross price in cents.
abstract-product-prices quantity Integer Number of items.

Possible errors

CODE REASON
307 Abstract product price is not found (for example, because of the wrong abstract product SKU.
311 Abstract product SKU is not specified.

To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.