Update
DevelopingPOST
/customers/{customerId}Validation
Field | Type | Rule | Description |
---|---|---|---|
name |
string |
nullable |
|
email |
string |
nullable email unique |
|
phone_prefix |
numeric |
nullable |
|
phone |
numeric |
nullable min:8 unique |
|
market_id |
string |
nullable |
Id from Market model |
The rules on the fields will change depending on conditions, including the following
Field | Rule | Condition |
---|---|---|
market_id |
required |
User authentication role SUBSCRIBER |
Request
Path Params
customerId
string
required
Example:
c4a868ea-735e-461f-868c-a5d2eaa212d0
Body Params application/json
market_id
string
optional
name
string
optional
email
string
optional
phone_prefix
string
optional
phone
string
optional
Example
{
"name": "Ann Pacocha Updated",
"market_id": "be7407f3-8d36-4a01-a20f-f306f044f496",
"email": "[email protected]"
}
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
meta
object
required
code
integer
required
status
string
required
message
string
required
data
object
required
id
string
required
created_by
null
required
qoyod_id
string
required
user
object
required
markets
array [object {4}]
required
Example
{
"meta": {
"code": 200,
"status": "success",
"message": "Update Success"
},
"data": {
"id": "c4a868ea-735e-461f-868c-a5d2eaa212d0",
"created_by": null,
"qoyod_id": null,
"type": null,
"gender": null,
"tax_number": null,
"zip_code": null,
"city": null,
"district": null,
"street": null,
"crn": null,
"user": {
"id": "fe4aa1ef-b35c-4e69-be60-fc34ab7447e5",
"userable_id": "c4a868ea-735e-461f-868c-a5d2eaa212d0",
"role": "CUSTOMER",
"name": "User 1 Updated",
"username": null,
"email": "[email protected]",
"phone_prefix": "966",
"phone": "55223322",
"lang": "en",
"fcm_token": null,
"is_active": true,
"email_verified_at": null,
"phone_verified_at": null,
"created_at": 1705548163869,
"updated_at": 1705548163869,
"deleted_at": null
},
"markets": [
{
"id": 152,
"customer_id": "c4a868ea-735e-461f-868c-a5d2eaa212d0",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"market": {
"id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"sector_id": 1,
"name_en": "First Restaurant",
"name_ar": "First Restaurant",
"description_en": "Ut maxime commodi natus id tenetur ullam. Repudiandae aut quia est perspiciatis facilis dolores repellendus ea eum. Iusto occaecati libero ea voluptas dolore qui qui maxime quod. Eum ut vel possimus sunt doloribus saepe repellendus et.",
"description_ar": "العظمى إستيلاء الأوروبية، حين عل. هو وبعد قتيل، العالمي ولم, يونيو مساعدة التاريخ، وصل تم. بـ سكان الجو اليابان تحت, يتم لأداء تكتيكاً قُدُماً ان. نفس موالية الجنوبي ما, أضف تم غضون أسابيع وقوعها،. وبدون ميناء الأمريكية فقد عل, قتيل، معارضة ضرب عن, دول وبعض لفرنسا تزامناً ثم. أي أدوات استبدال جعل. يكن لغات مشروط من.",
"logo_img": null,
"cover_img": "https://flavours-files.s3.me-south-1.amazonaws.com/img/uploads/markets/covers/1688386859.png",
"email": "[email protected]",
"phone_prefix": "966",
"phone": "551564439",
"crn": null,
"tax_number": "12345611",
"created_by": null,
"email_verified_at": null,
"phone_verified_at": null,
"created_at": 1680271006362,
"updated_at": 1683019078189,
"deleted_at": null,
"is_active": true
}
}
]
}
}
Last modified: a month ago