Create Branch

POST {{baseUrl}}/branches

This endpoint allows you to create a new branch and return the created branch id and its details.

Request Body

{"name"=>"<string>", "city_id"=>"<number>", "country_id"=>"<number>", "location"=>"<string>", "type"=>"<string>", "address_description"=>"<string>", "additional_number"=>"<string>", "building_number"=>"<string>", "street"=>"<string>", "local"=>"<string>", "postal_code"=>"<string>", "contacts"=>{"phone"=>"<string>", "whatsapp"=>"<string>", "telephone"=>"<string>"}, "status"=>"active", "cod_cost"=>"<string>", "is_cod_available"=>"<boolean>", "is_default"=>"<boolean>", "preparation_time"=>"<string>", "working_hours"=>{"sunday"=>{"enabled"=>"on", "from"=>["<string>", "<string>"], "to"=>["<string>", "<string>"]}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;status&quot;:&quot;\u003cnumber\u003e&quot;,&quot;success&quot;:&quot;\u003cboolean\u003e&quot;,&quot;data&quot;:{&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;inactive&quot;,&quot;location&quot;:{&quot;lat&quot;:&quot;\u003cstring\u003e&quot;,&quot;lng&quot;:&quot;\u003cstring\u003e&quot;},&quot;street&quot;:&quot;\u003cstring\u003e&quot;,&quot;address_description&quot;:&quot;\u003cstring\u003e&quot;,&quot;additional_number&quot;:&quot;\u003cstring\u003e&quot;,&quot;building_number&quot;:&quot;\u003cstring\u003e&quot;,&quot;local&quot;:&quot;\u003cstring\u003e&quot;,&quot;postal_code&quot;:&quot;\u003cstring\u003e&quot;,&quot;contacts&quot;:{&quot;phone&quot;:&quot;\u003cstring\u003e&quot;,&quot;whatsapp&quot;:&quot;\u003cstring\u003e&quot;,&quot;telephone&quot;:&quot;\u003cstring\u003e&quot;},&quot;preparation_time&quot;:&quot;\u003cstring\u003e&quot;,&quot;is_open&quot;:&quot;\u003cboolean\u003e&quot;,&quot;closest_time&quot;:{&quot;description&quot;:&quot;The time when the branch will be closed based on the request time. Each request may have a different value. &quot;,&quot;nullable&quot;:true},&quot;working_hours&quot;:[{&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;times&quot;:[{&quot;from&quot;:&quot;\u003cstring\u003e&quot;,&quot;to&quot;:&quot;\u003cstring\u003e&quot;},{&quot;from&quot;:&quot;\u003cstring\u003e&quot;,&quot;to&quot;:&quot;\u003cstring\u003e&quot;}]},{&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;times&quot;:[{&quot;from&quot;:&quot;\u003cstring\u003e&quot;,&quot;to&quot;:&quot;\u003cstring\u003e&quot;},{&quot;from&quot;:&quot;\u003cstring\u003e&quot;,&quot;to&quot;:&quot;\u003cstring\u003e&quot;}]}],&quot;is_cod_available&quot;:&quot;\u003cboolean\u003e&quot;,&quot;is_default&quot;:&quot;\u003cboolean\u003e&quot;,&quot;type&quot;:&quot;warehouse&quot;,&quot;cod_cost&quot;:&quot;\u003cstring\u003e&quot;,&quot;country&quot;:{&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;name_en&quot;:&quot;\u003cstring\u003e&quot;,&quot;code&quot;:&quot;\u003cstring\u003e&quot;,&quot;mobile_code&quot;:&quot;\u003cstring\u003e&quot;},&quot;city&quot;:{&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;name_en&quot;:&quot;\u003cstring\u003e&quot;}}}