Operations with specification attributes

Operations with Specification Attributes - GET, INSERT, UPDATE, DELETE

How to get all specification attributes
GET /odata/specificationattribute

Request Type: GET

Enter the request URL: http://StoreURL/odata/specificationattribute

Auth type: Bearer Token - paste the token generated in the previous steps

How to get specification attribute by id
GET /odata/specificationattribute('id')

Request Type: GET

Enter the request URL: http://StoreURL/odata/specificationattribute('id')

Auth type: Bearer Token - paste the token generated in the previous steps

How to delete specification attribute
DELETE /odata/specificationattribute('id')

Request Type: DELETE

Enter the request URL: http://StoreURL/odata/specificationattribute('id')

Auth type: Bearer Token - paste the token generated in the previous steps

Please note that in DELETE operations, you will get only "Status: 200 OK" information if the item was successfully deleted.

How to add new specification attribute
POST /odata/specificationattribute

Request Type: POST

Enter the request URL: http://StoreURL/odata/specificationattribute

Auth type: Bearer Token - paste the token generated in the previous steps

Headers: In the Key field enter the Content-Type, in Value field enter the application/json, description is empty.

Body: In the body field you need to enter the proper JSON. Which fields are necessary for specified actions you can check in the bottom of $metadata page. 

How to update specification attribute
POST /odata/specificationattribute

Request Type: POST

Enter the request URL: http://StoreURL/odata/specificationattribute

Auth type: Bearer Token - paste the token generated in the previous steps

Headers: In the Key field enter the Content-Type, in Value field enter the application/json, description is empty.

Body: In the body field you need to enter the proper JSON. Which fields are necessary for specified actions you can check in the bottom of $metadata page.

How to partially update specification attribute
PATCH /odata/specificationattribute('id')

Request Type: PATCH

Enter the request URL: http://StoreURL/odata/specificationattribute('id')

Auth type: Bearer Token - paste the token generated in the previous steps

Headers: In the Key field enter the Content-Type, in Value field enter the application/json, description is empty.

Body: In the body field you need to enter the proper JSON. Which fields are necessary for specified actions you can check in the bottom of $metadata page. Please note that you don't need to have all fields in your request.

How to update whole specification attribute
PUT /odata/specificationattribute('id')

Request Type: PUT

Enter the request URL: http://StoreURL/odata/specificationattribute('id')

Auth type: Bearer Token - paste the token generated in the previous steps

Headers: In the Key field enter the Content-Type, in Value field enter the application/json, description is empty.

Body: In the body field you need to enter the proper JSON. Which fields are necessary for specified actions you can check in the bottom of $metadata page. Please note that you have to provide all fields in your request, also the "id" field.

How to add new specification attribute to product
POST /odata/product('id')/CreateProductSpecification

Request Type: POST

Enter the request URL: http://StoreURL/odata/product('id')/CreateProductSpecification

Auth type: Bearer Token - paste the token generated in the previous steps

Headers: In the Key field enter the Content-Type, in Value field enter the application/json, description is empty.

Body: In the body field you need to enter the proper JSON. Which fields are necessary for specified actions you can check in the bottom of $metadata page. Please note that AttributeType is required field, here you have to enter the name of attribute type, i.e CustomText or Option. In the Specification Attribute and Specification Attribute Option Id you have to enter the existing IDs. 

How to update specification attribute assigned to product
POST /odata/product('id')/UpdateProductSpecification

Request Type: POST

Enter the request URL: http://StoreURL/odata/product('id')/UpdateProductSpecification

Auth type: Bearer Token - paste the token generated in the previous steps

Headers: In the Key field enter the Content-Type, in Value field enter the application/json, description is empty.

Body: In the body field you need to enter the proper JSON. Which fields are necessary for specified actions you can check in the bottom of $metadata page.

How to delete specification attribute from product
POST /odata/product('id')/DeleteProductSpecification

Request Type: POST

Enter the request URL: http://StoreURL/odata/product('id')/DeleteProductSpecification

Auth type: Bearer Token - paste the token generated in the previous steps

Headers: In the Key field enter the Content-Type, in Value field enter the application/json, description is empty.

Body: In the body field you need to enter the proper JSON. Which fields are necessary for specified actions you can check in the bottom of $metadata page.