WinShopAPI docs
ReferenceCompanies

Create a company representative

Assigns a representative to the company and returns the stored row. Requires `Permissions.Companies.Create`.

POST
/api/companies/{companyId}/representatives

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
city?|
Lengthlength <= 50
companyId?|
Formatint32
country?|
Lengthlength <= 80
dateOfBirth?|
Formatdate-time
dateOfNameDay?|
Formatdate-time
email?|
Lengthlength <= 80
eshopRepresentativeId?string|null
fax?|
Lengthlength <= 20
functionId?|
Formatint32
id?|
Formatint32
isInformEnabled?boolean|null
mobilePhone?|
Lengthlength <= 20
name?|
Lengthlength <= 50
note?string|null
phone?|
Lengthlength <= 20
surname?|
Lengthlength <= 50
title?|
Lengthlength <= 10
zipCode?|
Lengthlength <= 6

Response Body

application/json
  1. response
address1?|
Lengthlength <= 80
address2?|
Lengthlength <= 80
city?|
Lengthlength <= 50
companyId?|
Formatint32
country?|
Lengthlength <= 80
dateOfBirth?|
Formatdate-time
dateOfNameDay?|
Formatdate-time
email?|
Lengthlength <= 80
eshopRepresentativeId?string|null
fax?|
Lengthlength <= 20
functionId?|
Formatint32
id?|
Formatint32
isInformEnabled?boolean|null
mobilePhone?|
Lengthlength <= 20
name?|
Lengthlength <= 50
note?string|null
phone?|
Lengthlength <= 20
surname?|
Lengthlength <= 50
title?|
Lengthlength <= 10
zipCode?|
Lengthlength <= 6
curl -X POST 'https://<your-instance>/api/companies/0/representatives' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{  "address1": "Street 1",  "address2": "District 2",  "city": "New York",  "companyId": 2,  "country": "USA",  "dateOfBirth": "1990-01-01T00:00:00",  "dateOfNameDay": "2025-05-24T00:00:00",  "email": "[email protected]",  "fax": "777888999",  "isInformEnabled": true,  "mobilePhone": "111555666",  "name": "New Representative",  "note": "Test note",  "phone": "444555666",  "surname": "Deer",  "title": "Phd",  "zipCode": "13550"}'
{  "address1": "string",  "address2": "string",  "city": "string",  "companyId": 0,  "country": "string",  "dateOfBirth": "2019-08-24T14:15:22Z",  "dateOfNameDay": "2019-08-24T14:15:22Z",  "email": "string",  "eshopRepresentativeId": "string",  "fax": "string",  "functionId": 0,  "id": 0,  "isInformEnabled": true,  "mobilePhone": "string",  "name": "string",  "note": "string",  "phone": "string",  "surname": "string",  "title": "string",  "zipCode": "string"}