Manage the Rules of a Shipping Option
POST
/admin/shipping-options/{id}/rules/batch
Shipping Options
Request Request Example
JavaScript
Shell
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/admin/shipping-options//rules/batch' \
--header 'Content-Type: application/json' \
--data-raw '{
"create": [
{
"attribute": "customer_group",
"operator": "gt",
"value": "cusgroup_123"
}
],
"update": [
{
"id": "string",
"attribute": "customer_group",
"operator": "in",
"value": "cusgroup_123"
}
],
"delete": [
"string"
]
}'
Response Response Example
200 - Example 1
{
"created": [
{
"id": "string",
"attribute": "is_return",
"value": "string",
"shipping_option_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"operator": "gt"
}
],
"updated": [
{
"id": "string",
"attribute": "is_return",
"value": "string",
"shipping_option_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"operator": "gt"
}
],
"deleted": {
"object": "shipping_option_rule",
"deleted": true,
"ids": [
"string"
]
}
}
Request
Path Params
id
stringÂ
required
Query Params
fields
stringÂ
fields
+
it will be added to the default fields, using -
will remove it from the default fields. without prefix it will replace the entire default fields.Body Params application/json