younifyd
Menu

Update Price Modifier

Update a Modifier

PUT/pcm/pricebooks/{pricebookID}/modifiers/{modifierID}

Use it in a workflow

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

Request

Path parameters

pricebookIDstringrequired

Unique identifier of a Price Book

modifierIDstringrequired

Unique identifier of a Price Book Modifier

Request body

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

dataobjectrequired

Price modifier update request.

idstringrequired

A unique identifier for the price modifier.

typestringrequired

One ofprice-modifierDefault "price-modifier"

attributesobjectrequired4 fields
json
{
  "data": {
    "id": "37f2eed6-0bea-4d0b-a3c6-24cc76143bfd",
    "type": "price-modifier",
    "attributes": {
      "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
            }
          }
        }
      },
      "name": "large-supplement",
      "modifier_type": "price_equals",
      "external_ref": "external-ref"
    }
  }
}

Response

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

dataobject

A price modifier with the following attributes.

typestringrequired

One ofprice-modifierDefault "price-modifier"

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.

attributesobjectrequired6 fields
idstringrequired

A unique identifier for the price modifier.

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": {
    "type": "price-modifier",
    "attributes": {
      "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
            }
          }
        }
      },
      "name": "large-supplement",
      "modifier_type": "price_equals",
      "external_ref": "external-ref",
      "created_at": "2020-09-22T09:00:00Z",
      "updated_at": "2020-09-22T09:00:00Z"
    },
    "id": "37f2eed6-0bea-4d0b-a3c6-24cc76143bfd",
    "pricebook_external_ref": "a-pricebook-external-ref",
    "meta": {
      "owner": "store"
    }
  },
  "links": {
    "self": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7/modifiers/f5bd1fc7-48a2-40ac-88dd-2bd9985050cd"
  }
}

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