Flavours API
OrderTypeConfig

Update Order Type Config

PUT
/api/v2/orders/types/configs/{configId}

Update an adopted order type for the caller market. When the effective target is PRODUCT, a products[] batch syncs per-product charge overrides (sync/replace, keyed by modifier_id).

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Path Parameters

configId*string

Header Parameters

X-API-Version*string

API contract version to target. See the Changelog for what changed in each version.

Default"2.0.0"
Value in"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"

Request Body

application/json

is_active?|

Whether the order type is enabled at the cashier.

name_en?|

Order type name override (English). Must not be greater than 255 characters.

name_ar?|

Order type name override (Arabic). Must not be greater than 255 characters.

image_url?|

Order type image override: an uploaded image URL (custom image). Use icon_id to pick a catalog icon instead. Must be a valid URL.

icon_id?|

Icon override — a reference into the shared icon catalog (GET /v2/icons). Must match an existing stored value.

settings?array<>
is_split?|

Whether split payment is allowed for this order type.

value?|

Charge amount for this order type.

value_type?|

Charge amount type, required when value is present. This field is required when value is present.

Value in"PERCENT" | "NOMINAL"
target?|

Charge level, required when value is present. This field is required when value is present.

Value in"ORDER" | "PRODUCT"
method?|

Charge tax-interaction method (AFTER_TAX/EXCLUSIVE/INCLUSIVE). Only for target=ORDER; required then. Hidden for target=PRODUCT. This field is required when target is ORDER.

Value in"AFTER_TAX" | "EXCLUSIVE" | "INCLUSIVE"
mode?|

Per-product charge mode (ENTIRELY/SPECIFIC). Only for target=PRODUCT; required then. Hidden for target=ORDER. This field is required when target is PRODUCT.

Value in"ENTIRELY" | "SPECIFIC"
methods?array<|>

Allowed payment methods for this order type. Send an item id to update an existing method, or omit id (with payment_method_key) to add one. At most one item may have is_preset true. Empty/absent clears the set (all methods allowed).

products?array<|>

Per-product charge overrides, keyed by modifier_id (sync/replace). Only allowed when the effective target is PRODUCT; absent leaves overrides untouched, an empty array clears them all.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://api.flavours.sa/dev/api/v2/orders/types/configs/sed" \  -H "X-API-Version: 2.3.0" \  -H "Content-Type: application/json" \  -d '{}'
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Order type config updated successfully."
  },
  "data": {
    "id": "366e978f-1fd6-47fc-99a0-39e8e04cade0",
    "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
    "type_key": "UPDATE_ME",
    "target": null,
    "name_en": "Updated Name",
    "name_ar": null,
    "image_url": null,
    "value": null,
    "value_type": null,
    "sort": 4,
    "settings": [
      "WITH_TABLE",
      "WITH_DRIVER"
    ],
    "is_split": true,
    "is_active": false,
    "created_at": 1787446696317,
    "updated_at": 1787446696322,
    "icon_id": null,
    "type": {
      "key": "UPDATE_ME",
      "name_en": "Updated Name",
      "name_ar": "حدثني",
      "image_url": null,
      "created_at": 1787446696317,
      "updated_at": 1787446696321,
      "icon_id": null
    },
    "methods": [],
    "products": []
  }
}
{
  "meta": {
    "code": 401,
    "status": "error",
    "message": "Unauthenticated."
  },
  "data": null
}
{
  "meta": {
    "code": 403,
    "status": "error",
    "message": "Unauthorized."
  },
  "data": null
}
{
  "meta": {
    "code": 404,
    "status": "error",
    "message": "Resource not found."
  },
  "data": null
}
{
  "meta": {
    "code": 422,
    "status": "error",
    "message": "The value type field is required when value is present. (and 1 more error)"
  },
  "data": [
    {
      "code": 0,
      "message": "The value type field is required when value is present.",
      "field": "value_type"
    },
    {
      "code": 0,
      "message": "The target field is required when value is present.",
      "field": "target"
    }
  ]
}
{
  "meta": {
    "code": 500,
    "status": "error",
    "message": "Internal server error."
  },
  "data": null
}