PUT
/
api
/
branches
/
{id}
/
mark-as-primary
{
  "id": 1,
  "name": "Main Branch",
  "code": "BR001",
  "address": "123 Main Street",
  "city": "New York",
  "country": "USA",
  "phoneNumber": "+1-555-123-4567",
  "email": "[email protected]",
  "website": "https://www.example.com/branch",
  "primary": true,
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-20T10:00:00Z"
}

Headers

Authorization
string
required

Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Path Parameters

id
string
required

Response

The branch has been successfully marked as primary.

id
number
required

Branch ID

Example:

1

name
string
required

Branch name

Example:

"Main Branch"

code
string
required

Branch code

Example:

"BR001"

address
string
required

Branch address

Example:

"123 Main Street"

city
string
required

Branch city

Example:

"New York"

country
string
required

Branch country

Example:

"USA"

phoneNumber
string
required

Branch phone number

Example:

"+1-555-123-4567"

email
string
required

Branch email

website
string
required

Branch website

Example:

"https://www.example.com/branch"

primary
boolean
required

Whether this is the primary branch

Example:

true

createdAt
string<date-time>
required

Creation timestamp

Example:

"2024-03-20T10:00:00Z"

updatedAt
string<date-time>
required

Last update timestamp

Example:

"2024-03-20T10:00:00Z"