WinShopAPI docs
ReferenceCompanies

Create a company branch

Adds a branch to the company and returns it with status 201. Requires `Permissions.Companies.Create`.

POST
/api/companies/{companyId}/branches

Authorization

Bearer
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.

Path Parameters

companyId*integer
Formatint32

Request Body

application/json
  1. body
address1?|
Lengthlength <= 80
address2?|
Lengthlength <= 80
address3?|
Lengthlength <= 80
barcode?|
Lengthlength <= 16
branchCreationDate?|
Formatdate-time
city?|
Lengthlength <= 80
companyId?|
Formatint32
companyIdentificationNumber?|
Lengthlength <= 50
country?|
Lengthlength <= 80
countryId?|
Formatint32
customerId?|
Formatint32
deliveryDays?|
Formatint32
districtId?|
Formatint32
email1?|
Lengthlength <= 80
email2?|
Lengthlength <= 80
email3?|
Lengthlength <= 80
email4?|
Lengthlength <= 80
frameworkOrder?|
Lengthlength <= 80
gps?|
Lengthlength <= 150
homelandAbroadOwn?|
Formatint32
id?|
Formatint32
isB2BEnabled?boolean|null
isInactive?boolean|null
linkB2BWarehouseId?|
Formatint32
linkUserId?|
Formatint32
linkWarehouseId?|
Formatint32
name?|
Lengthlength <= 80
note?string|null
number?|
Lengthlength <= 20
paymentTypeId?|
Formatint32
person1?|
Lengthlength <= 80
person2?|
Lengthlength <= 80
person3?|
Lengthlength <= 80
person4?|
Lengthlength <= 80
phone1?|
Lengthlength <= 80
phone2?|
Lengthlength <= 80
phone3?|
Lengthlength <= 80
phone4?|
Lengthlength <= 80
regionId?|
Formatint32
routeId?|
Formatint32
routeOrder?|
Formatint32
salesRepresentativeId?|
Formatint32
storeChainName?|
Lengthlength <= 80
transportTypeId?|
Formatint32
vatCode?|
Lengthlength <= 5
vatRegistrationNumber?|
Lengthlength <= 50
visitFrequency?|
Lengthlength <= 20
zipCode?|
Lengthlength <= 50

Response Body

application/json
  1. response
address1?|
Lengthlength <= 80
address2?|
Lengthlength <= 80
address3?|
Lengthlength <= 80
barcode?|
Lengthlength <= 16
branchCreationDate?|
Formatdate-time
city?|
Lengthlength <= 80
companyId?|
Formatint32
companyIdentificationNumber?|
Lengthlength <= 50
country?|
Lengthlength <= 80
countryId?|
Formatint32
customerId?|
Formatint32
deliveryDays?|
Formatint32
districtId?|
Formatint32
email1?|
Lengthlength <= 80
email2?|
Lengthlength <= 80
email3?|
Lengthlength <= 80
email4?|
Lengthlength <= 80
frameworkOrder?|
Lengthlength <= 80
gps?|
Lengthlength <= 150
homelandAbroadOwn?|
Formatint32
id?|
Formatint32
isB2BEnabled?boolean|null
isInactive?boolean|null
linkB2BWarehouseId?|
Formatint32
linkUserId?|
Formatint32
linkWarehouseId?|
Formatint32
name?|
Lengthlength <= 80
note?string|null
number?|
Lengthlength <= 20
paymentTypeId?|
Formatint32
person1?|
Lengthlength <= 80
person2?|
Lengthlength <= 80
person3?|
Lengthlength <= 80
person4?|
Lengthlength <= 80
phone1?|
Lengthlength <= 80
phone2?|
Lengthlength <= 80
phone3?|
Lengthlength <= 80
phone4?|
Lengthlength <= 80
regionId?|
Formatint32
routeId?|
Formatint32
routeOrder?|
Formatint32
salesRepresentativeId?|
Formatint32
storeChainName?|
Lengthlength <= 80
transportTypeId?|
Formatint32
vatCode?|
Lengthlength <= 5
vatRegistrationNumber?|
Lengthlength <= 50
visitFrequency?|
Lengthlength <= 20
zipCode?|
Lengthlength <= 50
curl -X POST 'https://<your-instance>/api/companies/0/branches' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{  "address1": "Main Street 12",  "city": "Prague",  "companyId": 2,  "companyIdentificationNumber": "12345678",  "country": "Czech Republic",  "countryId": 1,  "customerId": 5,  "deliveryDays": 3,  "districtId": 101,  "email1": "[email protected]",  "gps": "50.0755,14.4378",  "isB2BEnabled": true,  "isInactive": false,  "name": "Downtown Branch",  "note": "Main branch for the region",  "paymentTypeId": 2,  "person1": "Jan Novak",  "phone1": "+420 123 456 789",  "regionId": 10,  "routeId": 1,  "routeOrder": 1,  "salesRepresentativeId": 8,  "storeChainName": "Market Central",  "transportTypeId": 3,  "vatCode": "CZ",  "vatRegistrationNumber": "CZ12345678",  "visitFrequency": "Weekly",  "zipCode": "11000"}'
{  "address1": "string",  "address2": "string",  "address3": "string",  "barcode": "string",  "branchCreationDate": "2019-08-24T14:15:22Z",  "city": "string",  "companyId": 0,  "companyIdentificationNumber": "string",  "country": "string",  "countryId": 0,  "customerId": 0,  "deliveryDays": 0,  "districtId": 0,  "email1": "string",  "email2": "string",  "email3": "string",  "email4": "string",  "frameworkOrder": "string",  "gps": "string",  "homelandAbroadOwn": 0,  "id": 0,  "isB2BEnabled": true,  "isInactive": true,  "linkB2BWarehouseId": 0,  "linkUserId": 0,  "linkWarehouseId": 0,  "name": "string",  "note": "string",  "number": "string",  "paymentTypeId": 0,  "person1": "string",  "person2": "string",  "person3": "string",  "person4": "string",  "phone1": "string",  "phone2": "string",  "phone3": "string",  "phone4": "string",  "regionId": 0,  "routeId": 0,  "routeOrder": 0,  "salesRepresentativeId": 0,  "storeChainName": "string",  "transportTypeId": 0,  "vatCode": "strin",  "vatRegistrationNumber": "string",  "visitFrequency": "string",  "zipCode": "string"}