Upsert attribute (create or update)
POST
/v2/product-catalog/attributes
const url = 'https://api-crm-staging.divinea.com/api/v2/product-catalog/attributes';const options = { method: 'POST', headers: {APIKey: '<APIKey>', 'Content-Type': 'application/json'}, body: '{"applicableToTypes":["example"],"attributeId":1,"code":"example","displayOrder":1,"isVisible":true,"names":{"additionalProperty":"example"},"valueType":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-crm-staging.divinea.com/api/v2/product-catalog/attributes \ --header 'APIKey: <APIKey>' \ --header 'Content-Type: application/json' \ --data '{ "applicableToTypes": [ "example" ], "attributeId": 1, "code": "example", "displayOrder": 1, "isVisible": true, "names": { "additionalProperty": "example" }, "valueType": "example" }'Authorizations
Sezione intitolata “Authorizations”Request Body
Sezione intitolata “Request Body”Request
Media typeapplication/json
UpsertAttributeRequest
object
applicableToTypes
Array<string>
attributeId
integer format: int64
code
string
displayOrder
integer format: int32
isVisible
boolean
names
object
key
additional properties
string
valueType
string
Examplegenerated
{ "applicableToTypes": [ "example" ], "attributeId": 1, "code": "example", "displayOrder": 1, "isVisible": true, "names": { "additionalProperty": "example" }, "valueType": "example"}Responses
Sezione intitolata “Responses”OK
Media type*/*
CreationResponse
object
id
string
message
string
status
string