VismaBouwsoftAPICalls.v1_PUT_ProductStock | Method |
This API call is used to update fields of a(n) ProductStock
General Description
HTTP method | API version |
---|---|
PUT | v1 |
Don’t forget to put the Authorization field in the header
API Path: /ProductStock/{id}
You make this API call with the key field id as the path parameter (the id of the ProductStock you want to update)
Fields
The following fields are available:
Field Name | Type |
---|---|
id | Number |
lotprice_total | Number |
quantity | Number |
quantity_available | Number |
/ProductStock/{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/ProductStock/134
with the following parameters :
Header Parameters :
ParameterName: Clientnr, ParameterValue: 115
ParameterName: AccessToken, ParameterValue: GDGfWxflfPzSftbIlfzRqAjVflmjfGDffAjkzIIjbDfGfGlDjb
Query Parameters :
ParameterName: columns, ParameterValue: quantity=160
Success gives statuscode 200 And the following result
{“RecordChanges”:
[
{
"id": 134,
"lotprice_total": 158.800000000000011,
"quantity": 160,
"quantity_available": 60
}
]
}
https://ra.bouwsoft.be/api/v1/ProductStock/134
with the following parameters :
Header Parameters :
ParameterName: Clientnr, ParameterValue: 115
ParameterName: AccessToken, ParameterValue: GDGfWxflfPzSftbIlfzRqAjVflmjfGDffAjkzIIjbDfGfGlDjb
Query Parameters :
ParameterName: columns, ParameterValue: quantity=60
Success gives statuscode 400 And the following result
{“RecordChanges”:
[
{
"Code": 400,
"Description": "Could not update record",
"Details": [
{
"reason": "ValueLessThan",
"message": "The value for quantity cannot be smaller than the value for quantity_reserved",
"description": "Value must be greater than or equal to minimum.",
"locationType": "field",
"location": "quantity"
}
],
"RequestId": "115–72547faa-f26e–4d65–8019–14ab2fcbc69f–250212–143447",
"Message": "Bad Request"
}
]
}
https://ra.bouwsoft.be/api/v1/ProductStock/134
with the following parameters :
Header Parameters :
ParameterName: Clientnr, ParameterValue: 115
ParameterName: AccessToken, ParameterValue: GDGfWxflfPzSftbIlfzRqAjVflmjfGDffAjkzIIjbDfGfGlDjb
Query Parameters :
ParameterName: columns, ParameterValue: quantity=152
Success gives statuscode 200 And the following result
{“RecordChanges”:
[
{
"id": 134,
"lotprice_total": 150.860000000000014,
"quantity": 152,
"quantity_available": 52
}
]
}