Skip to main content

Add a Product Price to a Price Book

POST 

https://euwest.api.elasticpath.com/pcm/pricebooks/:pricebookID/prices

Price books contain prices for the products in your catalog. Use the Prices API to adds the prices for a product to a specified price book. If the prices for the product already exist in the price book, the operation fails and the existing product prices are not updated.

Request

Responses

A product price with the following attributes.

Authorization: Authorization

name: Authorizationtype: httpin: headerscheme: bearer

Request Collapse all
Base URL
https://euwest.api.elasticpath.com
Auth
Parameters
— pathrequired
Body required
{
  "data": {
    "type": "product-price",
    "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
            }
          }
        }
      },
      "sku": "product-sku-a",
      "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": "a-external-ref",
      "admin_attributes": {
        "cost_of_goods": "42.0",
        "charge_type": "credit card"
      },
      "shopper_attributes": {
        "cost_of_goods": "42.0",
        "charge_type": "credit card"
      }
    }
  }
}
ResponseClear

Click the Send API Request button above and see the response here!