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

    Update a Price Book

    PUT Update a Price Book by ID

    https://api.moltin.com/pcm/pricebooks/:id
    

    Updates the specified price book.

    Parameters

    Path parameters

    NameRequiredTypeDescription
    idRequiredstringThe unique identifier of the price book you want to update.

    Headers

    NameRequiredTypeDescription
    AuthorizationRequiredstringThe Bearer token to grant the API access.

    Body

    Required. A pricebook object with the following attributes:

    NameRequiredTypeDescription
    idRequiredstringThe unique identifier of the price book.
    typeRequiredstringAlways: pricebook
    attributes.nameOptionalstringThe name of the price book.
    attributes.descriptionOptionalstringThe purpose for the price book, such as flash sale pricing or preferred customer pricing.

    Request Example

    curl -X PUT https://api.moltin.com/pcm/pricebooks/2cf0d38c-58aa-420d-8658-4385dccea609 \
         -H "Authorization: Bearer XXXX" \
         -H "Content-Type: application/json" \
         -d $'{
            "data": {
                "id": "2cf0d38c-58aa-420d-8658-4385dccea609",
                "type": "pricebook",
                "attributes": {
                    "name": "Customer A Pricing"
                }
            }
        }'
    

    Response Example

    200 OK

    {
        "data": {
            "id": "2cf0d38c-58aa-420d-8658-4385dccea609",
            "type": "pricebook",
            "attributes": {
                "created_at": "2021-02-08T20:56:27.537Z",
                "description": "Tier 1 pricing",
                "name": "Customer A Pricing",
                "updated_at": "2021-02-08T21:34:49.789Z"
                },
            "meta": {
                "owner": "store"
            }
        },
      "links": {
            "self": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7"
        }
    }
    

    Was this helpful?

    Previous
    Create a Price Book