Update Branch
PUT {{baseUrl}}/branches/:branch
This endpoint allows you to update branch details by providing the ID of the branch you want to update its details in the branch path parameter.
OAuth Scopes
branches.read branches.read_write
Request Body
{"name"=>"Riyadh", "city_id"=>1473353380, "country_id"=>1473353380, "location"=>"37.78044939,-97.8503951", "cod_cost"=>"15", "is_cod_available"=>"on", "type"=>"branch", "is_default"=>"on", "address_description"=>"some bla bla bla", "street"=>"bla bla bla", "local"=>"bla bla", "postal_code"=>"7111", "contacts"=>{"phone"=>"+201099999999", "whatsapp"=>"+201099999999", "telephone"=>"+201099999999"}, "preparation_time"=>"01:30", "working_hours"=>{"sunday"=>{"enabled"=>"on", "from"=>["08:00", "19:00"], "to"=>["17:00", "23:30"]}}}
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"status":200,"success":true,"data":{"id":1345871747,"name":"Branch","status":"active","location":{"lat":"37.78044939","lng":"-97.8503951"},"contacts":{"phone":"+201099999999","whatsapp":"+201099999999","telephone":"+201099999999"},"preparation_time":"ساعة 30 دقيقة","is_open":false,"closest_time":{"from":"08:00","to":"17:00"},"working_hours":[{"name":"الأحد","times":[{"from":"08:00","to":"17:00"},{"from":"19:00","to":"23:30"}]}],"is_cod_available":true,"is_default":true,"type":[],"cod_cost":"15","country":{"id":1473353380,"name":"السعودية","name_en":"Saudi Arabia","code":"SA","mobile_code":"+966"},"city":{"id":1,"name":"الرياض","name_en":"Riyadh"}}}