Create Order Risk

🔒

Requires write_order access scope. More access scope

The Create Order Risk API allows the creation of risk assessments for orders, enabling users to flag orders with custom risk levels and details.

This API is especially useful for:

  1. Adding fraud detection and risk assessment details to orders.
  2. Automating risk management based on custom rules.
  3. Enabling enhanced reporting and tracking for high-risk orders.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

ParameterTypeRequiredDescriptionExample
order_idstringYesThe unique ID of the order.633130-00000015

Body Parameters

ParameterTypeRequiredDescriptionExample
riskobjectYesThe order risk object containing risk details.{...}
risk.levelstringYesRisk level for the order. Possible values: low, medium, high.low
risk.valuesarray of stringsNoList of risk details explaining the reason for the risk.["wrong order price"]
propertiesobjectNoCustom properties for the order risk.{ "key": "value" }
properties.keystringNoKey for the custom property.key

Response Description

Public Response Fields

📘

Public Response Parameters

Success Response

FieldTypeDescriptionExample
risk.idstringThe unique ID of the created risk.372997190468224746
risk.order_idstringThe unique ID of the order associated with the risk.633130-00000015
risk.levelstringRisk level for the order. Possible values: low, medium, high.low
risk.valuearray of stringsList of reasons or details for the risk.["wrong order price"]
properties.keystringKey for the custom property.key
created_atstringTimestamp when the risk was created (ISO 8601 format).2024-04-25T06:37:40Z
updated_atstringTimestamp when the risk was last updated (ISO 8601 format).2024-04-25T06:37:40Z

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "file number error"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!