Share

Update an item's categorization attributes

PATCH /api/bom/v1/part_version/{partVersionId}/category_attribute updates a categorization attribute value set on a specific item.

Request schema

Method URL
PATCH /api/bom/v1/part_version/{partVersionId}/category_attribute

Request header

*indicates required parameters

Field Value Type Description
*Authorization String Enter: Bearer access token.
*Upc-Selected-Company Integer Company’s ID. Use the value returned in the id field received in response to the following request: GET /api/auth/v1/companies.
*PartVersionId Integer The ID of the item in which you want to edit categorization attributes.
X-User-Id Text Enter the email address of the user being impersonated. This value is required if you are using a two-legged token. If you are using a three-legged token, then this field is not required.

Request body

Field Value Type Description
*newAttributeValues Array Contains an array of attribute IDs and values they should be updated to. For every attribute the following parameters should be set:

  • attributeId - The ID of the attribute to change the value of.
  • valueDate - The new date value of the attribute, set if the value type is DATE.
  • valueDecimal - The new decimal value of the attribute, set if the value type is FLOAT.
  • valueInteger - The new number value of the attribute, set if the value type is INTEGER.
  • valueLOV - The newly selected drop-down value of the attribute, set if the value type is LOV; should be the value ID in the drop-down and not the actual value. This ID can be found using the API for finding all attributes in a category (see Get all attributes in a category).
  • valueString - The new text value of the attribute, set if the value type is STRING.


Note: Only one value field should be set in the request; in other words, if the value type is STRING then only valueString should be set.

Sample request body

{
  "newAttributeValues": [
    {
    "attributeID": 9531,
    "valueDecimal": 10000
    }
  ]
}

Response schema

A successful request returns an empty 200-HTTP response.

Was this information helpful?