VismaBouwsoftAPICalls.v1_POST_OrderDiscounts Method
v1_POST_OrderDiscounts() as String

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

General Description

HTTP method API version
POST v1

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

API Path: /OrderDiscounts
or

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

with the following parameters :

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

Query Parameters :
ParameterName: columns, ParameterValue: order_id=25

Success gives statuscode 201 And the following result

{“RecordChanges”: [
  {
    "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"
  }
]
}