API Reference
Products
Create a price point
1min
code examples curl location globoff request post 'https //api fictive com/rest/api/products/{productreference}/price points' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'post', headers myheaders, redirect 'follow' }; fetch("https //api fictive com/rest/api/products/{productreference}/price points", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api fictive com/rest/api/products/{productreference}/price points") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //api fictive com/rest/api/products/{productreference}/price points" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses { "role" "default", "amount" 20 52, "isgross" true, "pricereference" "0010fn2ns2k63hehc0", "taxcategory" "standard", "paymentmethod" "creditcard", "currency" "gbp" }// please provide the price as a number with no more than 2 decimal places \<br /> invalid payment method provided \<br /> invalid currency provided // not authorized // product cannot be found // a price point exists for the role, payment method and currency provided please update the existing price point // role is not configured \<br /> role must be provided \<br /> category is not configured as a tax category \<br /> currency is not configured \<br /> currency must be provided \<br /> payment method must be provided // internal server error
π€
Have a question?
Our super-smart AI,knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.