Edit Unit
Testing Env
https://www.testecommerce.vodoerp.com
Testing Env
https://www.testecommerce.vodoerp.com
PUT
/api/v1/standard_units/102
Last modified:2025-04-30 08:45:19
Key | Value | Description | Type |
---|---|---|---|
apikey | 5f28583f26a1a | API key for authentication; contact support to obtain. Required | String |
apiconnection | appmobile | Connection type; contact support to obtain. Required | String |
secure-business-key | 4765066450c0bd66325.48403130 | Business-specific key; contact support for valid values. Required | String |
userToken | 09119b2691afaa567bc1d46c829ebd41193c8545191146cc5df791681a792ad9 | User token from login API; see description for endpoints. (Get user token from https://testaccounts.vodoerp.com/api/login or https://accounts.vodoerp.com/api/login ) Required | String |
Key | Value | Description | Type |
---|---|---|---|
name_ar | Unit Name Arabic updated | Updated unit name in Arabic. Required | String |
name_en | Unit Name English updated | Updated unit name in English. Required | String |
type | custom | Unit type (e.g., custom ). | String |
children[0][name_ar] | Child Name Arabic updated | Updated child unit name in Arabic. Required | String |
children[0][name_en] | Child Name English updated | Updated child unit name in English. Required | String |
children[0][width] | 100 | Width of the child unit. | String |
calculations[0][value] | 6.5 | Updated conversion factor for the unit. | String |
(Additional children and calculations follow the same pattern.) |
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://www.testecommerce.vodoerp.com/api/v1/standard_units/102' \
--header 'apikey: 5f28583f26a1a' \
--header 'apiconnection: appmobile' \
--header 'secure-business-key: 4765066450c0bd66325.48403130' \
--header 'userToken: 09119b2691afaa567bc1d46c829ebd41193c8545191146cc5df791681a792ad9' \
--header 'Content-Type: application/json' \
--data-raw '{
"name_ar": "Unit Name Arabic updated",
"name_en": "Unit Name English updated",
"type": "custom",
"business_id": 44,
"children": [
{
"name_ar": "Child Name Arabic updated",
"name_en": "Child Name English updated",
"width": 100,
"length": 200,
"height": 50,
"weight": 10,
"width_unit_id": 1,
"length_unit_id": 2,
"height_unit_id": 3,
"weight_unit_id": 4
},
{
"name_ar": "Another Child Name Arabic updated",
"name_en": "Another Child Name English updated",
"width": 120,
"length": 220,
"height": 55,
"weight": 12,
"width_unit_id": 1,
"length_unit_id": 2,
"height_unit_id": 3,
"weight_unit_id": 4
},
{
"name_ar": "Another Childbbbbbbbb Name Arabic updated",
"name_en": "Another Childbbbbbbb Name English updated",
"width": 120,
"length": 220,
"height": 55,
"weight": 12,
"width_unit_id": 1,
"length_unit_id": 2,
"height_unit_id": 3,
"weight_unit_id": 4
},
{
"name_ar": "Another Childddddddddddddd Name Arabic updated",
"name_en": "Another Childddddddd Name English updated",
"width": 120,
"length": 220,
"height": 55,
"weight": 12,
"width_unit_id": 1,
"length_unit_id": 2,
"height_unit_id": 3,
"weight_unit_id": 4
}
],
"calculations": [
{
"value": 6.5
},
{
"value": 7.0
},
{
"value": 8.0
},
{
"value": 9.0
}
]
}'
Response Response Example
{"status":true,"message":"Unit updated successfully","data":{"id":132,"name_ar":"Unit Name Arabic updated","name_en":"Unit Name English updated","type":"custom","business_id":"259","standard_product_unit":0,"created_at":"2025-04-30T07:58:46.000000Z","updated_at":"2025-04-30T08:48:36.000000Z","children":[{"id":795,"standard_unit_id":132,"name_ar":"Child Name Arabic updated","name_en":"Child Name English updated","width":100,"length":200,"height":50,"weight":10,"width_unit_id":1,"length_unit_id":2,"height_unit_id":3,"weight_unit_id":4,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z","calculations_from":[{"id":708,"from_unit_child_id":795,"to_unit_child_id":795,"value":6.5,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z"},{"id":709,"from_unit_child_id":795,"to_unit_child_id":796,"value":7,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z"},{"id":710,"from_unit_child_id":795,"to_unit_child_id":797,"value":8,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z"},{"id":711,"from_unit_child_id":795,"to_unit_child_id":798,"value":9,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z"}],"calculations_to":[{"id":708,"from_unit_child_id":795,"to_unit_child_id":795,"value":6.5,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z"}]},{"id":796,"standard_unit_id":132,"name_ar":"Another Child Name Arabic updated","name_en":"Another Child Name English updated","width":120,"length":220,"height":55,"weight":12,"width_unit_id":1,"length_unit_id":2,"height_unit_id":3,"weight_unit_id":4,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z","calculations_from":[],"calculations_to":[{"id":709,"from_unit_child_id":795,"to_unit_child_id":796,"value":7,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z"}]},{"id":797,"standard_unit_id":132,"name_ar":"Another Childbbbbbbbb Name Arabic updated","name_en":"Another Childbbbbbbb Name English updated","width":120,"length":220,"height":55,"weight":12,"width_unit_id":1,"length_unit_id":2,"height_unit_id":3,"weight_unit_id":4,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z","calculations_from":[],"calculations_to":[{"id":710,"from_unit_child_id":795,"to_unit_child_id":797,"value":8,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z"}]},{"id":798,"standard_unit_id":132,"name_ar":"Another Childddddddddddddd Name Arabic updated","name_en":"Another Childddddddd Name English updated","width":120,"length":220,"height":55,"weight":12,"width_unit_id":1,"length_unit_id":2,"height_unit_id":3,"weight_unit_id":4,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z","calculations_from":[],"calculations_to":[{"id":711,"from_unit_child_id":795,"to_unit_child_id":798,"value":9,"created_at":"2025-04-30T08:48:36.000000Z","updated_at":"2025-04-30T08:48:36.000000Z"}]}]}}
Request
Header Params
apikey
stringÂ
required
Example:
5f28583f26a1a
apiconnection
stringÂ
required
Example:
appmobile
secure-business-key
stringÂ
required
728106399db2b289783.89154521
2680667168f2f8a68f6.12561200
140356399db2b2c32f0.25237063
96701678e330f31f768.22400604
14807664478836358b0.31329842
Example:
4765066450c0bd66325.48403130
userToken
stringÂ
required
https://testaccounts.vodoerp.com/api/login
or
https://accounts.vodoerp.com/api/login
Example:
09119b2691afaa567bc1d46c829ebd41193c8545191146cc5df791681a792ad9
Body Params application/json