Zum Inhalt

Reference

Discount thresholds

GET/api/v1/discount-thresholdsGet discount thresholds

The discount thresholds in percent: a quote whose effective one-time or monthly discount is above its threshold needs approval (discounts.approve) before it can be sent. catalog.manage only.scope catalog

Response 200

one_time_pctnumber
monthly_pctnumber
urlstring
Schema
{
  "type": "object",
  "properties": {
    "one_time_pct": {
      "type": "number"
    },
    "monthly_pct": {
      "type": "number"
    },
    "url": {
      "type": "string"
    }
  },
  "required": [
    "one_time_pct",
    "monthly_pct",
    "url"
  ],
  "additionalProperties": false
}

Refusals are problems with a code — see Errors.

PATCH/api/v1/discount-thresholdsSet discount thresholds

Sets the discount thresholds in percent (0 to 100, e.g. 10 or 12.5); a threshold left out keeps its value. A quote whose effective discount is above a threshold needs approval, and that is decided when the quote is saved: a new threshold changes which quotes saved from now on need approval -- raising one lets bigger discounts through without it -- while a quote already saved keeps its answer until it is saved again. catalog.manage only.scope catalog

Body (JSON)

one_time_pctnumberThreshold for the one-time discount, in percent.
monthly_pctnumberThreshold for the monthly discount, in percent.

Response 200

beforeobject
before.one_time_pctnumber
before.monthly_pctnumber
before.urlstring
thresholdsobject
thresholds.one_time_pctnumber
thresholds.monthly_pctnumber
thresholds.urlstring
Schema
{
  "type": "object",
  "properties": {
    "before": {
      "type": "object",
      "properties": {
        "one_time_pct": {
          "type": "number"
        },
        "monthly_pct": {
          "type": "number"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "one_time_pct",
        "monthly_pct",
        "url"
      ],
      "additionalProperties": false
    },
    "thresholds": {
      "type": "object",
      "properties": {
        "one_time_pct": {
          "type": "number"
        },
        "monthly_pct": {
          "type": "number"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "one_time_pct",
        "monthly_pct",
        "url"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "before",
    "thresholds"
  ],
  "additionalProperties": false
}

Refusals are problems with a code — see Errors.