Updates the specified supplier information.
Only suppliers that were created with the REST API can be updated with this request.
Path
/api/%API_VERSION%/suppliers
/{supplier
}
Method
PUT
Request headers
This request has the following headers.
Request headers
Name |
Value |
Description |
---|---|---|
|
|
|
|
|
Response content type. |
|
|
Request content type. You can also specify the |
|
|
Request body size, in bytes. The maximum body size for this request is 128 MB ( |
Request parameters
This request has the following parameters:
Request parameters
Name |
Parameter type |
Description |
---|---|---|
|
Path |
Name of the supplier. |
Request body
This request body contains a JSON array with a supplier object. Only one supplier object must be specified.
[
{
"name":"%SUPPLIER_NAME%",
"status":"%SUPPLIER_STATUS%,
"confidence": %SUPPLIER_CONFIDENCE%,
"retention": %SUPPLIER_RETENTION%,
"vendor": "%SUPPLIER_VENDOR%"
}
]
Supplier object properties are described in the following table.
Supplier object properties
Property |
Value |
Mandatory |
Description |
---|---|---|---|
|
|
No |
Name of the supplier. |
|
|
No |
Status of the supplier. This value must be This value must be |
|
|
No |
Confidence level for indicators from this supplier. |
|
|
No |
Retention period for indicators, in minutes. This parameter determines the period after which indicators from this supplier are not used in matching. |
|
|
No |
Supplier vendor name. |
Request example
The following is an example of a PUT suppliers/{supplier} request.
PUT https://192.0.2.57/api/1.1/
Accept: application/json Content-Type: application/json Authorization: Basic Content-Length: 41
[ {"name":"NewName", "confidence": 90} ] |
Response headers
The response has the following headers.
Response headers
Name |
Value |
Description |
---|---|---|
Content-Type |
|
Response content type. |
Content-Length |
|
Response body size, in bytes. |
Response body
The response body contains a JSON object with a status of the operation.
[
{
"status": "Supplier info successfully updated"
}
]
Status object properties are described in the following table.
Status object properties
Property |
Value |
Description |
---|---|---|
|
|
Status of the operation. |
Response example
The following is an example of a PUT suppliers/{supplier} request response.
НТТР/1.1 201 ОК Date:Mon, 23 Dec 2019 09:56:10 UTC Content-Type: application/json Content-Length: 46
[{"status": "Supplier info successfully updated"}] |
Error responses
For more information about possible response statuses, see section "Response statuses".
An error response contains a JSON array with the error description.
[
{
"status": "An error occurred while updating Supplier info",
"reason": "%REASON%"
}
]
Error object properties are described in the following table.
Error object properties
Property |
Value |
Description |
---|---|---|
|
|
Error description. |
|
|
Cause of the error. |
Error response example
The following is an example of a PUT suppliers/{supplier} error response.
НТТР/1.1 404 Supplier doesn't exist Date:Mon, 23 Dec 2019 09:56:10 UTC Content-Type: application/json Content-Length: 93
[{"status": "An error occurred while updating supplier info", "reason": "Supplier doesn't exist"}] |