# Branches

## GET /v1/core/branches

> List all branches.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetBranchesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetBranches_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetBranches_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BranchMap"}}},"required":["items"]},"BranchMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"legalEntityUid":{"type":"string"},"defaultSubinventoryUid":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressM_d6a023c9"},"scheduleUid":{"type":"string"},"siteProductListUids":{"type":"array","items":{"type":"string"}},"posProductListUids":{"type":"array","items":{"type":"string"}},"tableProductListUids":{"type":"array","items":{"type":"string"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"AddressM_d6a023c9":{"type":"object","properties":{}}}},"paths":{"/v1/core/branches":{"get":{"operationId":"Branches_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBranchesApiResponse"}}}}},"summary":"List all branches.","tags":["Branches"]}}}}
```

## GET /v1/core/branches/{uid}

> Get a branch by id.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetBranchApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetBranch_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetBranch_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetBranch_Data_Item"},"schedule":{"$ref":"#/components/schemas/ScheduleM_7937212b"}},"required":["item"]},"GetBranch_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"legalEntityUid":{"type":"string"},"defaultSubinventoryUid":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressM_d6a023c9"},"scheduleUid":{"type":"string"},"siteProductListUids":{"type":"array","items":{"type":"string"}},"posProductListUids":{"type":"array","items":{"type":"string"}},"tableProductListUids":{"type":"array","items":{"type":"string"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"AddressM_d6a023c9":{"type":"object","properties":{}},"ScheduleM_7937212b":{"type":"object","properties":{}},"GetBranchApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetBranch_Error"}},"required":["error"]},"GetBranch_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetBranch_ErrorCodes_enum"}]}},"required":["code"]},"GetBranch_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/branches/{uid}":{"get":{"operationId":"Branches_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBranchApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBranchApiError"}}}}},"summary":"Get a branch by id.","tags":["Branches"]}}}}
```

## GET /v1/core/branches/export

> Exports all branches with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportBranchesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportBranches_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportBranches_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BranchMap"}},"next":{"type":"string"}},"required":["items"]},"BranchMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"legalEntityUid":{"type":"string"},"defaultSubinventoryUid":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressM_d6a023c9"},"scheduleUid":{"type":"string"},"siteProductListUids":{"type":"array","items":{"type":"string"}},"posProductListUids":{"type":"array","items":{"type":"string"}},"tableProductListUids":{"type":"array","items":{"type":"string"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"AddressM_d6a023c9":{"type":"object","properties":{}}}},"paths":{"/v1/core/branches/export":{"get":{"operationId":"Branches_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportBranchesApiResponse"}}}}},"summary":"Exports all branches with support for incremental fetching.","tags":["Branches"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.gormic.com/api-reference/core/branches.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
