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 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

get_events_{id}

Code samples

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

GET https://app.bergsystem.pl/api/events/{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/events/{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/events/{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/events/{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/events/{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/events/{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/events/{id}", data)
    req.Header = headers

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

GET /events/{id}

Parameters

Name In Type Required Description
id path integer true Events 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/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 Event 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 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 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

patch_events_{id}

Code samples

# You can also use wget
curl -X PATCH https://app.bergsystem.pl/api/events/{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/events/{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": {
    "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/{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/events/{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/events/{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/events/{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/events/{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/events/{id}", data)
    req.Header = headers

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

PATCH /events/{id}

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
id path integer true Events 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/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 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 200

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 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_synchronization_{type}

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/events/synchronization/{type} \
  -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/events/synchronization/{type} HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

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

fetch('https://app.bergsystem.pl/api/events/synchronization/{type}',
{
  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/events/synchronization/{type}',
  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/events/synchronization/{type}', 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/events/synchronization/{type}', 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/synchronization/{type}");
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/events/synchronization/{type}", data)
    req.Header = headers

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

POST /events/synchronization/{type}

Body parameter

{
  "data": {
    "attributes": {
      "status": true
    }
  }
}

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
type path string true Synchronize identifier
body body object true none
» data body object false none
»» attributes body object false none
»»» status body boolean false none

Enumerated Values

Parameter Value
type outlook
type google

Example responses

400 Response

{
  "errors": [
    {
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The data are correct. None
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

get_events_event_types

Code samples

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

GET https://app.bergsystem.pl/api/events/event_types 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/event_types',
{
  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/event_types',
  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/event_types', 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/event_types', 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/event_types");
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/event_types", data)
    req.Header = headers

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

GET /events/event_types

PLACEHOLDER

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

{
  "meta": {
    "totalItems": 5
  },
  "data": [
    {
      "_id": 12,
      "name": "Simple calendar type",
      "bgColor": null,
      "fontAwesome": "phone"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of calendar type 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
» meta object false none none
»» totalItems integer false none none
» data [CalendarEventType] true none none
»» _id integer false read-only none
»» name string false none none
»» bgColor string¦null false none none
»» fontAwesome string false none none

get_events_event_types_{id}

Code samples

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

GET https://app.bergsystem.pl/api/events/event_types/{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/events/event_types/{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/events/event_types/{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/events/event_types/{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/events/event_types/{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/events/event_types/{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/events/event_types/{id}", data)
    req.Header = headers

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

GET /events/event_types/{id}

Parameters

Name In Type Required Description
id path integer true Calendar event type 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/events/types/1",
    "type": "CalendarType",
    "attributes": {
      "_id": 12,
      "name": "Simple calendar type",
      "bgColor": null,
      "fontAwesome": "phone"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Calendar type 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 CalendarEventTypeData false none none
»» id string false none none
»» type string false none none
»» attributes CalendarEventType false none none
»»» _id integer false read-only none
»»» name string false none none
»»» bgColor string¦null false none none
»»» fontAwesome string false none none

Files

post_files

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/files \
  -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/files HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "type": "sales",
      "name": "string",
      "extension": "string",
      "base64": "string",
      "objectId": 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/files',
{
  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/files',
  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/files', 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/files', 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/files");
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/files", data)
    req.Header = headers

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

POST /files

Body parameter

{
  "data": {
    "attributes": {
      "type": "sales",
      "name": "string",
      "extension": "string",
      "base64": "string",
      "objectId": 0
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body object false none
»»» type body string false type of resource
»»» name body string false file name
»»» extension body string false file extension
»»» base64 body string false file base64
»»» objectId body integer false resource id
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
»»» type sales
»»» type sales_opportunity
»»» type user
»»» type event

Example responses

400 Response

{
  "errors": [
    {
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The data are correct. None
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

get_files

Code samples

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

GET https://app.bergsystem.pl/api/files?type=sales 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/files?type=sales',
{
  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/files',
  params: {
  'type' => 'string'
}, 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/files', params={
  'type': 'sales'
}, 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/files', 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/files?type=sales");
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/files", data)
    req.Header = headers

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

GET /files

Parameters

Name In Type Required Description
type query string true Type for file
id query integer false id of object like user data, sale id etc
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
type sales
type sales_opportunity
type user
type event

Example responses

200 Response

{
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "id": "/api/file/1",
      "type": "File",
      "attributes": {
        "_id": "string",
        "_type": "string",
        "name": "string",
        "extension": "string",
        "base64": "string",
        "objectId": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of files 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
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [FileData] true none none
»» id string false none none
»» type string false none none
»» attributes File false none none
»»» _id string false none none
»»» _type string false none none
»»» name string false none none
»»» extension string false none none
»»» base64 string false none none
»»» objectId string false none none

get_files_{id}

Code samples

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

GET https://app.bergsystem.pl/api/files/{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/files/{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/files/{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/files/{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/files/{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/files/{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/files/{id}", data)
    req.Header = headers

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

GET /files/{id}

Parameters

Name In Type Required Description
id path string true File 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": "string",
    "type": "string",
    "attributes": {
      "_id": "string",
      "_type": "string",
      "name": "string",
      "extension": "string",
      "base64": "string",
      "objectId": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK File 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 object false none none
»» id string false none none
»» type string false none none
»» attributes File false none none
»»» _id string false none none
»»» _type string false none none
»»» name string false none none
»»» extension string false none none
»»» base64 string false none none
»»» objectId string false none none

Goals

get_goals

Code samples

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

GET https://app.bergsystem.pl/api/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/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/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/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/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/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/goals", data)
    req.Header = headers

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

GET /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/goals/1",
      "type": "Goal",
      "attributes": {
        "_id": 1,
        "name": "Simple category",
        "goalDay": 0,
        "goalWeek": 0,
        "goalMonth": 0,
        "goalQuarter": 0,
        "goalHalfYear": 0,
        "goalYear": 0,
        "active": true
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of 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 [GoalData] true none none
»» id string false none none
»» type string false none none
»» attributes Goal false none none
»»» _id integer false read-only none
»»» name string false none none
»»» goalDay integer false none none
»»» goalWeek integer false none none
»»» goalMonth integer false none none
»»» goalQuarter integer false none none
»»» goalHalfYear integer false none none
»»» goalYear integer false none none
»»» active boolean false none none

post_goals

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/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/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 category",
      "goalDay": 0,
      "goalWeek": 0,
      "goalMonth": 0,
      "goalQuarter": 0,
      "goalHalfYear": 0,
      "goalYear": 0,
      "active": true
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/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/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/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/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/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/goals", data)
    req.Header = headers

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

POST /goals

Body parameter

{
  "data": {
    "attributes": {
      "name": "Simple category",
      "goalDay": 0,
      "goalWeek": 0,
      "goalMonth": 0,
      "goalQuarter": 0,
      "goalHalfYear": 0,
      "goalYear": 0,
      "active": true
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Goal false none
»»» _id body integer false none
»»» name body string false none
»»» goalDay body integer false none
»»» goalWeek body integer false none
»»» goalMonth body integer false none
»»» goalQuarter body integer false none
»»» goalHalfYear body integer false none
»»» goalYear body integer false none
»»» active body boolean 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 category",
    "goalDay": 0,
    "goalWeek": 0,
    "goalMonth": 0,
    "goalQuarter": 0,
    "goalHalfYear": 0,
    "goalYear": 0,
    "active": true
  }
}

Responses

Status Meaning Description Schema
201 Created Goal type 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 Goal false none none
»» _id integer false read-only none
»» name string false none none
»» goalDay integer false none none
»» goalWeek integer false none none
»» goalMonth integer false none none
»» goalQuarter integer false none none
»» goalHalfYear integer false none none
»» goalYear integer false none none
»» active boolean false none none

get_goals_{id}

Code samples

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

GET https://app.bergsystem.pl/api/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/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/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/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/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/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/goals/{id}", data)
    req.Header = headers

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

GET /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 category",
    "goalDay": 0,
    "goalWeek": 0,
    "goalMonth": 0,
    "goalQuarter": 0,
    "goalHalfYear": 0,
    "goalYear": 0,
    "active": true
  }
}

Responses

Status Meaning Description Schema
200 OK Goal type 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 Goal false none none
»» _id integer false read-only none
»» name string false none none
»» goalDay integer false none none
»» goalWeek integer false none none
»» goalMonth integer false none none
»» goalQuarter integer false none none
»» goalHalfYear integer false none none
»» goalYear integer false none none
»» active boolean false none none

Installments

get_installments

Code samples

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

GET https://app.bergsystem.pl/api/installments 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/installments',
{
  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/installments',
  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/installments', 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/installments', 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/installments");
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/installments", data)
    req.Header = headers

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

GET /installments

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
filter%5BcontractId%5D query integer false Filter by contract id.

Detailed descriptions

filter%5BcontractId%5D: Filter by contract id.

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": 0,
      "productId": 0,
      "contractId": 0,
      "active": true,
      "addDate": "2019-08-24",
      "removeData": "2019-08-24",
      "paymentDate": "2019-08-24",
      "price": "string",
      "priceCommission": "string",
      "status": "string",
      "changeUserId": 0,
      "description": "string",
      "paymentNumber": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of donations 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 [Donation] true none none
»» id integer false none none
»» productId integer¦null false none none
»» contractId integer¦null false none none
»» active boolean false none none
»» addDate string(date)¦null false none none
»» removeData string(date)¦null false none none
»» paymentDate string(date)¦null false none none
»» price string¦null false none none
»» priceCommission string¦null false none none
»» status string¦null false none none
»» changeUserId integer¦null false none none
»» description string¦null false none none
»» paymentNumber integer¦null false none none

post_installments

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/installments \
  -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/installments HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "id": 0,
      "productId": 0,
      "contractId": 0,
      "active": true,
      "addDate": "2019-08-24",
      "removeData": "2019-08-24",
      "paymentDate": "2019-08-24",
      "price": "string",
      "priceCommission": "string",
      "status": "string",
      "changeUserId": 0,
      "description": "string",
      "paymentNumber": 0
    }
  }
}';
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/installments',
{
  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/installments',
  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/installments', 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/installments', 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/installments");
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/installments", data)
    req.Header = headers

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

POST /installments

Body parameter

{
  "data": {
    "attributes": {
      "id": 0,
      "productId": 0,
      "contractId": 0,
      "active": true,
      "addDate": "2019-08-24",
      "removeData": "2019-08-24",
      "paymentDate": "2019-08-24",
      "price": "string",
      "priceCommission": "string",
      "status": "string",
      "changeUserId": 0,
      "description": "string",
      "paymentNumber": 0
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Donation false none
»»» id body integer false none
»»» productId body integer¦null false none
»»» contractId body integer¦null false none
»»» active body boolean false none
»»» addDate body string(date)¦null false none
»»» removeData body string(date)¦null false none
»»» paymentDate body string(date)¦null false none
»»» price body string¦null false none
»»» priceCommission body string¦null false none
»»» status body string¦null false none
»»» changeUserId body integer¦null false none
»»» description body string¦null false none
»»» paymentNumber body integer¦null false none
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
filter%5BcontractId%5D query integer false Filter by contract id.

Detailed descriptions

filter%5BcontractId%5D: Filter by contract id.

Example responses

201 Response

{
  "data": {
    "id": 0,
    "productId": 0,
    "contractId": 0,
    "active": true,
    "addDate": "2019-08-24",
    "removeData": "2019-08-24",
    "paymentDate": "2019-08-24",
    "price": "string",
    "priceCommission": "string",
    "status": "string",
    "changeUserId": 0,
    "description": "string",
    "paymentNumber": 0
  }
}

Responses

Status Meaning Description Schema
201 Created Donation 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 Donation false none none
»» id integer false none none
»» productId integer¦null false none none
»» contractId integer¦null false none none
»» active boolean false none none
»» addDate string(date)¦null false none none
»» removeData string(date)¦null false none none
»» paymentDate string(date)¦null false none none
»» price string¦null false none none
»» priceCommission string¦null false none none
»» status string¦null false none none
»» changeUserId integer¦null false none none
»» description string¦null false none none
»» paymentNumber integer¦null false none none

get_installments_{id}

Code samples

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

GET https://app.bergsystem.pl/api/installments/{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/installments/{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/installments/{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/installments/{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/installments/{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/installments/{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/installments/{id}", data)
    req.Header = headers

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

GET /installments/{id}

Parameters

Name In Type Required Description
id path integer true Installment 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": 0,
    "productId": 0,
    "contractId": 0,
    "active": true,
    "addDate": "2019-08-24",
    "removeData": "2019-08-24",
    "paymentDate": "2019-08-24",
    "price": "string",
    "priceCommission": "string",
    "status": "string",
    "changeUserId": 0,
    "description": "string",
    "paymentNumber": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Donation 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 Donation false none none
»» id integer false none none
»» productId integer¦null false none none
»» contractId integer¦null false none none
»» active boolean false none none
»» addDate string(date)¦null false none none
»» removeData string(date)¦null false none none
»» paymentDate string(date)¦null false none none
»» price string¦null false none none
»» priceCommission string¦null false none none
»» status string¦null false none none
»» changeUserId integer¦null false none none
»» description string¦null false none none
»» paymentNumber integer¦null false none none

Insurance Companies

get_insurance_companies

Code samples

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

GET https://app.bergsystem.pl/api/insurance_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/insurance_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/insurance_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/insurance_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/insurance_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/insurance_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/insurance_companies", data)
    req.Header = headers

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

GET /insurance_companies

Parameters

Name In Type Required Description
filter%sytem%5D query string false Filter by user's system.
filter%5Bkeycloak%5D query string false Filter by keycloak user name.
filter%nip%5D query string false Filter by user's nip.
filter%regon%5D query string false Filter by user's regon.
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Detailed descriptions

filter%sytem%5D: Filter by user's system.

filter%5Bkeycloak%5D: Filter by keycloak user name.

filter%nip%5D: Filter by user's nip.

filter%regon%5D: Filter by user's regon.

Example responses

200 Response

{
  "links": {
    "self": "/insurance_logins"
  },
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "program": "string",
      "producer": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of insurances 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 Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [Insurance] true none none
»» program string false none none
»» producer string false none none

Invoices

get_invoicesprod

Code samples

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

GET https://app.bergsystem.pl/api/invoicesprod 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/invoicesprod',
{
  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/invoicesprod',
  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/invoicesprod', 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/invoicesprod', 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/invoicesprod");
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/invoicesprod", data)
    req.Header = headers

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

GET /invoicesprod

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/goals/1",
      "type": "InvoiceProduct",
      "attributes": {
        "_id": 1,
        "name": "Simple invoice product",
        "senderType": 1
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of invoice products 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 [InvoiceProductData] true none none
»» id string false none none
»» type string false none none
»» attributes InvoiceProduct false none none
»»» _id integer false read-only none
»»» name string false none none
»»» senderType object false none none

post_invoicesprod

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/invoicesprod \
  -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/invoicesprod 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 invoice product",
      "senderType": 1
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/invoicesprod',
{
  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/invoicesprod',
  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/invoicesprod', 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/invoicesprod', 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/invoicesprod");
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/invoicesprod", data)
    req.Header = headers

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

POST /invoicesprod

Body parameter

{
  "data": {
    "attributes": {
      "name": "Simple invoice product",
      "senderType": 1
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body InvoiceProduct false none
»»» _id body integer false none
»»» name body string false none
»»» senderType 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 invoice product",
    "senderType": 1
  }
}

Responses

Status Meaning Description Schema
201 Created Invoice product 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 InvoiceProduct false none none
»» _id integer false read-only none
»» name string false none none
»» senderType object false none none

get_invoicesprod_{id}

Code samples

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

GET https://app.bergsystem.pl/api/invoicesprod/{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/invoicesprod/{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/invoicesprod/{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/invoicesprod/{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/invoicesprod/{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/invoicesprod/{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/invoicesprod/{id}", data)
    req.Header = headers

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

GET /invoicesprod/{id}

Parameters

Name In Type Required Description
id path integer true Invoice product 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 invoice product",
    "senderType": 1
  }
}

Responses

Status Meaning Description Schema
200 OK Invoice product 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 InvoiceProduct false none none
»» _id integer false read-only none
»» name string false none none
»» senderType object false none none

Logged Users

get_me

Code samples

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

GET https://app.bergsystem.pl/api/me 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/me',
{
  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/me',
  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/me', 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/me', 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/me");
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/me", data)
    req.Header = headers

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

GET /me

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

{
  "data": [
    {
      "_id": 1,
      "name": "string",
      "firstName": "string",
      "lastName": "string",
      "imagePath": "string",
      "userTypeName": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Logged user 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 [Me] true none none
»» _id integer false read-only none
»» name string false none none
»» firstName string false none none
»» lastName string false none none
»» imagePath string false none none
»» userTypeName string false none none

Notifications

get_notifications

Code samples

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

GET https://app.bergsystem.pl/api/notifications 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/notifications',
{
  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/notifications',
  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/notifications', 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/notifications', 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/notifications");
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/notifications", data)
    req.Header = headers

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

GET /notifications

Parameters

Name In Type Required Description
page query integer false none
notificationType query NotificationType false none
readed query integer false none
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
notificationType sale
notificationType sale_opportunity
notificationType contact
notificationType event
notificationType settlement
notificationType plan
notificationType birthday
notificationType intranet
notificationType import
notificationType export
readed 0
readed 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/notification/1",
      "type": "Notification",
      "attributes": {
        "_id": 0,
        "name": "string",
        "descritpion": "string",
        "employeeId": 0,
        "clientId": 0,
        "clientCompanyEmployee": 0,
        "contractId": 0,
        "calendarId": 0,
        "system": 0,
        "active": true,
        "createdDate": "2019-08-24",
        "linkAction": "string",
        "module": "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 [Notification] true none none
»» id string false none none
»» type string false none none
»» attributes NotificationData false none none
»»» _id integer false none none
»»» name string false none none
»»» descritpion string false none none
»»» employeeId integer false none none
»»» clientId integer¦null false none none
»»» clientCompanyEmployee integer¦null false none none
»»» contractId integer¦null false none none
»»» calendarId integer¦null false none none
»»» system integer¦null false none none
»»» active boolean false none none
»»» createdDate string(date)¦null false none none
»»» linkAction string¦null false none none
»»» module string¦null false none none

post_notifications_readed

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/notifications/readed \
  -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/notifications/readed HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

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

fetch('https://app.bergsystem.pl/api/notifications/readed',
{
  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/notifications/readed',
  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/notifications/readed', 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/notifications/readed', 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/notifications/readed");
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/notifications/readed", data)
    req.Header = headers

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

POST /notifications/readed

Body parameter

{
  "data": {
    "attributes": {
      "status": true
    }
  }
}

Parameters

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

Example responses

400 Response

{
  "errors": [
    {
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The data are correct. None
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

post_notifications_{id}_readed

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/notifications/{id}/readed \
  -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/notifications/{id}/readed HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

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

fetch('https://app.bergsystem.pl/api/notifications/{id}/readed',
{
  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/notifications/{id}/readed',
  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/notifications/{id}/readed', 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/notifications/{id}/readed', 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/notifications/{id}/readed");
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/notifications/{id}/readed", data)
    req.Header = headers

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

POST /notifications/{id}/readed

Body parameter

{
  "data": {
    "attributes": {
      "status": true
    }
  }
}

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
id path integer true Notification identifier
body body object true none
» data body object false none
»» attributes body object false none
»»» status body boolean false none

Example responses

400 Response

{
  "errors": [
    {
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The data are correct. None
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

Password

post_password

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/password \
  -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/password HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

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

fetch('https://app.bergsystem.pl/api/password',
{
  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/password',
  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/password', 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/password', 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/password");
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/password", data)
    req.Header = headers

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

POST /password

Body parameter

{
  "data": {
    "attributes": {
      "plainPassword": "string",
      "password": "string"
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body object false none
»»» plainPassword body string false old password
»»» password body string false new password
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

400 Response

{
  "errors": [
    {
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The data are correct. None
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

Paychecks

get_paychecks

Code samples

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

GET https://app.bergsystem.pl/api/paychecks 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/paychecks',
{
  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/paychecks',
  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/paychecks', 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/paychecks', 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/paychecks");
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/paychecks", data)
    req.Header = headers

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

GET /paychecks

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": 0,
      "contractId": 0,
      "contractDonationId": 0,
      "active": true,
      "status": "string",
      "changeDate": "2019-08-24",
      "addDate": "2019-08-24",
      "removeDate": "2019-08-24",
      "userId": 0,
      "addUserId": 0,
      "changeUserId": 0,
      "removeUserId": 0,
      "acceptedUserId": 0,
      "paymentUserId": 0,
      "resetUserId": 0,
      "resetDate": "2019-08-24",
      "paymentStatus": "string",
      "amount": "string",
      "points": "string",
      "pricePoints": "string",
      "description": "string",
      "importId": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of paychecks 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 [Paycheck] true none none
»» id integer false none none
»» contractId integer false none none
»» contractDonationId integer false none none
»» active boolean false none none
»» status string false none none
»» changeDate string(date)¦null false none none
»» addDate string(date) false none none
»» removeDate string(date)¦null false none none
»» userId integer false none none
»» addUserId integer false none none
»» changeUserId integer false none none
»» removeUserId integer false none none
»» acceptedUserId integer false none none
»» paymentUserId integer false none none
»» resetUserId integer false none none
»» resetDate string(date)¦null false none none
»» paymentStatus string false none none
»» amount string false none none
»» points string false none none
»» pricePoints string false none none
»» description string false none none
»» importId integer false none none

post_paychecks

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/paychecks \
  -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/paychecks HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "id": 0,
      "contractId": 0,
      "contractDonationId": 0,
      "active": true,
      "status": "string",
      "changeDate": "2019-08-24",
      "addDate": "2019-08-24",
      "removeDate": "2019-08-24",
      "userId": 0,
      "addUserId": 0,
      "changeUserId": 0,
      "removeUserId": 0,
      "acceptedUserId": 0,
      "paymentUserId": 0,
      "resetUserId": 0,
      "resetDate": "2019-08-24",
      "paymentStatus": "string",
      "amount": "string",
      "points": "string",
      "pricePoints": "string",
      "description": "string",
      "importId": 0
    }
  }
}';
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/paychecks',
{
  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/paychecks',
  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/paychecks', 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/paychecks', 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/paychecks");
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/paychecks", data)
    req.Header = headers

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

POST /paychecks

Body parameter

{
  "data": {
    "attributes": {
      "id": 0,
      "contractId": 0,
      "contractDonationId": 0,
      "active": true,
      "status": "string",
      "changeDate": "2019-08-24",
      "addDate": "2019-08-24",
      "removeDate": "2019-08-24",
      "userId": 0,
      "addUserId": 0,
      "changeUserId": 0,
      "removeUserId": 0,
      "acceptedUserId": 0,
      "paymentUserId": 0,
      "resetUserId": 0,
      "resetDate": "2019-08-24",
      "paymentStatus": "string",
      "amount": "string",
      "points": "string",
      "pricePoints": "string",
      "description": "string",
      "importId": 0
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Paycheck false none
»»» id body integer false none
»»» contractId body integer false none
»»» contractDonationId body integer false none
»»» active body boolean false none
»»» status body string false none
»»» changeDate body string(date)¦null false none
»»» addDate body string(date) false none
»»» removeDate body string(date)¦null false none
»»» userId body integer false none
»»» addUserId body integer false none
»»» changeUserId body integer false none
»»» removeUserId body integer false none
»»» acceptedUserId body integer false none
»»» paymentUserId body integer false none
»»» resetUserId body integer false none
»»» resetDate body string(date)¦null false none
»»» paymentStatus body string false none
»»» amount body string false none
»»» points body string false none
»»» pricePoints body string false none
»»» description body string false none
»»» importId body integer 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": 0,
    "contractId": 0,
    "contractDonationId": 0,
    "active": true,
    "status": "string",
    "changeDate": "2019-08-24",
    "addDate": "2019-08-24",
    "removeDate": "2019-08-24",
    "userId": 0,
    "addUserId": 0,
    "changeUserId": 0,
    "removeUserId": 0,
    "acceptedUserId": 0,
    "paymentUserId": 0,
    "resetUserId": 0,
    "resetDate": "2019-08-24",
    "paymentStatus": "string",
    "amount": "string",
    "points": "string",
    "pricePoints": "string",
    "description": "string",
    "importId": 0
  }
}

Responses

Status Meaning Description Schema
201 Created Paycheck 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 Paycheck false none none
»» id integer false none none
»» contractId integer false none none
»» contractDonationId integer false none none
»» active boolean false none none
»» status string false none none
»» changeDate string(date)¦null false none none
»» addDate string(date) false none none
»» removeDate string(date)¦null false none none
»» userId integer false none none
»» addUserId integer false none none
»» changeUserId integer false none none
»» removeUserId integer false none none
»» acceptedUserId integer false none none
»» paymentUserId integer false none none
»» resetUserId integer false none none
»» resetDate string(date)¦null false none none
»» paymentStatus string false none none
»» amount string false none none
»» points string false none none
»» pricePoints string false none none
»» description string false none none
»» importId integer false none none

get_paychecks_{id}

Code samples

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

GET https://app.bergsystem.pl/api/paychecks/{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/paychecks/{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/paychecks/{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/paychecks/{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/paychecks/{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/paychecks/{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/paychecks/{id}", data)
    req.Header = headers

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

GET /paychecks/{id}

Parameters

Name In Type Required Description
id path integer true Paycheck 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": 0,
    "contractId": 0,
    "contractDonationId": 0,
    "active": true,
    "status": "string",
    "changeDate": "2019-08-24",
    "addDate": "2019-08-24",
    "removeDate": "2019-08-24",
    "userId": 0,
    "addUserId": 0,
    "changeUserId": 0,
    "removeUserId": 0,
    "acceptedUserId": 0,
    "paymentUserId": 0,
    "resetUserId": 0,
    "resetDate": "2019-08-24",
    "paymentStatus": "string",
    "amount": "string",
    "points": "string",
    "pricePoints": "string",
    "description": "string",
    "importId": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Paycheck 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 Paycheck false none none
»» id integer false none none
»» contractId integer false none none
»» contractDonationId integer false none none
»» active boolean false none none
»» status string false none none
»» changeDate string(date)¦null false none none
»» addDate string(date) false none none
»» removeDate string(date)¦null false none none
»» userId integer false none none
»» addUserId integer false none none
»» changeUserId integer false none none
»» removeUserId integer false none none
»» acceptedUserId integer false none none
»» paymentUserId integer false none none
»» resetUserId integer false none none
»» resetDate string(date)¦null false none none
»» paymentStatus string false none none
»» amount string false none none
»» points string false none none
»» pricePoints string false none none
»» description string false none none
»» importId integer false none none

Payments

get_payments

Code samples

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

GET https://app.bergsystem.pl/api/payments 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/payments',
{
  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/payments',
  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/payments', 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/payments', 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/payments");
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/payments", data)
    req.Header = headers

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

GET /payments

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
filter%5BcontractId%5D query integer false Filter by contract id.

Detailed descriptions

filter%5BcontractId%5D: Filter by contract id.

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": 0,
      "productId": 0,
      "contractId": 0,
      "active": true,
      "addDate": "2019-08-24",
      "removeData": "2019-08-24",
      "paymentDate": "2019-08-24",
      "price": "string",
      "priceCommission": "string",
      "status": "string",
      "changeUserId": 0,
      "description": "string",
      "paymentNumber": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of donations 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 [Donation] true none none
»» id integer false none none
»» productId integer¦null false none none
»» contractId integer¦null false none none
»» active boolean false none none
»» addDate string(date)¦null false none none
»» removeData string(date)¦null false none none
»» paymentDate string(date)¦null false none none
»» price string¦null false none none
»» priceCommission string¦null false none none
»» status string¦null false none none
»» changeUserId integer¦null false none none
»» description string¦null false none none
»» paymentNumber integer¦null false none none

post_payments

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/payments \
  -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/payments HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "id": 0,
      "productId": 0,
      "contractId": 0,
      "active": true,
      "addDate": "2019-08-24",
      "removeData": "2019-08-24",
      "paymentDate": "2019-08-24",
      "price": "string",
      "priceCommission": "string",
      "status": "string",
      "changeUserId": 0,
      "description": "string",
      "paymentNumber": 0
    }
  }
}';
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/payments',
{
  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/payments',
  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/payments', 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/payments', 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/payments");
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/payments", data)
    req.Header = headers

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

POST /payments

Body parameter

{
  "data": {
    "attributes": {
      "id": 0,
      "productId": 0,
      "contractId": 0,
      "active": true,
      "addDate": "2019-08-24",
      "removeData": "2019-08-24",
      "paymentDate": "2019-08-24",
      "price": "string",
      "priceCommission": "string",
      "status": "string",
      "changeUserId": 0,
      "description": "string",
      "paymentNumber": 0
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Donation false none
»»» id body integer false none
»»» productId body integer¦null false none
»»» contractId body integer¦null false none
»»» active body boolean false none
»»» addDate body string(date)¦null false none
»»» removeData body string(date)¦null false none
»»» paymentDate body string(date)¦null false none
»»» price body string¦null false none
»»» priceCommission body string¦null false none
»»» status body string¦null false none
»»» changeUserId body integer¦null false none
»»» description body string¦null false none
»»» paymentNumber body integer¦null false none
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
filter%5BcontractId%5D query integer false Filter by contract id.

Detailed descriptions

filter%5BcontractId%5D: Filter by contract id.

Example responses

201 Response

{
  "data": {
    "id": 0,
    "productId": 0,
    "contractId": 0,
    "active": true,
    "addDate": "2019-08-24",
    "removeData": "2019-08-24",
    "paymentDate": "2019-08-24",
    "price": "string",
    "priceCommission": "string",
    "status": "string",
    "changeUserId": 0,
    "description": "string",
    "paymentNumber": 0
  }
}

Responses

Status Meaning Description Schema
201 Created Donation 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 Donation false none none
»» id integer false none none
»» productId integer¦null false none none
»» contractId integer¦null false none none
»» active boolean false none none
»» addDate string(date)¦null false none none
»» removeData string(date)¦null false none none
»» paymentDate string(date)¦null false none none
»» price string¦null false none none
»» priceCommission string¦null false none none
»» status string¦null false none none
»» changeUserId integer¦null false none none
»» description string¦null false none none
»» paymentNumber integer¦null false none none

get_payments_{id}

Code samples

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

GET https://app.bergsystem.pl/api/payments/{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/payments/{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/payments/{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/payments/{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/payments/{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/payments/{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/payments/{id}", data)
    req.Header = headers

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

GET /payments/{id}

Parameters

Name In Type Required Description
id path integer true Payment 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": 0,
    "productId": 0,
    "contractId": 0,
    "active": true,
    "addDate": "2019-08-24",
    "removeData": "2019-08-24",
    "paymentDate": "2019-08-24",
    "price": "string",
    "priceCommission": "string",
    "status": "string",
    "changeUserId": 0,
    "description": "string",
    "paymentNumber": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Donation 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 Donation false none none
»» id integer false none none
»» productId integer¦null false none none
»» contractId integer¦null false none none
»» active boolean false none none
»» addDate string(date)¦null false none none
»» removeData string(date)¦null false none none
»» paymentDate string(date)¦null false none none
»» price string¦null false none none
»» priceCommission string¦null false none none
»» status string¦null false none none
»» changeUserId integer¦null false none none
»» description string¦null false none none
»» paymentNumber integer¦null false none none

Products

get_products

Code samples

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

GET https://app.bergsystem.pl/api/products 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/products',
{
  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/products',
  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/products', 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/products', 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/products");
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/products", data)
    req.Header = headers

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

GET /products

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/products/1",
      "type": "Product",
      "attributes": {
        "_id": 1,
        "name": "string",
        "producer": {},
        "category": {},
        "conferenceCategory": {},
        "productType": {},
        "provider": {},
        "priceComission": "string",
        "points": 0,
        "place": "string",
        "status": "string",
        "parentUser": {},
        "limit": 0,
        "dateStart": "string",
        "dateEnd": "string",
        "dateLimit": "string",
        "type": "string",
        "time": "string",
        "description": "string",
        "price": "string",
        "priceClient": "string",
        "pricePlus": "string",
        "priceClientPlus": "string",
        "wwwPage": "string",
        "active": true,
        "conference": 0,
        "pointsType": "string",
        "priceType": "string",
        "underProduct": {},
        "emailAddress": "string",
        "mailTitleConfirm": "string",
        "mailTitleInvitation": "string",
        "vat": 0,
        "currency": {},
        "amountCurrency": 0,
        "series": "string",
        "proposal": "string",
        "valuation": 0,
        "useCountType": "string",
        "risk": "string",
        "aliorCountProduct": "string",
        "expired": "2019-08-24T14:15:22Z",
        "beforeExpired": "2019-08-24T14:15:22Z",
        "tags": "string",
        "paymentType": "string",
        "withCurrency": "string",
        "withCommissions": "string",
        "withPoints": "string",
        "addToContract": true,
        "backMessage": "string",
        "bannerPathImage": "string",
        "sales": {},
        "file": {},
        "priorityComission": true,
        "minPrice": "string",
        "maxPrice": "string",
        "managementFee": "string",
        "repurchase": "string",
        "withoutFee": "string",
        "investmentHorizon": "string",
        "frequencyWithdrawals": "string",
        "percent": "string",
        "percentForCompany": "string",
        "percentForCompanyResumption": "string",
        "segment": "string",
        "distributionPayment": "string",
        "companyCommissionEditable": "string",
        "needLogin": true,
        "confirmNow": 0,
        "conferenceProduct": {},
        "showInIntranet": true,
        "oneProductStep": "string",
        "productNumberFrom": "string",
        "productNumberTo": "string",
        "contractType": {},
        "dateOfRedemption": "2019-08-24T14:15:22Z",
        "bondType": "string",
        "goalType": "string",
        "priceAddPayment": 0,
        "numberOfShares": 0,
        "otherCommissionForResumption": "string",
        "fullButton": "string",
        "buttonColor": "string",
        "buttonTextColor": "string",
        "outsideDescription": "string",
        "import": {},
        "confirmSms": true,
        "updateUserDataData": true,
        "productDetails": {},
        "nowProductDetail": {},
        "productDetailsWasCheck": true,
        "invoiceProduct": {},
        "formTemplate": 0,
        "headOfCommission": "string",
        "memberOfCommission": "string",
        "memberOfCommissionTwo": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of products 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 [ProductData] true none none
»» id string false none none
»» type string false none none
»» attributes Product false none none
»»» _id integer false read-only none
»»» name string false none none
»»» producer object false none none
»»» category object false none none
»»» conferenceCategory object false none none
»»» productType object false none none
»»» provider object false none none
»»» priceComission string false none none
»»» points integer false none none
»»» place string false none none
»»» status string false none none
»»» parentUser object false none none
»»» limit integer false none none
»»» dateStart string false none none
»»» dateEnd string false none none
»»» dateLimit string false none none
»»» type string false none none
»»» time string false none none
»»» description string false none none
»»» price string false none none
»»» priceClient string false none none
»»» pricePlus string false none none
»»» priceClientPlus string false none none
»»» wwwPage string false none none
»»» active boolean false none none
»»» conference integer false none none
»»» pointsType string false none none
»»» priceType string false none none
»»» underProduct object false none none
»»» emailAddress string false none none
»»» mailTitleConfirm string false none none
»»» mailTitleInvitation string false none none
»»» vat integer false none none
»»» currency object false none none
»»» amountCurrency integer false none none
»»» series string false none none
»»» proposal string false none none
»»» valuation integer false none none
»»» useCountType string false none none
»»» risk string false none none
»»» aliorCountProduct string false none none
»»» expired string(date-time) false none none
»»» beforeExpired string(date-time) false none none
»»» tags string false none none
»»» paymentType string false none none
»»» withCurrency string false none none
»»» withCommissions string false none none
»»» withPoints string false none none
»»» addToContract boolean false none none
»»» backMessage string false none none
»»» bannerPathImage string false none none
»»» sales object false none none
»»» file object false none none
»»» priorityComission boolean false none none
»»» minPrice string false none none
»»» maxPrice string false none none
»»» managementFee string false none none
»»» repurchase string false none none
»»» withoutFee string false none none
»»» investmentHorizon string false none none
»»» frequencyWithdrawals string false none none
»»» percent string false none none
»»» percentForCompany string false none none
»»» percentForCompanyResumption string false none none
»»» segment string false none none
»»» distributionPayment string false none none
»»» companyCommissionEditable string false none none
»»» needLogin boolean false none none
»»» confirmNow integer false none none
»»» conferenceProduct object false none none
»»» showInIntranet boolean false none none
»»» oneProductStep string false none none
»»» productNumberFrom string false none none
»»» productNumberTo string false none none
»»» contractType object false none none
»»» dateOfRedemption string(date-time) false none none
»»» bondType string false none none
»»» goalType string false none none
»»» priceAddPayment integer false none none
»»» numberOfShares integer false none none
»»» otherCommissionForResumption string false none none
»»» fullButton string false none none
»»» buttonColor string false none none
»»» buttonTextColor string false none none
»»» outsideDescription string false none none
»»» import object false none none
»»» confirmSms boolean false none none
»»» updateUserDataData boolean false none none
»»» productDetails object false none none
»»» nowProductDetail object false none none
»»» productDetailsWasCheck boolean false none none
»»» invoiceProduct object false none none
»»» formTemplate number false none none
»»» headOfCommission string false none none
»»» memberOfCommission string false none none
»»» memberOfCommissionTwo string false none none

post_products

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/products \
  -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/products HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "name": "string",
      "producer": {},
      "category": {},
      "conferenceCategory": {},
      "productType": {},
      "provider": {},
      "priceComission": "string",
      "points": 0,
      "place": "string",
      "status": "string",
      "parentUser": {},
      "limit": 0,
      "dateStart": "string",
      "dateEnd": "string",
      "dateLimit": "string",
      "type": "string",
      "time": "string",
      "description": "string",
      "price": "string",
      "priceClient": "string",
      "pricePlus": "string",
      "priceClientPlus": "string",
      "wwwPage": "string",
      "active": true,
      "conference": 0,
      "pointsType": "string",
      "priceType": "string",
      "underProduct": {},
      "emailAddress": "string",
      "mailTitleConfirm": "string",
      "mailTitleInvitation": "string",
      "vat": 0,
      "currency": {},
      "amountCurrency": 0,
      "series": "string",
      "proposal": "string",
      "valuation": 0,
      "useCountType": "string",
      "risk": "string",
      "aliorCountProduct": "string",
      "expired": "2019-08-24T14:15:22Z",
      "beforeExpired": "2019-08-24T14:15:22Z",
      "tags": "string",
      "paymentType": "string",
      "withCurrency": "string",
      "withCommissions": "string",
      "withPoints": "string",
      "addToContract": true,
      "backMessage": "string",
      "bannerPathImage": "string",
      "sales": {},
      "file": {},
      "priorityComission": true,
      "minPrice": "string",
      "maxPrice": "string",
      "managementFee": "string",
      "repurchase": "string",
      "withoutFee": "string",
      "investmentHorizon": "string",
      "frequencyWithdrawals": "string",
      "percent": "string",
      "percentForCompany": "string",
      "percentForCompanyResumption": "string",
      "segment": "string",
      "distributionPayment": "string",
      "companyCommissionEditable": "string",
      "needLogin": true,
      "confirmNow": 0,
      "conferenceProduct": {},
      "showInIntranet": true,
      "oneProductStep": "string",
      "productNumberFrom": "string",
      "productNumberTo": "string",
      "contractType": {},
      "dateOfRedemption": "2019-08-24T14:15:22Z",
      "bondType": "string",
      "goalType": "string",
      "priceAddPayment": 0,
      "numberOfShares": 0,
      "otherCommissionForResumption": "string",
      "fullButton": "string",
      "buttonColor": "string",
      "buttonTextColor": "string",
      "outsideDescription": "string",
      "import": {},
      "confirmSms": true,
      "updateUserDataData": true,
      "productDetails": {},
      "nowProductDetail": {},
      "productDetailsWasCheck": true,
      "invoiceProduct": {},
      "formTemplate": 0,
      "headOfCommission": "string",
      "memberOfCommission": "string",
      "memberOfCommissionTwo": "string"
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/products',
{
  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/products',
  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/products', 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/products', 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/products");
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/products", data)
    req.Header = headers

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

POST /products

Body parameter

{
  "data": {
    "attributes": {
      "name": "string",
      "producer": {},
      "category": {},
      "conferenceCategory": {},
      "productType": {},
      "provider": {},
      "priceComission": "string",
      "points": 0,
      "place": "string",
      "status": "string",
      "parentUser": {},
      "limit": 0,
      "dateStart": "string",
      "dateEnd": "string",
      "dateLimit": "string",
      "type": "string",
      "time": "string",
      "description": "string",
      "price": "string",
      "priceClient": "string",
      "pricePlus": "string",
      "priceClientPlus": "string",
      "wwwPage": "string",
      "active": true,
      "conference": 0,
      "pointsType": "string",
      "priceType": "string",
      "underProduct": {},
      "emailAddress": "string",
      "mailTitleConfirm": "string",
      "mailTitleInvitation": "string",
      "vat": 0,
      "currency": {},
      "amountCurrency": 0,
      "series": "string",
      "proposal": "string",
      "valuation": 0,
      "useCountType": "string",
      "risk": "string",
      "aliorCountProduct": "string",
      "expired": "2019-08-24T14:15:22Z",
      "beforeExpired": "2019-08-24T14:15:22Z",
      "tags": "string",
      "paymentType": "string",
      "withCurrency": "string",
      "withCommissions": "string",
      "withPoints": "string",
      "addToContract": true,
      "backMessage": "string",
      "bannerPathImage": "string",
      "sales": {},
      "file": {},
      "priorityComission": true,
      "minPrice": "string",
      "maxPrice": "string",
      "managementFee": "string",
      "repurchase": "string",
      "withoutFee": "string",
      "investmentHorizon": "string",
      "frequencyWithdrawals": "string",
      "percent": "string",
      "percentForCompany": "string",
      "percentForCompanyResumption": "string",
      "segment": "string",
      "distributionPayment": "string",
      "companyCommissionEditable": "string",
      "needLogin": true,
      "confirmNow": 0,
      "conferenceProduct": {},
      "showInIntranet": true,
      "oneProductStep": "string",
      "productNumberFrom": "string",
      "productNumberTo": "string",
      "contractType": {},
      "dateOfRedemption": "2019-08-24T14:15:22Z",
      "bondType": "string",
      "goalType": "string",
      "priceAddPayment": 0,
      "numberOfShares": 0,
      "otherCommissionForResumption": "string",
      "fullButton": "string",
      "buttonColor": "string",
      "buttonTextColor": "string",
      "outsideDescription": "string",
      "import": {},
      "confirmSms": true,
      "updateUserDataData": true,
      "productDetails": {},
      "nowProductDetail": {},
      "productDetailsWasCheck": true,
      "invoiceProduct": {},
      "formTemplate": 0,
      "headOfCommission": "string",
      "memberOfCommission": "string",
      "memberOfCommissionTwo": "string"
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Product false none
»»» _id body integer false none
»»» name body string false none
»»» producer body object false none
»»» category body object false none
»»» conferenceCategory body object false none
»»» productType body object false none
»»» provider body object false none
»»» priceComission body string false none
»»» points body integer false none
»»» place body string false none
»»» status body string false none
»»» parentUser body object false none
»»» limit body integer false none
»»» dateStart body string false none
»»» dateEnd body string false none
»»» dateLimit body string false none
»»» type body string false none
»»» time body string false none
»»» description body string false none
»»» price body string false none
»»» priceClient body string false none
»»» pricePlus body string false none
»»» priceClientPlus body string false none
»»» wwwPage body string false none
»»» active body boolean false none
»»» conference body integer false none
»»» pointsType body string false none
»»» priceType body string false none
»»» underProduct body object false none
»»» emailAddress body string false none
»»» mailTitleConfirm body string false none
»»» mailTitleInvitation body string false none
»»» vat body integer false none
»»» currency body object false none
»»» amountCurrency body integer false none
»»» series body string false none
»»» proposal body string false none
»»» valuation body integer false none
»»» useCountType body string false none
»»» risk body string false none
»»» aliorCountProduct body string false none
»»» expired body string(date-time) false none
»»» beforeExpired body string(date-time) false none
»»» tags body string false none
»»» paymentType body string false none
»»» withCurrency body string false none
»»» withCommissions body string false none
»»» withPoints body string false none
»»» addToContract body boolean false none
»»» backMessage body string false none
»»» bannerPathImage body string false none
»»» sales body object false none
»»» file body object false none
»»» priorityComission body boolean false none
»»» minPrice body string false none
»»» maxPrice body string false none
»»» managementFee body string false none
»»» repurchase body string false none
»»» withoutFee body string false none
»»» investmentHorizon body string false none
»»» frequencyWithdrawals body string false none
»»» percent body string false none
»»» percentForCompany body string false none
»»» percentForCompanyResumption body string false none
»»» segment body string false none
»»» distributionPayment body string false none
»»» companyCommissionEditable body string false none
»»» needLogin body boolean false none
»»» confirmNow body integer false none
»»» conferenceProduct body object false none
»»» showInIntranet body boolean false none
»»» oneProductStep body string false none
»»» productNumberFrom body string false none
»»» productNumberTo body string false none
»»» contractType body object false none
»»» dateOfRedemption body string(date-time) false none
»»» bondType body string false none
»»» goalType body string false none
»»» priceAddPayment body integer false none
»»» numberOfShares body integer false none
»»» otherCommissionForResumption body string false none
»»» fullButton body string false none
»»» buttonColor body string false none
»»» buttonTextColor body string false none
»»» outsideDescription body string false none
»»» import body object false none
»»» confirmSms body boolean false none
»»» updateUserDataData body boolean false none
»»» productDetails body object false none
»»» nowProductDetail body object false none
»»» productDetailsWasCheck body boolean false none
»»» invoiceProduct body object false none
»»» formTemplate body number false none
»»» headOfCommission body string false none
»»» memberOfCommission body string false none
»»» memberOfCommissionTwo body string 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": "string",
    "producer": {},
    "category": {},
    "conferenceCategory": {},
    "productType": {},
    "provider": {},
    "priceComission": "string",
    "points": 0,
    "place": "string",
    "status": "string",
    "parentUser": {},
    "limit": 0,
    "dateStart": "string",
    "dateEnd": "string",
    "dateLimit": "string",
    "type": "string",
    "time": "string",
    "description": "string",
    "price": "string",
    "priceClient": "string",
    "pricePlus": "string",
    "priceClientPlus": "string",
    "wwwPage": "string",
    "active": true,
    "conference": 0,
    "pointsType": "string",
    "priceType": "string",
    "underProduct": {},
    "emailAddress": "string",
    "mailTitleConfirm": "string",
    "mailTitleInvitation": "string",
    "vat": 0,
    "currency": {},
    "amountCurrency": 0,
    "series": "string",
    "proposal": "string",
    "valuation": 0,
    "useCountType": "string",
    "risk": "string",
    "aliorCountProduct": "string",
    "expired": "2019-08-24T14:15:22Z",
    "beforeExpired": "2019-08-24T14:15:22Z",
    "tags": "string",
    "paymentType": "string",
    "withCurrency": "string",
    "withCommissions": "string",
    "withPoints": "string",
    "addToContract": true,
    "backMessage": "string",
    "bannerPathImage": "string",
    "sales": {},
    "file": {},
    "priorityComission": true,
    "minPrice": "string",
    "maxPrice": "string",
    "managementFee": "string",
    "repurchase": "string",
    "withoutFee": "string",
    "investmentHorizon": "string",
    "frequencyWithdrawals": "string",
    "percent": "string",
    "percentForCompany": "string",
    "percentForCompanyResumption": "string",
    "segment": "string",
    "distributionPayment": "string",
    "companyCommissionEditable": "string",
    "needLogin": true,
    "confirmNow": 0,
    "conferenceProduct": {},
    "showInIntranet": true,
    "oneProductStep": "string",
    "productNumberFrom": "string",
    "productNumberTo": "string",
    "contractType": {},
    "dateOfRedemption": "2019-08-24T14:15:22Z",
    "bondType": "string",
    "goalType": "string",
    "priceAddPayment": 0,
    "numberOfShares": 0,
    "otherCommissionForResumption": "string",
    "fullButton": "string",
    "buttonColor": "string",
    "buttonTextColor": "string",
    "outsideDescription": "string",
    "import": {},
    "confirmSms": true,
    "updateUserDataData": true,
    "productDetails": {},
    "nowProductDetail": {},
    "productDetailsWasCheck": true,
    "invoiceProduct": {},
    "formTemplate": 0,
    "headOfCommission": "string",
    "memberOfCommission": "string",
    "memberOfCommissionTwo": "string"
  }
}

Responses

Status Meaning Description Schema
201 Created Product 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 Product false none none
»» _id integer false read-only none
»» name string false none none
»» producer object false none none
»» category object false none none
»» conferenceCategory object false none none
»» productType object false none none
»» provider object false none none
»» priceComission string false none none
»» points integer false none none
»» place string false none none
»» status string false none none
»» parentUser object false none none
»» limit integer false none none
»» dateStart string false none none
»» dateEnd string false none none
»» dateLimit string false none none
»» type string false none none
»» time string false none none
»» description string false none none
»» price string false none none
»» priceClient string false none none
»» pricePlus string false none none
»» priceClientPlus string false none none
»» wwwPage string false none none
»» active boolean false none none
»» conference integer false none none
»» pointsType string false none none
»» priceType string false none none
»» underProduct object false none none
»» emailAddress string false none none
»» mailTitleConfirm string false none none
»» mailTitleInvitation string false none none
»» vat integer false none none
»» currency object false none none
»» amountCurrency integer false none none
»» series string false none none
»» proposal string false none none
»» valuation integer false none none
»» useCountType string false none none
»» risk string false none none
»» aliorCountProduct string false none none
»» expired string(date-time) false none none
»» beforeExpired string(date-time) false none none
»» tags string false none none
»» paymentType string false none none
»» withCurrency string false none none
»» withCommissions string false none none
»» withPoints string false none none
»» addToContract boolean false none none
»» backMessage string false none none
»» bannerPathImage string false none none
»» sales object false none none
»» file object false none none
»» priorityComission boolean false none none
»» minPrice string false none none
»» maxPrice string false none none
»» managementFee string false none none
»» repurchase string false none none
»» withoutFee string false none none
»» investmentHorizon string false none none
»» frequencyWithdrawals string false none none
»» percent string false none none
»» percentForCompany string false none none
»» percentForCompanyResumption string false none none
»» segment string false none none
»» distributionPayment string false none none
»» companyCommissionEditable string false none none
»» needLogin boolean false none none
»» confirmNow integer false none none
»» conferenceProduct object false none none
»» showInIntranet boolean false none none
»» oneProductStep string false none none
»» productNumberFrom string false none none
»» productNumberTo string false none none
»» contractType object false none none
»» dateOfRedemption string(date-time) false none none
»» bondType string false none none
»» goalType string false none none
»» priceAddPayment integer false none none
»» numberOfShares integer false none none
»» otherCommissionForResumption string false none none
»» fullButton string false none none
»» buttonColor string false none none
»» buttonTextColor string false none none
»» outsideDescription string false none none
»» import object false none none
»» confirmSms boolean false none none
»» updateUserDataData boolean false none none
»» productDetails object false none none
»» nowProductDetail object false none none
»» productDetailsWasCheck boolean false none none
»» invoiceProduct object false none none
»» formTemplate number false none none
»» headOfCommission string false none none
»» memberOfCommission string false none none
»» memberOfCommissionTwo string false none none

get_products_{id}

Code samples

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

GET https://app.bergsystem.pl/api/products/{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/products/{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/products/{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/products/{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/products/{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/products/{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/products/{id}", data)
    req.Header = headers

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

GET /products/{id}

Parameters

Name In Type Required Description
id path integer true Product 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": "string",
    "producer": {},
    "category": {},
    "conferenceCategory": {},
    "productType": {},
    "provider": {},
    "priceComission": "string",
    "points": 0,
    "place": "string",
    "status": "string",
    "parentUser": {},
    "limit": 0,
    "dateStart": "string",
    "dateEnd": "string",
    "dateLimit": "string",
    "type": "string",
    "time": "string",
    "description": "string",
    "price": "string",
    "priceClient": "string",
    "pricePlus": "string",
    "priceClientPlus": "string",
    "wwwPage": "string",
    "active": true,
    "conference": 0,
    "pointsType": "string",
    "priceType": "string",
    "underProduct": {},
    "emailAddress": "string",
    "mailTitleConfirm": "string",
    "mailTitleInvitation": "string",
    "vat": 0,
    "currency": {},
    "amountCurrency": 0,
    "series": "string",
    "proposal": "string",
    "valuation": 0,
    "useCountType": "string",
    "risk": "string",
    "aliorCountProduct": "string",
    "expired": "2019-08-24T14:15:22Z",
    "beforeExpired": "2019-08-24T14:15:22Z",
    "tags": "string",
    "paymentType": "string",
    "withCurrency": "string",
    "withCommissions": "string",
    "withPoints": "string",
    "addToContract": true,
    "backMessage": "string",
    "bannerPathImage": "string",
    "sales": {},
    "file": {},
    "priorityComission": true,
    "minPrice": "string",
    "maxPrice": "string",
    "managementFee": "string",
    "repurchase": "string",
    "withoutFee": "string",
    "investmentHorizon": "string",
    "frequencyWithdrawals": "string",
    "percent": "string",
    "percentForCompany": "string",
    "percentForCompanyResumption": "string",
    "segment": "string",
    "distributionPayment": "string",
    "companyCommissionEditable": "string",
    "needLogin": true,
    "confirmNow": 0,
    "conferenceProduct": {},
    "showInIntranet": true,
    "oneProductStep": "string",
    "productNumberFrom": "string",
    "productNumberTo": "string",
    "contractType": {},
    "dateOfRedemption": "2019-08-24T14:15:22Z",
    "bondType": "string",
    "goalType": "string",
    "priceAddPayment": 0,
    "numberOfShares": 0,
    "otherCommissionForResumption": "string",
    "fullButton": "string",
    "buttonColor": "string",
    "buttonTextColor": "string",
    "outsideDescription": "string",
    "import": {},
    "confirmSms": true,
    "updateUserDataData": true,
    "productDetails": {},
    "nowProductDetail": {},
    "productDetailsWasCheck": true,
    "invoiceProduct": {},
    "formTemplate": 0,
    "headOfCommission": "string",
    "memberOfCommission": "string",
    "memberOfCommissionTwo": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Product 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 Product false none none
»» _id integer false read-only none
»» name string false none none
»» producer object false none none
»» category object false none none
»» conferenceCategory object false none none
»» productType object false none none
»» provider object false none none
»» priceComission string false none none
»» points integer false none none
»» place string false none none
»» status string false none none
»» parentUser object false none none
»» limit integer false none none
»» dateStart string false none none
»» dateEnd string false none none
»» dateLimit string false none none
»» type string false none none
»» time string false none none
»» description string false none none
»» price string false none none
»» priceClient string false none none
»» pricePlus string false none none
»» priceClientPlus string false none none
»» wwwPage string false none none
»» active boolean false none none
»» conference integer false none none
»» pointsType string false none none
»» priceType string false none none
»» underProduct object false none none
»» emailAddress string false none none
»» mailTitleConfirm string false none none
»» mailTitleInvitation string false none none
»» vat integer false none none
»» currency object false none none
»» amountCurrency integer false none none
»» series string false none none
»» proposal string false none none
»» valuation integer false none none
»» useCountType string false none none
»» risk string false none none
»» aliorCountProduct string false none none
»» expired string(date-time) false none none
»» beforeExpired string(date-time) false none none
»» tags string false none none
»» paymentType string false none none
»» withCurrency string false none none
»» withCommissions string false none none
»» withPoints string false none none
»» addToContract boolean false none none
»» backMessage string false none none
»» bannerPathImage string false none none
»» sales object false none none
»» file object false none none
»» priorityComission boolean false none none
»» minPrice string false none none
»» maxPrice string false none none
»» managementFee string false none none
»» repurchase string false none none
»» withoutFee string false none none
»» investmentHorizon string false none none
»» frequencyWithdrawals string false none none
»» percent string false none none
»» percentForCompany string false none none
»» percentForCompanyResumption string false none none
»» segment string false none none
»» distributionPayment string false none none
»» companyCommissionEditable string false none none
»» needLogin boolean false none none
»» confirmNow integer false none none
»» conferenceProduct object false none none
»» showInIntranet boolean false none none
»» oneProductStep string false none none
»» productNumberFrom string false none none
»» productNumberTo string false none none
»» contractType object false none none
»» dateOfRedemption string(date-time) false none none
»» bondType string false none none
»» goalType string false none none
»» priceAddPayment integer false none none
»» numberOfShares integer false none none
»» otherCommissionForResumption string false none none
»» fullButton string false none none
»» buttonColor string false none none
»» buttonTextColor string false none none
»» outsideDescription string false none none
»» import object false none none
»» confirmSms boolean false none none
»» updateUserDataData boolean false none none
»» productDetails object false none none
»» nowProductDetail object false none none
»» productDetailsWasCheck boolean false none none
»» invoiceProduct object false none none
»» formTemplate number false none none
»» headOfCommission string false none none
»» memberOfCommission string false none none
»» memberOfCommissionTwo string false none none

get_products_categories

Code samples

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

GET https://app.bergsystem.pl/api/products/categories 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/products/categories',
{
  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/products/categories',
  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/products/categories', 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/products/categories', 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/products/categories");
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/products/categories", data)
    req.Header = headers

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

GET /products/categories

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/products/categories/1",
      "type": "Category",
      "attributes": {
        "_id": 6,
        "name": "Simple category",
        "type": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of categories 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
» 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 [CategoryData] true none none
»» id string false none none
»» type string false none none
»» attributes Category false none none
»»» _id integer false read-only none
»»» name string false none none
»»» type string false none none

post_products_categories

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/products/categories \
  -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/products/categories 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 category",
      "type": "string"
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/products/categories',
{
  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/products/categories',
  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/products/categories', 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/products/categories', 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/products/categories");
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/products/categories", data)
    req.Header = headers

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

POST /products/categories

Body parameter

{
  "data": {
    "attributes": {
      "name": "Simple category",
      "type": "string"
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Category false none
»»» _id body integer false none
»»» name body string false none
»»» type body string 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": 6,
    "name": "Simple category",
    "type": "string"
  }
}

Responses

Status Meaning Description Schema
201 Created Category type 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 Category false none none
»» _id integer false read-only none
»» name string false none none
»» type string false none none

get_products_categories_{id}

Code samples

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

GET https://app.bergsystem.pl/api/products/categories/{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/products/categories/{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/products/categories/{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/products/categories/{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/products/categories/{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/products/categories/{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/products/categories/{id}", data)
    req.Header = headers

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

GET /products/categories/{id}

Parameters

Name In Type Required Description
id path integer true Category 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": 6,
    "name": "Simple category",
    "type": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Category type 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 Category false none none
»» _id integer false read-only none
»» name string false none none
»» type string false none none

get_products_producers

Code samples

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

GET https://app.bergsystem.pl/api/products/producers 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/products/producers',
{
  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/products/producers',
  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/products/producers', 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/products/producers', 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/products/producers");
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/products/producers", data)
    req.Header = headers

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

GET /products/producers

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/products/producers/1",
      "type": "Producer",
      "attributes": {
        "_id": 1,
        "name": "Simple producer",
        "description": "Simple description",
        "settleCash": true,
        "settlePrinting": true,
        "recrutiment": true
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of producers 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 [ProducerData] true none none
»» id string false none none
»» type string false none none
»» attributes Producer false none none
»»» _id integer false read-only none
»»» name string false none none
»»» description string false none none
»»» settleCash boolean false none none
»»» settlePrinting boolean false none none
»»» recrutiment boolean false none none

post_products_producers

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/products/producers \
  -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/products/producers 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 producer",
      "description": "Simple description",
      "settleCash": true,
      "settlePrinting": true,
      "recrutiment": true
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/products/producers',
{
  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/products/producers',
  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/products/producers', 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/products/producers', 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/products/producers");
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/products/producers", data)
    req.Header = headers

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

POST /products/producers

Body parameter

{
  "data": {
    "attributes": {
      "name": "Simple producer",
      "description": "Simple description",
      "settleCash": true,
      "settlePrinting": true,
      "recrutiment": true
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Producer false none
»»» _id body integer false none
»»» name body string false none
»»» description body string false none
»»» settleCash body boolean false none
»»» settlePrinting body boolean false none
»»» recrutiment body boolean 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 producer",
    "description": "Simple description",
    "settleCash": true,
    "settlePrinting": true,
    "recrutiment": true
  }
}

Responses

Status Meaning Description Schema
201 Created Producer 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 Producer false none none
»» _id integer false read-only none
»» name string false none none
»» description string false none none
»» settleCash boolean false none none
»» settlePrinting boolean false none none
»» recrutiment boolean false none none

get_products_producers_{id}

Code samples

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

GET https://app.bergsystem.pl/api/products/producers/{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/products/producers/{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/products/producers/{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/products/producers/{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/products/producers/{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/products/producers/{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/products/producers/{id}", data)
    req.Header = headers

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

GET /products/producers/{id}

Parameters

Name In Type Required Description
id path integer true Producer 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 producer",
    "description": "Simple description",
    "settleCash": true,
    "settlePrinting": true,
    "recrutiment": true
  }
}

Responses

Status Meaning Description Schema
200 OK Producer 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 Producer false none none
»» _id integer false read-only none
»» name string false none none
»» description string false none none
»» settleCash boolean false none none
»» settlePrinting boolean false none none
»» recrutiment boolean false none none

Sales

get_sales

Code samples

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

GET https://app.bergsystem.pl/api/sales 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/sales',
{
  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/sales',
  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/sales', 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/sales', 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/sales");
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/sales", data)
    req.Header = headers

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

GET /sales

An endpoint that allows to get collection of sales data.

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
page%5Bpage%5D query integer(int32) false Page number.

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/sales/1",
      "type": "Sales",
      "attributes": {
        "_id": 1243,
        "customerId": 166,
        "companyId": 32,
        "employeeId": 1,
        "title": "Title",
        "sellingProcessId": 1,
        "sellingProcessStepId": 11,
        "contractStateId": 1,
        "contractStatusId": 1,
        "description": "Description",
        "extraFields": {
          "property1": "string",
          "property2": "string"
        },
        "items": [
          {
            "item_key": {
              "property1": "string",
              "property2": "string"
            }
          }
        ],
        "createdDate": "2013-07-09T14:09:49+02:00",
        "originSystem": "CC",
        "externalId": "EXT1",
        "startDateOfProtection": "2013-07-09",
        "signingDate": "2013-07-09",
        "endDate": "2013-07-09",
        "resumption": true
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of sales 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 [SalesData] true none none
»» id string false none none
»» type string false none none
»» attributes Sales false none none
»»» _id integer false read-only none
»»» customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» title string true none Nazwa
»»» sellingProcessId integer¦null false none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId integer¦null false none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId integer false none It's "1" for Sale.
»»» description string¦null false none "Opis" field can be found Zarządzanie polami.
»»» extraFields object false none User defined fields ("Pola zdefiniowane")
»»»» 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
»»» items [object] false none List of items - "środki trwałe".
»»»» item_key object false none none
»»»»» 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
»»» createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
»»» originSystem string¦null false none Pochodzenie szansy
»»» externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection string(date-time) false none "Data rozpoczęcia ochrony" can be found at Zarządzanie polami.
»»» signingDate string(date)¦null false none Data podpisania
»»» endDate string(date)¦null false none Data zakończenia
»»» resumption boolean false none Wznowienie

post_sales

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/sales \
  -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/sales HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "customerId": 166,
      "companyId": 32,
      "employeeId": 1,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "contractStateId": 1,
      "contractStatusId": 1,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "signingDate": "2013-07-09",
      "endDate": "2013-07-09",
      "resumption": true
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/sales',
{
  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/sales',
  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/sales', 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/sales', 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/sales");
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/sales", data)
    req.Header = headers

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

POST /sales

Body parameter

{
  "data": {
    "attributes": {
      "customerId": 166,
      "companyId": 32,
      "employeeId": 1,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "contractStateId": 1,
      "contractStatusId": 1,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "signingDate": "2013-07-09",
      "endDate": "2013-07-09",
      "resumption": true
    }
  }
}

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

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Sales false none
»»» _id body integer false none
»»» customerId body integer¦null false "Klient" (id) can be found in Kontakty/Osoby in column "id".
»»» companyId body integer false "Firma" (id) can be found in Kontakty/Firmy in column "id".
»»» employeeId body integer true "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
»»» title body string true Nazwa
»»» sellingProcessId body integer¦null false "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId body integer¦null false "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» contractStateId body integer false "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId body integer false It's "1" for Sale.
»»» description body string¦null false "Opis" field can be found Zarządzanie polami.
»»» extraFields body object false User defined fields ("Pola zdefiniowane")
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» items body [object] false List of items - "środki trwałe".
»»»» item_key body object false none
»»»»» additionalProperties body any false none
»»»»»» anonymous body string false none
»»»»»» anonymous body integer false none
»»»»»» anonymous body boolean false none
»»» createdDate body string(date-time) false "Data podpisania" can be found at Zarządzanie polami
»»» originSystem body string¦null false Pochodzenie szansy
»»» externalId body string¦null false "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection body string(date-time) false "Data rozpoczęcia ochrony" can be found at Zarządzanie polami.
»»» signingDate body string(date)¦null false Data podpisania
»»» endDate body string(date)¦null false Data zakończenia
»»» resumption body boolean false Wznowienie
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
page%5Bpage%5D query integer(int32) false Page number.

Detailed descriptions

»»» customerId: "Klient" (id) can be found in Kontakty/Osoby in column "id". This field needs to be enabled in Zarządzanie polami.

»»» companyId: "Firma" (id) can be found in Kontakty/Firmy in column "id". This field needs to be enabled in Zarządzanie polami.

»»» employeeId: "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id". This field needs to be enabled in Zarządzanie polami.

Example responses

201 Response

{
  "data": {
    "_id": 1243,
    "customerId": 166,
    "companyId": 32,
    "employeeId": 1,
    "title": "Title",
    "sellingProcessId": 1,
    "sellingProcessStepId": 11,
    "contractStateId": 1,
    "contractStatusId": 1,
    "description": "Description",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "items": [
      {
        "item_key": {
          "property1": "string",
          "property2": "string"
        }
      }
    ],
    "createdDate": "2013-07-09T14:09:49+02:00",
    "originSystem": "CC",
    "externalId": "EXT1",
    "startDateOfProtection": "2013-07-09",
    "signingDate": "2013-07-09",
    "endDate": "2013-07-09",
    "resumption": true
  }
}

Responses

Status Meaning Description Schema
201 Created Sales 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 Sales false none none
»» _id integer false read-only none
»» customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
»» companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
»» employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
»» title string true none Nazwa
»» sellingProcessId integer¦null false none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»» sellingProcessStepId integer¦null false none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»» contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»» contractStatusId integer false none It's "1" for Sale.
»» description string¦null false none "Opis" field can be found Zarządzanie polami.
»» extraFields object false none User defined fields ("Pola zdefiniowane")
»»» 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
»» items [object] false none List of items - "środki trwałe".
»»» item_key object false none none
»»»» 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
»» createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
»» originSystem string¦null false none Pochodzenie szansy
»» externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»» startDateOfProtection string(date-time) false none "Data rozpoczęcia ochrony" can be found at Zarządzanie polami.
»» signingDate string(date)¦null false none Data podpisania
»» endDate string(date)¦null false none Data zakończenia
»» resumption boolean false none Wznowienie

get_sales_{id}

Code samples

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

GET https://app.bergsystem.pl/api/sales/{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/sales/{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/sales/{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/sales/{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/sales/{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/sales/{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/sales/{id}", data)
    req.Header = headers

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

GET /sales/{id}

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

Parameters

Name In Type Required Description
id path integer true Sale 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": 1243,
    "customerId": 166,
    "companyId": 32,
    "employeeId": 1,
    "title": "Title",
    "sellingProcessId": 1,
    "sellingProcessStepId": 11,
    "contractStateId": 1,
    "contractStatusId": 1,
    "description": "Description",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "items": [
      {
        "item_key": {
          "property1": "string",
          "property2": "string"
        }
      }
    ],
    "createdDate": "2013-07-09T14:09:49+02:00",
    "originSystem": "CC",
    "externalId": "EXT1",
    "startDateOfProtection": "2013-07-09",
    "signingDate": "2013-07-09",
    "endDate": "2013-07-09",
    "resumption": true
  }
}

Responses

Status Meaning Description Schema
200 OK Sales 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 Sales false none none
»» _id integer false read-only none
»» customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
»» companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
»» employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
»» title string true none Nazwa
»» sellingProcessId integer¦null false none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»» sellingProcessStepId integer¦null false none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»» contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»» contractStatusId integer false none It's "1" for Sale.
»» description string¦null false none "Opis" field can be found Zarządzanie polami.
»» extraFields object false none User defined fields ("Pola zdefiniowane")
»»» 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
»» items [object] false none List of items - "środki trwałe".
»»» item_key object false none none
»»»» 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
»» createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
»» originSystem string¦null false none Pochodzenie szansy
»» externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»» startDateOfProtection string(date-time) false none "Data rozpoczęcia ochrony" can be found at Zarządzanie polami.
»» signingDate string(date)¦null false none Data podpisania
»» endDate string(date)¦null false none Data zakończenia
»» resumption boolean false none Wznowienie

patch_sales_{id}

Code samples

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

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

const inputBody = '{
  "data": {
    "attributes": {
      "customerId": 166,
      "companyId": 32,
      "employeeId": 1,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "contractStateId": 1,
      "contractStatusId": 1,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "signingDate": "2013-07-09",
      "endDate": "2013-07-09",
      "resumption": true
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/sales/{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/json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://app.bergsystem.pl/api/sales/{id}',
  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.patch('https://app.bergsystem.pl/api/sales/{id}', 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('PATCH','https://app.bergsystem.pl/api/sales/{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/sales/{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/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/sales/{id}", data)
    req.Header = headers

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

PATCH /sales/{id}

Body parameter

{
  "data": {
    "attributes": {
      "customerId": 166,
      "companyId": 32,
      "employeeId": 1,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "contractStateId": 1,
      "contractStatusId": 1,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "signingDate": "2013-07-09",
      "endDate": "2013-07-09",
      "resumption": true
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Sales false none
»»» _id body integer false none
»»» customerId body integer¦null false "Klient" (id) can be found in Kontakty/Osoby in column "id".
»»» companyId body integer false "Firma" (id) can be found in Kontakty/Firmy in column "id".
»»» employeeId body integer true "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
»»» title body string true Nazwa
»»» sellingProcessId body integer¦null false "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId body integer¦null false "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» contractStateId body integer false "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId body integer false It's "1" for Sale.
»»» description body string¦null false "Opis" field can be found Zarządzanie polami.
»»» extraFields body object false User defined fields ("Pola zdefiniowane")
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» items body [object] false List of items - "środki trwałe".
»»»» item_key body object false none
»»»»» additionalProperties body any false none
»»»»»» anonymous body string false none
»»»»»» anonymous body integer false none
»»»»»» anonymous body boolean false none
»»» createdDate body string(date-time) false "Data podpisania" can be found at Zarządzanie polami
»»» originSystem body string¦null false Pochodzenie szansy
»»» externalId body string¦null false "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection body string(date-time) false "Data rozpoczęcia ochrony" can be found at Zarządzanie polami.
»»» signingDate body string(date)¦null false Data podpisania
»»» endDate body string(date)¦null false Data zakończenia
»»» resumption body boolean false Wznowienie
id path integer true Sale identifier
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Detailed descriptions

»»» customerId: "Klient" (id) can be found in Kontakty/Osoby in column "id". This field needs to be enabled in Zarządzanie polami.

»»» companyId: "Firma" (id) can be found in Kontakty/Firmy in column "id". This field needs to be enabled in Zarządzanie polami.

»»» employeeId: "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id". This field needs to be enabled in Zarządzanie polami.

Example responses

200 Response

{
  "data": {
    "_id": 1243,
    "customerId": 166,
    "companyId": 32,
    "employeeId": 1,
    "title": "Title",
    "sellingProcessId": 1,
    "sellingProcessStepId": 11,
    "contractStateId": 1,
    "contractStatusId": 1,
    "description": "Description",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "items": [
      {
        "item_key": {
          "property1": "string",
          "property2": "string"
        }
      }
    ],
    "createdDate": "2013-07-09T14:09:49+02:00",
    "originSystem": "CC",
    "externalId": "EXT1",
    "startDateOfProtection": "2013-07-09",
    "signingDate": "2013-07-09",
    "endDate": "2013-07-09",
    "resumption": true
  }
}

Responses

Status Meaning Description Schema
200 OK Sales 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 200

Name Type Required Restrictions Description
» data Sales false none none
»» _id integer false read-only none
»» customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
»» companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
»» employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
»» title string true none Nazwa
»» sellingProcessId integer¦null false none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»» sellingProcessStepId integer¦null false none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»» contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»» contractStatusId integer false none It's "1" for Sale.
»» description string¦null false none "Opis" field can be found Zarządzanie polami.
»» extraFields object false none User defined fields ("Pola zdefiniowane")
»»» 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
»» items [object] false none List of items - "środki trwałe".
»»» item_key object false none none
»»»» 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
»» createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
»» originSystem string¦null false none Pochodzenie szansy
»» externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»» startDateOfProtection string(date-time) false none "Data rozpoczęcia ochrony" can be found at Zarządzanie polami.
»» signingDate string(date)¦null false none Data podpisania
»» endDate string(date)¦null false none Data zakończenia
»» resumption boolean false none Wznowienie

Sales opportunities

get_sales_opportunities

Code samples

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

GET https://app.bergsystem.pl/api/sales_opportunities 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/sales_opportunities',
{
  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/sales_opportunities',
  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/sales_opportunities', 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/sales_opportunities', 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/sales_opportunities");
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/sales_opportunities", data)
    req.Header = headers

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

GET /sales_opportunities

An endpoint that allows to get collection of sales opportunities data.

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
page%5Bpage%5D query integer(int32) false Page number.

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/sales_opportunities/136",
      "type": "SalesOpportunity",
      "attributes": {
        "_id": 1243,
        "customerId": 166,
        "companyId": 32,
        "employeeId": 0,
        "title": "Title",
        "sellingProcessId": 1,
        "sellingProcessStepId": 11,
        "expectedSigningDate": "2013-07-09",
        "contractStateId": 1,
        "contractStatusId": 11,
        "description": "Description",
        "extraFields": {
          "property1": "string",
          "property2": "string"
        },
        "items": [
          {
            "item_key": {
              "property1": "string",
              "property2": "string"
            }
          }
        ],
        "createdDate": "2013-07-09T14:09:49+02:00",
        "originSystem": "CC",
        "externalId": "EXT1",
        "startDateOfProtection": "2013-07-09",
        "resumption": true,
        "amount": 9.99
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of sales opportunities 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 [SalesOpportunityData] true none none
»» id string false none none
»» type string false none none
»» attributes SalesOpportunity false none none
»»» _id integer false read-only none
»»» customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» title string true none Nazwa
»»» sellingProcessId integer¦null true none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId integer¦null true none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» expectedSigningDate string(date)¦null false none Oczekiwana data podpisania
»»» contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId integer¦null false none When sale opportunity is lost, reason (it's id) can be found at Powody przegranych
»»» description string¦null false none "Opis" field can be found Zarządzanie polami.
»»» extraFields object false none User defined fields ("Pola zdefiniowane")
»»»» 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
»»» items [object] false none List of items - "środki trwałe".
»»»» item_key object false none none
»»»»» 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
»»» createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
»»» originSystem string¦null false none Pochodzenie szansy
»»» externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection string(date-time) false none none
»»» resumption boolean false none Wznowienie
»»» amount number(float) false none Wartość

post_sales_opportunities

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/sales_opportunities \
  -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/sales_opportunities HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "customerId": 166,
      "companyId": 32,
      "employeeId": 0,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "expectedSigningDate": "2013-07-09",
      "contractStateId": 1,
      "contractStatusId": 11,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "resumption": true,
      "amount": 9.99
    }
  }
}';
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/sales_opportunities',
{
  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/sales_opportunities',
  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/sales_opportunities', 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/sales_opportunities', 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/sales_opportunities");
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/sales_opportunities", data)
    req.Header = headers

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

POST /sales_opportunities

Body parameter

{
  "data": {
    "attributes": {
      "customerId": 166,
      "companyId": 32,
      "employeeId": 0,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "expectedSigningDate": "2013-07-09",
      "contractStateId": 1,
      "contractStatusId": 11,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "resumption": true,
      "amount": 9.99
    }
  }
}

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

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body SalesOpportunity false none
»»» _id body integer false none
»»» customerId body integer¦null false "Klient" (id) can be found in Kontakty/Osoby in column "id".
»»» companyId body integer false "Firma" (id) can be found in Kontakty/Firmy in column "id".
»»» employeeId body integer true "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
»»» title body string true Nazwa
»»» sellingProcessId body integer¦null true "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId body integer¦null true "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» expectedSigningDate body string(date)¦null false Oczekiwana data podpisania
»»» contractStateId body integer false "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId body integer¦null false When sale opportunity is lost, reason (it's id) can be found at Powody przegranych
»»» description body string¦null false "Opis" field can be found Zarządzanie polami.
»»» extraFields body object false User defined fields ("Pola zdefiniowane")
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» items body [object] false List of items - "środki trwałe".
»»»» item_key body object false none
»»»»» additionalProperties body any false none
»»»»»» anonymous body string false none
»»»»»» anonymous body integer false none
»»»»»» anonymous body boolean false none
»»» createdDate body string(date-time) false "Data podpisania" can be found at Zarządzanie polami
»»» originSystem body string¦null false Pochodzenie szansy
»»» externalId body string¦null false "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection body string(date-time) false none
»»» resumption body boolean false Wznowienie
»»» amount body number(float) false Wartość
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
page%5Bpage%5D query integer(int32) false Page number.

Detailed descriptions

»»» customerId: "Klient" (id) can be found in Kontakty/Osoby in column "id". This field needs to be enabled in Zarządzanie polami.

»»» companyId: "Firma" (id) can be found in Kontakty/Firmy in column "id". This field needs to be enabled in Zarządzanie polami.

»»» employeeId: "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id". This field needs to be enabled in Zarządzanie polami.

Example responses

201 Response

{
  "data": {
    "id": "/api/sales_opportunities/136",
    "type": "SalesOpportunity",
    "attributes": {
      "_id": 1243,
      "customerId": 166,
      "companyId": 32,
      "employeeId": 0,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "expectedSigningDate": "2013-07-09",
      "contractStateId": 1,
      "contractStatusId": 11,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "createdDate": "2013-07-09T14:09:49+02:00",
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "resumption": true,
      "amount": 9.99
    }
  }
}

Responses

Status Meaning Description Schema
201 Created Sales opportunity 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 SalesOpportunityData false none none
»» id string false none none
»» type string false none none
»» attributes SalesOpportunity false none none
»»» _id integer false read-only none
»»» customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» title string true none Nazwa
»»» sellingProcessId integer¦null true none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId integer¦null true none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» expectedSigningDate string(date)¦null false none Oczekiwana data podpisania
»»» contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId integer¦null false none When sale opportunity is lost, reason (it's id) can be found at Powody przegranych
»»» description string¦null false none "Opis" field can be found Zarządzanie polami.
»»» extraFields object false none User defined fields ("Pola zdefiniowane")
»»»» 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
»»» items [object] false none List of items - "środki trwałe".
»»»» item_key object false none none
»»»»» 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
»»» createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
»»» originSystem string¦null false none Pochodzenie szansy
»»» externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection string(date-time) false none none
»»» resumption boolean false none Wznowienie
»»» amount number(float) false none Wartość

get_sales_opportunities_{id}

Code samples

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

GET https://app.bergsystem.pl/api/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{id}", data)
    req.Header = headers

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

GET /sales_opportunities/{id}

An endpoint that allows to get sales opportunity data by its identifier.

Parameters

Name In Type Required Description
id path integer true Sale opportunity 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/sales_opportunities/136",
    "type": "SalesOpportunity",
    "attributes": {
      "_id": 1243,
      "customerId": 166,
      "companyId": 32,
      "employeeId": 0,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "expectedSigningDate": "2013-07-09",
      "contractStateId": 1,
      "contractStatusId": 11,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "createdDate": "2013-07-09T14:09:49+02:00",
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "resumption": true,
      "amount": 9.99
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Sales opportunity 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 SalesOpportunityData false none none
»» id string false none none
»» type string false none none
»» attributes SalesOpportunity false none none
»»» _id integer false read-only none
»»» customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» title string true none Nazwa
»»» sellingProcessId integer¦null true none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId integer¦null true none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» expectedSigningDate string(date)¦null false none Oczekiwana data podpisania
»»» contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId integer¦null false none When sale opportunity is lost, reason (it's id) can be found at Powody przegranych
»»» description string¦null false none "Opis" field can be found Zarządzanie polami.
»»» extraFields object false none User defined fields ("Pola zdefiniowane")
»»»» 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
»»» items [object] false none List of items - "środki trwałe".
»»»» item_key object false none none
»»»»» 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
»»» createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
»»» originSystem string¦null false none Pochodzenie szansy
»»» externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection string(date-time) false none none
»»» resumption boolean false none Wznowienie
»»» amount number(float) false none Wartość

patch_sales_opportunities_{id}

Code samples

# You can also use wget
curl -X PATCH https://app.bergsystem.pl/api/sales_opportunities/{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/sales_opportunities/{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": {
    "attributes": {
      "customerId": 166,
      "companyId": 32,
      "employeeId": 0,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "expectedSigningDate": "2013-07-09",
      "contractStateId": 1,
      "contractStatusId": 11,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "resumption": true,
      "amount": 9.99
    }
  }
}';
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/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{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/sales_opportunities/{id}", data)
    req.Header = headers

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

PATCH /sales_opportunities/{id}

Body parameter

{
  "data": {
    "attributes": {
      "customerId": 166,
      "companyId": 32,
      "employeeId": 0,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "expectedSigningDate": "2013-07-09",
      "contractStateId": 1,
      "contractStatusId": 11,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "resumption": true,
      "amount": 9.99
    }
  }
}

An endpoint that allows to edit sales opportunity data by its identifier.

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body SalesOpportunity false none
»»» _id body integer false none
»»» customerId body integer¦null false "Klient" (id) can be found in Kontakty/Osoby in column "id".
»»» companyId body integer false "Firma" (id) can be found in Kontakty/Firmy in column "id".
»»» employeeId body integer true "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
»»» title body string true Nazwa
»»» sellingProcessId body integer¦null true "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId body integer¦null true "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» expectedSigningDate body string(date)¦null false Oczekiwana data podpisania
»»» contractStateId body integer false "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId body integer¦null false When sale opportunity is lost, reason (it's id) can be found at Powody przegranych
»»» description body string¦null false "Opis" field can be found Zarządzanie polami.
»»» extraFields body object false User defined fields ("Pola zdefiniowane")
»»»» additionalProperties body any false none
»»»»» anonymous body string false none
»»»»» anonymous body integer false none
»»»»» anonymous body boolean false none
»»» items body [object] false List of items - "środki trwałe".
»»»» item_key body object false none
»»»»» additionalProperties body any false none
»»»»»» anonymous body string false none
»»»»»» anonymous body integer false none
»»»»»» anonymous body boolean false none
»»» createdDate body string(date-time) false "Data podpisania" can be found at Zarządzanie polami
»»» originSystem body string¦null false Pochodzenie szansy
»»» externalId body string¦null false "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection body string(date-time) false none
»»» resumption body boolean false Wznowienie
»»» amount body number(float) false Wartość
id path integer true Sale opportunity identifier
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Detailed descriptions

»»» customerId: "Klient" (id) can be found in Kontakty/Osoby in column "id". This field needs to be enabled in Zarządzanie polami.

»»» companyId: "Firma" (id) can be found in Kontakty/Firmy in column "id". This field needs to be enabled in Zarządzanie polami.

»»» employeeId: "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id". This field needs to be enabled in Zarządzanie polami.

Example responses

200 Response

{
  "data": {
    "id": "/api/sales_opportunities/136",
    "type": "SalesOpportunity",
    "attributes": {
      "_id": 1243,
      "customerId": 166,
      "companyId": 32,
      "employeeId": 0,
      "title": "Title",
      "sellingProcessId": 1,
      "sellingProcessStepId": 11,
      "expectedSigningDate": "2013-07-09",
      "contractStateId": 1,
      "contractStatusId": 11,
      "description": "Description",
      "extraFields": {
        "property1": "string",
        "property2": "string"
      },
      "items": [
        {
          "item_key": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "createdDate": "2013-07-09T14:09:49+02:00",
      "originSystem": "CC",
      "externalId": "EXT1",
      "startDateOfProtection": "2013-07-09",
      "resumption": true,
      "amount": 9.99
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Sales opportunity 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 200

Name Type Required Restrictions Description
» data SalesOpportunityData false none none
»» id string false none none
»» type string false none none
»» attributes SalesOpportunity false none none
»»» _id integer false read-only none
»»» customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
»»» title string true none Nazwa
»»» sellingProcessId integer¦null true none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
»»» sellingProcessStepId integer¦null true none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
»»» expectedSigningDate string(date)¦null false none Oczekiwana data podpisania
»»» contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
»»» contractStatusId integer¦null false none When sale opportunity is lost, reason (it's id) can be found at Powody przegranych
»»» description string¦null false none "Opis" field can be found Zarządzanie polami.
»»» extraFields object false none User defined fields ("Pola zdefiniowane")
»»»» 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
»»» items [object] false none List of items - "środki trwałe".
»»»» item_key object false none none
»»»»» 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
»»» createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
»»» originSystem string¦null false none Pochodzenie szansy
»»» externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
»»» startDateOfProtection string(date-time) false none none
»»» resumption boolean false none Wznowienie
»»» amount number(float) false none Wartość

Searches

Code samples

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

GET https://app.bergsystem.pl/api/search?search=string 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/search?search=string',
{
  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/search',
  params: {
  'search' => 'string'
}, 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/search', params={
  'search': 'string'
}, 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/search', 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/search?search=string");
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/search", data)
    req.Header = headers

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

GET /search

Parameters

Name In Type Required Description
search query string true String what you want find
type query string false Type for find
size query integer false work only if type is null
page query integer false none
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Enumerated Values

Parameter Value
type CUSTOMER
type COMPANY
type EMPLOYEE
type TAG
type CONTRACT
type SALE
type CASE

Example responses

200 Response

{
  "data": [
    {
      "id": "/api/searches/1",
      "type": "Search",
      "attributes": {
        "_id": 1,
        "name": "Bocian",
        "_type": 1,
        "active": true,
        "otherData": [
          "string"
        ]
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Search 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 [object] false none none
»» id string false none none
»» type string false none none
»» attributes object false none none
»»» _id integer false none none
»»» name string false none none
»»» _type integer false none none
»»» active boolean false none none
»»» otherData any false none none

oneOf

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

xor

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

xor

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

Selling Processes

get_selling_processes

Code samples

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

GET https://app.bergsystem.pl/api/selling_processes 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/selling_processes',
{
  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/selling_processes',
  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/selling_processes', 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/selling_processes', 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/selling_processes");
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/selling_processes", data)
    req.Header = headers

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

GET /selling_processes

An endpoint that allows to get collection of selling processes data.

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 selling process id.
filter%5Bname%5D query string false Filter by selling process name.
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. Supported sorting fields: * id * name

filter%5Bid%5D: Filter by selling process id.

filter%5Bname%5D: Filter by selling process name.

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/selling_processes/1",
      "type": "SellingProcess",
      "attributes": {
        "_id": 1243,
        "name": "Proces sprzedaży"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of selling processes. 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 [SellingProcessData] true none none
»» id string false none none
»» type string false none none
»» attributes SellingProcess false none none
»»» _id integer false read-only none
»»» name string false none none

get_selling_processes_{id}

Code samples

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

GET https://app.bergsystem.pl/api/selling_processes/{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/selling_processes/{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/selling_processes/{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/selling_processes/{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/selling_processes/{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/selling_processes/{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/selling_processes/{id}", data)
    req.Header = headers

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

GET /selling_processes/{id}

An endpoint that allows to get selling process by its identifier.

Parameters

Name In Type Required Description
id path integer true Selling process 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/selling_processes/1",
    "type": "SellingProcess",
    "attributes": {
      "_id": 1243,
      "name": "Proces sprzedaży"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Selling process 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 SellingProcessData false none none
»» id string false none none
»» type string false none none
»» attributes SellingProcess false none none
»»» _id integer false read-only none
»»» name string false none none

get_selling_processes_{id}_steps

Code samples

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

GET https://app.bergsystem.pl/api/selling_processes/{id}/steps 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/selling_processes/{id}/steps',
{
  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/selling_processes/{id}/steps',
  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/selling_processes/{id}/steps', 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/selling_processes/{id}/steps', 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/selling_processes/{id}/steps");
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/selling_processes/{id}/steps", data)
    req.Header = headers

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

GET /selling_processes/{id}/steps

An endpoint that allows to get all steps for selling process identifier.

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 selling process step id.
filter%5Bname%5D query string false Filter by selling process step name.
filter%5Borders%5D query integer false Filter by selling process step order.
filter%5Bcolor%5D query string false Filter by selling process step color.
id path integer true Selling process step identifier
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. Supported sorting fields: * id * name * orders * color

filter%5Bid%5D: Filter by selling process step id.

filter%5Bname%5D: Filter by selling process step name.

filter%5Borders%5D: Filter by selling process step order.

filter%5Bcolor%5D: Filter by selling process step color.

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/selling_process_steps/11",
      "type": "SellingProcessStep",
      "attributes": {
        "_id": 1243,
        "name": "Lead",
        "orders": 1,
        "color": "#fa573c"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of steps of selling process. 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 [SellingProcessStepData] true none none
»» id string false none none
»» type string false none none
»» attributes SellingProcessStep false none none
»»» _id integer false read-only none
»»» name string false none none
»»» orders integer false none none
»»» color string false none none

Settlements

get_settlement_package

Code samples

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

GET https://app.bergsystem.pl/api/settlement_package 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/settlement_package',
{
  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/settlement_package',
  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/settlement_package', 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/settlement_package', 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/settlement_package");
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/settlement_package", data)
    req.Header = headers

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

GET /settlement_package

Parameters

Name In Type Required Description
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.
settlementType query integer false Filter by settlementType type
title query string false Filter by title

Detailed descriptions

settlementType: Filter by settlementType type

title: Filter by title

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": 0,
      "created": "2019-08-24",
      "updated": "2019-08-24",
      "dateCreated": "2019-08-24",
      "dateSentAmount": "2019-08-24",
      "postingDate": "2019-08-24",
      "status": 0,
      "title": "string",
      "commentAcceptPackage": "string",
      "amount": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of settlements package 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 [SettlementPackage] true none none
»» _id integer false none none
»» created string(date) false none none
»» updated string(date) false none none
»» dateCreated string(date)¦null false none none
»» dateSentAmount string(date)¦null false none none
»» postingDate string(date)¦null false none none
»» status integer false none none
»» title string false none none
»» commentAcceptPackage string false none none
»» amount integer false none none

get_settlement_package_{settlement_package_id}

Code samples

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

GET https://app.bergsystem.pl/api/settlement_package/{settlement_package_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/settlement_package/{settlement_package_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/settlement_package/{settlement_package_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/settlement_package/{settlement_package_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/settlement_package/{settlement_package_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/settlement_package/{settlement_package_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/settlement_package/{settlement_package_id}", data)
    req.Header = headers

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

GET /settlement_package/{settlement_package_id}

Parameters

Name In Type Required Description
settlement_package_id path integer true settlement package 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": 0,
    "created": "2019-08-24",
    "updated": "2019-08-24",
    "dateCreated": "2019-08-24",
    "dateSentAmount": "2019-08-24",
    "postingDate": "2019-08-24",
    "status": 0,
    "title": "string",
    "commentAcceptPackage": "string",
    "amount": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Settlement package 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 SettlementPackage false none none
»» _id integer false none none
»» created string(date) false none none
»» updated string(date) false none none
»» dateCreated string(date)¦null false none none
»» dateSentAmount string(date)¦null false none none
»» postingDate string(date)¦null false none none
»» status integer false none none
»» title string false none none
»» commentAcceptPackage string false none none
»» amount integer false none none

patch_settlement_package_{settlement_package_id}

Code samples

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

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

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

fetch('https://app.bergsystem.pl/api/settlement_package/{settlement_package_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/json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://app.bergsystem.pl/api/settlement_package/{settlement_package_id}',
  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.patch('https://app.bergsystem.pl/api/settlement_package/{settlement_package_id}', 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('PATCH','https://app.bergsystem.pl/api/settlement_package/{settlement_package_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/settlement_package/{settlement_package_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/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/settlement_package/{settlement_package_id}", data)
    req.Header = headers

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

PATCH /settlement_package/{settlement_package_id}

Body parameter

{
  "data": {
    "attributes": {
      "status": 1
    }
  }
}

Parameters

Name In Type Required Description
settlement_package_id path integer true settlement package id
body body object true none
» data body object false none
»» attributes body object false none
»»» status body integer false 0 - new
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "data": {
    "_id": 0,
    "created": "2019-08-24",
    "updated": "2019-08-24",
    "dateCreated": "2019-08-24",
    "dateSentAmount": "2019-08-24",
    "postingDate": "2019-08-24",
    "status": 0,
    "title": "string",
    "commentAcceptPackage": "string",
    "amount": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Settlement package 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 SettlementPackage false none none
»» _id integer false none none
»» created string(date) false none none
»» updated string(date) false none none
»» dateCreated string(date)¦null false none none
»» dateSentAmount string(date)¦null false none none
»» postingDate string(date)¦null false none none
»» status integer false none none
»» title string false none none
»» commentAcceptPackage string false none none
»» amount integer false none none

get_settlement

Code samples

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

GET https://app.bergsystem.pl/api/settlement 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/settlement',
{
  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/settlement',
  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/settlement', 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/settlement', 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/settlement");
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/settlement", data)
    req.Header = headers

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

GET /settlement

Parameters

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

Detailed descriptions

package: Filter by package id

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": 0,
      "created": "2019-08-24",
      "updated": "2019-08-24",
      "dateCreated": "2019-08-24",
      "dateSentAmount": "2019-08-24",
      "postingDate": "2019-08-24",
      "status": 0,
      "title": "string",
      "sendType": "string",
      "amount": 0,
      "contract": {
        "id": 0
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of settlements 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 [Settlement] true none none
»» _id integer false none none
»» created string(date) false none none
»» updated string(date) false none none
»» dateCreated string(date)¦null false none none
»» dateSentAmount string(date)¦null false none none
»» postingDate string(date)¦null false none none
»» status integer false none none
»» title string false none none
»» sendType string false none none
»» amount integer false none none
»» contract object false none none
»»» id integer false none none

get_settlement_{settlement_id}

Code samples

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

GET https://app.bergsystem.pl/api/settlement/{settlement_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/settlement/{settlement_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/settlement/{settlement_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/settlement/{settlement_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/settlement/{settlement_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/settlement/{settlement_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/settlement/{settlement_id}", data)
    req.Header = headers

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

GET /settlement/{settlement_id}

Parameters

Name In Type Required Description
settlement_id path integer true settlement 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": 0,
    "created": "2019-08-24",
    "updated": "2019-08-24",
    "dateCreated": "2019-08-24",
    "dateSentAmount": "2019-08-24",
    "postingDate": "2019-08-24",
    "status": 0,
    "title": "string",
    "sendType": "string",
    "amount": 0,
    "contract": {
      "id": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Settlement 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 Settlement false none none
»» _id integer false none none
»» created string(date) false none none
»» updated string(date) false none none
»» dateCreated string(date)¦null false none none
»» dateSentAmount string(date)¦null false none none
»» postingDate string(date)¦null false none none
»» status integer false none none
»» title string false none none
»» sendType string false none none
»» amount integer false none none
»» contract object false none none
»»» id integer false none none

patch_settlement_{settlement_id}

Code samples

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

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

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

fetch('https://app.bergsystem.pl/api/settlement/{settlement_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/json',
  'X-Tenant' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://app.bergsystem.pl/api/settlement/{settlement_id}',
  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.patch('https://app.bergsystem.pl/api/settlement/{settlement_id}', 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('PATCH','https://app.bergsystem.pl/api/settlement/{settlement_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/settlement/{settlement_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/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/settlement/{settlement_id}", data)
    req.Header = headers

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

PATCH /settlement/{settlement_id}

Body parameter

{
  "data": {
    "attributes": {
      "status": 1
    }
  }
}

Parameters

Name In Type Required Description
settlement_id path integer true settlement id
body body object true none
» data body object false none
»» attributes body object false none
»»» status body integer false 0 - new
X-Tenant header string false "Tenant" field value from GET /token response. Required only for cloud version API.

Example responses

200 Response

{
  "data": {
    "_id": 0,
    "created": "2019-08-24",
    "updated": "2019-08-24",
    "dateCreated": "2019-08-24",
    "dateSentAmount": "2019-08-24",
    "postingDate": "2019-08-24",
    "status": 0,
    "title": "string",
    "sendType": "string",
    "amount": 0,
    "contract": {
      "id": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Settlement 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 Settlement false none none
»» _id integer false none none
»» created string(date) false none none
»» updated string(date) false none none
»» dateCreated string(date)¦null false none none
»» dateSentAmount string(date)¦null false none none
»» postingDate string(date)¦null false none none
»» status integer false none none
»» title string false none none
»» sendType string false none none
»» amount integer false none none
»» contract object false none none
»»» id integer false none none

Surveys

get_survey

Code samples

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

GET https://app.bergsystem.pl/api/survey 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/survey',
{
  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/survey',
  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/survey', 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/survey', 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/survey");
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/survey", data)
    req.Header = headers

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

GET /survey

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

{
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "id": "/api/survey/1",
      "type": "Survey",
      "attributes": {
        "_id": "string",
        "_type": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of surveys 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
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [SurveyData] true none none
»» id string false none none
»» type string false none none
»» attributes Survey false none none
»»» _id string false none none
»»» _type string false none none

get_survey_client

Code samples

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

GET https://app.bergsystem.pl/api/survey/client?customerId=0 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/survey/client?customerId=0',
{
  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/survey/client',
  params: {
  'customerId' => 'integer'
}, 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/survey/client', params={
  'customerId': '0'
}, 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/survey/client', 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/survey/client?customerId=0");
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/survey/client", data)
    req.Header = headers

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

GET /survey/client

Parameters

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

Example responses

200 Response

{
  "meta": {
    "totalItems": 4,
    "itemsPerPage": 4,
    "currentPage": 1
  },
  "data": [
    {
      "id": "/api/survey_clients/1",
      "type": "Survey",
      "attributes": {
        "_id": "string",
        "_type": "string",
        "name": "string",
        "clientId": 0,
        "clientName": "string",
        "createdDate": "2020-09-25T00:00:00+02:00"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of client's surveys 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
» meta Meta false none none
»» totalItems integer false none none
»» itemsPerPage integer false none none
»» currentPage integer false none none
» data [SurveyClientData] true none none
»» id string false none none
»» type string false none none
»» attributes SurveyClient false none none
»»» _id string false none none
»»» _type string false none none
»»» name string false none none
»»» clientId integer false none none
»»» clientName string false none none
»»» createdDate string(date-time) false read-only Data dodania

post_survey_generator

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/survey/generator \
  -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/survey/generator HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/vnd.api+json
Accept: application/json
X-Tenant: string

const inputBody = '{
  "data": {
    "attributes": {
      "customerId": 0,
      "surveyId": 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/survey/generator',
{
  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/survey/generator',
  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/survey/generator', 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/survey/generator', 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/survey/generator");
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/survey/generator", data)
    req.Header = headers

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

POST /survey/generator

Body parameter

{
  "data": {
    "attributes": {
      "customerId": 0,
      "surveyId": 0
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body object false none
»»» customerId body integer false customer id
»»» surveyId body integer false survey 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": "string",
    "type": "string",
    "attributes": {
      "customerId": 0,
      "surveyId": 0,
      "url": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK File 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 200

Name Type Required Restrictions Description
» data object false none none
»» id string false none none
»» type string false none none
»» attributes SurveyGenerator false none none
»»» customerId integer false none none
»»» surveyId integer false none none
»»» url string false none none

Tags

get_tags

Code samples

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

GET https://app.bergsystem.pl/api/tags 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/tags',
{
  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/tags',
  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/tags', 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/tags', 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/tags");
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/tags", data)
    req.Header = headers

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

GET /tags

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/tags/1",
      "type": "Tags",
      "attributes": {
        "_id": 1,
        "name": "Simple name",
        "type": true,
        "bgColor": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of tags 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 [TagsData] true none none
»» id string false none none
»» type string false none none
»» attributes Tags false none none
»»» _id integer false read-only none
»»» name string false none none
»»» type boolean false none none
»»» bgColor string false none none

post_tags

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/tags \
  -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/tags 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 name",
      "type": true,
      "bgColor": "string"
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/tags',
{
  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/tags',
  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/tags', 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/tags', 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/tags");
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/tags", data)
    req.Header = headers

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

POST /tags

Body parameter

{
  "data": {
    "attributes": {
      "name": "Simple name",
      "type": true,
      "bgColor": "string"
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body Tags false none
»»» _id body integer false none
»»» name body string false none
»»» type body boolean false none
»»» bgColor body string 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/tags/1",
    "type": "Tags",
    "attributes": {
      "_id": 1,
      "name": "Sample tag",
      "_type": 1,
      "bgColor": "string"
    }
  }
}

Responses

Status Meaning Description Schema
201 Created Tags 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 object false none none
»» id string false none none
»» type string false none none
»» attributes object false none none
»»» _id integer false none none
»»» name string false none none
»»» _type integer false none none
»»» bgColor string false none none

get_tags_{id}

Code samples

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

GET https://app.bergsystem.pl/api/tags/{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/tags/{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/tags/{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/tags/{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/tags/{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/tags/{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/tags/{id}", data)
    req.Header = headers

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

GET /tags/{id}

Parameters

Name In Type Required Description
id path integer true Tags 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/tags/1",
    "type": "Tags",
    "attributes": {
      "_id": 1,
      "name": "Sample tag",
      "_type": 1,
      "bgColor": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Tags 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 object false none none
»» id string false none none
»» type string false none none
»» attributes object false none none
»»» _id integer false none none
»»» name string false none none
»»» _type integer false none none
»»» bgColor string false none none

Tokens

post_token

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://app.bergsystem.pl/api/token HTTP/1.1
Host: app.bergsystem.pl
Content-Type: application/x-www-form-urlencoded
Accept: application/json

const inputBody = '{
  "client_id": "api-client",
  "client_secret": "secret",
  "grant_type": "password",
  "scope": "string",
  "username": "john.doe@bersystem.pl",
  "password": "my_secret",
  "refresh_token": "string"
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/token',
{
  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/x-www-form-urlencoded',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

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

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/x-www-form-urlencoded',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

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

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/x-www-form-urlencoded',
    'Accept' => 'application/json',
    '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/token', 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/token");
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/x-www-form-urlencoded"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

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

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

POST /token

Body parameter

client_id: api-client
client_secret: secret
grant_type: password
scope: string
username: john.doe@bersystem.pl
password: my_secret
refresh_token: string

A endpoint that allows to get the authorization token required by other api requests

Parameters

Name In Type Required Description
body body object true none
» client_id body string true none
» client_secret body string false none
» grant_type body string true none
» scope body string true none
» username body string¦null false none
» password body string¦null false none
» refresh_token body string¦null false none

Enumerated Values

Parameter Value
» grant_type password
» grant_type refresh_token
» grant_type authorization_code
» grant_type client_credentials

Example responses

200 Response

{
  "token_type": "Bearer",
  "expires_in": 3600,
  "access_token": "very_long_string",
  "refresh_token": "very_long_string2",
  "tenant": "My company"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Error. Error
401 Unauthorized Unauthorized. Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» token_type string true none none
» expires_in integer true none none
» access_token string true none none
» refresh_token string true none none
» tenant string false none OPTIONAL - this field is being used on cloud version only

Enumerated Values

Property Value
token_type Bearer

User Origins

get_users_origins

Code samples

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

GET https://app.bergsystem.pl/api/users/origins 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/users/origins',
{
  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/users/origins',
  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/users/origins', 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/users/origins', 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/users/origins");
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/users/origins", data)
    req.Header = headers

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

GET /users/origins

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/products/1",
      "type": "Product",
      "attributes": {
        "_id": 1,
        "name": "string",
        "producer": {},
        "category": {},
        "conferenceCategory": {},
        "productType": {},
        "provider": {},
        "priceComission": "string",
        "points": 0,
        "place": "string",
        "status": "string",
        "parentUser": {},
        "limit": 0,
        "dateStart": "string",
        "dateEnd": "string",
        "dateLimit": "string",
        "type": "string",
        "time": "string",
        "description": "string",
        "price": "string",
        "priceClient": "string",
        "pricePlus": "string",
        "priceClientPlus": "string",
        "wwwPage": "string",
        "active": true,
        "conference": 0,
        "pointsType": "string",
        "priceType": "string",
        "underProduct": {},
        "emailAddress": "string",
        "mailTitleConfirm": "string",
        "mailTitleInvitation": "string",
        "vat": 0,
        "currency": {},
        "amountCurrency": 0,
        "series": "string",
        "proposal": "string",
        "valuation": 0,
        "useCountType": "string",
        "risk": "string",
        "aliorCountProduct": "string",
        "expired": "2019-08-24T14:15:22Z",
        "beforeExpired": "2019-08-24T14:15:22Z",
        "tags": "string",
        "paymentType": "string",
        "withCurrency": "string",
        "withCommissions": "string",
        "withPoints": "string",
        "addToContract": true,
        "backMessage": "string",
        "bannerPathImage": "string",
        "sales": {},
        "file": {},
        "priorityComission": true,
        "minPrice": "string",
        "maxPrice": "string",
        "managementFee": "string",
        "repurchase": "string",
        "withoutFee": "string",
        "investmentHorizon": "string",
        "frequencyWithdrawals": "string",
        "percent": "string",
        "percentForCompany": "string",
        "percentForCompanyResumption": "string",
        "segment": "string",
        "distributionPayment": "string",
        "companyCommissionEditable": "string",
        "needLogin": true,
        "confirmNow": 0,
        "conferenceProduct": {},
        "showInIntranet": true,
        "oneProductStep": "string",
        "productNumberFrom": "string",
        "productNumberTo": "string",
        "contractType": {},
        "dateOfRedemption": "2019-08-24T14:15:22Z",
        "bondType": "string",
        "goalType": "string",
        "priceAddPayment": 0,
        "numberOfShares": 0,
        "otherCommissionForResumption": "string",
        "fullButton": "string",
        "buttonColor": "string",
        "buttonTextColor": "string",
        "outsideDescription": "string",
        "import": {},
        "confirmSms": true,
        "updateUserDataData": true,
        "productDetails": {},
        "nowProductDetail": {},
        "productDetailsWasCheck": true,
        "invoiceProduct": {},
        "formTemplate": 0,
        "headOfCommission": "string",
        "memberOfCommission": "string",
        "memberOfCommissionTwo": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of products 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 [ProductData] true none none
»» id string false none none
»» type string false none none
»» attributes Product false none none
»»» _id integer false read-only none
»»» name string false none none
»»» producer object false none none
»»» category object false none none
»»» conferenceCategory object false none none
»»» productType object false none none
»»» provider object false none none
»»» priceComission string false none none
»»» points integer false none none
»»» place string false none none
»»» status string false none none
»»» parentUser object false none none
»»» limit integer false none none
»»» dateStart string false none none
»»» dateEnd string false none none
»»» dateLimit string false none none
»»» type string false none none
»»» time string false none none
»»» description string false none none
»»» price string false none none
»»» priceClient string false none none
»»» pricePlus string false none none
»»» priceClientPlus string false none none
»»» wwwPage string false none none
»»» active boolean false none none
»»» conference integer false none none
»»» pointsType string false none none
»»» priceType string false none none
»»» underProduct object false none none
»»» emailAddress string false none none
»»» mailTitleConfirm string false none none
»»» mailTitleInvitation string false none none
»»» vat integer false none none
»»» currency object false none none
»»» amountCurrency integer false none none
»»» series string false none none
»»» proposal string false none none
»»» valuation integer false none none
»»» useCountType string false none none
»»» risk string false none none
»»» aliorCountProduct string false none none
»»» expired string(date-time) false none none
»»» beforeExpired string(date-time) false none none
»»» tags string false none none
»»» paymentType string false none none
»»» withCurrency string false none none
»»» withCommissions string false none none
»»» withPoints string false none none
»»» addToContract boolean false none none
»»» backMessage string false none none
»»» bannerPathImage string false none none
»»» sales object false none none
»»» file object false none none
»»» priorityComission boolean false none none
»»» minPrice string false none none
»»» maxPrice string false none none
»»» managementFee string false none none
»»» repurchase string false none none
»»» withoutFee string false none none
»»» investmentHorizon string false none none
»»» frequencyWithdrawals string false none none
»»» percent string false none none
»»» percentForCompany string false none none
»»» percentForCompanyResumption string false none none
»»» segment string false none none
»»» distributionPayment string false none none
»»» companyCommissionEditable string false none none
»»» needLogin boolean false none none
»»» confirmNow integer false none none
»»» conferenceProduct object false none none
»»» showInIntranet boolean false none none
»»» oneProductStep string false none none
»»» productNumberFrom string false none none
»»» productNumberTo string false none none
»»» contractType object false none none
»»» dateOfRedemption string(date-time) false none none
»»» bondType string false none none
»»» goalType string false none none
»»» priceAddPayment integer false none none
»»» numberOfShares integer false none none
»»» otherCommissionForResumption string false none none
»»» fullButton string false none none
»»» buttonColor string false none none
»»» buttonTextColor string false none none
»»» outsideDescription string false none none
»»» import object false none none
»»» confirmSms boolean false none none
»»» updateUserDataData boolean false none none
»»» productDetails object false none none
»»» nowProductDetail object false none none
»»» productDetailsWasCheck boolean false none none
»»» invoiceProduct object false none none
»»» formTemplate number false none none
»»» headOfCommission string false none none
»»» memberOfCommission string false none none
»»» memberOfCommissionTwo string false none none

get_users_origins_{id}

Code samples

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

GET https://app.bergsystem.pl/api/users/origins/{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/users/origins/{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/users/origins/{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/users/origins/{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/users/origins/{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/users/origins/{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/users/origins/{id}", data)
    req.Header = headers

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

GET /users/origins/{id}

Parameters

Name In Type Required Description
id path integer true Origin 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": "string",
    "producer": {},
    "category": {},
    "conferenceCategory": {},
    "productType": {},
    "provider": {},
    "priceComission": "string",
    "points": 0,
    "place": "string",
    "status": "string",
    "parentUser": {},
    "limit": 0,
    "dateStart": "string",
    "dateEnd": "string",
    "dateLimit": "string",
    "type": "string",
    "time": "string",
    "description": "string",
    "price": "string",
    "priceClient": "string",
    "pricePlus": "string",
    "priceClientPlus": "string",
    "wwwPage": "string",
    "active": true,
    "conference": 0,
    "pointsType": "string",
    "priceType": "string",
    "underProduct": {},
    "emailAddress": "string",
    "mailTitleConfirm": "string",
    "mailTitleInvitation": "string",
    "vat": 0,
    "currency": {},
    "amountCurrency": 0,
    "series": "string",
    "proposal": "string",
    "valuation": 0,
    "useCountType": "string",
    "risk": "string",
    "aliorCountProduct": "string",
    "expired": "2019-08-24T14:15:22Z",
    "beforeExpired": "2019-08-24T14:15:22Z",
    "tags": "string",
    "paymentType": "string",
    "withCurrency": "string",
    "withCommissions": "string",
    "withPoints": "string",
    "addToContract": true,
    "backMessage": "string",
    "bannerPathImage": "string",
    "sales": {},
    "file": {},
    "priorityComission": true,
    "minPrice": "string",
    "maxPrice": "string",
    "managementFee": "string",
    "repurchase": "string",
    "withoutFee": "string",
    "investmentHorizon": "string",
    "frequencyWithdrawals": "string",
    "percent": "string",
    "percentForCompany": "string",
    "percentForCompanyResumption": "string",
    "segment": "string",
    "distributionPayment": "string",
    "companyCommissionEditable": "string",
    "needLogin": true,
    "confirmNow": 0,
    "conferenceProduct": {},
    "showInIntranet": true,
    "oneProductStep": "string",
    "productNumberFrom": "string",
    "productNumberTo": "string",
    "contractType": {},
    "dateOfRedemption": "2019-08-24T14:15:22Z",
    "bondType": "string",
    "goalType": "string",
    "priceAddPayment": 0,
    "numberOfShares": 0,
    "otherCommissionForResumption": "string",
    "fullButton": "string",
    "buttonColor": "string",
    "buttonTextColor": "string",
    "outsideDescription": "string",
    "import": {},
    "confirmSms": true,
    "updateUserDataData": true,
    "productDetails": {},
    "nowProductDetail": {},
    "productDetailsWasCheck": true,
    "invoiceProduct": {},
    "formTemplate": 0,
    "headOfCommission": "string",
    "memberOfCommission": "string",
    "memberOfCommissionTwo": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Product 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 Product false none none
»» _id integer false read-only none
»» name string false none none
»» producer object false none none
»» category object false none none
»» conferenceCategory object false none none
»» productType object false none none
»» provider object false none none
»» priceComission string false none none
»» points integer false none none
»» place string false none none
»» status string false none none
»» parentUser object false none none
»» limit integer false none none
»» dateStart string false none none
»» dateEnd string false none none
»» dateLimit string false none none
»» type string false none none
»» time string false none none
»» description string false none none
»» price string false none none
»» priceClient string false none none
»» pricePlus string false none none
»» priceClientPlus string false none none
»» wwwPage string false none none
»» active boolean false none none
»» conference integer false none none
»» pointsType string false none none
»» priceType string false none none
»» underProduct object false none none
»» emailAddress string false none none
»» mailTitleConfirm string false none none
»» mailTitleInvitation string false none none
»» vat integer false none none
»» currency object false none none
»» amountCurrency integer false none none
»» series string false none none
»» proposal string false none none
»» valuation integer false none none
»» useCountType string false none none
»» risk string false none none
»» aliorCountProduct string false none none
»» expired string(date-time) false none none
»» beforeExpired string(date-time) false none none
»» tags string false none none
»» paymentType string false none none
»» withCurrency string false none none
»» withCommissions string false none none
»» withPoints string false none none
»» addToContract boolean false none none
»» backMessage string false none none
»» bannerPathImage string false none none
»» sales object false none none
»» file object false none none
»» priorityComission boolean false none none
»» minPrice string false none none
»» maxPrice string false none none
»» managementFee string false none none
»» repurchase string false none none
»» withoutFee string false none none
»» investmentHorizon string false none none
»» frequencyWithdrawals string false none none
»» percent string false none none
»» percentForCompany string false none none
»» percentForCompanyResumption string false none none
»» segment string false none none
»» distributionPayment string false none none
»» companyCommissionEditable string false none none
»» needLogin boolean false none none
»» confirmNow integer false none none
»» conferenceProduct object false none none
»» showInIntranet boolean false none none
»» oneProductStep string false none none
»» productNumberFrom string false none none
»» productNumberTo string false none none
»» contractType object false none none
»» dateOfRedemption string(date-time) false none none
»» bondType string false none none
»» goalType string false none none
»» priceAddPayment integer false none none
»» numberOfShares integer false none none
»» otherCommissionForResumption string false none none
»» fullButton string false none none
»» buttonColor string false none none
»» buttonTextColor string false none none
»» outsideDescription string false none none
»» import object false none none
»» confirmSms boolean false none none
»» updateUserDataData boolean false none none
»» productDetails object false none none
»» nowProductDetail object false none none
»» productDetailsWasCheck boolean false none none
»» invoiceProduct object false none none
»» formTemplate number false none none
»» headOfCommission string false none none
»» memberOfCommission string false none none
»» memberOfCommissionTwo string false none none

User types

get_usertypes

Code samples

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

GET https://app.bergsystem.pl/api/usertypes 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/usertypes',
{
  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/usertypes',
  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/usertypes', 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/usertypes', 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/usertypes");
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/usertypes", data)
    req.Header = headers

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

GET /usertypes

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/usertypes/1",
      "type": "UserType",
      "attributes": {
        "_id": 1,
        "name": "Simple name",
        "description": "Simple description",
        "active": true,
        "userDataType": {},
        "points": "string",
        "rank": 0,
        "nextPoints": 0,
        "userTypeNext": {},
        "bgColor": "string",
        "isSection": false,
        "groups": {},
        "isCandidate": true,
        "isOldSystem": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of user types 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 [UserTypeData] true none none
»» id string false none none
»» type string false none none
»» attributes UserType false none none
»»» _id integer false read-only none
»»» name string false none none
»»» description string false none none
»»» active boolean false none none
»»» userDataType object false none none
»»» points string false none none
»»» rank integer false none none
»»» nextPoints integer false none none
»»» userTypeNext object false none none
»»» bgColor string false none none
»»» isSection boolean false none none
»»» groups object false none none
»»» isCandidate boolean false none none
»»» isOldSystem string false none none

post_usertypes

Code samples

# You can also use wget
curl -X POST https://app.bergsystem.pl/api/usertypes \
  -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/usertypes 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 name",
      "description": "Simple description",
      "active": true,
      "userDataType": {},
      "points": "string",
      "rank": 0,
      "nextPoints": 0,
      "userTypeNext": {},
      "bgColor": "string",
      "isSection": false,
      "groups": {},
      "isCandidate": true,
      "isOldSystem": "string"
    }
  }
}';
const headers = {
  'Content-Type':'application/vnd.api+json',
  'Accept':'application/json',
  'X-Tenant':'string',
  'Authorization':'Bearer {access-token}'
};

fetch('https://app.bergsystem.pl/api/usertypes',
{
  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/usertypes',
  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/usertypes', 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/usertypes', 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/usertypes");
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/usertypes", data)
    req.Header = headers

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

POST /usertypes

Body parameter

{
  "data": {
    "attributes": {
      "name": "Simple name",
      "description": "Simple description",
      "active": true,
      "userDataType": {},
      "points": "string",
      "rank": 0,
      "nextPoints": 0,
      "userTypeNext": {},
      "bgColor": "string",
      "isSection": false,
      "groups": {},
      "isCandidate": true,
      "isOldSystem": "string"
    }
  }
}

Parameters

Name In Type Required Description
body body object true none
» data body object false none
»» attributes body UserType false none
»»» _id body integer false none
»»» name body string false none
»»» description body string false none
»»» active body boolean false none
»»» userDataType body object false none
»»» points body string false none
»»» rank body integer false none
»»» nextPoints body integer false none
»»» userTypeNext body object false none
»»» bgColor body string false none
»»» isSection body boolean false none
»»» groups body object false none
»»» isCandidate body boolean false none
»»» isOldSystem body string 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 name",
    "description": "Simple description",
    "active": true,
    "userDataType": {},
    "points": "string",
    "rank": 0,
    "nextPoints": 0,
    "userTypeNext": {},
    "bgColor": "string",
    "isSection": false,
    "groups": {},
    "isCandidate": true,
    "isOldSystem": "string"
  }
}

Responses

Status Meaning Description Schema
201 Created User type 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 UserType false none none
»» _id integer false read-only none
»» name string false none none
»» description string false none none
»» active boolean false none none
»» userDataType object false none none
»» points string false none none
»» rank integer false none none
»» nextPoints integer false none none
»» userTypeNext object false none none
»» bgColor string false none none
»» isSection boolean false none none
»» groups object false none none
»» isCandidate boolean false none none
»» isOldSystem string false none none

get_usertypes_{id}

Code samples

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

GET https://app.bergsystem.pl/api/usertypes/{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/usertypes/{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/usertypes/{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/usertypes/{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/usertypes/{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/usertypes/{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/usertypes/{id}", data)
    req.Header = headers

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

GET /usertypes/{id}

Parameters

Name In Type Required Description
id path integer true User type 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 name",
    "description": "Simple description",
    "active": true,
    "userDataType": {},
    "points": "string",
    "rank": 0,
    "nextPoints": 0,
    "userTypeNext": {},
    "bgColor": "string",
    "isSection": false,
    "groups": {},
    "isCandidate": true,
    "isOldSystem": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK User type 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 UserType false none none
»» _id integer false read-only none
»» name string false none none
»» description string false none none
»» active boolean false none none
»» userDataType object false none none
»» points string false none none
»» rank integer false none none
»» nextPoints integer false none none
»» userTypeNext object false none none
»» bgColor string false none none
»» isSection boolean false none none
»» groups object false none none
»» isCandidate boolean false none none
»» isOldSystem string false none none

Schemas

BaseUserData

{
  "_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"
}

Properties

Name Type Required Restrictions Description
_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.

Enumerated Values

Property Value
visibility ALL_COMPANY
visibility STRUCTURAL
visibility ADVISER_ONLY

BaseUserDataCommonOutputFields

{
  "state": "Krakow",
  "region": "Malopolskie",
  "country": "Polska",
  "invoiceCountry": "Polska",
  "additionalCountry": "Polska",
  "officeCountry": "Polska",
  "origins": "Lead"
}

Properties

Name Type Required Restrictions Description
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

BaseUserDataCommonInputFields

{
  "originsId": 1,
  "stateId": 11,
  "regionId": 12,
  "countryId": 135,
  "invoiceCountryId": 135,
  "additionalCountryId": 135,
  "officeCountryId": 135
}

Properties

Name Type Required Restrictions Description
originsId integer false none IDs and its meaning can be found at Zarządzanie polami (click on "Pochodzenie").
stateId integer false none ID can be found at Zarządzanie polami - click "Powiat"
regionId integer false none ID can be found at Zarządzanie polami - click "Region"
countryId integer false none Poland - '135', Germany - '122', United Kingodm - '184'
invoiceCountryId integer false none Poland - '135', Germany - '122', United Kingodm - '184'
additionalCountryId integer false none Poland - '135', Germany - '122', United Kingodm - '184'
officeCountryId integer false none Poland - '135', Germany - '122', United Kingodm - '184'

CalendarEventType

{
  "_id": 12,
  "name": "Simple calendar type",
  "bgColor": null,
  "fontAwesome": "phone"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
bgColor string¦null false none none
fontAwesome string false none none

CalendarEventTypeData

{
  "id": "/api/events/types/1",
  "type": "CalendarType",
  "attributes": {
    "_id": 12,
    "name": "Simple calendar type",
    "bgColor": null,
    "fontAwesome": "phone"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes CalendarEventType false none none

Category

{
  "_id": 6,
  "name": "Simple category",
  "type": "string"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
type string false none none

CategoryData

{
  "id": "/api/products/categories/1",
  "type": "Category",
  "attributes": {
    "_id": 6,
    "name": "Simple category",
    "type": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Category false none none

Customer

{
  "_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"
}

Properties

allOf

Name Type Required Restrictions Description
anonymous BaseUserData false none none

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

Enumerated Values

Property Value
gender male
gender female

CustomerData

{
  "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"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Customer false none none

CustomerExtraFieldData

{
  "id": "/api/customer_extra_fields/1243",
  "type": "CustomerExtraField",
  "attributes": {
    "_id": 1243,
    "label": "Product name",
    "key": "ProductName1"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes ExtraField false none none

CustomerExtraAgreementsData

{
  "id": "/api/customer_extra_agreements/1243",
  "type": "CustomerExtraAgreement",
  "attributes": {
    "_id": 1243,
    "label": "Agreement name",
    "key": "smsAgreement",
    "active": true
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes ExtraAgreement false none none

Company

{
  "_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"
}

Properties

allOf

Name Type Required Restrictions Description
anonymous BaseUserData false none none

and

Name Type Required Restrictions Description
anonymous BaseUserDataCommonOutputFields false none none

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

CompanyData

{
  "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"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Company false none none

ContractExtraFieldData

{
  "id": "/api/contract_extra_fields/1243",
  "type": "ContractExtraField",
  "attributes": {
    "_id": 1243,
    "label": "Product name",
    "key": "ProductName1"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes ExtraField false none none

DeleteUserData

{
  "id": "string",
  "type": "DELETE_USER_DATA_EMPLOYEE",
  "createdTimestamp": 0,
  "data": {
    "userDataId": 0,
    "status": "DELETE"
  }
}

request of delete user data for webhook

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
createdTimestamp integer false none none
data object false none none
» userDataId integer false none none
» status string false none none

Enumerated Values

Property Value
type DELETE_USER_DATA_EMPLOYEE
type DELETE_USER_DATA_CUSTOMER
type DELETE_USER_DATA_COMPANY
status DELETE

Donation

{
  "id": 0,
  "productId": 0,
  "contractId": 0,
  "active": true,
  "addDate": "2019-08-24",
  "removeData": "2019-08-24",
  "paymentDate": "2019-08-24",
  "price": "string",
  "priceCommission": "string",
  "status": "string",
  "changeUserId": 0,
  "description": "string",
  "paymentNumber": 0
}

Properties

Name Type Required Restrictions Description
id integer false none none
productId integer¦null false none none
contractId integer¦null false none none
active boolean false none none
addDate string(date)¦null false none none
removeData string(date)¦null false none none
paymentDate string(date)¦null false none none
price string¦null false none none
priceCommission string¦null false none none
status string¦null false none none
changeUserId integer¦null false none none
description string¦null false none none
paymentNumber integer¦null false none none

Employee

{
  "_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"
}

Properties

allOf

Name Type Required Restrictions Description
anonymous BaseUserData false none none

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

Enumerated Values

Property Value
gender male
gender female
employeeType person
employeeType company

EmployeeData

{
  "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"
  }
}

Properties

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

Error

{
  "errors": [
    {
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string"
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
errors [object] false none none
» title string false none none
» detail string false none none
» source object false none none
»» pointer string false none none

Event

{
  "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"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes EventData false none none

EventData

{
  "_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"
}

Properties

Name Type Required Restrictions Description
_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

ExtraAgreement

{
  "_id": 1243,
  "label": "Agreement name",
  "key": "smsAgreement",
  "active": true
}

Properties

Name Type Required Restrictions Description
_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

ExtraField

{
  "_id": 1243,
  "label": "Product name",
  "key": "ProductName1"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
label string false none none
key string false none none

File

{
  "_id": "string",
  "_type": "string",
  "name": "string",
  "extension": "string",
  "base64": "string",
  "objectId": "string"
}

Properties

Name Type Required Restrictions Description
_id string false none none
_type string false none none
name string false none none
extension string false none none
base64 string false none none
objectId string false none none

FileData

{
  "id": "/api/file/1",
  "type": "File",
  "attributes": {
    "_id": "string",
    "_type": "string",
    "name": "string",
    "extension": "string",
    "base64": "string",
    "objectId": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes File false none none

Goal

{
  "_id": 1,
  "name": "Simple category",
  "goalDay": 0,
  "goalWeek": 0,
  "goalMonth": 0,
  "goalQuarter": 0,
  "goalHalfYear": 0,
  "goalYear": 0,
  "active": true
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
goalDay integer false none none
goalWeek integer false none none
goalMonth integer false none none
goalQuarter integer false none none
goalHalfYear integer false none none
goalYear integer false none none
active boolean false none none

GoalData

{
  "id": "/api/goals/1",
  "type": "Goal",
  "attributes": {
    "_id": 1,
    "name": "Simple category",
    "goalDay": 0,
    "goalWeek": 0,
    "goalMonth": 0,
    "goalQuarter": 0,
    "goalHalfYear": 0,
    "goalYear": 0,
    "active": true
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Goal false none none

Insurance

{
  "program": "string",
  "producer": "string"
}

Properties

Name Type Required Restrictions Description
program string false none none
producer string false none none

InvoiceProduct

{
  "_id": 1,
  "name": "Simple invoice product",
  "senderType": 1
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
senderType object false none none

InvoiceProductData

{
  "id": "/api/goals/1",
  "type": "InvoiceProduct",
  "attributes": {
    "_id": 1,
    "name": "Simple invoice product",
    "senderType": 1
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes InvoiceProduct false none none

Me

{
  "_id": 1,
  "name": "string",
  "firstName": "string",
  "lastName": "string",
  "imagePath": "string",
  "userTypeName": "string"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
firstName string false none none
lastName string false none none
imagePath string false none none
userTypeName string false none none

MeData

{
  "id": "string",
  "type": "Me",
  "attributes": {
    "_id": 1,
    "name": "string",
    "firstName": "string",
    "lastName": "string",
    "imagePath": "string",
    "userTypeName": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Me false none none

Meta

{
  "totalItems": 4,
  "itemsPerPage": 4,
  "currentPage": 1
}

Properties

Name Type Required Restrictions Description
totalItems integer false none none
itemsPerPage integer false none none
currentPage integer false none none

Notification

{
  "id": "/api/notification/1",
  "type": "Notification",
  "attributes": {
    "_id": 0,
    "name": "string",
    "descritpion": "string",
    "employeeId": 0,
    "clientId": 0,
    "clientCompanyEmployee": 0,
    "contractId": 0,
    "calendarId": 0,
    "system": 0,
    "active": true,
    "createdDate": "2019-08-24",
    "linkAction": "string",
    "module": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes NotificationData false none none

NotificationData

{
  "_id": 0,
  "name": "string",
  "descritpion": "string",
  "employeeId": 0,
  "clientId": 0,
  "clientCompanyEmployee": 0,
  "contractId": 0,
  "calendarId": 0,
  "system": 0,
  "active": true,
  "createdDate": "2019-08-24",
  "linkAction": "string",
  "module": "string"
}

Properties

Name Type Required Restrictions Description
_id integer false none none
name string false none none
descritpion string false none none
employeeId integer false none none
clientId integer¦null false none none
clientCompanyEmployee integer¦null false none none
contractId integer¦null false none none
calendarId integer¦null false none none
system integer¦null false none none
active boolean false none none
createdDate string(date)¦null false none none
linkAction string¦null false none none
module string¦null false none none

NotificationType

"sale"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous sale
anonymous sale_opportunity
anonymous contact
anonymous event
anonymous settlement
anonymous plan
anonymous birthday
anonymous intranet
anonymous import
anonymous export

Origin

{
  "_id": 0,
  "name": "string",
  "context": "string",
  "percentage": "string"
}

Properties

Name Type Required Restrictions Description
_id integer false none none
name string false none none
context string false none none
percentage string false none none

OriginData

{
  "id": "/api/users/origins/1",
  "type": "UserDataOrgin",
  "attributes": {
    "_id": 0,
    "name": "string",
    "context": "string",
    "percentage": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Origin false none none

Paycheck

{
  "id": 0,
  "contractId": 0,
  "contractDonationId": 0,
  "active": true,
  "status": "string",
  "changeDate": "2019-08-24",
  "addDate": "2019-08-24",
  "removeDate": "2019-08-24",
  "userId": 0,
  "addUserId": 0,
  "changeUserId": 0,
  "removeUserId": 0,
  "acceptedUserId": 0,
  "paymentUserId": 0,
  "resetUserId": 0,
  "resetDate": "2019-08-24",
  "paymentStatus": "string",
  "amount": "string",
  "points": "string",
  "pricePoints": "string",
  "description": "string",
  "importId": 0
}

Properties

Name Type Required Restrictions Description
id integer false none none
contractId integer false none none
contractDonationId integer false none none
active boolean false none none
status string false none none
changeDate string(date)¦null false none none
addDate string(date) false none none
removeDate string(date)¦null false none none
userId integer false none none
addUserId integer false none none
changeUserId integer false none none
removeUserId integer false none none
acceptedUserId integer false none none
paymentUserId integer false none none
resetUserId integer false none none
resetDate string(date)¦null false none none
paymentStatus string false none none
amount string false none none
points string false none none
pricePoints string false none none
description string false none none
importId integer false none none

{
  "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"
}

Properties

Name Type Required Restrictions Description
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

Plans

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

Properties

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

PlansData

{
  "id": "/api/employees/goals/1",
  "type": "Plans",
  "attributes": {
    "_id": 1,
    "name": "Simple plan",
    "contractFieldType": {}
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Plans false none none

Producer

{
  "_id": 1,
  "name": "Simple producer",
  "description": "Simple description",
  "settleCash": true,
  "settlePrinting": true,
  "recrutiment": true
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
description string false none none
settleCash boolean false none none
settlePrinting boolean false none none
recrutiment boolean false none none

ProducerData

{
  "id": "/api/products/producers/1",
  "type": "Producer",
  "attributes": {
    "_id": 1,
    "name": "Simple producer",
    "description": "Simple description",
    "settleCash": true,
    "settlePrinting": true,
    "recrutiment": true
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Producer false none none

Product

{
  "_id": 1,
  "name": "string",
  "producer": {},
  "category": {},
  "conferenceCategory": {},
  "productType": {},
  "provider": {},
  "priceComission": "string",
  "points": 0,
  "place": "string",
  "status": "string",
  "parentUser": {},
  "limit": 0,
  "dateStart": "string",
  "dateEnd": "string",
  "dateLimit": "string",
  "type": "string",
  "time": "string",
  "description": "string",
  "price": "string",
  "priceClient": "string",
  "pricePlus": "string",
  "priceClientPlus": "string",
  "wwwPage": "string",
  "active": true,
  "conference": 0,
  "pointsType": "string",
  "priceType": "string",
  "underProduct": {},
  "emailAddress": "string",
  "mailTitleConfirm": "string",
  "mailTitleInvitation": "string",
  "vat": 0,
  "currency": {},
  "amountCurrency": 0,
  "series": "string",
  "proposal": "string",
  "valuation": 0,
  "useCountType": "string",
  "risk": "string",
  "aliorCountProduct": "string",
  "expired": "2019-08-24T14:15:22Z",
  "beforeExpired": "2019-08-24T14:15:22Z",
  "tags": "string",
  "paymentType": "string",
  "withCurrency": "string",
  "withCommissions": "string",
  "withPoints": "string",
  "addToContract": true,
  "backMessage": "string",
  "bannerPathImage": "string",
  "sales": {},
  "file": {},
  "priorityComission": true,
  "minPrice": "string",
  "maxPrice": "string",
  "managementFee": "string",
  "repurchase": "string",
  "withoutFee": "string",
  "investmentHorizon": "string",
  "frequencyWithdrawals": "string",
  "percent": "string",
  "percentForCompany": "string",
  "percentForCompanyResumption": "string",
  "segment": "string",
  "distributionPayment": "string",
  "companyCommissionEditable": "string",
  "needLogin": true,
  "confirmNow": 0,
  "conferenceProduct": {},
  "showInIntranet": true,
  "oneProductStep": "string",
  "productNumberFrom": "string",
  "productNumberTo": "string",
  "contractType": {},
  "dateOfRedemption": "2019-08-24T14:15:22Z",
  "bondType": "string",
  "goalType": "string",
  "priceAddPayment": 0,
  "numberOfShares": 0,
  "otherCommissionForResumption": "string",
  "fullButton": "string",
  "buttonColor": "string",
  "buttonTextColor": "string",
  "outsideDescription": "string",
  "import": {},
  "confirmSms": true,
  "updateUserDataData": true,
  "productDetails": {},
  "nowProductDetail": {},
  "productDetailsWasCheck": true,
  "invoiceProduct": {},
  "formTemplate": 0,
  "headOfCommission": "string",
  "memberOfCommission": "string",
  "memberOfCommissionTwo": "string"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
producer object false none none
category object false none none
conferenceCategory object false none none
productType object false none none
provider object false none none
priceComission string false none none
points integer false none none
place string false none none
status string false none none
parentUser object false none none
limit integer false none none
dateStart string false none none
dateEnd string false none none
dateLimit string false none none
type string false none none
time string false none none
description string false none none
price string false none none
priceClient string false none none
pricePlus string false none none
priceClientPlus string false none none
wwwPage string false none none
active boolean false none none
conference integer false none none
pointsType string false none none
priceType string false none none
underProduct object false none none
emailAddress string false none none
mailTitleConfirm string false none none
mailTitleInvitation string false none none
vat integer false none none
currency object false none none
amountCurrency integer false none none
series string false none none
proposal string false none none
valuation integer false none none
useCountType string false none none
risk string false none none
aliorCountProduct string false none none
expired string(date-time) false none none
beforeExpired string(date-time) false none none
tags string false none none
paymentType string false none none
withCurrency string false none none
withCommissions string false none none
withPoints string false none none
addToContract boolean false none none
backMessage string false none none
bannerPathImage string false none none
sales object false none none
file object false none none
priorityComission boolean false none none
minPrice string false none none
maxPrice string false none none
managementFee string false none none
repurchase string false none none
withoutFee string false none none
investmentHorizon string false none none
frequencyWithdrawals string false none none
percent string false none none
percentForCompany string false none none
percentForCompanyResumption string false none none
segment string false none none
distributionPayment string false none none
companyCommissionEditable string false none none
needLogin boolean false none none
confirmNow integer false none none
conferenceProduct object false none none
showInIntranet boolean false none none
oneProductStep string false none none
productNumberFrom string false none none
productNumberTo string false none none
contractType object false none none
dateOfRedemption string(date-time) false none none
bondType string false none none
goalType string false none none
priceAddPayment integer false none none
numberOfShares integer false none none
otherCommissionForResumption string false none none
fullButton string false none none
buttonColor string false none none
buttonTextColor string false none none
outsideDescription string false none none
import object false none none
confirmSms boolean false none none
updateUserDataData boolean false none none
productDetails object false none none
nowProductDetail object false none none
productDetailsWasCheck boolean false none none
invoiceProduct object false none none
formTemplate number false none none
headOfCommission string false none none
memberOfCommission string false none none
memberOfCommissionTwo string false none none

ProductData

{
  "id": "/api/products/1",
  "type": "Product",
  "attributes": {
    "_id": 1,
    "name": "string",
    "producer": {},
    "category": {},
    "conferenceCategory": {},
    "productType": {},
    "provider": {},
    "priceComission": "string",
    "points": 0,
    "place": "string",
    "status": "string",
    "parentUser": {},
    "limit": 0,
    "dateStart": "string",
    "dateEnd": "string",
    "dateLimit": "string",
    "type": "string",
    "time": "string",
    "description": "string",
    "price": "string",
    "priceClient": "string",
    "pricePlus": "string",
    "priceClientPlus": "string",
    "wwwPage": "string",
    "active": true,
    "conference": 0,
    "pointsType": "string",
    "priceType": "string",
    "underProduct": {},
    "emailAddress": "string",
    "mailTitleConfirm": "string",
    "mailTitleInvitation": "string",
    "vat": 0,
    "currency": {},
    "amountCurrency": 0,
    "series": "string",
    "proposal": "string",
    "valuation": 0,
    "useCountType": "string",
    "risk": "string",
    "aliorCountProduct": "string",
    "expired": "2019-08-24T14:15:22Z",
    "beforeExpired": "2019-08-24T14:15:22Z",
    "tags": "string",
    "paymentType": "string",
    "withCurrency": "string",
    "withCommissions": "string",
    "withPoints": "string",
    "addToContract": true,
    "backMessage": "string",
    "bannerPathImage": "string",
    "sales": {},
    "file": {},
    "priorityComission": true,
    "minPrice": "string",
    "maxPrice": "string",
    "managementFee": "string",
    "repurchase": "string",
    "withoutFee": "string",
    "investmentHorizon": "string",
    "frequencyWithdrawals": "string",
    "percent": "string",
    "percentForCompany": "string",
    "percentForCompanyResumption": "string",
    "segment": "string",
    "distributionPayment": "string",
    "companyCommissionEditable": "string",
    "needLogin": true,
    "confirmNow": 0,
    "conferenceProduct": {},
    "showInIntranet": true,
    "oneProductStep": "string",
    "productNumberFrom": "string",
    "productNumberTo": "string",
    "contractType": {},
    "dateOfRedemption": "2019-08-24T14:15:22Z",
    "bondType": "string",
    "goalType": "string",
    "priceAddPayment": 0,
    "numberOfShares": 0,
    "otherCommissionForResumption": "string",
    "fullButton": "string",
    "buttonColor": "string",
    "buttonTextColor": "string",
    "outsideDescription": "string",
    "import": {},
    "confirmSms": true,
    "updateUserDataData": true,
    "productDetails": {},
    "nowProductDetail": {},
    "productDetailsWasCheck": true,
    "invoiceProduct": {},
    "formTemplate": 0,
    "headOfCommission": "string",
    "memberOfCommission": "string",
    "memberOfCommissionTwo": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Product false none none

Rodo

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

Properties

Name Type Required Restrictions Description
_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

RodoData

{
  "id": "/api/customers/agreements/1",
  "type": "Rodo",
  "attributes": {
    "_id": 1,
    "active": true,
    "name": "Simple name",
    "description": "Simple description",
    "userDataType": 0
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Rodo false none none

Sales

{
  "_id": 1243,
  "customerId": 166,
  "companyId": 32,
  "employeeId": 1,
  "title": "Title",
  "sellingProcessId": 1,
  "sellingProcessStepId": 11,
  "contractStateId": 1,
  "contractStatusId": 1,
  "description": "Description",
  "extraFields": {
    "property1": "string",
    "property2": "string"
  },
  "items": [
    {
      "item_key": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "createdDate": "2013-07-09T14:09:49+02:00",
  "originSystem": "CC",
  "externalId": "EXT1",
  "startDateOfProtection": "2013-07-09",
  "signingDate": "2013-07-09",
  "endDate": "2013-07-09",
  "resumption": true
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
title string true none Nazwa
sellingProcessId integer¦null false none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
sellingProcessStepId integer¦null false none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
contractStatusId integer false none It's "1" for Sale.
description string¦null false none "Opis" field can be found Zarządzanie polami.
extraFields object false none User defined fields ("Pola zdefiniowane")
» 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
items [object] false none List of items - "środki trwałe".
» item_key object false none none
»» 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
createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
originSystem string¦null false none Pochodzenie szansy
externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
startDateOfProtection string(date-time) false none "Data rozpoczęcia ochrony" can be found at Zarządzanie polami.
signingDate string(date)¦null false none Data podpisania
endDate string(date)¦null false none Data zakończenia
resumption boolean false none Wznowienie

SalesData

{
  "id": "/api/sales/1",
  "type": "Sales",
  "attributes": {
    "_id": 1243,
    "customerId": 166,
    "companyId": 32,
    "employeeId": 1,
    "title": "Title",
    "sellingProcessId": 1,
    "sellingProcessStepId": 11,
    "contractStateId": 1,
    "contractStatusId": 1,
    "description": "Description",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "items": [
      {
        "item_key": {
          "property1": "string",
          "property2": "string"
        }
      }
    ],
    "createdDate": "2013-07-09T14:09:49+02:00",
    "originSystem": "CC",
    "externalId": "EXT1",
    "startDateOfProtection": "2013-07-09",
    "signingDate": "2013-07-09",
    "endDate": "2013-07-09",
    "resumption": true
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Sales false none none

SalesOpportunity

{
  "_id": 1243,
  "customerId": 166,
  "companyId": 32,
  "employeeId": 0,
  "title": "Title",
  "sellingProcessId": 1,
  "sellingProcessStepId": 11,
  "expectedSigningDate": "2013-07-09",
  "contractStateId": 1,
  "contractStatusId": 11,
  "description": "Description",
  "extraFields": {
    "property1": "string",
    "property2": "string"
  },
  "items": [
    {
      "item_key": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "createdDate": "2013-07-09T14:09:49+02:00",
  "originSystem": "CC",
  "externalId": "EXT1",
  "startDateOfProtection": "2013-07-09",
  "resumption": true,
  "amount": 9.99
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
customerId integer¦null false none "Klient" (id) can be found in Kontakty/Osoby in column "id".
This field needs to be enabled in Zarządzanie polami.
companyId integer false none "Firma" (id) can be found in Kontakty/Firmy in column "id".
This field needs to be enabled in Zarządzanie polami.
employeeId integer true none "Współpracownik" (id) can be found in Zespół/Tabela współpracowników in column "id".
This field needs to be enabled in Zarządzanie polami.
title string true none Nazwa
sellingProcessId integer¦null true none "Proces sprzedaży" (it's id) can found at Proces sprzedaży.
sellingProcessStepId integer¦null true none "Krok sprzedaży" (it's id) can found at Proces sprzedaży by click on "Zarządzaj krokami".
expectedSigningDate string(date)¦null false none Oczekiwana data podpisania
contractStateId integer false none "Status umowy" (id) can be found at https://app.bergsystem.pl/contractstate/
contractStatusId integer¦null false none When sale opportunity is lost, reason (it's id) can be found at Powody przegranych
description string¦null false none "Opis" field can be found Zarządzanie polami.
extraFields object false none User defined fields ("Pola zdefiniowane")
» 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
items [object] false none List of items - "środki trwałe".
» item_key object false none none
»» 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
createdDate string(date-time) false read-only "Data podpisania" can be found at Zarządzanie polami
originSystem string¦null false none Pochodzenie szansy
externalId string¦null false none "Identyfikator systemu zewnętrznego" can be found at Zarządzanie polami
startDateOfProtection string(date-time) false none none
resumption boolean false none Wznowienie
amount number(float) false none Wartość

SalesOpportunityData

{
  "id": "/api/sales_opportunities/136",
  "type": "SalesOpportunity",
  "attributes": {
    "_id": 1243,
    "customerId": 166,
    "companyId": 32,
    "employeeId": 0,
    "title": "Title",
    "sellingProcessId": 1,
    "sellingProcessStepId": 11,
    "expectedSigningDate": "2013-07-09",
    "contractStateId": 1,
    "contractStatusId": 11,
    "description": "Description",
    "extraFields": {
      "property1": "string",
      "property2": "string"
    },
    "items": [
      {
        "item_key": {
          "property1": "string",
          "property2": "string"
        }
      }
    ],
    "createdDate": "2013-07-09T14:09:49+02:00",
    "originSystem": "CC",
    "externalId": "EXT1",
    "startDateOfProtection": "2013-07-09",
    "resumption": true,
    "amount": 9.99
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes SalesOpportunity false none none

SellingProcessData

{
  "id": "/api/selling_processes/1",
  "type": "SellingProcess",
  "attributes": {
    "_id": 1243,
    "name": "Proces sprzedaży"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes SellingProcess false none none

SellingProcess

{
  "_id": 1243,
  "name": "Proces sprzedaży"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none

SellingProcessStepData

{
  "id": "/api/selling_process_steps/11",
  "type": "SellingProcessStep",
  "attributes": {
    "_id": 1243,
    "name": "Lead",
    "orders": 1,
    "color": "#fa573c"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes SellingProcessStep false none none

SellingProcessStep

{
  "_id": 1243,
  "name": "Lead",
  "orders": 1,
  "color": "#fa573c"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
orders integer false none none
color string false none none

Settlement

{
  "_id": 0,
  "created": "2019-08-24",
  "updated": "2019-08-24",
  "dateCreated": "2019-08-24",
  "dateSentAmount": "2019-08-24",
  "postingDate": "2019-08-24",
  "status": 0,
  "title": "string",
  "sendType": "string",
  "amount": 0,
  "contract": {
    "id": 0
  }
}

Properties

Name Type Required Restrictions Description
_id integer false none none
created string(date) false none none
updated string(date) false none none
dateCreated string(date)¦null false none none
dateSentAmount string(date)¦null false none none
postingDate string(date)¦null false none none
status integer false none none
title string false none none
sendType string false none none
amount integer false none none
contract object false none none
» id integer false none none

SettlementPackage

{
  "_id": 0,
  "created": "2019-08-24",
  "updated": "2019-08-24",
  "dateCreated": "2019-08-24",
  "dateSentAmount": "2019-08-24",
  "postingDate": "2019-08-24",
  "status": 0,
  "title": "string",
  "commentAcceptPackage": "string",
  "amount": 0
}

Properties

Name Type Required Restrictions Description
_id integer false none none
created string(date) false none none
updated string(date) false none none
dateCreated string(date)¦null false none none
dateSentAmount string(date)¦null false none none
postingDate string(date)¦null false none none
status integer false none none
title string false none none
commentAcceptPackage string false none none
amount integer false none none

Survey

{
  "_id": "string",
  "_type": "string"
}

Properties

Name Type Required Restrictions Description
_id string false none none
_type string false none none

SurveyData

{
  "id": "/api/survey/1",
  "type": "Survey",
  "attributes": {
    "_id": "string",
    "_type": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Survey false none none

SurveyClient

{
  "_id": "string",
  "_type": "string",
  "name": "string",
  "clientId": 0,
  "clientName": "string",
  "createdDate": "2020-09-25T00:00:00+02:00"
}

Properties

Name Type Required Restrictions Description
_id string false none none
_type string false none none
name string false none none
clientId integer false none none
clientName string false none none
createdDate string(date-time) false read-only Data dodania

SurveyClientData

{
  "id": "/api/survey_clients/1",
  "type": "Survey",
  "attributes": {
    "_id": "string",
    "_type": "string",
    "name": "string",
    "clientId": 0,
    "clientName": "string",
    "createdDate": "2020-09-25T00:00:00+02:00"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes SurveyClient false none none

SurveyGenerator

{
  "customerId": 0,
  "surveyId": 0,
  "url": "string"
}

Properties

Name Type Required Restrictions Description
customerId integer false none none
surveyId integer false none none
url string false none none

Tags

{
  "_id": 1,
  "name": "Simple name",
  "type": true,
  "bgColor": "string"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
type boolean false none none
bgColor string false none none

TagsData

{
  "id": "/api/tags/1",
  "type": "Tags",
  "attributes": {
    "_id": 1,
    "name": "Simple name",
    "type": true,
    "bgColor": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes Tags false none none

UserType

{
  "_id": 1,
  "name": "Simple name",
  "description": "Simple description",
  "active": true,
  "userDataType": {},
  "points": "string",
  "rank": 0,
  "nextPoints": 0,
  "userTypeNext": {},
  "bgColor": "string",
  "isSection": false,
  "groups": {},
  "isCandidate": true,
  "isOldSystem": "string"
}

Properties

Name Type Required Restrictions Description
_id integer false read-only none
name string false none none
description string false none none
active boolean false none none
userDataType object false none none
points string false none none
rank integer false none none
nextPoints integer false none none
userTypeNext object false none none
bgColor string false none none
isSection boolean false none none
groups object false none none
isCandidate boolean false none none
isOldSystem string false none none

UserTypeData

{
  "id": "/api/usertypes/1",
  "type": "UserType",
  "attributes": {
    "_id": 1,
    "name": "Simple name",
    "description": "Simple description",
    "active": true,
    "userDataType": {},
    "points": "string",
    "rank": 0,
    "nextPoints": 0,
    "userTypeNext": {},
    "bgColor": "string",
    "isSection": false,
    "groups": {},
    "isCandidate": true,
    "isOldSystem": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
attributes UserType false none none