VismaBouwsoftAPICalls.v1_GET_OrderMargins Method
v1_GET_OrderMargins() as String

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

HTTP method API version
GET v1

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

API Path: /OrderMargins/
or
API Path: /OrderMargins/{id}

You can make this API call:
* without the key field id to get a list of OrderMargins
* with the key field id as the path parameter (the specific id of the OrderMargin you want to get)

Fields

The following fields are available:

Field Name Type
id Number
order_id Number
margin_nr Number
margin_name String
margin_name_localized String
description String
amount Number
percent Number
applyto_order Boolean
applyto_chapter Number
applyto_part Number
applyto_group String
application_localized String

/OrderMargins/

API Path: /OrderMargins/

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

with the following parameters :

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

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

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–4/430”, “Records”: [
  {
    "id": 17,
    "order_id": 260,
    "margin_nr": 3,
    "margin_name": "EQUIPMENT",
    "margin_name_localized": "Equipment",
    "description": "",
    "amount": 0.0,
    "percent": 0,
    "applyto_order": false,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": ""
  },
  {
    "id": 26,
    "order_id": 261,
    "margin_nr": 1,
    "margin_name": "ARTICLES",
    "margin_name_localized": "Articles",
    "description": "",
    "amount": 1.8,
    "percent": 30,
    "applyto_order": true,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": "All lines"
  }
,

]
}

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

with the following parameters :

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

Query Parameters :
ParameterName: filter, ParameterValue: order_id eq 261

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–2/3”, “Records”: [
  {
    "id": 26,
    "order_id": 261,
    "margin_nr": 1,
    "margin_name": "ARTICLES",
    "margin_name_localized": "Articles",
    "description": "",
    "amount": 1.8,
    "percent": 30,
    "applyto_order": true,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": "All lines"
  },
  {
    "id": 27,
    "order_id": 261,
    "margin_nr": 2,
    "margin_name": "HOURS",
    "margin_name_localized": "Hours",
    "description": "",
    "amount": 0.0,
    "percent": 30,
    "applyto_order": true,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": "All lines"
  }
,

]
}

/OrderMargins/{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/OrderMargins/17

with the following parameters :

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

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–0/1”, “Records”: [
  {
    "id": 17,
    "order_id": 260,
    "margin_nr": 3,
    "margin_name": "EQUIPMENT",
    "margin_name_localized": "Equipment",
    "description": "",
    "amount": 0.0,
    "percent": 0,
    "applyto_order": false,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": ""
  }
]
}

https://ra.bouwsoft.be/api/v1/OrderMargins/1443

with the following parameters :

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

Success gives statuscode 200 And the following result

{ “Content-Range”:“0–0/1”, “Records”: [
  {
    "id": 1443,
    "order_id": 25,
    "margin_nr": 1,
    "margin_name": "ARTICLES",
    "margin_name_localized": "Articles",
    "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/OrderMargins/1443

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": 1443,
    "order_id": 25,
    "margin_nr": 1,
    "margin_name": "ARTICLES",
    "margin_name_localized": "Articles",
    "description": "",
    "amount": 45.600000000000001,
    "percent": 1,
    "applyto_order": true,
    "applyto_chapter": 0,
    "applyto_part": 0,
    "applyto_group": "",
    "application_localized": "All lines"
  }
]
}