📄 MIPYME Documents
Create a new company branch
POST
Endpoint URL
https://api-billing.koywe.com/V1/company_branches
Requires authentication
Authentication
Send header Authorization: Bearer <token> (obtained from POST /auth) for protected endpoints.
Parameters
No parameters.
Request body — fields
| Field | Type | Required | Description |
|---|---|---|---|
account_id | integer | Always required | ID of the associated account |
is_headquarters | integer | Optional | Indicates whether the location is the company's headquarters. If the value is 1, it means this branch is the main office. |
branch_type | integer | Optional | Defines the type of branch. If the value is 1, it is a physical (real) branch. If the value is 2, it is a virtual branch. |
name | string | Always required | Name of the company branch. |
address | string | Optional | Address of the company branch. |
district | string | Optional | District of the company branch. |
city | string | Optional | City of the company branch. |
phone | string | Optional | Phone of the company branch. |
company_branch_tax_code | string | Optional | Tax code assigned to the company branch for fiscal and accounting purposes. |
company_branch_internal_code | string | Optional | Internal code assigned to the company branch for identification within the system. |
parent_company_branch_id | integer | Optional | ID of the parent company branch. |
Request body — JSON example
{
"account_id": 0,
"is_headquarters": 0,
"branch_type": 0,
"name": "string",
"address": "string",
"district": "string",
"city": "string",
"phone": "string",
"company_branch_tax_code": "string",
"company_branch_internal_code": "string",
"parent_company_branch_id": 0
}
Responses
Company branch successfully generated
Bad request - invalid input or validation error
Unauthorized - invalid token or missing authentication
Server error - unexpected error occurred