Flavours API
Market

Update Market

POST
/api/v2/markets/{marketId}

Update an existing market.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Path Parameters

marketId*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

includes*array<>
sector_id?|

Sector ID. The id of an existing record in the sectors table.

name_en?|

English market name.

name_ar?|

Arabic market name.

description_en?|

English description.

description_ar?|

Arabic description.

logo_img?|

Logo image URL. Must be a valid URL.

cover_img?|

Cover image URL. Must be a valid URL.

email?|

Market email address. Must be a valid email address.

phone_prefix?|

Phone prefix (country code). This field is required when phone is present. The phone_prefix of an existing record in the countries table.

phone?|

Phone number. This field is required when phone_prefix is present. Must be at least 8.

crn?|

Commercial Registration Number.

tax_number?|

Tax number.

is_active?|

Whether the market is active.

email_verification_code?|

Must be 6 digits.

phone_verification_code?|

Must be 6 digits.

country_id?|

Country ID. The id of an existing record in the countries table.

order_num_start?|

Starting order number. Must be at least 0.

receipt_message_en?|
receipt_message_ar?|
receipt_second_msg?|
receipt_print_top?|
receipt_print_bottom?|
is_tax_details?|
is_offline_calculate?|

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:8000/api/v2/markets/sed" \  -H "X-API-Version: 2.3.0" \  -H "Content-Type: application/json" \  -d '{    "includes": [      "animi"    ]  }'
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Business updated successfully."
  },
  "data": {
    "id": "07928d80-350c-46eb-8786-91a40ca509a0",
    "sector_id": 13,
    "name_en": "Weber and Sons",
    "name_ar": "Jenkins Ltd",
    "description_en": "Aut non reprehenderit voluptate.",
    "description_ar": null,
    "logo_img": "https://via.placeholder.com/200x200.png/00ffff?text=business+logo+et",
    "cover_img": "https://via.placeholder.com/200x200.png/00ee66?text=business+cover+animi",
    "email": "[email protected]",
    "phone_prefix": "212",
    "phone_number": "4769320137",
    "crn": "124-313-2863",
    "tax_number": "72043015227",
    "created_by": null,
    "email_verified_at": 1782824824410,
    "phone_verified_at": 1782824824410,
    "created_at": 1782824824152,
    "updated_at": 1782824838263,
    "deleted_at": null,
    "is_active": true,
    "merchant_id": null,
    "reseller_id": null,
    "slug": "donnelly-swaniawski",
    "code": "ENT-0000000001",
    "links": {
      "website": null,
      "instagram": null,
      "youtube": null,
      "x": null,
      "call_center": null
    },
    "branches_count": 5,
    "active_branches_count": 4,
    "inactive_branches_count": 1,
    "level": null,
    "phone": "4769320137",
    "merchant": null,
    "reseller": null,
    "location": null,
    "plans": [],
    "setting": null,
    "sector": {
      "id": 13,
      "icon": "🚗",
      "name_en": "velit",
      "name_ar": "velit",
      "type": "GROCERY",
      "deleted_at": null,
      "pages": [],
      "features": []
    }
  }
}
{
  "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 email must be a valid email address."
  },
  "data": [
    {
      "code": 0,
      "message": "The email must be a valid email address.",
      "field": "email"
    }
  ]
}
{
  "meta": {
    "code": 500,
    "status": "error",
    "message": "Internal server error."
  },
  "data": null
}