ProductParameter
Create product parameter
Creates a new product parameter.
Parameters for "Create product parameter"
POST/API/ProductParameter
Request Example
curl -X POST 'https://mgmtapi.geins.io/API/ProductParameter' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic [USER-CREDENTIALS-BASE64-ENCODED]' \
-H 'X-ApiKey: {MGMT_API_KEY}'\
-d '{
"ParameterId": 0,
"GroupId": 0,
"ParameterType": 0,
"Name": "string",
"LocalizedNames": [
{
"LanguageCode": "string",
"Content": "string"
}
]
}'
import axios from 'axios';
const config = {
method: 'POST',
url: 'https://mgmtapi.geins.io/API/ProductParameter',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Basic [USER-CREDENTIALS-BASE64-ENCODED]',
'X-ApiKey': '{MGMT_API_KEY}'
},
data: {
"ParameterId": 0,
"GroupId": 0,
"ParameterType": 0,
"Name": "string",
"LocalizedNames": [
{
"LanguageCode": "string",
"Content": "string"
}
]
}
};
axios.request(config)
.then(response => response.data)
.catch(error => console.error(error));
fetch('https://mgmtapi.geins.io/API/ProductParameter', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Basic [USER-CREDENTIALS-BASE64-ENCODED]',
'X-ApiKey': '{MGMT_API_KEY}'
},
body: JSON.stringify({
"ParameterId": 0,
"GroupId": 0,
"ParameterType": 0,
"Name": "string",
"LocalizedNames": [
{
"LanguageCode": "string",
"Content": "string"
}
]
})
})
.then(res => res.json())
.then((response) => response)
.catch(console.error);
import requests
url = "https://mgmtapi.geins.io/API/ProductParameter"
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Basic [USER-CREDENTIALS-BASE64-ENCODED]',
'X-ApiKey': '{MGMT_API_KEY}'
}
payload = {
"ParameterId": 0,
"GroupId": 0,
"ParameterType": 0,
"Name": "string",
"LocalizedNames": [
{
"LanguageCode": "string",
"Content": "string"
}
]
}
response = requests.POST(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://mgmtapi.geins.io/API/ProductParameter"
payload := []byte(`{
"ParameterId": 0,
"GroupId": 0,
"ParameterType": 0,
"Name": "string",
"LocalizedNames": [
{
"LanguageCode": "string",
"Content": "string"
}
]
}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic [USER-CREDENTIALS-BASE64-ENCODED]")
req.Header.Add("X-ApiKey", "{MGMT_API_KEY}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
using System.Text;
using System.Text.Json;
using System.Net.Http;
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Basic [USER-CREDENTIALS-BASE64-ENCODED]");
client.DefaultRequestHeaders.Add("X-ApiKey", "{MGMT_API_KEY}");
var body = new
{
ParameterId = 0,
GroupId = 0,
ParameterType = 0,
Name = "string",
LocalizedNames = new[]
{
new
{
LanguageCode = "string",
Content = "string"
}
}
};
var jsonContent = JsonSerializer.Serialize(body);
var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
var response = await client.POSTAsync("https://mgmtapi.geins.io/API/ProductParameter", content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
Response
{
"Resource": {
"ParameterId": 0,
"GroupId": 0,
"GroupName": "string",
"ParameterType": 0,
"Name": "string",
"LocalizedNames": [
{
"LanguageCode": "string",
"Content": "string"
}
],
"PredefinedValues": [
{
"ParameterId": 0,
"PredefinedValueId": 0,
"Name": "string",
"LocalizedNames": [
{
"LanguageCode": "string",
"Content": "string"
}
]
}
]
},
"Message": "string",
"Details": [
"string"
]
}
{
"Message": "string",
"Details": [
"string"
]
}
Update product parameter values (batch) (obsolete)
Updates multiple product parameter values. Any existing product parameter values not supplied in the request will remain on the product. Note that this endpoint is obsolete and will be removed in a future version. Use API/Product/Parameter/Values instead.
Update product parameter
Updates a product parameter. Leaving out a property will ensure no changes are made to that property. Collection properties will delete and/or add as necessary to match the supplied data.