NAV
Shell HTTP JavaScript Ruby Python PHP Java Go

Berg CRM API v0.9.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

About this document

The following specification describes REST API for Berg CRM.

Versioning

Specification versioning follows Semantic Versioning

Cloud version vs server version

There's one specification for both versions as cloud version difference is only additional field for tenant identification (X-Tenant).

Authorization

For Cloud version API X-Tenant header is required for every request. The only exception is authorization url in authorization code flow - X-Tenant should be passed as query parameter, for example: https://app.bergsystem.pl/api/authorize?client_id=your_client&respone_type=code&redirect_uri=https://encoded_redirec_url&scope=all&X-Tenant=tenant_name

Base URLs:

Authentication

Customers

get_customers

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/customers \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/customers HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/customers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/customers', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/customers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/customers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /customers

An endpoint that allows to get collection of customers data, it is possible to filter and sort according to selected fields.

Parameters

Name In Type Required Description
page%5Bpage%5D query integer(int32) false Page number.
sort query string false Sort data by field. Default sorting order is ascending. To reverse it use "-" before field name.
filter%5Bid%5D query integer false Filter by customer id.
filter%5BparentCompany%5D query string false Filter by parent company name or part of it.
filter%5Bfirstname%5D query string false Filter by customer's firstname or part of it.
filter%5Blastname%5D query string false Filter by customer's lastname or part of it.
filter%5Bcity%5D query string false Filter by customer's city name or part of it. Field "miasto" can be found at Zarządzanie polami.
filter%5Bphone%5D query string false Filter by customer's phone number or part of it. Field "telefon" can be found at Zarządzanie polami.
filter%5Bemail%5D query string false Filter by customer's email or part of it. Field can be found at Zarządzanie polami.
filter%5BstateId%5D query string false Filter by customer's state id or collection separated by comma.
filter%5BoriginsId%5D query string false Filter by customer's origins id or collection separated by comma.
filter%5Bpesel%5D query string false Filter by customer's PESEL or part of it.
filter%5BparentUserId%5D query string false Filter by parent empoloyee's id or collection separated by comma. "Opiekun" (it's id) - can be found at Zarządzanie polami.
filter%5BcreationDateFromd%5D query string(date) false Filter by creation date from (inclusive).
filter%5BcreationDateTo%5D query string(date) false Filter by creation date to (inclusive).
filter%5BtagId%5D query string false Filter by tag id or tag ids separated by comma. Field "tagi" - can be found at Zarządzanie polami.
filter%5BcrmStatusId%5D query string false Filter by CRM status id or CRM status ids separated by comma. Field "Status CRM" can be found at Zarządzanie polami.
filter%5BpersonalDataProcessingAgreement%5D query integer false Filter customer's by personal data processing agreeement. 0 - for "no", 1 - for "yes". Field can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
filter%5BmarketingContentAgreement%5D query integer false Filter customer's by markenting content agreement. 0 - for "no", 1 - for "yes". Field can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
filter%5BmailSmsMessagesAgreement%5D query integer false Filter customer's by e-mail and SMS messages delivery agreement. 0 for "no", 1 - for "yes". Field can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
filter%5BcommercialContentAgreement%5D query integer false Filter customer's by commercial content delivery agreement. 0 - for "no", 1 - for "yes". Field can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
filter%5BproductCategoryId%5D query string false Filter by customer's product category id or ids separated by comma.
filter%5BproductProducerId%5D query string false Filter by customers product producer id or ids separated by comma.
filter%5BproductId%5D query string false Filter by customers product id or ids separated by comma.
filter%5BcontractStatusId%5D query string false Filter by contract status id or ids separated by comma.
filter query object false Extra fields filter. For example ?filter%5BextraField_myFieldd%5D=myValue
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Detailed descriptions

sort: Sort data by field. Default sorting order is ascending. To reverse it use "-" before field name. For sorting by extra fields use prefix "extraField_" before field name.

Supported sorting fields: * lastname * parentUser * state * city * phone * email * pesel * origins * createdDate * crmStatus * personalDataProcessingAgreement * marketingContentAgreement * commercialContentAgreement * mailSmsMessagesAgreement * id * ... and extra fields.

filter%5Bid%5D: Filter by customer id.

filter%5BparentCompany%5D: Filter by parent company name or part of it.

filter%5Bfirstname%5D: Filter by customer's firstname or part of it.

filter%5Blastname%5D: Filter by customer's lastname or part of it.

filter%5Bcity%5D: Filter by customer's city name or part of it. Field "miasto" can be found at Zarządzanie polami.

filter%5Bphone%5D: Filter by customer's phone number or part of it. Field "telefon" can be found at Zarządzanie polami.

filter%5Bemail%5D: Filter by customer's email or part of it. Field can be found at Zarządzanie polami.

filter%5BstateId%5D: Filter by customer's state id or collection separated by comma.

filter%5BoriginsId%5D: Filter by customer's origins id or collection separated by comma. IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").

filter%5Bpesel%5D: Filter by customer's PESEL or part of it.

filter%5BparentUserId%5D: Filter by parent empoloyee's id or collection separated by comma. "Opiekun" (it's id) - can be found at Zarządzanie polami.

filter%5BcreationDateFromd%5D: Filter by creation date from (inclusive).

filter%5BcreationDateTo%5D: Filter by creation date to (inclusive).

filter%5BtagId%5D: Filter by tag id or tag ids separated by comma. Field "tagi" - can be found at Zarządzanie polami.

filter%5BcrmStatusId%5D: Filter by CRM status id or CRM status ids separated by comma. Field "Status CRM" can be found at Zarządzanie polami.

filter%5BpersonalDataProcessingAgreement%5D: Filter customer's by personal data processing agreeement. 0 - for "no", 1 - for "yes". Field can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".

filter%5BmarketingContentAgreement%5D: Filter customer's by markenting content agreement. 0 - for "no", 1 - for "yes". Field can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".

filter%5BmailSmsMessagesAgreement%5D: Filter customer's by e-mail and SMS messages delivery agreement. 0 for "no", 1 - for "yes". Field can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".

filter%5BcommercialContentAgreement%5D: Filter customer's by commercial content delivery agreement. 0 - for "no", 1 - for "yes". Field can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".

filter%5BproductCategoryId%5D: Filter by customer's product category id or ids separated by comma. IDs and its meaning can be found at Rodzaje produktów.

filter%5BproductProducerId%5D: Filter by customers product producer id or ids separated by comma. IDs and its meaning can be found at Producenci produktów.

filter%5BproductId%5D: Filter by customers product id or ids separated by comma. IDs and its meaning can be found at Produkty.

filter%5BcontractStatusId%5D: Filter by contract status id or ids separated by comma. "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/

Enumerated Values

Parameter Value
filter%5BpersonalDataProcessingAgreement%5D 0
filter%5BpersonalDataProcessingAgreement%5D 1
filter%5BmarketingContentAgreement%5D 0
filter%5BmarketingContentAgreement%5D 1
filter%5BmailSmsMessagesAgreement%5D 0
filter%5BmailSmsMessagesAgreement%5D 1
filter%5BcommercialContentAgreement%5D 0
filter%5BcommercialContentAgreement%5D 1

Example responses

200 Response

