Update Order Type Config
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).
Authorization
default You can retrieve your token by logging in.
In: header
Path Parameters
Header Parameters
API contract version to target. See the Changelog for what changed in each version.
"2.0.0""2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Request Body
application/json
Whether the order type is enabled at the cashier.
Order type name override (English). Must not be greater than 255 characters.
Order type name override (Arabic). Must not be greater than 255 characters.
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 override — a reference into the shared icon catalog (GET /v2/icons). Must match an existing stored value.
Whether split payment is allowed for this order type.
Charge amount for this order type.
Charge amount type, required when value is present. This field is required when value is present.
"PERCENT" | "NOMINAL"Charge level, required when value is present. This field is required when value is present.
"ORDER" | "PRODUCT"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.
"AFTER_TAX" | "EXCLUSIVE" | "INCLUSIVE"Per-product charge mode (ENTIRELY/SPECIFIC). Only for target=PRODUCT; required then. Hidden for target=ORDER. This field is required when target is PRODUCT.
"ENTIRELY" | "SPECIFIC"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).
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
}