younifyd
Menu

Get Pricebooks

Get all Price Books

GET/pcm/pricebooks

Use it in a workflow

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

Request

Query parameters

filterstring

You can filter on this endpoint. See [Filtering](#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 {{getPricebooks.response.data.<field>}}.

metaobject

Contains the results for the entire collection.

resultsobject1 fields
pageobject4 fields
dataarray<object>
idstringrequired

A unique identifier of a price book.

typestringrequired

Always `pricebook`.

One ofpricebookDefault "pricebook"

attributesobjectrequired5 fields
metaobject1 fields
linksobject

Links are used to allow you to move between requests. Single entities use a self parameter with a link to that specific resource. Sometimes, there aren’t enough entities for a project to fill multiple pages. In this situation, we return some defaults, instead of expecting you to check for these special cases.

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": [
    {
      "id": "4c45e4ec-26e0-4043-86e4-c15b9cf985a7",
      "type": "pricebook",
      "attributes": {
        "name": "Standard Price Book",
        "created_at": "2020-09-22T09:00:00Z",
        "updated_at": "2020-09-22T09:00:00Z",
        "external_ref": "an-external-ref",
        "description": "This is a test price book"
      },
      "meta": {
        "owner": "store"
      }
    }
  ],
  "meta": {
    "results": {
      "total": 1
    },
    "page": {
      "limit": 10,
      "offset": 0,
      "current": 0,
      "total": 1
    }
  },
  "links": {
    "self": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7?filter=like(name,*Standard*)",
    "first": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7?filter=like(name,*Standard*)&page[offset]=0&page[limit]=25",
    "last": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7?filter=like(name,*Standard*)&page[offset]=0&page[limit]=25",
    "prev": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7?filter=like(name,*Standard*)&page[offset]=0&page[limit]=25",
    "next": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7?filter=like(name,*Standard*)&page[offset]=25&page[limit]=25"
  }
}

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

Was this page helpful?