---
title: Update a price point
slug: docs/demo/update-a-price-point
description: Learn how to send a PATCH request using cURL with this comprehensive code example. Included are all necessary headers and the required data payload for updating a product's price on the fictive API. Find out how to specify the endpoint URL and parameters 
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "dEbxQKBgBpbnRg9JPbaT2",
  "data": {
    "url": "https://api.fictive.com/REST/api/products/{productReference}/price-point/{priceReference}",
    "name": "Update a price point",
    "method": "PATCH",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "productReference",
          "type": "string"
        },
        {
          "kind": "required",
          "name": "priceReference",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "patchRequest",
          "type": "array",
          "schema": [
            {
              "kind": "optional",
              "name": "value",
              "type": "object",
              "schema": [],
              "modelRef": "#/definitions/System.Object",
              "customType": "System.Object"
            },
            {
              "kind": "optional",
              "name": "path",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "op",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "from",
              "type": "string",
              "example": ""
            }
          ],
          "modelRef": "#/definitions/Microsoft.AspNet.JsonPatch.JsonPatchDocument[FictiveGlobal.Api.Rest.Dtos.v1.Patch.Products.ProductPricePatchModel]",
          "customType": "Microsoft.AspNet.JsonPatch.JsonPatchDocument[FictiveGlobal.Api.Rest.Dtos.v1.Patch.Products.ProductPricePatchModel]",
          "isExpanded": true
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "role",
                "type": "string",
                "example": "",
                "description": "Gets or sets the Role name"
              },
              {
                "kind": "optional",
                "name": "amount",
                "type": "number<double>",
                "example": "",
                "description": "Gets or sets the Amount"
              },
              {
                "kind": "optional",
                "name": "isGross",
                "type": "boolean",
                "example": "",
                "description": "Specify whether is gross amount"
              },
              {
                "kind": "optional",
                "name": "priceReference",
                "type": "string",
                "example": "",
                "description": "Unique price reference"
              },
              {
                "kind": "optional",
                "name": "taxCategory",
                "type": "string",
                "example": "",
                "description": "Tax category name"
              },
              {
                "kind": "optional",
                "name": "paymentMethod",
                "type": "string",
                "example": "",
                "description": "Payment method name"
              },
              {
                "kind": "optional",
                "name": "currency",
                "type": "string",
                "example": "",
                "description": "Three letter currency ISO code"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PricePointResponse",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PricePointResponse",
            "isExpanded": true,
            "description": "Response DTO V1 for the Product Price Point."
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "{\n  \"role\": \"Default\",\n  \"amount\": 30.52,\n  \"isGross\": true,\n  \"priceReference\": \"0010FN2NS2K63HEHC0\",\n  \"taxCategory\": \"Standard\",\n  \"paymentMethod\": \"CreditCard\",\n  \"currency\": \"GBP\"\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "Request is invalid\r\n            <br /> Cannot provide the same parameter name multiple times\r\n            <br />Please provide the price as a number with no more than 2 decimal places",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Product cannot be found\r\n            <br /> Product price point cannot be found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "Calling this endpoint will allow you to update a specific price point via the eSuite API",
    "examples": {
      "languages": [
        {
          "id": "_a00-hszKojELCl2Wp5u_",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.fictive.com/REST/api/products/{productReference}/price-point/{priceReference} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-version: string' \\\n     --data '[\n     {}\n     ]'"
        },
        {
          "id": "NYR_DTwxOoGG1ISqb7MT5",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar raw = JSON.stringify([\n   {}\n]);\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/products/{productReference}/price-point/{priceReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "JD7YlXabE7IpBhi-i8z6C",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/products/{productReference}/price-point/{priceReference}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\nrequest.body = JSON.dump([\n   {}\n])\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "5FHwY24mQ77S5SBQd5OZT",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/products/{productReference}/price-point/{priceReference}\"\n\npayload = json.dumps([\n   {}\n])\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "_a00-hszKojELCl2Wp5u_"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"role\": \"Default\",\n  \"amount\": 30.52,\n  \"isGross\": true,\n  \"priceReference\": \"0010FN2NS2K63HEHC0\",\n  \"taxCategory\": \"Standard\",\n  \"paymentMethod\": \"CreditCard\",\n  \"currency\": \"GBP\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Request is invalid\r\n             Cannot provide the same parameter name multiple times\r\n            Please provide the price as a number with no more than 2 decimal places\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Product cannot be found\r\n             Product price point cannot be found\n"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}