younifyd
Menu

Get Pricebook By Id

Get a Price Book by ID

GET/pcm/pricebooks/{pricebookID}

Use it in a workflow

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

Request

Path parameters

pricebookIDstringrequired

The unique identifier of a price book.

Query parameters

includestring

To include product prices in a response, add `include=prices`.

One ofprices

Response

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

dataobject

A price book with the following attributes.

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.

selfstring (uri)

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

includedarray<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.

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"
    }
  },
  "links": {
    "self": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7"
  },
  "included": [
    {
      "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"
      }
    }
  ]
}

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