{
  "links": {
    "self": "/customers?page%5Bpage%5D=2",
    "first": "/customers?page%5Bpage%5D=1",
    "prev": "/customers?page%5Bpage%5D=1",
    "next": "/customers?page%5Bpage%5D=3",
    "last": "/customers?page%5Bpage%5D=3"
  },
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "id": "/api/customers/15",
      "type": "Customer",
      "attributes": {
        "_id": 12333,
        "parentUserId": 1,
        "personalDataProcessingAgreement": true,
        "commercialContentAgreement": true,
        "marketingContentAgreement": false,
        "mailSmsMessagesAgreement": true,
        "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
        "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
        "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
        "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
        "visibility": "ADVISER_ONLY",
        "idCardSeries": "STM",
        "phone": "48943210675",
        "email": "kljkasd@o2.pl",
        "city": "Wroclaw",
        "street": "Jaworowa",
        "houseNumber": "20A/77",
        "premisesNumber": "18",
        "postcode": "00-930",
        "invoiceEmail": "kljkasd@o2.pl",
        "invoiceCity": "Poznan",
        "invoiceStreet": "Topolowa",
        "invoiceHouseNumber": "30A/36",
        "invoicePremisesNumber": "37A",
        "invoicePostcode": "invoicePostcode",
        "invoiceNip": "2967751927",
        "invoiceName": "Faktura",
        "invoiceBankNumber": "string",
        "additionalPhone": "48475036329",
        "additionalEmail": "emilia05@sawicka.pl",
        "additionalCity": "Sieradz",
        "additionalStreet": "Orzeszkowej Elizy",
        "additionalHouseNumber": "89/11",
        "additionalPremisesNumber": "42/69",
        "additionalPostcode": "07-524",
        "officeCity": "Poznan",
        "officeStreet": "Cisowa",
        "officeHouseNumber": "32A",
        "officePremisesNumber": "11",
        "officePostcode": "26-536",
        "createdDate": "2020-09-25T00:00:00+02:00",
        "modifiedDate": "2020-09-25T00:00:00+02:00",
        "tags": [
          "VIP"
        ],
        "description": "My description",
        "linkedIn": "string",
        "facebook": "string",
        "extraFields": {
          "property1": "string",
          "property2": "string"
        },
        "extraAgreements": "{“rodo_999999999999”: true}",
        "externalId": "EXT1",
        "name": "string",
        "nip": "string",
        "regon": "string",
        "knfRauNumber": "string",
        "postOffice": "string",
        "officePostOffice": "string",
        "additionalPostOffice": "string",
        "firstname": "James",
        "lastname": "Smith",
        "gender": "male",
        "pesel": "33072308033",
        "birthday": "2000-01-30",
        "driveLicenceDate": "2000-01-30",
        "state": "Krakow",
        "region": "Malopolskie",
        "country": "Polska",
        "invoiceCountry": "Polska",
        "additionalCountry": "Polska",
        "officeCountry": "Polska",
        "origins": "Lead"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of customers. Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links PaginationLinks false none none
»» self string false none none
»» first string false none none
»» prev string false none none
»» next string false none none
»» last string false none none
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [CustomerData] true none none
»» id string false none none
»» type string false none none
»» attributes any false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» firstname string false none Field "Imię".
»»»» lastname string false none Field "Lastname".
»»»» gender string false none none
»»»» pesel string false none none
»»»» birthday string(date) false none Field "data urodzenia" can be found at Zarządzanie polami
»»»» driveLicenceDate string(date) false none Field "data wydania prawa jazdy" can be found at Zarządzanie polami

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY
gender male
gender female

post_customers

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/customers \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

POST https://app.bergsystem.pl/api/customers HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "firstname": "James",
    "lastname": "Smith",
    "gender": "male",
    "pesel": "33072308033",
    "birthday": "2000-01-30",
    "driveLicenceDate": "2000-01-30",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customers',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://app.bergsystem.pl/api/customers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://app.bergsystem.pl/api/customers', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://app.bergsystem.pl/api/customers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://app.bergsystem.pl/api/customers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /customers

Body parameter

{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "firstname": "James",
    "lastname": "Smith",
    "gender": "male",
    "pesel": "33072308033",
    "birthday": "2000-01-30",
    "driveLicenceDate": "2000-01-30",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135
  }
}

An endpoint that allows to create customer with the requested data payload.

Parameters

Name In Type Required Description
body body object true none
» data body any false none
»» anonymous body BaseUserData false none
»»» _id body integer false none
»»» parentUserId body integer false "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»» personalDataProcessingAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»» commercialContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»» marketingContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»» mailSmsMessagesAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»» personalDataProcessingAgreementModified body string(date-time) false Data modyfikacji zgody na SMS/e-mail.
»»» commercialContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»» marketingContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»» mailSmsMessagesAgreementModified body string(date-time) false Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»» visibility body string false Widoczność
»»» idCardSeries body string false Nr dowodu osobistego - can be found at Zarządzanie polami.
»»» phone body string false Telefon - can be found at Zarządzanie polami.
»»» email body string(email) false Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»» city body string false Miasto - can be found at Zarządzanie polami.
»»» street body string false Ulica - can be found at Zarządzanie polami.
»»» houseNumber body string false Numer domu - can be found at Zarządzanie polami.
»»» premisesNumber body string false Numer lokalu - can be found at Zarządzanie polami.
»»» postcode body string false Kod pocztowy - can be found at Zarządzanie polami.
»»» invoiceEmail body string(email) false Mail do faktur - can be found at Zarządzanie polami.
»»» invoiceCity body string false Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceStreet body string false Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceHouseNumber body string false Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePremisesNumber body string false Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePostcode body string false Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceNip body string false NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceName body string false Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceBankNumber body string¦null false "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» additionalPhone body string false Telefon dodatkowy - can be found at Zarządzanie polami.
»»» additionalEmail body string(email) false Maile dodatkowe - can be found at Zarządzanie polami.
»»» additionalCity body string false Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalStreet body string false Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalHouseNumber body string false Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPremisesNumber body string false Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPostcode body string false Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» officeCity body string false Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeStreet body string false Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeHouseNumber body string false Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePremisesNumber body string false Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePostcode body string false Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» createdDate body string(date-time) false Data dodania
»»» modifiedDate body string(date-time) false none
»»» tags body [string] false none
»»» description body string false Field "opis" - can be found at Zarządzanie polami.
»»» linkedIn body string false Field "linkedin" - can be found at Zarządzanie polami.
»»» facebook body string false Field "facebook" - can be found at Zarządzanie polami.
»»» extraFields body object false User defined fields
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» extraAgreements body object false User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»» additionalProperties body boolean false none
»»» externalId body string¦null false Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»» name body string¦null false Field "nazwa firmy" - can be found at Zarządzanie polami.
»»» nip body string¦null false Field "NIP" - can be found at Zarządzanie polami.
»»» regon body string¦null false Field "REGON" - can be found at Zarządzanie polami.
»»» knfRauNumber body string¦null false Field "knf Rau Number" - can be found at Zarządzanie polami.
»»» postOffice body string¦null false Field "post office" - can be found at Zarządzanie polami.
»»» officePostOffice body string¦null false Field "office post office" - can be found at Zarządzanie polami.
»»» additionalPostOffice body string¦null false Field "register post office" - can be found at Zarządzanie polami.
»» anonymous body object false none
»»» firstname body string false Field "Imię".
»»» lastname body string false Field "Lastname".
»»» gender body string false none
»»» pesel body string false none
»»» birthday body string(date) false Field "data urodzenia" can be found at Zarządzanie polami
»»» driveLicenceDate body string(date) false Field "data wydania prawa jazdy" can be found at Zarządzanie polami
»» anonymous body BaseUserDataCommonInputFields false none
»»» originsId body integer false IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").
»»» stateId body integer false ID can be found at Zarządzanie polami - click "Powiat"
»»» regionId body integer false ID can be found at Zarządzanie polami - click "Region"
»»» countryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» invoiceCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» additionalCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» officeCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
»»» visibility ALL_COMPANY
»»» visibility STRUCTURAL
»»» visibility ADVISER_ONLY
»»» gender male
»»» gender female

Example responses

201 Response

{
  "data": {
    "id": "/api/customers/15",
    "type": "Customer",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "firstname": "James",
      "lastname": "Smith",
      "gender": "male",
      "pesel": "33072308033",
      "birthday": "2000-01-30",
      "driveLicenceDate": "2000-01-30",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead"
    }
  }
}

Responses

Status Meaning Description Schema
201 Created Customers data. Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error
404 Not Found Resource not found. Error

Response Schema

Status Code 201

Name Type Required Restrictions Description
» data CustomerData false none none
»» id string false none none
»» type string false none none
»» attributes any false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» firstname string false none Field "Imię".
»»»» lastname string false none Field "Lastname".
»»»» gender string false none none
»»»» pesel string false none none
»»»» birthday string(date) false none Field "data urodzenia" can be found at Zarządzanie polami
»»»» driveLicenceDate string(date) false none Field "data wydania prawa jazdy" can be found at Zarządzanie polami

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY
gender male
gender female

