younifyd
Menu

Create Pricebook

Create a Price Book

POST/pcm/pricebooks

Use it in a workflow

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

Request

Request body

Enter the body as JSON in the step's Body field.

dataobjectrequired
typestringrequired

One ofpricebookDefault "pricebook"

attributesobjectrequired3 fields
json
{
  "data": {
    "type": "pricebook",
    "attributes": {
      "name": "pricebook-store-abc",
      "description": "This is a price book",
      "external_ref": "external-ref"
    }
  }
}

Response

Returns 201 with an object. Read it in later steps with {{createPricebook.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.

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"
  }
}

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