Update Product Unit
Update an existing product unit's properties. All fields are optional in update requests - only provided fields will be modified.
📝 Request Structure
Updatable Fields
description- Description of the product unitexternalId- External identifier for the product unitproductVariantId- ID of the product variantextraFields- Additional fields as key-value pairsimages- Array of image URLs for the product unitdisabled- Whether the unit is disabledtags- Tags associated with the unituserGroupId- UUID of the user group
📘 Field Interpretation
- Omitted fields remain unchanged
- All fields are optional in update requests
- Arrays replace existing values
- Objects (extraFields) are merged with existing
- Images must be valid HTTPS URLs
- Tags must be valid title strings
📤 Request Format
PUT /api/v1/units/UNIT-123
Content-Type: application/json
Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature
{
"description": "Updated demo unit for display",
"externalId": "EXT-UNIT-12345",
"productVariantId": "VARIANT-002",
"images": [
"https://example.com/unit1-updated.webp",
"https://example.com/unit2-updated.webp"
],
"disabled": false,
"tags": ["electronics", "updated"],
"extraFields": {
"location": "Store B",
"condition": "Excellent"
},
"userGroupId": "550e8400-e29b-41d4-a716-446655440000"
}
📥 Response Format
Success Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"externalId": "EXT-UNIT-12345",
"productId": "123e4567-e89b-12d3-a456-426614174000",
"productVariantId": "VARIANT-002",
"productExternalId": "PROD-EXT-123",
"description": "Updated demo unit for display",
"images": [
"https://example.com/unit1-updated.webp",
"https://example.com/unit2-updated.webp"
],
"organizationId": "123e4567-e89b-12d3-a456-426614174000",
"disabled": false,
"userGroupId": "550e8400-e29b-41d4-a716-446655440000",
"extraFields": {
"location": "Store B",
"condition": "Excellent"
}
}
❌ Error Responses
This endpoint follows the standard error format.
🔒 Required Permissions
units:updateunits:manage(for certain fields)
💡 Tips
- Only include fields that need updating
- Validate all URLs and UUIDs
- Keep descriptions concise
- Update tags thoughtfully
- Consider impact on related systems
- Document significant changes