VismaBouwsoftAPICalls.v1_GET_ProductAlternativeUnits Method
v1_GET_ProductAlternativeUnits() as String

This API call is used to get fields of a(n) ProductAlternativeUnit(s)

HTTP method API version
GET v1

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

API Path: /ProductAlternativeUnits/
or
API Path: /ProductAlternativeUnits/{id}
or
API Path: /ProductAlternativeUnits/FieldInfo/

You can make this API call:
* without the key field id to get a list of ProductAlternativeUnits
* with the key field id as the path parameter (the specific id of the ProductAlternativeUnit you want to get)
* to request the FieldInfo for this call

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 200
(200 OK)

If there is something wrong with the request, the response status and code is 400
(400 Bad Request)

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

If what you sent can’t be processed, the response status is 500
(500 Internal Server Error)

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: fbjfWxfIjmzSfIrtlfzRqAbkftOjkGjVfVkkzjGDtmfIfOUVlj

Query Parameters :
ParameterName: filter, ParameterValue: product_id eq 1
ParameterName: limit, ParameterValue:
ParameterName: sort, ParameterValue: unit

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–2/3”, “Records”: [
  {
    "id": 255,
    "product_id": 1,
    "unit": "Doos",
    "unit_localized": "box",
    "factor": 100,
    "bulkdiscount": false,
    "bulkdiscount_fromquantity": 0,
    "price_cost": 350.0,
    "margin_catalogue": 30.0,
    "price_catalogue": 455.0,
    "barcode": ""
  },
  {
    "id": 3,
    "product_id": 1,
    "unit": "m2",
    "unit_localized": "m²",
    "factor": 0.1,
    "bulkdiscount": false,
    "bulkdiscount_fromquantity": 0,
    "price_cost": 0.35,
    "margin_catalogue": 30.0,
    "price_catalogue": 0.455,
    "barcode": ""
  }
,

]
}

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

with the following parameters :

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

Query Parameters :
ParameterName: filter, ParameterValue:
ParameterName: limit, ParameterValue: 5
ParameterName: sort, ParameterValue: product_id

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–4/593”, “Records”: [
  {
    "id": 3,
    "product_id": 1,
    "unit": "m2",
    "unit_localized": "m²",
    "factor": 0.1,
    "bulkdiscount": false,
    "bulkdiscount_fromquantity": 0,
    "price_cost": 0.35,
    "margin_catalogue": 30.0,
    "price_catalogue": 0.455,
    "barcode": ""
  },
  {
    "id": 255,
    "product_id": 1,
    "unit": "Doos",
    "unit_localized": "box",
    "factor": 100,
    "bulkdiscount": false,
    "bulkdiscount_fromquantity": 0,
    "price_cost": 350.0,
    "margin_catalogue": 30.0,
    "price_catalogue": 455.0,
    "barcode": ""
  }
,

]
}

/ProductAlternativeUnits/{id}

If everything succeeds the HTTP response status is 200
(200 OK)

If there is something wrong with the request, the response status and code is 400
(400 Bad Request)

If there is no record that has the requested id the HTTP response status and code is 404
(404 Not found)

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

If what you sent can’t be processed, the response status is 500
(500 Internal Server Error)

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/255

with the following parameters :

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

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–0/1”, “Records”: [
  {
    "id": 255,
    "product_id": 1,
    "unit": "Doos",
    "unit_localized": "box",
    "factor": 100,
    "bulkdiscount": false,
    "bulkdiscount_fromquantity": 0,
    "price_cost": 350.0,
    "margin_catalogue": 30.0,
    "price_catalogue": 455.0,
    "barcode": ""
  }
]
}

/ProductAlternativeUnits/FieldInfo

If everything succeeds the HTTP response status is 200
(200 OK)

If there is something wrong with the request, the response status and code is 400
(400 Bad Request)

If there is no record that has the requested id the HTTP response status and code is 404
(404 Not found)

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

If what you sent can’t be processed, the response status is 500
(500 Internal Server Error)

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/FieldInfo

with the following parameters :

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

Success gives statuscode 200 And the following result

[
  {
    "name": "product_id",
    "type_id": 1,
    "type_name": "tpLong",
    "length": 0,
    "required": true,
    "writeable": true,
    "forcewrite": false,
    "link": ""
  },
  {
    "name": "unit",
    "type_id": 2,
    "type_name": "tpString",
    "length": 10,
    "required": true,
    "writeable": true,
    "forcewrite": false,
    "link": ""
  }
,

]