• PXM Price Books/
    PXM Price Book Modifiers API/
    Update a Price Book Modifier

    Update a Price Book Modifier

    PUT Update a Price Book by ID

    https://api.moltin.com/pcm/pricebooks/:pricebookId/modifiers/:modifierId
    

    Updates the specified price book modifier.

    Parameters

    Path parameters

    NameRequiredTypeDescription
    pricebookIdRequiredstringThe ID of the pricebook.
    modifierIdRequiredstringThe ID of the modifier you want to update.

    Headers

    NameRequiredTypeDescription
    AuthorizationRequiredstringThe Bearer token required to get access to the API.

    Body

    AttributeRequiredTypeDescription
    typeRequiredstringThe type of resource object. You must use price_modifier.
    attributes.nameRequiredstringThe name of the price modifier that you want to update.
    attributes.currenciesRequiredobjectThe value of the price modifier.

    Request Example

    curl -X PUT https://api.moltin.com//pcm/pricebooks/fe3f3f4c-bf36-44fc-9af6-e460276b2a45/modifiers/dde5425f-1b7b-457e-ba3c-accb0c089f3b
         -H "Authorization: Bearer XXXX" \
         -H "Content-Type: application/json" \
    {
      "data": {
        "type": "price-modifier",
        "id": "dde5425f-1b7b-457e-ba3c-accb0c089f3b",
        "attributes": {
          "currencies": {
            "USD": {
              "amount": 100,
              "includes_tax": false,
              "tiers": {
                "min_5": {
                  "minimum_quantity": 5,
                  "amount": 80
                }
              }
            }
          }
        }
      }
    }
    

    Response Example

    200 OK

    {
      "data": {
        "id": "dde5425f-1b7b-457e-ba3c-accb0c089f3b",
        "attributes": {
          "currencies": {
            "USD": {
              "amount": 100,
              "includes_tax": false,
              "tiers": {
                "min_5": {
                  "amount": 80,
                  "minimum_quantity": 5
                }
              }
            }
          },
          "modifier_type": "price_increment",
          "name": "large_supplement"
        },
          "meta": {
          "owner": "store"
        },
        "type": "price-modifier"
      },
      "links": {
        "self": "/pcm/pricebooks/fe3f3f4c-bf36-44fc-9af6-e460276b2a45/modifiers/dde5425f-1b7b-457e-ba3c-accb0c089f3b"
      }
    }
    

    Was this helpful?

    Previous
    Create a Price Book Modifier