VismaBouwsoftAPICalls.v1_GET_OrderDiscounts Method
v1_GET_OrderDiscounts() as String

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

HTTP method API version
GET v1

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

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

You can make this API call:
* without the key field id to get a list of OrderDiscounts
* with the key field id as the path parameter (the specific id of the OrderDiscount 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
order_id 1 tpLong 0 Yes No No
nr 2 tpString 100 No Yes No
description 2 tpString 250 No Yes No
amount 8 tpCurrency 0 No No No
percent 13 tpPercent 0 No Yes No
applyto_order 5 tpBool 0 No Yes No
applyto_chapter 1 tpLong 0 No Yes No
applyto_part 1 tpLong 0 No Yes No
applyto_group 2 tpString 100 No Yes No
application_localized 2 tpString 0 No No No

/OrderDiscounts/

API Path: /OrderDiscounts/

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

with the following parameters :

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

Query Parameters :
ParameterName: limit, ParameterValue: 5
ParameterName: sort, ParameterValue: id

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–4/88”, “Records”: [
  {
    "id": 77,
    "order_id": 270,
    "nr": "",
    "description": "Korting",
    "amount": 175.0,
    "percent": 2,
    "applyto_order": true,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": "All lines"
  },
  {
    "id": 79,
    "order_id": 270,
    "nr": "",
    "description": "voor wouter",
    "amount": 0.0,
    "percent": 1,
    "applyto_order": false,
    "applyto_chapter": 2,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": "Chapter 2"
  }
,

]
}

/OrderDiscounts/{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/OrderDiscounts/1462

with the following parameters :

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

Query Parameters :
ParameterName: columns, ParameterValue:

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–0/1”, “Records”: [
  {
    "id": 1462,
    "order_id": 25,
    "nr": "",
    "description": "",
    "amount": 0.0,
    "percent": 0,
    "applyto_order": true,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": "All lines"
  }
]
}

https://ra.bouwsoft.be/api/v1/OrderDiscounts/1462

with the following parameters :

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

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–0/1”, “Records”: [
  {
    "id": 1462,
    "order_id": 25,
    "nr": "",
    "description": "",
    "amount": 45.600000000000001,
    "percent": 1,
    "applyto_order": true,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": "All lines"
  }
]
}

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

with the following parameters :

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

Success gives statuscode 200 And the following result

[
  {
    "name": "order_id",
    "type_id": 1,
    "type_name": "tpLong",
    "length": 0,
    "required": true,
    "writeable": false,
    "forcewrite": false,
    "link": ""
  },
  {
    "name": "nr",
    "type_id": 2,
    "type_name": "tpString",
    "length": 100,
    "required": false,
    "writeable": true,
    "forcewrite": false,
    "link": ""
  }
,

]