VismaBouwsoftAPICalls.v1_POST_ProductAlternativeUnits Method
v1_POST_ProductAlternativeUnits() as String

This API call is used to add a(n) ProductAlternativeUnit

General Description

HTTP method API version
POST v1

Don’t forget to put the Authorization field in the header

API Path: /ProductAlternativeUnits
or

Fields

The following fields are available:

Field Name Type Id Type Name Length Required Writeable Force Write Link
product_id 1 tpLong 0 Yes Yes No
unit 2 tpString 10 Yes Yes No
unit_localized 2 tpString 10 No No No
factor 4 tpDouble 0 No Yes No
bulkdiscount 5 tpBool 0 No Yes No
bulkdiscount_fromquantity 4 tpDouble 0 No Yes No
price_cost 14 tpCurrencyHD 0 No Yes No
margin_catalogue 14 tpCurrencyHD 0 No No No
price_catalogue 14 tpCurrencyHD 0 No Yes No
barcode 2 tpString 0 No Yes No

/ProductAlternativeUnits

API Path: /ProductAlternativeUnits/

If everything succeeds the HTTP response status is 201
(201 CREATED)

If you forget to send the Authorization, the response status and code is 401
(401 Unauthorized)

For an explanation of all possible errors, please consult our section on possible answers to API calls here

Examples:

https://ra.bouwsoft.be/api/v1/ProductAlternativeUnits

with the following parameters :

Header Parameters :
ParameterName: Clientnr, ParameterValue: 115
ParameterName: AccessToken, ParameterValue: bPlfWxfGtGzSfffOPfzRqbmPfDfVkGAlfkmkzUjbAmGImfDfDb

Query Parameters :
ParameterName: columns, ParameterValue: product_id=2,unit=’kg’,factor=1

Success gives statuscode 201 And the following result

{“RecordChanges”: [
  {
    "id": 902,
    "product_id": 2,
    "unit": "kg",
    "unit_localized": "kg",
    "factor": 1,
    "bulkdiscount": false,
    "bulkdiscount_fromquantity": 0,
    "price_cost": 2.5,
    "margin_catalogue": 30.0,
    "price_catalogue": 3.25,
    "barcode": ""
  }
]
}

https://ra.bouwsoft.be/api/v1/ProductAlternativeUnits

with the following parameters :

Header Parameters :
ParameterName: Clientnr, ParameterValue: 115
ParameterName: AccessToken, ParameterValue: VItfWxfbrfzSfbVlVfzRqDrUfVrjfGfPfPbkzDmmjfVGDGGbbb

Query Parameters :
ParameterName: columns, ParameterValue: product_id%3D%7B%22v1_POST_Products%20%28test1%29%22%3A%20%22id%22%7D%2Cunit%3D%27pallet%27%2Cfactor%3D100

Success gives statuscode 201 And the following result

{“RecordChanges”: [
  {
    "id": 902,
    "product_id": 2832401,
    "unit": "pallet",
    "unit_localized": "pallet",
    "factor": 100,
    "bulkdiscount": false,
    "bulkdiscount_fromquantity": 0,
    "price_cost": 0.0,
    "margin_catalogue": 23.0,
    "price_catalogue": 0.0,
    "barcode": ""
  }
]
}