get_customers_{customerId}

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/customers/{customerId} \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/customers/{customerId} HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customers/{customerId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/customers/{customerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/customers/{customerId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/customers/{customerId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customers/{customerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/customers/{customerId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /customers/{customerId}

An endpoint that allows to get customer data by its identifier.

Parameters

Name In Type Required Description
customerId path integer true Customer id
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "data": {
    "id": "/api/customers/15",
    "type": "Customer",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "firstname": "James",
      "lastname": "Smith",
      "gender": "male",
      "pesel": "33072308033",
      "birthday": "2000-01-30",
      "driveLicenceDate": "2000-01-30",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Customers data. Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data CustomerData false none none
»» id string false none none
»» type string false none none
»» attributes any false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» firstname string false none Field "Imię".
»»»» lastname string false none Field "Lastname".
»»»» gender string false none none
»»»» pesel string false none none
»»»» birthday string(date) false none Field "data urodzenia" can be found at Zarządzanie polami
»»»» driveLicenceDate string(date) false none Field "data wydania prawa jazdy" can be found at Zarządzanie polami

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY
gender male
gender female

patch_customers_{customerId}

Code samples

# You can also use wget
curl -X PATCH https://app.bergsystem.pl/api/customers/{customerId} \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://app.bergsystem.pl/api/customers/{customerId} HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "firstname": "James",
    "lastname": "Smith",
    "gender": "male",
    "pesel": "33072308033",
    "birthday": "2000-01-30",
    "driveLicenceDate": "2000-01-30",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customers/{customerId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://app.bergsystem.pl/api/customers/{customerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://app.bergsystem.pl/api/customers/{customerId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://app.bergsystem.pl/api/customers/{customerId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customers/{customerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://app.bergsystem.pl/api/customers/{customerId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /customers/{customerId}

Body parameter

{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "firstname": "James",
    "lastname": "Smith",
    "gender": "male",
    "pesel": "33072308033",
    "birthday": "2000-01-30",
    "driveLicenceDate": "2000-01-30",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135
  }
}

An endpoint that allows to edit customer data by its identifier.

Parameters

Name In Type Required Description
customerId path integer true Customer id
body body object true none
» data body any false none
»» anonymous body BaseUserData false none
»»» _id body integer false none
»»» parentUserId body integer false "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»» personalDataProcessingAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»» commercialContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»» marketingContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»» mailSmsMessagesAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»» personalDataProcessingAgreementModified body string(date-time) false Data modyfikacji zgody na SMS/e-mail.
»»» commercialContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»» marketingContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»» mailSmsMessagesAgreementModified body string(date-time) false Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»» visibility body string false Widoczność
»»» idCardSeries body string false Nr dowodu osobistego - can be found at Zarządzanie polami.
»»» phone body string false Telefon - can be found at Zarządzanie polami.
»»» email body string(email) false Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»» city body string false Miasto - can be found at Zarządzanie polami.
»»» street body string false Ulica - can be found at Zarządzanie polami.
»»» houseNumber body string false Numer domu - can be found at Zarządzanie polami.
»»» premisesNumber body string false Numer lokalu - can be found at Zarządzanie polami.
»»» postcode body string false Kod pocztowy - can be found at Zarządzanie polami.
»»» invoiceEmail body string(email) false Mail do faktur - can be found at Zarządzanie polami.
»»» invoiceCity body string false Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceStreet body string false Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceHouseNumber body string false Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePremisesNumber body string false Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePostcode body string false Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceNip body string false NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceName body string false Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceBankNumber body string¦null false "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» additionalPhone body string false Telefon dodatkowy - can be found at Zarządzanie polami.
»»» additionalEmail body string(email) false Maile dodatkowe - can be found at Zarządzanie polami.
»»» additionalCity body string false Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalStreet body string false Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalHouseNumber body string false Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPremisesNumber body string false Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPostcode body string false Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» officeCity body string false Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeStreet body string false Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeHouseNumber body string false Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePremisesNumber body string false Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePostcode body string false Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» createdDate body string(date-time) false Data dodania
»»» modifiedDate body string(date-time) false none
»»» tags body [string] false none
»»» description body string false Field "opis" - can be found at Zarządzanie polami.
»»» linkedIn body string false Field "linkedin" - can be found at Zarządzanie polami.
»»» facebook body string false Field "facebook" - can be found at Zarządzanie polami.
»»» extraFields body object false User defined fields
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» extraAgreements body object false User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»» additionalProperties body boolean false none
»»» externalId body string¦null false Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»» name body string¦null false Field "nazwa firmy" - can be found at Zarządzanie polami.
»»» nip body string¦null false Field "NIP" - can be found at Zarządzanie polami.
»»» regon body string¦null false Field "REGON" - can be found at Zarządzanie polami.
»»» knfRauNumber body string¦null false Field "knf Rau Number" - can be found at Zarządzanie polami.
»»» postOffice body string¦null false Field "post office" - can be found at Zarządzanie polami.
»»» officePostOffice body string¦null false Field "office post office" - can be found at Zarządzanie polami.
»»» additionalPostOffice body string¦null false Field "register post office" - can be found at Zarządzanie polami.
»» anonymous body object false none
»»» firstname body string false Field "Imię".
»»» lastname body string false Field "Lastname".
»»» gender body string false none
»»» pesel body string false none
»»» birthday body string(date) false Field "data urodzenia" can be found at Zarządzanie polami
»»» driveLicenceDate body string(date) false Field "data wydania prawa jazdy" can be found at Zarządzanie polami
»» anonymous body BaseUserDataCommonInputFields false none
»»» originsId body integer false IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").
»»» stateId body integer false ID can be found at Zarządzanie polami - click "Powiat"
»»» regionId body integer false ID can be found at Zarządzanie polami - click "Region"
»»» countryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» invoiceCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» additionalCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» officeCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
»»» visibility ALL_COMPANY
»»» visibility STRUCTURAL
»»» visibility ADVISER_ONLY
»»» gender male
»»» gender female

Example responses

200 Response

{
  "data": {
    "id": "/api/customers/15",
    "type": "Customer",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "firstname": "James",
      "lastname": "Smith",
      "gender": "male",
      "pesel": "33072308033",
      "birthday": "2000-01-30",
      "driveLicenceDate": "2000-01-30",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Customers data. Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data CustomerData false none none
»» id string false none none
»» type string false none none
»» attributes any false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» firstname string false none Field "Imię".
»»»» lastname string false none Field "Lastname".
»»»» gender string false none none
»»»» pesel string false none none
»»»» birthday string(date) false none Field "data urodzenia" can be found at Zarządzanie polami
»»»» driveLicenceDate string(date) false none Field "data wydania prawa jazdy" can be found at Zarządzanie polami

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY
gender male
gender female

Customer Agreements

get_customers_agreements

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/customers/agreements \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/customers/agreements HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customers/agreements',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/customers/agreements',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/customers/agreements', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/customers/agreements', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customers/agreements");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/customers/agreements", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /customers/agreements

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "links": {
    "self": "/customers?page%5Bpage%5D=2",
    "first": "/customers?page%5Bpage%5D=1",
    "prev": "/customers?page%5Bpage%5D=1",
    "next": "/customers?page%5Bpage%5D=3",
    "last": "/customers?page%5Bpage%5D=3"
  },
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "id": "/api/customers/agreements/1",
      "type": "Rodo",
      "attributes": {
        "_id": 1,
        "active": true,
        "name": "Simple name",
        "description": "Simple description",
        "userDataType": 0
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of customer agreements Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links PaginationLinks false none none
»» self string false none none
»» first string false none none
»» prev string false none none
»» next string false none none
»» last string false none none
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [RodoData] true none none
»» id string false none none
»» type string false none none
»» attributes Rodo false none none
»»» _id integer false read-only none
»»» active boolean false none none
»»» name string false none none
»»» description string false none none
»»» userDataType number false none none

post_customers_agreements

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/customers/agreements \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

POST https://app.bergsystem.pl/api/customers/agreements HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "active": true,
      "name": "Simple name",
      "description": "Simple description",
      "userDataType": 0
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customers/agreements',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://app.bergsystem.pl/api/customers/agreements',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://app.bergsystem.pl/api/customers/agreements', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://app.bergsystem.pl/api/customers/agreements', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customers/agreements");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://app.bergsystem.pl/api/customers/agreements", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /customers/agreements

Body parameter

{
  "data": {
    "attributes": {
      "active": true,
      "name": "Simple name",
      "description": "Simple description",
      "userDataType": 0
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Rodo false none
»»» _id body integer false none
»»» active body boolean false none
»»» name body string false none
»»» description body string false none
»»» userDataType body number false none
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

201 Response

{
  "data": {
    "_id": 1,
    "active": true,
    "name": "Simple name",
    "description": "Simple description",
    "userDataType": 0
  }
}

Responses

Status Meaning Description Schema
201 Created Rodo data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error
404 Not Found Resource not found. Error

Response Schema

Status Code 201

Name Type Required Restrictions Description
» data Rodo false none none
»» _id integer false read-only none
»» active boolean false none none
»» name string false none none
»» description string false none none
»» userDataType number false none none

get_customers_agreements_{id}

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/customers/agreements/{id} \
  -H 'Accept: application/json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/customers/agreements/{id} HTTP/1.1
Host: app.bergsystem.pl
Accept: application/json
X-Tenant: string


const headers = {
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customers/agreements/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/customers/agreements/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/customers/agreements/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/customers/agreements/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customers/agreements/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/customers/agreements/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /customers/agreements/{id}

Parameters

Name In Type Required Description
id path integer true Agreement identifier
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "data": {
    "_id": 1,
    "active": true,
    "name": "Simple name",
    "description": "Simple description",
    "userDataType": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Rodo data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data Rodo false none none
»» _id integer false read-only none
»» active boolean false none none
»» name string false none none
»» description string false none none
»» userDataType number false none none

Customer Extra Agreements

get_customer_extra_agreements

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/customer_extra_agreements \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/customer_extra_agreements HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json


const headers = {
  'Accept':'application/vnd.api+json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customer_extra_agreements',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/customer_extra_agreements',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/customer_extra_agreements', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/customer_extra_agreements', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customer_extra_agreements");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/customer_extra_agreements", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /customer_extra_agreements

Example responses

200 Response

{
  "links": {
    "self": "/api/customer_extra_agreements"
  },
  "meta": {
    "totalItems": 4
  },
  "data": [
    {
      "id": "/api/customer_extra_agreements/1243",
      "type": "CustomerExtraAgreement",
      "attributes": {
        "_id": 1243,
        "label": "Agreement name",
        "key": "smsAgreement",
        "active": true
      }
    }
  ]
}

An endpoint that allows to get collection of all active extra agreements for customers.

Responses

Status Meaning Description Schema
200 OK List of customer extra agreements. Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links object false none none
»» self string false none none
» meta object false none none
»» totalItems integer false none none
» data [CustomerExtraAgreementsData] true none none
»» id string false none none
»» type string false none none
»» attributes ExtraAgreement false none none
»»» _id integer false read-only none
»»» label string false none none
»»» key string false none Dynamic api key like rodo_{id} or static like smsAgreement
»»» active boolean false none none

Customer Extra Fields

get_customer_extra_fields

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/customer_extra_fields \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/customer_extra_fields HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json


const headers = {
  'Accept':'application/vnd.api+json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/customer_extra_fields',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/customer_extra_fields',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/customer_extra_fields', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/customer_extra_fields', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/customer_extra_fields");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/customer_extra_fields", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /customer_extra_fields

Example responses

200 Response

{
  "links": {
    "self": "/api/customer_extra_fields"
  },
  "meta": {
    "totalItems": 4
  },
  "data": [
    {
      "id": "/api/customer_extra_fields/1243",
      "type": "CustomerExtraField",
      "attributes": {
        "_id": 1243,
        "label": "Product name",
        "key": "ProductName1"
      }
    }
  ]
}

An endpoint that allows to get collection of all active extra fields for customers.

Responses

Status Meaning Description Schema
200 OK List of customer extra fields. Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links object false none none
»» self string false none none
» meta object false none none
»» totalItems integer false none none
» data [CustomerExtraFieldData] true none none
»» id string false none none
»» type string false none none
»» attributes ExtraField false none none
»»» _id integer false read-only none
»»» label string false none none
»»» key string false none none

Companies

get_companies

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/companies \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/companies HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/companies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/companies',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/companies', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/companies', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/companies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/companies", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies

An endpoint that allows to get collection of companies data, it is possible to filter and sort according to selected fields.

Parameters

Name In Type Required Description
page%5Bpage%5D query integer(int32) false Page number.
sort query string false Sort data by field. Default sorting order is ascending. To reverse it use "-" before field name.
filter%5Bid%5D query integer false Filter by company id.
filter%5Bname%5D query string false Filter by company's name or part of it. Field "nazwa firmy" - can be found at Zarządzanie polami.
filter%5Bcity%5D query string false Filter by company's city name or part of it. Field "miasto" can be found at Zarządzanie polami.
filter%5Bnip%5D query string false Filter by company's NIP number. Field "NIP" - can be found at Zarządzanie polami.
filter%5Bphone%5D query string false Filter by company's phone number or part of it. Field "telefon" can be found at Zarządzanie polami.
filter%5Bemail%5D query string false Filter by company's email or part of it. Field can be found at Zarządzanie polami.
filter%5BstateId%5D query string false Filter by company's state id or collection separated by comma. Field can be found at Zarządzanie polami - click "Powiat".
filter%5BoriginsId%5D query string false Filter by company's origins id or collection separated by comma.
filter%5BparentUserId%5D query string false Filter by parent empoloyee's id or collection separated by comma. "Opiekun" (it's id) - can be found at Zespółi ("id" column).
filter%5BcreationDateFrom%5D query string(date) false Filter by creation date from (inclusive).
filter%5BcreationDateTo%5D query string(date) false Filter by creation date to (inclusive).
filter%5BtagId%5D query string false Filter by tag id or tag ids separated by comma. Field "tagi" - can be found at Zarządzanie polami.
filter%5BcrmStatusId%5D query string false Filter by CRM status id or CRM status ids separated by comma. Field "Status CRM" can be found at Zarządzanie polami.
filter%5BproductCategoryId%5D query string false Filter by customer's product category id or ids separated by comma.
filter%5BproductProducerId%5D query string false Filter by customers product producer id or ids separated by comma.
filter%5BproductId%5D query string false Filter by customers product id or ids separated by comma.
filter%5BcontractStatusId%5D query string false Filter by contract status id or ids separated by comma.
filter query object false Extra fields filter. For example ?filter%5BextraField_myFieldd%5D=myValue
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Detailed descriptions

sort: Sort data by field. Default sorting order is ascending. To reverse it use "-" before field name. For sorting by extra fields use prefix "extraField_" before field name. Supported sorting fields: * name * parentUser * state * city * phone * email * nip * origins * crmStatus * id * ... and extra fields.

filter%5Bid%5D: Filter by company id.

filter%5Bname%5D: Filter by company's name or part of it. Field "nazwa firmy" - can be found at Zarządzanie polami.

filter%5Bcity%5D: Filter by company's city name or part of it. Field "miasto" can be found at Zarządzanie polami.

filter%5Bnip%5D: Filter by company's NIP number. Field "NIP" - can be found at Zarządzanie polami.

filter%5Bphone%5D: Filter by company's phone number or part of it. Field "telefon" can be found at Zarządzanie polami.

filter%5Bemail%5D: Filter by company's email or part of it. Field can be found at Zarządzanie polami.

filter%5BstateId%5D: Filter by company's state id or collection separated by comma. Field can be found at Zarządzanie polami - click "Powiat".

filter%5BoriginsId%5D: Filter by company's origins id or collection separated by comma. IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").

filter%5BparentUserId%5D: Filter by parent empoloyee's id or collection separated by comma. "Opiekun" (it's id) - can be found at Zespółi ("id" column).

filter%5BcreationDateFrom%5D: Filter by creation date from (inclusive).

filter%5BcreationDateTo%5D: Filter by creation date to (inclusive).

filter%5BtagId%5D: Filter by tag id or tag ids separated by comma. Field "tagi" - can be found at Zarządzanie polami.

filter%5BcrmStatusId%5D: Filter by CRM status id or CRM status ids separated by comma. Field "Status CRM" can be found at Zarządzanie polami.

filter%5BproductCategoryId%5D: Filter by customer's product category id or ids separated by comma. IDs and its meaning can be found at Rodzaje produktów.

filter%5BproductProducerId%5D: Filter by customers product producer id or ids separated by comma. IDs and its meaning can be found at Producenci produktów.

filter%5BproductId%5D: Filter by customers product id or ids separated by comma. IDs and its meaning can be found at Produkty.

filter%5BcontractStatusId%5D: Filter by contract status id or ids separated by comma. "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/

Example responses

200 Response

{
  "links": {
    "self": "/customers?page%5Bpage%5D=2",
    "first": "/customers?page%5Bpage%5D=1",
    "prev": "/customers?page%5Bpage%5D=1",
    "next": "/customers?page%5Bpage%5D=3",
    "last": "/customers?page%5Bpage%5D=3"
  },
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "id": "/api/companies/15",
      "type": "Company",
      "attributes": {
        "_id": 12333,
        "parentUserId": 1,
        "personalDataProcessingAgreement": true,
        "commercialContentAgreement": true,
        "marketingContentAgreement": false,
        "mailSmsMessagesAgreement": true,
        "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
        "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
        "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
        "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
        "visibility": "ADVISER_ONLY",
        "idCardSeries": "STM",
        "phone": "48943210675",
        "email": "kljkasd@o2.pl",
        "city": "Wroclaw",
        "street": "Jaworowa",
        "houseNumber": "20A/77",
        "premisesNumber": "18",
        "postcode": "00-930",
        "invoiceEmail": "kljkasd@o2.pl",
        "invoiceCity": "Poznan",
        "invoiceStreet": "Topolowa",
        "invoiceHouseNumber": "30A/36",
        "invoicePremisesNumber": "37A",
        "invoicePostcode": "invoicePostcode",
        "invoiceNip": "2967751927",
        "invoiceName": "Faktura",
        "invoiceBankNumber": "string",
        "additionalPhone": "48475036329",
        "additionalEmail": "emilia05@sawicka.pl",
        "additionalCity": "Sieradz",
        "additionalStreet": "Orzeszkowej Elizy",
        "additionalHouseNumber": "89/11",
        "additionalPremisesNumber": "42/69",
        "additionalPostcode": "07-524",
        "officeCity": "Poznan",
        "officeStreet": "Cisowa",
        "officeHouseNumber": "32A",
        "officePremisesNumber": "11",
        "officePostcode": "26-536",
        "createdDate": "2020-09-25T00:00:00+02:00",
        "modifiedDate": "2020-09-25T00:00:00+02:00",
        "tags": [
          "VIP"
        ],
        "description": "My description",
        "linkedIn": "string",
        "facebook": "string",
        "extraFields": {
          "property1": "string",
          "property2": "string"
        },
        "extraAgreements": "{“rodo_999999999999”: true}",
        "externalId": "EXT1",
        "name": "string",
        "nip": "string",
        "regon": "string",
        "knfRauNumber": "string",
        "postOffice": "string",
        "officePostOffice": "string",
        "additionalPostOffice": "string",
        "state": "Krakow",
        "region": "Malopolskie",
        "country": "Polska",
        "invoiceCountry": "Polska",
        "additionalCountry": "Polska",
        "officeCountry": "Polska",
        "origins": "Lead",
        "contactPerson": "Jan Kowalski",
        "startDate": "2020-02-01",
        "pkd": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM",
        "pkdSecondary": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z MARKETINGIEM",
        "krs": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of companies Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links PaginationLinks false none none
»» self string false none none
»» first string false none none
»» prev string false none none
»» next string false none none
»» last string false none none
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [CompanyData] true none none
»» id string false none none
»» type string false none none
»» attributes any false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» contactPerson string¦null false none Field "osoba kontaktowa" can be found at Zarządzanie polami
»»»» startDate string(date)¦null false none Field "Data rozpoczęcia działalności" can be found at Zarządzanie polami
»»»» pkd string¦null false none Field "PKD" can be found at Zarządzanie polami
»»»» pkdSecondary string¦null false none Field "PKD dodatkowe" can be found at Zarządzanie polami
»»»» krs string¦null false none Field "KRS" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY

post_companies

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/companies \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

POST https://app.bergsystem.pl/api/companies HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135,
    "contactPerson": "Jan Kowalski",
    "startDate": "2020-02-01",
    "pkd": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM",
    "pkdSecondary": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z MARKETINGIEM",
    "krs": "string"
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/companies',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://app.bergsystem.pl/api/companies',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://app.bergsystem.pl/api/companies', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://app.bergsystem.pl/api/companies', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/companies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://app.bergsystem.pl/api/companies", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /companies

Body parameter

{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135,
    "contactPerson": "Jan Kowalski",
    "startDate": "2020-02-01",
    "pkd": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM",
    "pkdSecondary": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z MARKETINGIEM",
    "krs": "string"
  }
}

An endpoint that allows to create company with the requested data payload.

Parameters

Name In Type Required Description
body body object true none
» data body any false none
»» anonymous body BaseUserData false none
»»» _id body integer false none
»»» parentUserId body integer false "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»» personalDataProcessingAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»» commercialContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»» marketingContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»» mailSmsMessagesAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»» personalDataProcessingAgreementModified body string(date-time) false Data modyfikacji zgody na SMS/e-mail.
»»» commercialContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»» marketingContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»» mailSmsMessagesAgreementModified body string(date-time) false Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»» visibility body string false Widoczność
»»» idCardSeries body string false Nr dowodu osobistego - can be found at Zarządzanie polami.
»»» phone body string false Telefon - can be found at Zarządzanie polami.
»»» email body string(email) false Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»» city body string false Miasto - can be found at Zarządzanie polami.
»»» street body string false Ulica - can be found at Zarządzanie polami.
»»» houseNumber body string false Numer domu - can be found at Zarządzanie polami.
»»» premisesNumber body string false Numer lokalu - can be found at Zarządzanie polami.
»»» postcode body string false Kod pocztowy - can be found at Zarządzanie polami.
»»» invoiceEmail body string(email) false Mail do faktur - can be found at Zarządzanie polami.
»»» invoiceCity body string false Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceStreet body string false Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceHouseNumber body string false Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePremisesNumber body string false Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePostcode body string false Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceNip body string false NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceName body string false Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceBankNumber body string¦null false "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» additionalPhone body string false Telefon dodatkowy - can be found at Zarządzanie polami.
»»» additionalEmail body string(email) false Maile dodatkowe - can be found at Zarządzanie polami.
»»» additionalCity body string false Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalStreet body string false Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalHouseNumber body string false Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPremisesNumber body string false Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPostcode body string false Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» officeCity body string false Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeStreet body string false Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeHouseNumber body string false Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePremisesNumber body string false Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePostcode body string false Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» createdDate body string(date-time) false Data dodania
»»» modifiedDate body string(date-time) false none
»»» tags body [string] false none
»»» description body string false Field "opis" - can be found at Zarządzanie polami.
»»» linkedIn body string false Field "linkedin" - can be found at Zarządzanie polami.
»»» facebook body string false Field "facebook" - can be found at Zarządzanie polami.
»»» extraFields body object false User defined fields
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» extraAgreements body object false User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»» additionalProperties body boolean false none
»»» externalId body string¦null false Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»» name body string¦null false Field "nazwa firmy" - can be found at Zarządzanie polami.
»»» nip body string¦null false Field "NIP" - can be found at Zarządzanie polami.
»»» regon body string¦null false Field "REGON" - can be found at Zarządzanie polami.
»»» knfRauNumber body string¦null false Field "knf Rau Number" - can be found at Zarządzanie polami.
»»» postOffice body string¦null false Field "post office" - can be found at Zarządzanie polami.
»»» officePostOffice body string¦null false Field "office post office" - can be found at Zarządzanie polami.
»»» additionalPostOffice body string¦null false Field "register post office" - can be found at Zarządzanie polami.
»» anonymous body BaseUserDataCommonInputFields false none
»»» originsId body integer false IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").
»»» stateId body integer false ID can be found at Zarządzanie polami - click "Powiat"
»»» regionId body integer false ID can be found at Zarządzanie polami - click "Region"
»»» countryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» invoiceCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» additionalCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» officeCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»» anonymous body object false none
»»» contactPerson body string¦null false Field "osoba kontaktowa" can be found at Zarządzanie polami
»»» startDate body string(date)¦null false Field "Data rozpoczęcia działalności" can be found at Zarządzanie polami
»»» pkd body string¦null false Field "PKD" can be found at Zarządzanie polami
»»» pkdSecondary body string¦null false Field "PKD dodatkowe" can be found at Zarządzanie polami
»»» krs body string¦null false Field "KRS" can be found at Zarządzanie polami
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
»»» visibility ALL_COMPANY
»»» visibility STRUCTURAL
»»» visibility ADVISER_ONLY

Example responses

201 Response

{
  "data": {
    "id": "/api/companies/15",
    "type": "Company",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead",
      "contactPerson": "Jan Kowalski",
      "startDate": "2020-02-01",
      "pkd": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM",
      "pkdSecondary": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z MARKETINGIEM",
      "krs": "string"
    }
  }
}

Responses

Status Meaning Description Schema
201 Created Company data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error
404 Not Found Resource not found. Error

Response Schema

Status Code 201

Name Type Required Restrictions Description
» data CompanyData false none none
»» id string false none none
»» type string false none none
»» attributes any false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» contactPerson string¦null false none Field "osoba kontaktowa" can be found at Zarządzanie polami
»»»» startDate string(date)¦null false none Field "Data rozpoczęcia działalności" can be found at Zarządzanie polami
»»»» pkd string¦null false none Field "PKD" can be found at Zarządzanie polami
»»»» pkdSecondary string¦null false none Field "PKD dodatkowe" can be found at Zarządzanie polami
»»»» krs string¦null false none Field "KRS" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY

get_companies_{id}

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/companies/{id} \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/companies/{id} HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/companies/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/companies/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/companies/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/companies/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/companies/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/companies/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies/{id}

An endpoint that allows to get company data by its identifier.

Parameters

Name In Type Required Description
id path integer true Company identifier
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "data": {
    "id": "/api/companies/15",
    "type": "Company",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead",
      "contactPerson": "Jan Kowalski",
      "startDate": "2020-02-01",
      "pkd": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM",
      "pkdSecondary": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z MARKETINGIEM",
      "krs": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Company data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data CompanyData false none none
»» id string false none none
»» type string false none none
»» attributes any false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» contactPerson string¦null false none Field "osoba kontaktowa" can be found at Zarządzanie polami
»»»» startDate string(date)¦null false none Field "Data rozpoczęcia działalności" can be found at Zarządzanie polami
»»»» pkd string¦null false none Field "PKD" can be found at Zarządzanie polami
»»»» pkdSecondary string¦null false none Field "PKD dodatkowe" can be found at Zarządzanie polami
»»»» krs string¦null false none Field "KRS" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY

patch_companies_{id}

Code samples

# You can also use wget
curl -X PATCH https://app.bergsystem.pl/api/companies/{id} \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://app.bergsystem.pl/api/companies/{id} HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135,
    "contactPerson": "Jan Kowalski",
    "startDate": "2020-02-01",
    "pkd": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM",
    "pkdSecondary": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z MARKETINGIEM",
    "krs": "string"
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/companies/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://app.bergsystem.pl/api/companies/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://app.bergsystem.pl/api/companies/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://app.bergsystem.pl/api/companies/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/companies/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://app.bergsystem.pl/api/companies/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /companies/{id}

Body parameter

{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135,
    "contactPerson": "Jan Kowalski",
    "startDate": "2020-02-01",
    "pkd": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM",
    "pkdSecondary": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z MARKETINGIEM",
    "krs": "string"
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body any false none
»» anonymous body BaseUserData false none
»»» _id body integer false none
»»» parentUserId body integer false "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»» personalDataProcessingAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»» commercialContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»» marketingContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»» mailSmsMessagesAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»» personalDataProcessingAgreementModified body string(date-time) false Data modyfikacji zgody na SMS/e-mail.
»»» commercialContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»» marketingContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»» mailSmsMessagesAgreementModified body string(date-time) false Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»» visibility body string false Widoczność
»»» idCardSeries body string false Nr dowodu osobistego - can be found at Zarządzanie polami.
»»» phone body string false Telefon - can be found at Zarządzanie polami.
»»» email body string(email) false Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»» city body string false Miasto - can be found at Zarządzanie polami.
»»» street body string false Ulica - can be found at Zarządzanie polami.
»»» houseNumber body string false Numer domu - can be found at Zarządzanie polami.
»»» premisesNumber body string false Numer lokalu - can be found at Zarządzanie polami.
»»» postcode body string false Kod pocztowy - can be found at Zarządzanie polami.
»»» invoiceEmail body string(email) false Mail do faktur - can be found at Zarządzanie polami.
»»» invoiceCity body string false Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceStreet body string false Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceHouseNumber body string false Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePremisesNumber body string false Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePostcode body string false Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceNip body string false NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceName body string false Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceBankNumber body string¦null false "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» additionalPhone body string false Telefon dodatkowy - can be found at Zarządzanie polami.
»»» additionalEmail body string(email) false Maile dodatkowe - can be found at Zarządzanie polami.
»»» additionalCity body string false Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalStreet body string false Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalHouseNumber body string false Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPremisesNumber body string false Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPostcode body string false Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» officeCity body string false Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeStreet body string false Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeHouseNumber body string false Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePremisesNumber body string false Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePostcode body string false Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» createdDate body string(date-time) false Data dodania
»»» modifiedDate body string(date-time) false none
»»» tags body [string] false none
»»» description body string false Field "opis" - can be found at Zarządzanie polami.
»»» linkedIn body string false Field "linkedin" - can be found at Zarządzanie polami.
»»» facebook body string false Field "facebook" - can be found at Zarządzanie polami.
»»» extraFields body object false User defined fields
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» extraAgreements body object false User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»» additionalProperties body boolean false none
»»» externalId body string¦null false Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»» name body string¦null false Field "nazwa firmy" - can be found at Zarządzanie polami.
»»» nip body string¦null false Field "NIP" - can be found at Zarządzanie polami.
»»» regon body string¦null false Field "REGON" - can be found at Zarządzanie polami.
»»» knfRauNumber body string¦null false Field "knf Rau Number" - can be found at Zarządzanie polami.
»»» postOffice body string¦null false Field "post office" - can be found at Zarządzanie polami.
»»» officePostOffice body string¦null false Field "office post office" - can be found at Zarządzanie polami.
»»» additionalPostOffice body string¦null false Field "register post office" - can be found at Zarządzanie polami.
»» anonymous body BaseUserDataCommonInputFields false none
»»» originsId body integer false IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").
»»» stateId body integer false ID can be found at Zarządzanie polami - click "Powiat"
»»» regionId body integer false ID can be found at Zarządzanie polami - click "Region"
»»» countryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» invoiceCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» additionalCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» officeCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»» anonymous body object false none
»»» contactPerson body string¦null false Field "osoba kontaktowa" can be found at Zarządzanie polami
»»» startDate body string(date)¦null false Field "Data rozpoczęcia działalności" can be found at Zarządzanie polami
»»» pkd body string¦null false Field "PKD" can be found at Zarządzanie polami
»»» pkdSecondary body string¦null false Field "PKD dodatkowe" can be found at Zarządzanie polami
»»» krs body string¦null false Field "KRS" can be found at Zarządzanie polami
id path integer true Company identifier
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
»»» visibility ALL_COMPANY
»»» visibility STRUCTURAL
»»» visibility ADVISER_ONLY

Example responses

200 Response

{
  "data": {
    "id": "/api/companies/15",
    "type": "Company",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead",
      "contactPerson": "Jan Kowalski",
      "startDate": "2020-02-01",
      "pkd": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM",
      "pkdSecondary": "6201Z DZIAŁALNOŚĆ ZWIĄZANA Z MARKETINGIEM",
      "krs": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Company data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data CompanyData false none none
»» id string false none none
»» type string false none none
»» attributes any false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» contactPerson string¦null false none Field "osoba kontaktowa" can be found at Zarządzanie polami
»»»» startDate string(date)¦null false none Field "Data rozpoczęcia działalności" can be found at Zarządzanie polami
»»»» pkd string¦null false none Field "PKD" can be found at Zarządzanie polami
»»»» pkdSecondary string¦null false none Field "PKD dodatkowe" can be found at Zarządzanie polami
»»»» krs string¦null false none Field "KRS" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY

Contract Extra Fields

get_contract_extra_fields

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/contract_extra_fields \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/contract_extra_fields HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json


const headers = {
  'Accept':'application/vnd.api+json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/contract_extra_fields',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/contract_extra_fields',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/contract_extra_fields', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/contract_extra_fields', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/contract_extra_fields");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/contract_extra_fields", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /contract_extra_fields

Example responses

200 Response

{
  "links": {
    "self": "/api/contract_extra_fields"
  },
  "meta": {
    "totalItems": 4
  },
  "data": [
    {
      "id": "/api/contract_extra_fields/1243",
      "type": "ContractExtraField",
      "attributes": {
        "_id": 1243,
        "label": "Product name",
        "key": "ProductName1"
      }
    }
  ]
}

An endpoint that allows to get collection of all active extra fields for sales and sales opportunities.

Responses

Status Meaning Description Schema
200 OK List of contract extra fields. Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links object false none none
»» self string false none none
» meta object false none none
»» totalItems integer false none none
» data [ContractExtraFieldData] true none none
»» id string false none none
»» type string false none none
»» attributes ExtraField false none none
»»» _id integer false read-only none
»»» label string false none none
»»» key string false none none

Employees

get_employees

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/employees \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/employees HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/employees',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/employees',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/employees', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/employees', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/employees");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/employees", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /employees

An endpoint that allows to get collection of employees data, it is possible to filter and sort according to selected fields.

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "links": {
    "self": "/customers?page%5Bpage%5D=2",
    "first": "/customers?page%5Bpage%5D=1",
    "prev": "/customers?page%5Bpage%5D=1",
    "next": "/customers?page%5Bpage%5D=3",
    "last": "/customers?page%5Bpage%5D=3"
  },
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "firstname": "James",
      "lastname": "Smith",
      "gender": "male",
      "pesel": "33072308033",
      "birthday": "2000-01-30",
      "driveLicenceDate": "2000-01-30",
      "employeeType": "person",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of employees Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links PaginationLinks false none none
»» self string false none none
»» first string false none none
»» prev string false none none
»» next string false none none
»» last string false none none
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [allOf] true none none

allOf

Name Type Required Restrictions Description
»» anonymous BaseUserData false none none
»»» _id integer false read-only none
»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»» visibility string false none Widoczność
»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»» city string false none Miasto - can be found at Zarządzanie polami.
»»» street string false none Ulica - can be found at Zarządzanie polami.
»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» createdDate string(date-time) false read-only Data dodania
»»» modifiedDate string(date-time) false read-only none
»»» tags [string] false none none
»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»» extraFields object false none User defined fields
»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»» additionalProperties boolean false none none
»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»» anonymous object false none none
»»» firstname string false none Field "Imię".
»»» lastname string false none Field "Nazwisko".
»»» gender string false none none
»»» pesel string false none none
»»» birthday string(date) false none Field "data urodzenia" can be found at Zarządzanie polami
»»» driveLicenceDate string(date) false none Field "data wydania prawa jazdy" can be found at Zarządzanie polami
»»» employeeType string false none none

and

Name Type Required Restrictions Description
»» anonymous BaseUserDataCommonOutputFields false none none
»»» state string false none Powiat - can be found at Zarządzanie polami.
»»» region string false none Region - can be found at Zarządzanie polami.
»»» country string false none none
»»» invoiceCountry string false none none
»»» additionalCountry string false none none
»»» officeCountry string false none none
»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY
gender male
gender female
employeeType person
employeeType company

post_employees

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/employees \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

POST https://app.bergsystem.pl/api/employees HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "firstname": "James",
    "lastname": "Smith",
    "gender": "male",
    "pesel": "33072308033",
    "birthday": "2000-01-30",
    "userType": 1,
    "driveLicenceDate": "2000-01-30",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/employees',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://app.bergsystem.pl/api/employees',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://app.bergsystem.pl/api/employees', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://app.bergsystem.pl/api/employees', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/employees");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://app.bergsystem.pl/api/employees", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /employees

Body parameter

{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "firstname": "James",
    "lastname": "Smith",
    "gender": "male",
    "pesel": "33072308033",
    "birthday": "2000-01-30",
    "userType": 1,
    "driveLicenceDate": "2000-01-30",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135
  }
}

An endpoint that allows to create employee with the requested data payload.

Parameters

Name In Type Required Description
body body object true none
» data body any false none
»» anonymous body BaseUserData false none
»»» _id body integer false none
»»» parentUserId body integer false "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»» personalDataProcessingAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»» commercialContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»» marketingContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»» mailSmsMessagesAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»» personalDataProcessingAgreementModified body string(date-time) false Data modyfikacji zgody na SMS/e-mail.
»»» commercialContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»» marketingContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»» mailSmsMessagesAgreementModified body string(date-time) false Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»» visibility body string false Widoczność
»»» idCardSeries body string false Nr dowodu osobistego - can be found at Zarządzanie polami.
»»» phone body string false Telefon - can be found at Zarządzanie polami.
»»» email body string(email) false Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»» city body string false Miasto - can be found at Zarządzanie polami.
»»» street body string false Ulica - can be found at Zarządzanie polami.
»»» houseNumber body string false Numer domu - can be found at Zarządzanie polami.
»»» premisesNumber body string false Numer lokalu - can be found at Zarządzanie polami.
»»» postcode body string false Kod pocztowy - can be found at Zarządzanie polami.
»»» invoiceEmail body string(email) false Mail do faktur - can be found at Zarządzanie polami.
»»» invoiceCity body string false Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceStreet body string false Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceHouseNumber body string false Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePremisesNumber body string false Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePostcode body string false Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceNip body string false NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceName body string false Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceBankNumber body string¦null false "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» additionalPhone body string false Telefon dodatkowy - can be found at Zarządzanie polami.
»»» additionalEmail body string(email) false Maile dodatkowe - can be found at Zarządzanie polami.
»»» additionalCity body string false Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalStreet body string false Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalHouseNumber body string false Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPremisesNumber body string false Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPostcode body string false Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» officeCity body string false Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeStreet body string false Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeHouseNumber body string false Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePremisesNumber body string false Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePostcode body string false Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» createdDate body string(date-time) false Data dodania
»»» modifiedDate body string(date-time) false none
»»» tags body [string] false none
»»» description body string false Field "opis" - can be found at Zarządzanie polami.
»»» linkedIn body string false Field "linkedin" - can be found at Zarządzanie polami.
»»» facebook body string false Field "facebook" - can be found at Zarządzanie polami.
»»» extraFields body object false User defined fields
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» extraAgreements body object false User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»» additionalProperties body boolean false none
»»» externalId body string¦null false Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»» name body string¦null false Field "nazwa firmy" - can be found at Zarządzanie polami.
»»» nip body string¦null false Field "NIP" - can be found at Zarządzanie polami.
»»» regon body string¦null false Field "REGON" - can be found at Zarządzanie polami.
»»» knfRauNumber body string¦null false Field "knf Rau Number" - can be found at Zarządzanie polami.
»»» postOffice body string¦null false Field "post office" - can be found at Zarządzanie polami.
»»» officePostOffice body string¦null false Field "office post office" - can be found at Zarządzanie polami.
»»» additionalPostOffice body string¦null false Field "register post office" - can be found at Zarządzanie polami.
»» anonymous body object false none
»»» firstname body string false Field "Imię".
»»» lastname body string false Field "Lastname".
»»» gender body string false none
»»» pesel body string false none
»»» birthday body string(date) false Field "data urodzenia" can be found at Zarządzanie polami
»»» userType body integer false "Stanowisko" (it's id) can be found at Stnowisko.
»»» driveLicenceDate body string(date) false Field "data wydania prawa jazdy" can be found at Zarządzanie polami
»» anonymous body BaseUserDataCommonInputFields false none
»»» originsId body integer false IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").
»»» stateId body integer false ID can be found at Zarządzanie polami - click "Powiat"
»»» regionId body integer false ID can be found at Zarządzanie polami - click "Region"
»»» countryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» invoiceCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» additionalCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» officeCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
»»» visibility ALL_COMPANY
»»» visibility STRUCTURAL
»»» visibility ADVISER_ONLY
»»» gender male
»»» gender female

Example responses

201 Response

{
  "data": {
    "id": "/api/customers/15",
    "type": "Employee",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "firstname": "James",
      "lastname": "Smith",
      "gender": "male",
      "pesel": "33072308033",
      "birthday": "2000-01-30",
      "driveLicenceDate": "2000-01-30",
      "employeeType": "person",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead"
    }
  }
}

Responses

Status Meaning Description Schema
201 Created Employee data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error
404 Not Found Resource not found. Error

Response Schema

Status Code 201

Name Type Required Restrictions Description
» data EmployeeData false none none
»» id string false none none
»» type string false none none
»» attributes Employee false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» firstname string false none Field "Imię".
»»»» lastname string false none Field "Nazwisko".
»»»» gender string false none none
»»»» pesel string false none none
»»»» birthday string(date) false none Field "data urodzenia" can be found at Zarządzanie polami
»»»» driveLicenceDate string(date) false none Field "data wydania prawa jazdy" can be found at Zarządzanie polami
»»»» employeeType string false none none

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY
gender male
gender female
employeeType person
employeeType company

get_employees_{id}

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/employees/{id} \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/employees/{id} HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/employees/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/employees/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/employees/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/employees/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/employees/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/employees/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /employees/{id}

An endpoint that allows to get employee data by its identifier.

Parameters

Name In Type Required Description
id path integer true Employee identifier
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "data": {
    "id": "/api/customers/15",
    "type": "Employee",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "firstname": "James",
      "lastname": "Smith",
      "gender": "male",
      "pesel": "33072308033",
      "birthday": "2000-01-30",
      "driveLicenceDate": "2000-01-30",
      "employeeType": "person",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Employee data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data EmployeeData false none none
»» id string false none none
»» type string false none none
»» attributes Employee false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» firstname string false none Field "Imię".
»»»» lastname string false none Field "Nazwisko".
»»»» gender string false none none
»»»» pesel string false none none
»»»» birthday string(date) false none Field "data urodzenia" can be found at Zarządzanie polami
»»»» driveLicenceDate string(date) false none Field "data wydania prawa jazdy" can be found at Zarządzanie polami
»»»» employeeType string false none none

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY
gender male
gender female
employeeType person
employeeType company

patch_employees_{id}

Code samples

# You can also use wget
curl -X PATCH https://app.bergsystem.pl/api/employees/{id} \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://app.bergsystem.pl/api/employees/{id} HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "firstname": "James",
    "lastname": "Smith",
    "gender": "male",
    "pesel": "33072308033",
    "birthday": "2000-01-30",
    "userType": 1,
    "driveLicenceDate": "2000-01-30",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/employees/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://app.bergsystem.pl/api/employees/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://app.bergsystem.pl/api/employees/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://app.bergsystem.pl/api/employees/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/employees/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://app.bergsystem.pl/api/employees/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /employees/{id}

Body parameter

{
  "data": {
    "parentUserId": 1,
    "personalDataProcessingAgreement": true,
    "commercialContentAgreement": true,
    "marketingContentAgreement": false,
    "mailSmsMessagesAgreement": true,
    "visibility": "ADVISER_ONLY",
    "idCardSeries": "STM",
    "phone": "48943210675",
    "email": "kljkasd@o2.pl",
    "city": "Wroclaw",
    "street": "Jaworowa",
    "houseNumber": "20A/77",
    "premisesNumber": "18",
    "postcode": "00-930",
    "invoiceEmail": "kljkasd@o2.pl",
    "invoiceCity": "Poznan",
    "invoiceStreet": "Topolowa",
    "invoiceHouseNumber": "30A/36",
    "invoicePremisesNumber": "37A",
    "invoicePostcode": "invoicePostcode",
    "invoiceNip": "2967751927",
    "invoiceName": "Faktura",
    "invoiceBankNumber": "string",
    "additionalPhone": "48475036329",
    "additionalEmail": "emilia05@sawicka.pl",
    "additionalCity": "Sieradz",
    "additionalStreet": "Orzeszkowej Elizy",
    "additionalHouseNumber": "89/11",
    "additionalPremisesNumber": "42/69",
    "additionalPostcode": "07-524",
    "officeCity": "Poznan",
    "officeStreet": "Cisowa",
    "officeHouseNumber": "32A",
    "officePremisesNumber": "11",
    "officePostcode": "26-536",
    "tags": [
      "VIP"
    ],
    "description": "My description",
    "linkedIn": "string",
    "facebook": "string",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "extraAgreements": "{“rodo_999999999999”: true}",
    "externalId": "EXT1",
    "name": "string",
    "nip": "string",
    "regon": "string",
    "knfRauNumber": "string",
    "postOffice": "string",
    "officePostOffice": "string",
    "additionalPostOffice": "string",
    "firstname": "James",
    "lastname": "Smith",
    "gender": "male",
    "pesel": "33072308033",
    "birthday": "2000-01-30",
    "userType": 1,
    "driveLicenceDate": "2000-01-30",
    "originsId": 1,
    "stateId": 11,
    "regionId": 12,
    "countryId": 135,
    "invoiceCountryId": 135,
    "additionalCountryId": 135,
    "officeCountryId": 135
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body any false none
»» anonymous body BaseUserData false none
»»» _id body integer false none
»»» parentUserId body integer false "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»» personalDataProcessingAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»» commercialContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»» marketingContentAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»» mailSmsMessagesAgreement body boolean false Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»» personalDataProcessingAgreementModified body string(date-time) false Data modyfikacji zgody na SMS/e-mail.
»»» commercialContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»» marketingContentAgreementModified body string(date-time) false Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»» mailSmsMessagesAgreementModified body string(date-time) false Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»» visibility body string false Widoczność
»»» idCardSeries body string false Nr dowodu osobistego - can be found at Zarządzanie polami.
»»» phone body string false Telefon - can be found at Zarządzanie polami.
»»» email body string(email) false Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»» city body string false Miasto - can be found at Zarządzanie polami.
»»» street body string false Ulica - can be found at Zarządzanie polami.
»»» houseNumber body string false Numer domu - can be found at Zarządzanie polami.
»»» premisesNumber body string false Numer lokalu - can be found at Zarządzanie polami.
»»» postcode body string false Kod pocztowy - can be found at Zarządzanie polami.
»»» invoiceEmail body string(email) false Mail do faktur - can be found at Zarządzanie polami.
»»» invoiceCity body string false Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceStreet body string false Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceHouseNumber body string false Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePremisesNumber body string false Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoicePostcode body string false Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceNip body string false NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceName body string false Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» invoiceBankNumber body string¦null false "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»» additionalPhone body string false Telefon dodatkowy - can be found at Zarządzanie polami.
»»» additionalEmail body string(email) false Maile dodatkowe - can be found at Zarządzanie polami.
»»» additionalCity body string false Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalStreet body string false Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalHouseNumber body string false Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPremisesNumber body string false Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» additionalPostcode body string false Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»» officeCity body string false Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeStreet body string false Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officeHouseNumber body string false Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePremisesNumber body string false Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» officePostcode body string false Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»» createdDate body string(date-time) false Data dodania
»»» modifiedDate body string(date-time) false none
»»» tags body [string] false none
»»» description body string false Field "opis" - can be found at Zarządzanie polami.
»»» linkedIn body string false Field "linkedin" - can be found at Zarządzanie polami.
»»» facebook body string false Field "facebook" - can be found at Zarządzanie polami.
»»» extraFields body object false User defined fields
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» extraAgreements body object false User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»» additionalProperties body boolean false none
»»» externalId body string¦null false Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»» name body string¦null false Field "nazwa firmy" - can be found at Zarządzanie polami.
»»» nip body string¦null false Field "NIP" - can be found at Zarządzanie polami.
»»» regon body string¦null false Field "REGON" - can be found at Zarządzanie polami.
»»» knfRauNumber body string¦null false Field "knf Rau Number" - can be found at Zarządzanie polami.
»»» postOffice body string¦null false Field "post office" - can be found at Zarządzanie polami.
»»» officePostOffice body string¦null false Field "office post office" - can be found at Zarządzanie polami.
»»» additionalPostOffice body string¦null false Field "register post office" - can be found at Zarządzanie polami.
»» anonymous body object false none
»»» firstname body string false Field "Imię".
»»» lastname body string false Field "Lastname".
»»» gender body string false none
»»» pesel body string false none
»»» birthday body string(date) false Field "data urodzenia" can be found at Zarządzanie polami
»»» userType body integer false "Stanowisko" (it's id) can be found at Stnowisko.
»»» driveLicenceDate body string(date) false Field "data wydania prawa jazdy" can be found at Zarządzanie polami
»» anonymous body BaseUserDataCommonInputFields false none
»»» originsId body integer false IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").
»»» stateId body integer false ID can be found at Zarządzanie polami - click "Powiat"
»»» regionId body integer false ID can be found at Zarządzanie polami - click "Region"
»»» countryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» invoiceCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» additionalCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
»»» officeCountryId body integer false Poland - '135', Germany - '122', United Kingodm - '184'
id path integer true Employee identifier
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
»»» visibility ALL_COMPANY
»»» visibility STRUCTURAL
»»» visibility ADVISER_ONLY
»»» gender male
»»» gender female

Example responses

200 Response

{
  "data": {
    "id": "/api/customers/15",
    "type": "Employee",
    "attributes": {
      "_id": 12333,
      "parentUserId": 1,
      "personalDataProcessingAgreement": true,
      "commercialContentAgreement": true,
      "marketingContentAgreement": false,
      "mailSmsMessagesAgreement": true,
      "personalDataProcessingAgreementModified": "2013-07-09T14:09:49+02:00",
      "commercialContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "marketingContentAgreementModified": "2013-07-09T14:09:49+02:00",
      "mailSmsMessagesAgreementModified": "2013-07-09T14:09:49+02:00",
      "visibility": "ADVISER_ONLY",
      "idCardSeries": "STM",
      "phone": "48943210675",
      "email": "kljkasd@o2.pl",
      "city": "Wroclaw",
      "street": "Jaworowa",
      "houseNumber": "20A/77",
      "premisesNumber": "18",
      "postcode": "00-930",
      "invoiceEmail": "kljkasd@o2.pl",
      "invoiceCity": "Poznan",
      "invoiceStreet": "Topolowa",
      "invoiceHouseNumber": "30A/36",
      "invoicePremisesNumber": "37A",
      "invoicePostcode": "invoicePostcode",
      "invoiceNip": "2967751927",
      "invoiceName": "Faktura",
      "invoiceBankNumber": "string",
      "additionalPhone": "48475036329",
      "additionalEmail": "emilia05@sawicka.pl",
      "additionalCity": "Sieradz",
      "additionalStreet": "Orzeszkowej Elizy",
      "additionalHouseNumber": "89/11",
      "additionalPremisesNumber": "42/69",
      "additionalPostcode": "07-524",
      "officeCity": "Poznan",
      "officeStreet": "Cisowa",
      "officeHouseNumber": "32A",
      "officePremisesNumber": "11",
      "officePostcode": "26-536",
      "createdDate": "2020-09-25T00:00:00+02:00",
      "modifiedDate": "2020-09-25T00:00:00+02:00",
      "tags": [
        "VIP"
      ],
      "description": "My description",
      "linkedIn": "string",
      "facebook": "string",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "extraAgreements": "{“rodo_999999999999”: true}",
      "externalId": "EXT1",
      "name": "string",
      "nip": "string",
      "regon": "string",
      "knfRauNumber": "string",
      "postOffice": "string",
      "officePostOffice": "string",
      "additionalPostOffice": "string",
      "firstname": "James",
      "lastname": "Smith",
      "gender": "male",
      "pesel": "33072308033",
      "birthday": "2000-01-30",
      "driveLicenceDate": "2000-01-30",
      "employeeType": "person",
      "state": "Krakow",
      "region": "Malopolskie",
      "country": "Polska",
      "invoiceCountry": "Polska",
      "additionalCountry": "Polska",
      "officeCountry": "Polska",
      "origins": "Lead"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Employee data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data EmployeeData false none none
»» id string false none none
»» type string false none none
»» attributes Employee false none none

allOf

Name Type Required Restrictions Description
»»» anonymous BaseUserData false none none
»»»» _id integer false read-only none
»»»» parentUserId integer false none "Opiekun" (it's id) - can be found at Zespółi ("id" column).
»»»» personalDataProcessingAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia".
»»»» commercialContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji handlowych drogą elektroniczną".
»»»» marketingContentAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na otrzymywanie informacji marketingowych drogą elektroniczną".
»»»» mailSmsMessagesAgreement boolean false none Can be found at Zarządzanie polami - "Zgoda na używanie telekomunikacyjnych urządzeń końcowych i automatycznych systemów wywołujących".
»»»» personalDataProcessingAgreementModified string(date-time) false read-only Data modyfikacji zgody na SMS/e-mail.
»»»» commercialContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie wiadomości handlowych drogą elektroniczną.
»»»» marketingContentAgreementModified string(date-time) false read-only Data modyfikacji zgody na otrzymywanie informacji marketingowych drogą elektroniczną.
»»»» mailSmsMessagesAgreementModified string(date-time) false read-only Data modyfikacja zgody na przetwarzanie danych osobowych w celu realizacji i obsługi umowy/zamówienia
»»»» visibility string false none Widoczność
»»»» idCardSeries string false none Nr dowodu osobistego - can be found at Zarządzanie polami.
»»»» phone string false none Telefon - can be found at Zarządzanie polami.
»»»» email string(email) false none Can be found at Zarządzanie polami. Field can be found at Zarządzanie polami.
»»»» city string false none Miasto - can be found at Zarządzanie polami.
»»»» street string false none Ulica - can be found at Zarządzanie polami.
»»»» houseNumber string false none Numer domu - can be found at Zarządzanie polami.
»»»» premisesNumber string false none Numer lokalu - can be found at Zarządzanie polami.
»»»» postcode string false none Kod pocztowy - can be found at Zarządzanie polami.
»»»» invoiceEmail string(email) false none Mail do faktur - can be found at Zarządzanie polami.
»»»» invoiceCity string false none Miasto (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceStreet string false none Ulica (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceHouseNumber string false none Numer domu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePremisesNumber string false none Numer lokalu (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoicePostcode string false none Kod pocztowy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceNip string false none NIP (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceName string false none Nazwa firmy (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» invoiceBankNumber string¦null false none "Numer rachunku bankowego" (in "Dane do faktur" data group) - can be found at Zarządzanie polami.
»»»» additionalPhone string false none Telefon dodatkowy - can be found at Zarządzanie polami.
»»»» additionalEmail string(email) false none Maile dodatkowe - can be found at Zarządzanie polami.
»»»» additionalCity string false none Miasto (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalStreet string false none Ulica (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalHouseNumber string false none Numer domu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPremisesNumber string false none Numer lokalu (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» additionalPostcode string false none Kod pocztowy (in "Adres korespondencyjny" data group) - can be found at Zarządzanie polami.
»»»» officeCity string false none Miasto (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeStreet string false none Ulica (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officeHouseNumber string false none Numer domu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePremisesNumber string false none Numer lokalu (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» officePostcode string false none Kod pocztowy (in "Adres biura" data group) - can be found at Zarządzanie polami.
»»»» createdDate string(date-time) false read-only Data dodania
»»»» modifiedDate string(date-time) false read-only none
»»»» tags [string] false none none
»»»» description string false none Field "opis" - can be found at Zarządzanie polami.
»»»» linkedIn string false none Field "linkedin" - can be found at Zarządzanie polami.
»»»» facebook string false none Field "facebook" - can be found at Zarządzanie polami.
»»»» extraFields object false none User defined fields
»»»»» additionalProperties any false none none

anyOf

Name Type Required Restrictions Description
»»»»»» anonymous string false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous integer false none none

or

Name Type Required Restrictions Description
»»»»»» anonymous boolean false none none

continued

Name Type Required Restrictions Description
»»»» extraAgreements object false none User defined agreements - can be found at RODO. It's JSON object with "rodo_[id_of_agreement]" as keys, and boolean as value.
»»»»» additionalProperties boolean false none none
»»»» externalId string¦null false none Field "ID zewnętrznego systemu" - can be found at Zarządzanie polami.
»»»» name string¦null false none Field "nazwa firmy" - can be found at Zarządzanie polami.
»»»» nip string¦null false none Field "NIP" - can be found at Zarządzanie polami.
»»»» regon string¦null false none Field "REGON" - can be found at Zarządzanie polami.
»»»» knfRauNumber string¦null false none Field "knf Rau Number" - can be found at Zarządzanie polami.
»»»» postOffice string¦null false none Field "post office" - can be found at Zarządzanie polami.
»»»» officePostOffice string¦null false none Field "office post office" - can be found at Zarządzanie polami.
»»»» additionalPostOffice string¦null false none Field "register post office" - can be found at Zarządzanie polami.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» firstname string false none Field "Imię".
»»»» lastname string false none Field "Nazwisko".
»»»» gender string false none none
»»»» pesel string false none none
»»»» birthday string(date) false none Field "data urodzenia" can be found at Zarządzanie polami
»»»» driveLicenceDate string(date) false none Field "data wydania prawa jazdy" can be found at Zarządzanie polami
»»»» employeeType string false none none

and

Name Type Required Restrictions Description
»»» anonymous BaseUserDataCommonOutputFields false none none
»»»» state string false none Powiat - can be found at Zarządzanie polami.
»»»» region string false none Region - can be found at Zarządzanie polami.
»»»» country string false none none
»»»» invoiceCountry string false none none
»»»» additionalCountry string false none none
»»»» officeCountry string false none none
»»»» origins string false none "Pochodzenie" can be found at Zarządzanie polami

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY
gender male
gender female
employeeType person
employeeType company

Employee Goals

get_employees_goals

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/employees/goals \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/employees/goals HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/employees/goals',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/employees/goals',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/employees/goals', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/employees/goals', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/employees/goals");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/employees/goals", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /employees/goals

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "links": {
    "self": "/customers?page%5Bpage%5D=2",
    "first": "/customers?page%5Bpage%5D=1",
    "prev": "/customers?page%5Bpage%5D=1",
    "next": "/customers?page%5Bpage%5D=3",
    "last": "/customers?page%5Bpage%5D=3"
  },
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "id": "/api/employees/goals/1",
      "type": "Plans",
      "attributes": {
        "_id": 1,
        "name": "Simple plan",
        "contractFieldType": {}
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of employees goals Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links PaginationLinks false none none
»» self string false none none
»» first string false none none
»» prev string false none none
»» next string false none none
»» last string false none none
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [PlansData] true none none
»» id string false none none
»» type string false none none
»» attributes Plans false none none
»»» _id integer false read-only none
»»» name string false none none
»»» contractFieldType object false none none

post_employees_goals

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/employees/goals \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

POST https://app.bergsystem.pl/api/employees/goals HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "name": "Simple plan",
      "contractFieldType": {}
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/employees/goals',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://app.bergsystem.pl/api/employees/goals',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://app.bergsystem.pl/api/employees/goals', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://app.bergsystem.pl/api/employees/goals', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/employees/goals");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://app.bergsystem.pl/api/employees/goals", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /employees/goals

Body parameter

{
  "data": {
    "attributes": {
      "name": "Simple plan",
      "contractFieldType": {}
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Plans false none
»»» _id body integer false none
»»» name body string false none
»»» contractFieldType body object false none
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

201 Response

{
  "data": {
    "_id": 1,
    "name": "Simple plan",
    "contractFieldType": {}
  }
}

Responses

Status Meaning Description Schema
201 Created Plans data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error
404 Not Found Resource not found. Error

Response Schema

Status Code 201

Name Type Required Restrictions Description
» data Plans false none none
»» _id integer false read-only none
»» name string false none none
»» contractFieldType object false none none

get_employees_goals_{id}

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/employees/goals/{id} \
  -H 'Accept: application/json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/employees/goals/{id} HTTP/1.1
Host: app.bergsystem.pl
Accept: application/json
X-Tenant: string


const headers = {
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/employees/goals/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/employees/goals/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/employees/goals/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/employees/goals/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/employees/goals/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/employees/goals/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /employees/goals/{id}

Parameters

Name In Type Required Description
id path integer true Goal identifier
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "data": {
    "_id": 1,
    "name": "Simple plan",
    "contractFieldType": {}
  }
}

Responses

Status Meaning Description Schema
200 OK Plans data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data Plans false none none
»» _id integer false read-only none
»» name string false none none
»» contractFieldType object false none none

Events

get_events

Code samples

# You can also use wget
curl -X GET https://app.bergsystem.pl/api/events \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://app.bergsystem.pl/api/events HTTP/1.1
Host: app.bergsystem.pl
Accept: application/vnd.api+json
X-Tenant: string


const headers = {
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/events',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://app.bergsystem.pl/api/events',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://app.bergsystem.pl/api/events', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://app.bergsystem.pl/api/events', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://app.bergsystem.pl/api/events", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /events

Parameters

Name In Type Required Description
page query integer false none
start query string false none
end query string false none
contractId query integer false none
status query string false none
calendarTypeId query string false none
userIds[] query array[string] false none
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "links": {
    "self": "/customers?page%5Bpage%5D=2",
    "first": "/customers?page%5Bpage%5D=1",
    "prev": "/customers?page%5Bpage%5D=1",
    "next": "/customers?page%5Bpage%5D=3",
    "last": "/customers?page%5Bpage%5D=3"
  },
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "id": "/api/event/1",
      "type": "Event",
      "attributes": {
        "_id": 0,
        "name": "string",
        "description": "string",
        "parentUserId": 0,
        "clientUserId": 0,
        "createUserId": 0,
        "modifyUserId": 0,
        "productId": 0,
        "contractId": 0,
        "caseId": 0,
        "active": true,
        "allDay": true,
        "endEvent": true,
        "status": true,
        "bgColor": "string",
        "fgColor": "string",
        "dateStart": "2019-08-24",
        "dateEnd": "2019-08-24",
        "typeEvent": 0,
        "visibleType": 0,
        "calendarTypeId": 0,
        "won": 0,
        "createDate": "2019-08-24",
        "seeInTimeline": true,
        "modifyDate": "2019-08-24",
        "private": true,
        "isReaded": true,
        "sendNotification": true,
        "editingByAuthorizedPersons": true,
        "location": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of events Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» links PaginationLinks false none none
»» self string false none none
»» first string false none none
»» prev string false none none
»» next string false none none
»» last string false none none
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [Event] true none none
»» id string false none none
»» type string false none none
»» attributes EventData false none none
»»» _id integer¦null false none none
»»» name string false none none
»»» description string false none none
»»» parentUserId integer false none none
»»» clientUserId integer false none none
»»» createUserId integer false none none
»»» modifyUserId integer false none none
»»» productId integer false none none
»»» contractId integer false none none
»»» caseId integer false none none
»»» active boolean false none none
»»» allDay boolean false none none
»»» endEvent boolean false none none
»»» status boolean false none none
»»» bgColor string¦null false none none
»»» fgColor string¦null false none none
»»» dateStart string(date)¦null false none none
»»» dateEnd string(date)¦null false none none
»»» typeEvent integer¦null false none none
»»» visibleType integer¦null false none none
»»» calendarTypeId integer¦null false none none
»»» won integer false none none
»»» createDate string(date)¦null false none none
»»» seeInTimeline boolean false none none
»»» modifyDate string(date)¦null false none none
»»» private boolean false none none
»»» isReaded boolean false none none
»»» sendNotification boolean false none none
»»» editingByAuthorizedPersons boolean false none none
»»» location string¦null false none none

post_events

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/events \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Tenant: string' \
  -H 'Authorization: Bearer {access-token}'

POST https://app.bergsystem.pl/api/events HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "id": "/api/event/1",
    "type": "Event",
    "attributes": {
      "_id": 0,
      "name": "string",
      "description": "string",
      "parentUserId": 0,
      "clientUserId": 0,
      "createUserId": 0,
      "modifyUserId": 0,
      "productId": 0,
      "contractId": 0,
      "caseId": 0,
      "active": true,
      "allDay": true,
      "endEvent": true,
      "status": true,
      "bgColor": "string",
      "fgColor": "string",
      "dateStart": "2019-08-24",
      "dateEnd": "2019-08-24",
      "typeEvent": 0,
      "visibleType": 0,
      "calendarTypeId": 0,
      "won": 0,
      "createDate": "2019-08-24",
      "seeInTimeline": true,
      "modifyDate": "2019-08-24",
      "private": true,
      "isReaded": true,
      "sendNotification": true,
      "editingByAuthorizedPersons": true,
      "location": "string"
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/vnd.api+json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/events',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Accept' => 'application/vnd.api+json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://app.bergsystem.pl/api/events',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Accept': 'application/vnd.api+json',
  'X-Tenant': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://app.bergsystem.pl/api/events', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/vnd.api+json',
    'Accept' => 'application/vnd.api+json',
    'X-Tenant' => 'string',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://app.bergsystem.pl/api/events', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://app.bergsystem.pl/api/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/vnd.api+json"},
        "Accept": []string{"application/vnd.api+json"},
        "X-Tenant": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://app.bergsystem.pl/api/events", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /events

Body parameter

{
  "data": {
    "id": "/api/event/1",
    "type": "Event",
    "attributes": {
      "_id": 0,
      "name": "string",
      "description": "string",
      "parentUserId": 0,
      "clientUserId": 0,
      "createUserId": 0,
      "modifyUserId": 0,
      "productId": 0,
      "contractId": 0,
      "caseId": 0,
      "active": true,
      "allDay": true,
      "endEvent": true,
      "status": true,
      "bgColor": "string",
      "fgColor": "string",
      "dateStart": "2019-08-24",
      "dateEnd": "2019-08-24",
      "typeEvent": 0,
      "visibleType": 0,
      "calendarTypeId": 0,
      "won": 0,
      "createDate": "2019-08-24",
      "seeInTimeline": true,
      "modifyDate": "2019-08-24",
      "private": true,
      "isReaded": true,
      "sendNotification": true,
      "editingByAuthorizedPersons": true,
      "location": "string"
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body Event false none
»» id body string false none
»» type body string false none
»» attributes body EventData false none
»»» _id body integer¦null false none
»»» name body string false none
»»» description body string false none
»»» parentUserId body integer false none
»»» clientUserId body integer false none
»»» createUserId body integer false none
»»» modifyUserId body integer false none
»»» productId body integer false none
»»» contractId body integer false none
»»» caseId body integer false none
»»» active body boolean false none
»»» allDay body boolean false none
»»» endEvent body boolean false none
»»» status body boolean false none
»»» bgColor body string¦null false none
»»» fgColor body string¦null false none
»»» dateStart body string(date)¦null false none
»»» dateEnd body string(date)¦null false none
»»» typeEvent body integer¦null false none
»»» visibleType body integer¦null false none
»»» calendarTypeId body integer¦null false none
»»» won body integer false none
»»» createDate body string(date)¦null false none
»»» seeInTimeline body boolean false none
»»» modifyDate body string(date)¦null false none
»»» private body boolean false none
»»» isReaded body boolean false none
»»» sendNotification body boolean false none
»»» editingByAuthorizedPersons body boolean false none
»»» location body string¦null false none
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

201 Response

{
  "data": {
    "id": "/api/event/1",
    "type": "Event",
    "attributes": {
      "_id": 0,
      "name": "string",
      "description": "string",
      "parentUserId": 0,
      "clientUserId": 0,
      "createUserId": 0,
      "modifyUserId": 0,
      "productId": 0,
      "contractId": 0,
      "caseId": 0,
      "active": true,
      "allDay": true,
      "endEvent": true,
      "status": true,
      "bgColor": "string",
      "fgColor": "string",
      "dateStart": "2019-08-24",
      "dateEnd": "2019-08-24",
      "typeEvent": 0,
      "visibleType": 0,
      "calendarTypeId": 0,
      "won": 0,
      "createDate": "2019-08-24",
      "seeInTimeline": true,
      "modifyDate": "2019-08-24",
      "private": true,
      "isReaded": true,
      "sendNotification": true,
      "editingByAuthorizedPersons": true,
      "location": "string"
    }
  }
}

Responses

Status Meaning Description Schema
201 Created Event data Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error
403 Forbidden Not enough privellages for this resource. Error
404 Not Found Resource not found. Error

Response Schema

Status Code 201

<
Name Type Required Restrictions Description
» data Event false none none
»» id string false none none
»» type string false none none
»» attributes EventData false none none
»»» _id integer¦null false none none
»»» name string false none none
»»» description string false none none
»»» parentUserId integer false none none
»»» clientUserId integer false none none
»»» createUserId integer false none none
»»» modifyUserId integer false none none
»»» productId integer false none none
»»» contractId integer false none none
»»» caseId integer false none none
»»» active boolean false none none
»»» allDay boolean false none none
»»» endEvent boolean false none none
»»» status boolean false