Order Risk
Order risks show the results of fraud checks that have been completed on an order. They appear in the Fraud analysis section of an order's details page in the Shopify admin.
The fraud analysis from your app shows each of the resulting messages from the order risks that your app has completed. It also shows the overall risk level for the order, which is determined by the order risk with the most severe recommendation.
When determining an order's risk level, Shopify takes into account only those order risks that have the display
property set to true
.
What you can do with Order Risk
The Shopify API lets you do the following with the Order Risk resource. More detailed versions of these general actions may be available:
- POST /admin/api/2020-01/orders/{order_id}/risks.json Creates an order risk for an order
- GET /admin/api/2020-01/orders/{order_id}/risks.json Retrieves a list of all order risks for an order
- GET /admin/api/2020-01/orders/{order_id}/risks/{risk_id}.json Retrieves a single order risk by its ID
- PUT /admin/api/2020-01/orders/{order_id}/risks/{risk_id}.json Updates an order risk
- DELETE /admin/api/2020-01/orders/{order_id}/risks/{risk_id}.json Deletes an order risk for an order
Order Risk properties
cause_cancel |
Whether this order risk is severe enough to force the cancellation of the order. If Note: Setting this property to |
checkout_id |
The ID of the checkout that the order risk belongs to. |
display |
Whether the order risk is displayed on the order details page in the Shopify admin. If This property can't be changed after an order risk is created. |
id |
A unique numeric identifier for the order risk. |
merchant_message
deprecated |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if Use |
message |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if |
order_id |
The ID of the order that the order risk belongs to. |
recommendation |
The recommended action given to the merchant. Valid values:
|
score |
For internal use only. A number between 0 and 1 that's assigned to the order. The closer the score is to 1, the more likely it is that the order is fraudulent. |
source |
The source of the order risk. |
Endpoints
Create an order risk showing a fraud risk for proxy detection
POST /admin/api/2020-01/orders/450789469/risks.json
{
"risk": {
"message": "This order came from an anonymous proxy",
"recommendation": "cancel",
"score": 1.0,
"source": "External",
"cause_cancel": true,
"display": true
}
}
View Response
HTTP/1.1 201 Created
{
"risk": {
"id": 700140151,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
Retrieve all order risks for an order
GET /admin/api/2020-01/orders/450789469/risks.json
View Response
HTTP/1.1 200 OK
{
"risks": [
{
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
},
{
"id": 700140153,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
]
}
Retrieve a single order risk
GET /admin/api/2020-01/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
}
}
Updates an order risk
Update an existing order risk for an order
PUT /admin/api/2020-01/orders/450789469/risks/284138680.json
{
"risk": {
"id": 284138680,
"message": "After further review, this is a legitimate order",
"recommendation": "accept",
"source": "External",
"cause_cancel": false,
"score": 0.0
}
}
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "0.0",
"recommendation": "accept",
"display": true,
"cause_cancel": false,
"message": "After further review, this is a legitimate order",
"merchant_message": "After further review, this is a legitimate order"
}
}
Deletes an order risk for an order
Delete an order risk for an order
DELETE /admin/api/2020-01/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
}
Order risks show the results of fraud checks that have been completed on an order. They appear in the Fraud analysis section of an order's details page in the Shopify admin.
The fraud analysis from your app shows each of the resulting messages from the order risks that your app has completed. It also shows the overall risk level for the order, which is determined by the order risk with the most severe recommendation.
When determining an order's risk level, Shopify takes into account only those order risks that have the display
property set to true
.
What you can do with Order Risk
The Shopify API lets you do the following with the Order Risk resource. More detailed versions of these general actions may be available:
- POST /admin/api/2020-04/orders/{order_id}/risks.json Creates an order risk for an order
- GET /admin/api/2020-04/orders/{order_id}/risks.json Retrieves a list of all order risks for an order
- GET /admin/api/2020-04/orders/{order_id}/risks/{risk_id}.json Retrieves a single order risk by its ID
- PUT /admin/api/2020-04/orders/{order_id}/risks/{risk_id}.json Updates an order risk
- DELETE /admin/api/2020-04/orders/{order_id}/risks/{risk_id}.json Deletes an order risk for an order
Order Risk properties
cause_cancel |
Whether this order risk is severe enough to force the cancellation of the order. If Note: Setting this property to |
checkout_id |
The ID of the checkout that the order risk belongs to. |
display |
Whether the order risk is displayed on the order details page in the Shopify admin. If This property can't be changed after an order risk is created. |
id |
A unique numeric identifier for the order risk. |
merchant_message
deprecated |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if Use |
message |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if |
order_id |
The ID of the order that the order risk belongs to. |
recommendation |
The recommended action given to the merchant. Valid values:
|
score |
For internal use only. A number between 0 and 1 that's assigned to the order. The closer the score is to 1, the more likely it is that the order is fraudulent. |
source |
The source of the order risk. |
Endpoints
Create an order risk showing a fraud risk for proxy detection
POST /admin/api/2020-04/orders/450789469/risks.json
{
"risk": {
"message": "This order came from an anonymous proxy",
"recommendation": "cancel",
"score": 1.0,
"source": "External",
"cause_cancel": true,
"display": true
}
}
View Response
HTTP/1.1 201 Created
{
"risk": {
"id": 700140151,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
Retrieve all order risks for an order
GET /admin/api/2020-04/orders/450789469/risks.json
View Response
HTTP/1.1 200 OK
{
"risks": [
{
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
},
{
"id": 700140153,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
]
}
Retrieve a single order risk
GET /admin/api/2020-04/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
}
}
Updates an order risk
Update an existing order risk for an order
PUT /admin/api/2020-04/orders/450789469/risks/284138680.json
{
"risk": {
"id": 284138680,
"message": "After further review, this is a legitimate order",
"recommendation": "accept",
"source": "External",
"cause_cancel": false,
"score": 0.0
}
}
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "0.0",
"recommendation": "accept",
"display": true,
"cause_cancel": false,
"message": "After further review, this is a legitimate order",
"merchant_message": "After further review, this is a legitimate order"
}
}
Deletes an order risk for an order
Delete an order risk for an order
DELETE /admin/api/2020-04/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
}
Order risks show the results of fraud checks that have been completed on an order. They appear in the Fraud analysis section of an order's details page in the Shopify admin.
The fraud analysis from your app shows each of the resulting messages from the order risks that your app has completed. It also shows the overall risk level for the order, which is determined by the order risk with the most severe recommendation.
When determining an order's risk level, Shopify takes into account only those order risks that have the display
property set to true
.
What you can do with Order Risk
The Shopify API lets you do the following with the Order Risk resource. More detailed versions of these general actions may be available:
- POST /admin/api/2020-07/orders/{order_id}/risks.json Creates an order risk for an order
- GET /admin/api/2020-07/orders/{order_id}/risks.json Retrieves a list of all order risks for an order
- GET /admin/api/2020-07/orders/{order_id}/risks/{risk_id}.json Retrieves a single order risk by its ID
- PUT /admin/api/2020-07/orders/{order_id}/risks/{risk_id}.json Updates an order risk
- DELETE /admin/api/2020-07/orders/{order_id}/risks/{risk_id}.json Deletes an order risk for an order
Order Risk properties
cause_cancel |
Whether this order risk is severe enough to force the cancellation of the order. If Note: Setting this property to |
checkout_id |
The ID of the checkout that the order risk belongs to. |
display |
Whether the order risk is displayed on the order details page in the Shopify admin. If This property can't be changed after an order risk is created. |
id |
A unique numeric identifier for the order risk. |
merchant_message
deprecated |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if Use |
message |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if |
order_id |
The ID of the order that the order risk belongs to. |
recommendation |
The recommended action given to the merchant. Valid values:
|
score |
For internal use only. A number between 0 and 1 that's assigned to the order. The closer the score is to 1, the more likely it is that the order is fraudulent. |
source |
The source of the order risk. |
Endpoints
Create an order risk showing a fraud risk for proxy detection
POST /admin/api/2020-07/orders/450789469/risks.json
{
"risk": {
"message": "This order came from an anonymous proxy",
"recommendation": "cancel",
"score": 1.0,
"source": "External",
"cause_cancel": true,
"display": true
}
}
View Response
HTTP/1.1 201 Created
{
"risk": {
"id": 700140151,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
Retrieve all order risks for an order
GET /admin/api/2020-07/orders/450789469/risks.json
View Response
HTTP/1.1 200 OK
{
"risks": [
{
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
},
{
"id": 700140153,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
]
}
Retrieve a single order risk
GET /admin/api/2020-07/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
}
}
Updates an order risk
Update an existing order risk for an order
PUT /admin/api/2020-07/orders/450789469/risks/284138680.json
{
"risk": {
"id": 284138680,
"message": "After further review, this is a legitimate order",
"recommendation": "accept",
"source": "External",
"cause_cancel": false,
"score": 0.0
}
}
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "0.0",
"recommendation": "accept",
"display": true,
"cause_cancel": false,
"message": "After further review, this is a legitimate order",
"merchant_message": "After further review, this is a legitimate order"
}
}
Deletes an order risk for an order
Delete an order risk for an order
DELETE /admin/api/2020-07/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
}
Order risks show the results of fraud checks that have been completed on an order. They appear in the Fraud analysis section of an order's details page in the Shopify admin.
The fraud analysis from your app shows each of the resulting messages from the order risks that your app has completed. It also shows the overall risk level for the order, which is determined by the order risk with the most severe recommendation.
When determining an order's risk level, Shopify takes into account only those order risks that have the display
property set to true
.
What you can do with Order Risk
The Shopify API lets you do the following with the Order Risk resource. More detailed versions of these general actions may be available:
- POST /admin/api/2020-10/orders/{order_id}/risks.json Creates an order risk for an order
- GET /admin/api/2020-10/orders/{order_id}/risks.json Retrieves a list of all order risks for an order
- GET /admin/api/2020-10/orders/{order_id}/risks/{risk_id}.json Retrieves a single order risk by its ID
- PUT /admin/api/2020-10/orders/{order_id}/risks/{risk_id}.json Updates an order risk
- DELETE /admin/api/2020-10/orders/{order_id}/risks/{risk_id}.json Deletes an order risk for an order
Order Risk properties
cause_cancel |
Whether this order risk is severe enough to force the cancellation of the order. If Note: Setting this property to |
checkout_id |
The ID of the checkout that the order risk belongs to. |
display |
Whether the order risk is displayed on the order details page in the Shopify admin. If This property can't be changed after an order risk is created. |
id |
A unique numeric identifier for the order risk. |
merchant_message
deprecated |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if Use |
message |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if |
order_id |
The ID of the order that the order risk belongs to. |
recommendation |
The recommended action given to the merchant. Valid values:
|
score |
For internal use only. A number between 0 and 1 that's assigned to the order. The closer the score is to 1, the more likely it is that the order is fraudulent. |
source |
The source of the order risk. |
Endpoints
Create an order risk showing a fraud risk for proxy detection
POST /admin/api/2020-10/orders/450789469/risks.json
{
"risk": {
"message": "This order came from an anonymous proxy",
"recommendation": "cancel",
"score": 1.0,
"source": "External",
"cause_cancel": true,
"display": true
}
}
View Response
HTTP/1.1 201 Created
{
"risk": {
"id": 700140151,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
Retrieve all order risks for an order
GET /admin/api/2020-10/orders/450789469/risks.json
View Response
HTTP/1.1 200 OK
{
"risks": [
{
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
},
{
"id": 700140153,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
]
}
Retrieve a single order risk
GET /admin/api/2020-10/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
}
}
Updates an order risk
Update an existing order risk for an order
PUT /admin/api/2020-10/orders/450789469/risks/284138680.json
{
"risk": {
"id": 284138680,
"message": "After further review, this is a legitimate order",
"recommendation": "accept",
"source": "External",
"cause_cancel": false,
"score": 0.0
}
}
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "0.0",
"recommendation": "accept",
"display": true,
"cause_cancel": false,
"message": "After further review, this is a legitimate order",
"merchant_message": "After further review, this is a legitimate order"
}
}
Deletes an order risk for an order
Delete an order risk for an order
DELETE /admin/api/2020-10/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
}
Order risks show the results of fraud checks that have been completed on an order. They appear in the Fraud analysis section of an order's details page in the Shopify admin.
The fraud analysis from your app shows each of the resulting messages from the order risks that your app has completed. It also shows the overall risk level for the order, which is determined by the order risk with the most severe recommendation.
When determining an order's risk level, Shopify takes into account only those order risks that have the display
property set to true
.
What you can do with Order Risk
The Shopify API lets you do the following with the Order Risk resource. More detailed versions of these general actions may be available:
- POST /admin/api/2021-01/orders/{order_id}/risks.json Creates an order risk for an order
- GET /admin/api/2021-01/orders/{order_id}/risks.json Retrieves a list of all order risks for an order
- GET /admin/api/2021-01/orders/{order_id}/risks/{risk_id}.json Retrieves a single order risk by its ID
- PUT /admin/api/2021-01/orders/{order_id}/risks/{risk_id}.json Updates an order risk
- DELETE /admin/api/2021-01/orders/{order_id}/risks/{risk_id}.json Deletes an order risk for an order
Order Risk properties
cause_cancel |
Whether this order risk is severe enough to force the cancellation of the order. If Note: Setting this property to |
checkout_id |
The ID of the checkout that the order risk belongs to. |
display |
Whether the order risk is displayed on the order details page in the Shopify admin. If This property can't be changed after an order risk is created. |
id |
A unique numeric identifier for the order risk. |
merchant_message
deprecated |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if Use |
message |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if |
order_id |
The ID of the order that the order risk belongs to. |
recommendation |
The recommended action given to the merchant. Valid values:
|
score |
For internal use only. A number between 0 and 1 that's assigned to the order. The closer the score is to 1, the more likely it is that the order is fraudulent. |
source |
The source of the order risk. |
Endpoints
Create an order risk showing a fraud risk for proxy detection
POST /admin/api/2021-01/orders/450789469/risks.json
{
"risk": {
"message": "This order came from an anonymous proxy",
"recommendation": "cancel",
"score": 1.0,
"source": "External",
"cause_cancel": true,
"display": true
}
}
View Response
HTTP/1.1 201 Created
{
"risk": {
"id": 700140151,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
Retrieve all order risks for an order
GET /admin/api/2021-01/orders/450789469/risks.json
View Response
HTTP/1.1 200 OK
{
"risks": [
{
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
},
{
"id": 700140153,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
]
}
Retrieve a single order risk
GET /admin/api/2021-01/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
}
}
Updates an order risk
Update an existing order risk for an order
PUT /admin/api/2021-01/orders/450789469/risks/284138680.json
{
"risk": {
"id": 284138680,
"message": "After further review, this is a legitimate order",
"recommendation": "accept",
"source": "External",
"cause_cancel": false,
"score": 0.0
}
}
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "0.0",
"recommendation": "accept",
"display": true,
"cause_cancel": false,
"message": "After further review, this is a legitimate order",
"merchant_message": "After further review, this is a legitimate order"
}
}
Deletes an order risk for an order
Delete an order risk for an order
DELETE /admin/api/2021-01/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
}
Order risks show the results of fraud checks that have been completed on an order. They appear in the Fraud analysis section of an order's details page in the Shopify admin.
The fraud analysis from your app shows each of the resulting messages from the order risks that your app has completed. It also shows the overall risk level for the order, which is determined by the order risk with the most severe recommendation.
When determining an order's risk level, Shopify takes into account only those order risks that have the display
property set to true
.
What you can do with Order Risk
The Shopify API lets you do the following with the Order Risk resource. More detailed versions of these general actions may be available:
- POST /admin/api/2021-04/orders/{order_id}/risks.json Creates an order risk for an order
- GET /admin/api/2021-04/orders/{order_id}/risks.json Retrieves a list of all order risks for an order
- GET /admin/api/2021-04/orders/{order_id}/risks/{risk_id}.json Retrieves a single order risk by its ID
- PUT /admin/api/2021-04/orders/{order_id}/risks/{risk_id}.json Updates an order risk
- DELETE /admin/api/2021-04/orders/{order_id}/risks/{risk_id}.json Deletes an order risk for an order
Order Risk properties
cause_cancel |
Whether this order risk is severe enough to force the cancellation of the order. If Note: Setting this property to |
checkout_id |
The ID of the checkout that the order risk belongs to. |
display |
Whether the order risk is displayed on the order details page in the Shopify admin. If This property can't be changed after an order risk is created. |
id |
A unique numeric identifier for the order risk. |
merchant_message
deprecated |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if Use |
message |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if |
order_id |
The ID of the order that the order risk belongs to. |
recommendation |
The recommended action given to the merchant. Valid values:
|
score |
For internal use only. A number between 0 and 1 that's assigned to the order. The closer the score is to 1, the more likely it is that the order is fraudulent. |
source |
The source of the order risk. |
Endpoints
Create an order risk showing a fraud risk for proxy detection
POST /admin/api/2021-04/orders/450789469/risks.json
{
"risk": {
"message": "This order came from an anonymous proxy",
"recommendation": "cancel",
"score": 1.0,
"source": "External",
"cause_cancel": true,
"display": true
}
}
View Response
HTTP/1.1 201 Created
{
"risk": {
"id": 700140151,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
Retrieve all order risks for an order
GET /admin/api/2021-04/orders/450789469/risks.json
View Response
HTTP/1.1 200 OK
{
"risks": [
{
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
},
{
"id": 700140153,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
]
}
Retrieve a single order risk
GET /admin/api/2021-04/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
}
}
Updates an order risk
Update an existing order risk for an order
PUT /admin/api/2021-04/orders/450789469/risks/284138680.json
{
"risk": {
"id": 284138680,
"message": "After further review, this is a legitimate order",
"recommendation": "accept",
"source": "External",
"cause_cancel": false,
"score": 0.0
}
}
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "0.0",
"recommendation": "accept",
"display": true,
"cause_cancel": false,
"message": "After further review, this is a legitimate order",
"merchant_message": "After further review, this is a legitimate order"
}
}
Deletes an order risk for an order
Delete an order risk for an order
DELETE /admin/api/2021-04/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
}
Order risks show the results of fraud checks that have been completed on an order. They appear in the Fraud analysis section of an order's details page in the Shopify admin.
The fraud analysis from your app shows each of the resulting messages from the order risks that your app has completed. It also shows the overall risk level for the order, which is determined by the order risk with the most severe recommendation.
When determining an order's risk level, Shopify takes into account only those order risks that have the display
property set to true
.
What you can do with Order Risk
The Shopify API lets you do the following with the Order Risk resource. More detailed versions of these general actions may be available:
- POST /admin/api/unstable/orders/{order_id}/risks.json Creates an order risk for an order
- GET /admin/api/unstable/orders/{order_id}/risks.json Retrieves a list of all order risks for an order
- GET /admin/api/unstable/orders/{order_id}/risks/{risk_id}.json Retrieves a single order risk by its ID
- PUT /admin/api/unstable/orders/{order_id}/risks/{risk_id}.json Updates an order risk
- DELETE /admin/api/unstable/orders/{order_id}/risks/{risk_id}.json Deletes an order risk for an order
Order Risk properties
cause_cancel |
Whether this order risk is severe enough to force the cancellation of the order. If Note: Setting this property to |
checkout_id |
The ID of the checkout that the order risk belongs to. |
display |
Whether the order risk is displayed on the order details page in the Shopify admin. If This property can't be changed after an order risk is created. |
id |
A unique numeric identifier for the order risk. |
merchant_message
deprecated |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if Use |
message |
The message that's displayed to the merchant to indicate the results of the fraud check. The message is displayed only if |
order_id |
The ID of the order that the order risk belongs to. |
recommendation |
The recommended action given to the merchant. Valid values:
|
score |
For internal use only. A number between 0 and 1 that's assigned to the order. The closer the score is to 1, the more likely it is that the order is fraudulent. |
source |
The source of the order risk. |
Endpoints
Create an order risk showing a fraud risk for proxy detection
POST /admin/api/unstable/orders/450789469/risks.json
{
"risk": {
"message": "This order came from an anonymous proxy",
"recommendation": "cancel",
"score": 1.0,
"source": "External",
"cause_cancel": true,
"display": true
}
}
View Response
HTTP/1.1 201 Created
{
"risk": {
"id": 700140151,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
Retrieve all order risks for an order
GET /admin/api/unstable/orders/450789469/risks.json
View Response
HTTP/1.1 200 OK
{
"risks": [
{
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
},
{
"id": 700140153,
"order_id": 450789469,
"checkout_id": 901414060,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order came from an anonymous proxy",
"merchant_message": "This order came from an anonymous proxy"
}
]
}
Retrieve a single order risk
GET /admin/api/unstable/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "1.0",
"recommendation": "cancel",
"display": true,
"cause_cancel": true,
"message": "This order was placed from a proxy IP",
"merchant_message": "This order was placed from a proxy IP"
}
}
Updates an order risk
Update an existing order risk for an order
PUT /admin/api/unstable/orders/450789469/risks/284138680.json
{
"risk": {
"id": 284138680,
"message": "After further review, this is a legitimate order",
"recommendation": "accept",
"source": "External",
"cause_cancel": false,
"score": 0.0
}
}
View Response
HTTP/1.1 200 OK
{
"risk": {
"id": 284138680,
"order_id": 450789469,
"checkout_id": null,
"source": "External",
"score": "0.0",
"recommendation": "accept",
"display": true,
"cause_cancel": false,
"message": "After further review, this is a legitimate order",
"merchant_message": "After further review, this is a legitimate order"
}
}
Deletes an order risk for an order
Delete an order risk for an order
DELETE /admin/api/unstable/orders/450789469/risks/284138680.json
View Response
HTTP/1.1 200 OK
{
}