Update a product
1 min
PATCH
https://api.fictive.com/REST/api/products/{productReference}
Path Parameters
- productReferencestringrequired
Header Parameters
- X-TokenIdstringDescription
- X-SessionIdstringDescription
- X-VersionstringrequiredDescription
- OriginstringDescription
Body Parameters
- patchRequestMicrosoft.AspNet.JsonPatch.JsonPatchDocument[FictiveGlobal.Api.Rest.Dtos.v1.Patch.Products.ProductPatchModel]required
- valueSystem.Object
- pathstring
- opstring
- fromstring
Responses
200
- FictiveGlobal.Api.Rest.Dtos.v1.ProductResponseDescription
- productReferencestring
- namestring
- descriptionstring
- typestring
- statusstring
- productListReferencesstring[]Example
- createdDatestring<date-time>Example
- lastUpdatedDatestring<date-time>Example
- productParametersobjectExample
- pricingFictiveGlobal.Api.Rest.Dtos.v1.PricePointResponse[]Description
- rolestringDescription
- amountnumber<double>Description
- isGrossbooleanDescription
- priceReferencestringDescription
- taxCategorystringDescription
- paymentMethodstringDescription
- currencystringDescription
- imagesFictiveGlobal.Api.Rest.Dtos.v1.ImageResponse[]Description
- imageReferencestring
- displayNamestring
- fileLocationstring
- defaultImageboolean
- creditsFictiveGlobal.Api.Rest.Dtos.v1.CreditResponse[]Description
- creditsReferencestring
- currencystring
- amountnumber<double>
- expiryDatestring<date-time>
- expiryDaysinteger<int32>
- contractPricingFictiveGlobal.Api.Rest.Dtos.v1.ProductService[]Description
- contractReferencestringDescription
- pricingFictiveGlobal.Api.Rest.Dtos.v1.ProductServicePricing[]Description
- productContractPriceReferencestringDescription
- taxCategoryFictiveGlobal.Api.Rest.Dtos.v1.TaxCategoryDescription
- taxCategoryReferencestringDescription
- taxCategoryNamestringDescription
- displayNamestringDescription
- amountFictiveGlobal.Api.Rest.Dtos.v3.CartLineItems.PricePointDescription
- grossAmountnumber<double>Description
- netAmountnumber<double>Description
- taxAmountnumber<double>Description
- currencystringDescription
- priceReferencestringDescription
- activeboolean
400
401
404
409
500
curl
curl --request PATCH \
--url https://api.fictive.com/REST/api/products/{productReference} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-version: string' \
--data '[
{}
]'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-version", "string");
var raw = JSON.stringify([
{}
]);
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.fictive.com/REST/api/products/{productReference}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fictive.com/REST/api/products/{productReference}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-version"] = "string"
request.body = JSON.dump([
{}
])
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.fictive.com/REST/api/products/{productReference}"
payload = json.dumps([
{}
])
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-version': 'string'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
200
[
{
"productReference": "0010BBLEC8GZAZA853",
"name": "Product A",
"description": "Product A Description",
"type": "Physical",
"status": "Active",
"productListReferences": [
"001PLYVMOL3WIA13S1"
],
"createdDate": "2021-09-21T05:33:24.6198965",
"lastUpdatedDate": "2021-09-21T05:33:24.6198965",
"productParameters": {
"ParameterName1": "ParameterValue1",
"ParameterName2": "ParameterValue2",
"ParameterName3": "ParameterValue3"
},
"pricing": [
{
"role": "Default",
"amount": 22,
"isGross": true,
"priceReference": "0010FN2NS2K63HEHC0",
"taxCategory": "Standard",
"paymentMethod": "ServiceCredits",
"currency": "GBP"
}
],
"images": [
{
"imageReference": "001IMALAKTOTN3DGB2",
"displayName": "Image1",
"fileLocation": "https://www.ImageLocation.co.uk/ImageFolder/Image1.jpg",
"defaultImage": true
}
],
"credits": [
{
"creditsReference": "001PCHCHYYG8VN4632",
"currency": "GBP",
"amount": 10,
"expiryDate": "2021-10-21T05:33:24.6198965"
}
],
"contractPricing": [
{
"contractReference": "0010GH2NS3K63HEHC4",
"pricing": [
{
"productContractPriceReference": "0580HH2NS3K63HFGC5",
"amount": {
"grossAmount": 10,
"netAmount": 8,
"taxAmount": 2,
"currency": "GBP"
},
"active": false
}
]
}
]
},
{
"productReference": "0010BZURPNZ3LJEM22",
"name": "Product B",
"description": "Product B Description",
"type": "Digital",
"status": "Active",
"productListReferences": [
"001PLYVMOL3WIA13S1"
],
"createdDate": "2021-09-21T05:33:24.6198965",
"lastUpdatedDate": "2021-09-21T05:33:24.6198965",
"productParameters": {
"ParameterName1": "ParameterValue1",
"ParameterName2": "ParameterValue2",
"ParameterName3": "ParameterValue3"
},
"pricing": [
{
"role": "Default",
"amount": 33,
"isGross": true,
"priceReference": "0010FF2HSPDM3LZBP0",
"taxCategory": "Standard",
"paymentMethod": "ServiceCredits",
"currency": "GBP"
}
],
"images": [
{
"imageReference": "001IMX81QIY5VFSZI0",
"displayName": "Image1",
"fileLocation": "https://www.ImageLocation.co.uk/ImageFolder/Image2.jpg",
"defaultImage": true
}
],
"credits": [
{
"creditsReference": "001PCPFIR6GWGF2XD0",
"currency": "USD",
"amount": 20,
"expiryDate": "2021-10-21T05:33:24.6198965"
}
],
"contractPricing": [
{
"contractReference": "009PSYVMOL3WIA13R8",
"pricing": [
{
"productContractPriceReference": "0010FS2T1F9AXORST1",
"taxCategory": {
"taxCategoryReference": "0010TC2T1F9AXORAAA",
"taxCategoryName": "Standard",
"displayName": "Standard"
},
"amount": {
"grossAmount": 16,
"netAmount": 10,
"taxAmount": 6,
"currency": "USD"
},
"active": false
}
]
}
]
}
]400
// Bad Request
Product names cannot exceed 128 characters
Product descriptions cannot exceed 850 characters
Invalid product type provided, please provide either Digital or Physical
Invalid status provided. Please provide a status of Active or Inactive
Invalid PATCH operation
Invalid PATCH path
Invalid Contract type provided
401
// Not Authorized
404
// Not Found
Product cannot be found
Product list cannot be found
Product list is not associated to the product
Contract cannot be found
409
// Conflict
A product already exists with the name provided
Contract {ContractReference} is already associated with product
Duplicate Contract reference provided
500
// 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.