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 Number
product_id Number
unit String
unit_localized String
factor Number
bulkdiscount Boolean
bulkdiscount_fromquantity Number
price_cost Number
margin_catalogue Number
price_catalogue Number
barcode String

/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": 883,
    "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": 883,
    "product_id": 2809432,
    "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": ""
  }
]
}