LaundryAPI
  1. Branches
LaundryAPI
  • Authentication
    • Signup
      POST
    • Resend Verification Code
      POST
    • Verify phone number
      POST
    • Login
      POST
    • Refresh Token
      GET
    • Forgot Password
      POST
    • Reset Password
      PATCH
    • Update Password
      PATCH
    • Logout
      POST
  • Users
    • Get Me
      GET
    • Update Me
      PATCH
    • Delete Me
      DELETE
    • Get All Users
      GET
    • Update User
      PATCH
    • Delete User
      DELETE
    • Create Delivery
      POST
    • Create Admin
      POST
  • Items
    • Get all items
      GET
    • Get Single item
      GET
    • Create item
      POST
    • Update item
      PATCH
    • Delete item
      DELETE
  • Orders
    • Get all orders
    • Single Order
    • Create Order
    • Delete order
    • Update Order
  • Branches
    • All Branches
      GET
    • Single Branch
      GET
    • branch's orders
      GET
    • Nearest Branches
      GET
    • Create Branch
      POST
    • update branch
      PATCH
    • Delete branch
      DELETE
  • Notifications
    • All Notifications
    • Create notification
    • Delete Notification
  • Banners
    • All Banners
    • Create Banner
    • Delete Banners
  • WhatsApp
    • initialize whatsapp Session
  1. Branches

Create Branch

POST
http://82.180.154.188:4352/branches
Last modified:2025-04-13 22:57:29
This endpoint allows admin to create a new branch with its name, location, and weekly working schedule.
If workingDays is not provided, the workingDays array will default to:
[{ "day": "Saturday", "isActive": false, "timeRanges": [] },.....]
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://82.180.154.188:4352/branches' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Downtown Branch for testing loation",
  "location": {
    "area": "Downtown",
    "coordinates": [30.111111, 30.111112]
  },
  "workingDays": [
    {
      "day": "Saturday",
      "isActive": true,
      "timeRanges": [
        { "from": "08:00", "to": "12:00" },
        { "from": "16:00", "to": "20:00" }
      ]
    },
    {
      "day": "Sunday",
      "isActive": false,
      "timeRanges": []
    }
  ]
}'
Response Response Example
{
    "status": "success",
    "message": "Branch created successfully"
}

Request

Header Params
Authorization
string 
required
Example:
Bearer {{JWT}}
Body Params application/json
Name of the branch.
name
string 
required
location
object 
required
area
string 
required
Name of the area or region where the branch is located.
coordinates
array[number]
required
Array of latitude and longitude coordinates (e.g., [37.7749, -122.4194]).
workingDays
array [object {3}] 
optional
List of days with their working status and time ranges. If omitted, defaults to all days inactive.
day
string 
required
Day of the week. Must be one of: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday.
isActive
boolean 
required
Whether the branch operates on this day.
timeRanges
array [object {2}] 
optional
Array of working time ranges for the day. Required only if isActive is true.
Examples

Responses

🟢201Created
application/json
Body
status
string 
required
message
string 
required
Previous
Nearest Branches
Next
update branch
Built with