younifyd
Menu

Get Product Prices

Gets all Prices by Price Book ID

GET/pcm/pricebooks/{pricebookID}/prices

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Get Product Prices action (under Price Books).
  3. Fill in the fields below, then reference the result from later steps as {{getProductPrices.response.data}}.

Request

Path parameters

pricebookIDstringrequired

The unique identifier of a price book.

Query parameters

filterstring

This endpoint supports filtering. See [Filtering]().

page[limit]integer (int64)

The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

page[offset]integer (int64)

The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page offset is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.

Response

Returns 200 with an object. Read it in later steps with {{getProductPrices.response.data.<field>}}.

metaobject

Contains the results for the entire collection.

resultsobject1 fields
pageobject4 fields
dataarray<object>
typestringrequired

One ofproduct-priceDefault "product-price"

pricebook_external_refstring

The unique attribute associated with the price book. This can be an external reference from a separate company system, for example. The maximum length is 2048 characters.

attributesobjectrequired8 fields
idstringrequired

The unique identifier for the product price.

metaobject2 fields

Information that provides context to other data sets.

linksobject

Links are used to allow you to move between requests.

selfstring (uri)

Single entities use a self parameter with a link to that specific resource.

firststring (uri)

Always the first page.

laststring (uri)

This is `null` if there is only one page.

prevstring (uri)

This is `null` if there is only one page.

nextstring (uri)

This is `null` if there is only one page.

json
{
  "data": [
    {
      "type": "product-price",
      "attributes": {
        "sku": "product-sku-a",
        "currencies": {
          "USD": {
            "amount": 100,
            "includes_tax": false,
            "tiers": {
              "min_5": {
                "minimum_quantity": 5,
                "amount": 50
              }
            }
          },
          "CAD": {
            "amount": 127,
            "includes_tax": false,
            "tiers": {
              "min_10": {
                "minimum_quantity": 10,
                "amount": 100
              }
            }
          },
          "GBP": {
            "amount": 73,
            "includes_tax": true,
            "tiers": {
              "min_20": {
                "minimum_quantity": 20,
                "amount": 60
              }
            }
          }
        },
        "sales": {
          "summer": {
            "schedule": {
              "valid_form": "2023-12-24T09:00:00",
              "valid_to": "2023-12-25T09:00:00"
            },
            "currencies": {
              "USD": {
                "amount": 90,
                "includes_tax": false,
                "tiers": {
                  "min_5": {
                    "minimum_quantity": 5,
                    "amount": 40
                  }
                }
              },
              "CAD": {
                "amount": 117,
                "includes_tax": false,
                "tiers": {
                  "min_10": {
                    "minimum_quantity": 10,
                    "amount": 80
                  }
                }
              },
              "GBP": {
                "amount": 65,
                "includes_tax": true,
                "tiers": {
                  "min_20": {
                    "minimum_quantity": 20,
                    "amount": 50
                  }
                }
              }
            }
          }
        },
        "external_ref": "external-ref",
        "created_at": "2020-09-22T09:00:00Z",
        "updated_at": "2020-09-22T09:00:00Z",
        "admin_attributes": {
          "cost_of_goods": "42.0",
          "charge_type": "credit card"
        },
        "shopper_attributes": {
          "cost_of_goods": "42.0",
          "charge_type": "credit card"
        }
      },
      "id": "a915553d-935d-4d56-870b-817b47a44a99",
      "pricebook_external_ref": "a-pricebook-external-ref",
      "meta": {
        "owner": "store",
        "pricebook_id": "4c45e4ec-26e0-4043-86e4-c15b9cf985a7"
      }
    }
  ],
  "meta": {
    "results": {
      "total": 1
    },
    "page": {
      "limit": 10,
      "offset": 0,
      "current": 0,
      "total": 1
    }
  },
  "links": {
    "self": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7/prices?filter=like(sku,*product*)",
    "first": "string",
    "last": "string",
    "prev": "string",
    "next": "string"
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.