Product specifications

Mark_pcmanMark_pcman Member Posts: 1

Hello,

I have a question about product specifications. How do I assign specific Attributes within a Type to a product?

The problem is that every Attribute assigned to the Type is also added to the product but not every product has the same Attributes from the Type.


Below here are the endpoints I tried:


1.First I create the Types, this one with the name 'Videokaarten'

POST /types.json

"type":

{

"title": "Videokaarten",

"sortOrder":  2

}


2.Then I create attributes, this one with the name 'FireStream'

POST /attributes.json

"attribute":

{

"title": "FireStream",

"defaultValue": ""

}


3.Then I assign attribute from step 2 to the Type from step 1.

POST /types/attributes.json

"typesAttribute":

{

"sortOrder": 1,

"type": 211965,

"attribute": 828346

}


4.Then I assign the Type from step to a product by updating the Type field .

"product":

{

"type": 211965

}


I tried to delete using ProductAttribute endpoint:

DELETE /products/120417090/attributes/828346.json

But that only removes custom value of the attribute and not the attribute from the Type.

For other products that belong to the same Type the product might have different Attributes. If I would create a Type for each product then I would get the result I want, but that seems unnecessary and I think Lightspeed doesn't want that either.


I hope somebody can help me with this.


Best regards,

Mark

Tags:
Sign In or Register to comment.