Skip to main content
POST
/
admin
/
commission
/
default
Upsert default CommissionRule
curl --request POST \
  --url https://api.example.com/admin/commission/default \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "reference": "site",
  "reference_id": "<string>",
  "is_active": true,
  "rate": {
    "type": "flat",
    "percentage_rate": 123,
    "include_tax": true,
    "price_set": [
      {
        "currency_code": "<string>",
        "amount": 123
      }
    ],
    "min_price_set": [
      {
        "currency_code": "<string>",
        "amount": 123
      }
    ],
    "max_price_set": [
      {
        "currency_code": "<string>",
        "amount": 123
      }
    ]
  }
}
'
{
  "commission_rule": {
    "id": "<string>",
    "name": "<string>",
    "reference": "<string>",
    "reference_id": "<string>",
    "is_active": true,
    "rate": {
      "id": "<string>",
      "type": "flat",
      "percentage_rate": 123,
      "include_tax": true,
      "price_set_id": "<string>",
      "min_price_set_id": "<string>",
      "max_price_set_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string

Commission rule name.

reference
enum<string>

Rule reference type

Available options:
site
reference_id
string

Rule reference id

is_active
boolean

Indicates if rule is active.

rate
object

Response

200 - application/json

Created

commission_rule
CommissionRule · object

Commission rule object