Skip to content

COMBASE/cloud-api-v3-js-client

Repository files navigation

cloud-api-v3-js-client

A JavaScript client for KORONA.cloud API version 3. Our API provides access to our cloud services.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 3.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install cloud-api-v3-js-client --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your cloud-api-v3-js-client from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('cloud-api-v3-js-client') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var KoronacloudApiV3 = require('cloud-api-v3-js-client');

var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new KoronacloudApiV3.AccountsApi()

var accountIdOrNumber = "accountIdOrNumber_example"; // {String} id of the related object (important: id should match the uuid-format)

var koronaAccountId = "koronaAccountId_example"; // {String} account id of the korona.cloud account


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccount(accountIdOrNumber, koronaAccountId, callback);

Documentation for API Endpoints

All URIs are relative to https://www.koronacloud.com/web/api/v3

Class Method HTTP request Description
KoronacloudApiV3.AccountsApi getAccount GET /accounts/{koronaAccountId}/accounts/{accountIdOrNumber} returns the single account
KoronacloudApiV3.AccountsApi getAccounts GET /accounts/{koronaAccountId}/accounts lists all accounts
KoronacloudApiV3.AdditionalReceiptInfoTypesApi getAdditionalReceiptInfoType GET /accounts/{koronaAccountId}/additionalReceiptInfoTypes/{additionalReceiptInfoTypeId} returns the single additional receipt info type
KoronacloudApiV3.AdditionalReceiptInfoTypesApi getAdditionalReceiptInfoTypes GET /accounts/{koronaAccountId}/additionalReceiptInfoTypes lists all additional receipt info types
KoronacloudApiV3.AssortmentsApi getAssortment GET /accounts/{koronaAccountId}/assortments/{assortmentId} returns the single assortment
KoronacloudApiV3.AssortmentsApi getAssortments GET /accounts/{koronaAccountId}/assortments lists all assortments
KoronacloudApiV3.CashiersApi getCashier GET /accounts/{koronaAccountId}/cashiers/{cashierIdOrNumber} returns the single cashier
KoronacloudApiV3.CashiersApi getCashiers GET /accounts/{koronaAccountId}/cashiers lists all cashiers
KoronacloudApiV3.CommodityGroupsApi addCommodityGroups POST /accounts/{koronaAccountId}/commodityGroups adds a batch of new commodity groups
KoronacloudApiV3.CommodityGroupsApi deleteCommodityGroup DELETE /accounts/{koronaAccountId}/commodityGroups/{commodityGroupId} deletes the single commodity group
KoronacloudApiV3.CommodityGroupsApi getCommodityGroup GET /accounts/{koronaAccountId}/commodityGroups/{commodityGroupId} returns the single commodity group
KoronacloudApiV3.CommodityGroupsApi getCommodityGroups GET /accounts/{koronaAccountId}/commodityGroups lists all commodity groups
KoronacloudApiV3.CommodityGroupsApi updateCommodityGroup PATCH /accounts/{koronaAccountId}/commodityGroups/{commodityGroupId} updates the single commodity group
KoronacloudApiV3.CommodityGroupsApi updateCommodityGroups PATCH /accounts/{koronaAccountId}/commodityGroups updates a batch of commodity groups
KoronacloudApiV3.CurrenciesApi getCurrencies GET /accounts/{koronaAccountId}/currencies lists all currencies
KoronacloudApiV3.CurrenciesApi getCurrency GET /accounts/{koronaAccountId}/currencies/{currencyId} returns the single currency
KoronacloudApiV3.CustomerGroupsApi getCustomerGroup GET /accounts/{koronaAccountId}/customerGroups/{customerGroupId} returns the single customer group
KoronacloudApiV3.CustomerGroupsApi getCustomerGroups GET /accounts/{koronaAccountId}/customerGroups lists all customer groups
KoronacloudApiV3.CustomerOrdersApi addCustomerOrders POST /accounts/{koronaAccountId}/customerOrders adds a batch of new customer orders
KoronacloudApiV3.CustomerOrdersApi deleteCustomerOrder DELETE /accounts/{koronaAccountId}/customerOrders/{customerOrderId} deletes the single customer order
KoronacloudApiV3.CustomerOrdersApi getCustomerOrder GET /accounts/{koronaAccountId}/customerOrders/{customerOrderId} returns the single customer order
KoronacloudApiV3.CustomerOrdersApi getCustomerOrders GET /accounts/{koronaAccountId}/customerOrders lists all customer orders
KoronacloudApiV3.CustomerOrdersApi updateCustomerOrder PATCH /accounts/{koronaAccountId}/customerOrders/{customerOrderId} updates the single customer order
KoronacloudApiV3.CustomerOrdersApi updateCustomerOrders PATCH /accounts/{koronaAccountId}/customerOrders updates a batch of customer orders
KoronacloudApiV3.CustomersApi addCustomers POST /accounts/{koronaAccountId}/customers adds a batch of new customers
KoronacloudApiV3.CustomersApi deleteCustomer DELETE /accounts/{koronaAccountId}/customers/{customerId} deletes the single customer
KoronacloudApiV3.CustomersApi getCustomer GET /accounts/{koronaAccountId}/customers/{customerId} returns the single customer
KoronacloudApiV3.CustomersApi getCustomers GET /accounts/{koronaAccountId}/customers lists all customers
KoronacloudApiV3.CustomersApi updateCustomer PATCH /accounts/{koronaAccountId}/customers/{customerId} updates the single customer
KoronacloudApiV3.CustomersApi updateCustomers PATCH /accounts/{koronaAccountId}/customers updates a batch of customers
KoronacloudApiV3.EconomicZonesApi getEconomicZone GET /accounts/{koronaAccountId}/economicZones/{economicZoneId} returns the single economic zone
KoronacloudApiV3.EconomicZonesApi getEconomicZones GET /accounts/{koronaAccountId}/economicZones lists all economic zones
KoronacloudApiV3.ExternalSystemCallsApi addExternalSystemCalls POST /accounts/{koronaAccountId}/externalSystemCalls adds a batch of new external system calls
KoronacloudApiV3.ExternalSystemCallsApi deleteExternalSystemCall DELETE /accounts/{koronaAccountId}/externalSystemCalls/{externalSystemCallId} deletes a single external system call
KoronacloudApiV3.ExternalSystemCallsApi getExternalSystemCall GET /accounts/{koronaAccountId}/externalSystemCalls/{externalSystemCallId} returns a single external system call
KoronacloudApiV3.ExternalSystemCallsApi getExternalSystemCalls GET /accounts/{koronaAccountId}/externalSystemCalls lists all external system calls
KoronacloudApiV3.ExternalSystemCallsApi updateExternalSystemCall PATCH /accounts/{koronaAccountId}/externalSystemCalls/{externalSystemCallId} updates the single external system call
KoronacloudApiV3.ExternalSystemCallsApi updateExternalSystemCalls PATCH /accounts/{koronaAccountId}/externalSystemCalls updates a batch of external system calls
KoronacloudApiV3.ImagesApi getImage GET /accounts/{koronaAccountId}/images/{imageId} displays the image
KoronacloudApiV3.InfoTextsApi getInfoText GET /accounts/{koronaAccountId}/infoTexts/{infoTextId} returns the single info text
KoronacloudApiV3.InfoTextsApi getInfoTexts GET /accounts/{koronaAccountId}/infoTexts lists all info texts
KoronacloudApiV3.InventoriesApi addInventories POST /accounts/{koronaAccountId}/inventories adds a batch of new inventories
KoronacloudApiV3.InventoriesApi addInventoryInventoryListItems POST /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists/{inventoryListId}/items adds inventory list items
KoronacloudApiV3.InventoriesApi deleteInventory DELETE /accounts/{koronaAccountId}/inventories/{inventoryId} deletes the single inventory (only allowed if hasBookedReceipts=false)
KoronacloudApiV3.InventoriesApi deleteInventoryInventoryListItem DELETE /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists/{inventoryListId}/items/{productId} deletes the single inventory list item
KoronacloudApiV3.InventoriesApi getInventories GET /accounts/{koronaAccountId}/inventories lists all inventories
KoronacloudApiV3.InventoriesApi getInventory GET /accounts/{koronaAccountId}/inventories/{inventoryId} returns the single inventory
KoronacloudApiV3.InventoriesApi getInventoryInventoryList GET /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists/{inventoryListId} returns the single inventory list
KoronacloudApiV3.InventoriesApi getInventoryInventoryListItem GET /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists/{inventoryListId}/items/{productId} returns the single inventory list item
KoronacloudApiV3.InventoriesApi getInventoryInventoryListItems GET /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists/{inventoryListId}/items lists all inventory list items
KoronacloudApiV3.InventoriesApi getInventoryInventoryLists GET /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists lists all inventory lists
KoronacloudApiV3.InventoriesApi updateInventory PATCH /accounts/{koronaAccountId}/inventories/{inventoryId} updates the single inventory
KoronacloudApiV3.InventoriesApi updateInventoryInventoryList PATCH /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists/{inventoryListId} updates the single inventory list
KoronacloudApiV3.InventoriesApi updateInventoryInventoryListItem PATCH /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists/{inventoryListId}/items/{productId} updates the single inventory list item
KoronacloudApiV3.InventoriesApi updateInventoryInventoryListItems PATCH /accounts/{koronaAccountId}/inventories/{inventoryId}/inventoryLists/{inventoryListId}/items updates inventory list items (property [product] required))
KoronacloudApiV3.KoronaAccountApi getKoronaAccount GET /accounts/{koronaAccountId} returns the single korona account
KoronacloudApiV3.OrganizationalUnitsApi addOrganizationalUnitDayRatings POST /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings adds a batch of new day ratings
KoronacloudApiV3.OrganizationalUnitsApi deleteOrganizationalUnitDayRating DELETE /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings/{dayRatingIdOrDate} deletes the single day rating by its id or date
KoronacloudApiV3.OrganizationalUnitsApi getOrganizationalUnit GET /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId} returns the single organizational unit
KoronacloudApiV3.OrganizationalUnitsApi getOrganizationalUnitDayRating GET /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings/{dayRatingIdOrDate} returns the single day rating by its id or date
KoronacloudApiV3.OrganizationalUnitsApi getOrganizationalUnitDayRatings GET /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings lists all organizational unit related day ratings
KoronacloudApiV3.OrganizationalUnitsApi getOrganizationalUnitInventoryLists GET /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/inventoryLists lists the inventory lists belonging to the organizational unit (KORONA.retail required)
KoronacloudApiV3.OrganizationalUnitsApi getOrganizationalUnitProductStocks GET /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/productStocks lists the product stocks of the organizational unit, in case it contains a warehouse (KORONA.retail required)
KoronacloudApiV3.OrganizationalUnitsApi getOrganizationalUnitStockReceipts GET /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/stockReceipts lists the stock receipts belonging to the organizational unit (KORONA.retail required)
KoronacloudApiV3.OrganizationalUnitsApi getOrganizationalUnits GET /accounts/{koronaAccountId}/organizationalUnits lists all organizational units
KoronacloudApiV3.OrganizationalUnitsApi updateOrganizationalUnitDayRating PATCH /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings/{dayRatingIdOrDate} updates the day rating by its id or date
KoronacloudApiV3.OrganizationalUnitsApi updateOrganizationalUnitDayRatings PATCH /accounts/{koronaAccountId}/organizationalUnits/{organizationalUnitId}/dayRatings updates a batch of day ratings
KoronacloudApiV3.PaymentMethodsApi getPaymentMethod GET /accounts/{koronaAccountId}/paymentMethods/{paymentMethodId} returns the single payment method
KoronacloudApiV3.PaymentMethodsApi getPaymentMethods GET /accounts/{koronaAccountId}/paymentMethods lists all payment methods
KoronacloudApiV3.PointsOfSaleApi addPointOfSaleEndOfDayStatements POST /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/endOfDayStatements adds a batch of point of sale-related end-of-day-statements
KoronacloudApiV3.PointsOfSaleApi addPointOfSaleReceipts POST /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts adds a batch of point of sale-related receipts
KoronacloudApiV3.PointsOfSaleApi getPointOfSale GET /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId} returns the single point of sale
KoronacloudApiV3.PointsOfSaleApi getPointOfSaleEndOfDayStatements GET /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/endOfDayStatements lists all point of sale-related end-of-day-statements
KoronacloudApiV3.PointsOfSaleApi getPointOfSaleReceipt GET /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts/{receiptId} returns the single point of sale-related receipt
KoronacloudApiV3.PointsOfSaleApi getPointOfSaleReceipts GET /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId}/receipts lists all point of sale-related receipts
KoronacloudApiV3.PointsOfSaleApi getPointsOfSale GET /accounts/{koronaAccountId}/pointsOfSale lists all points of sale
KoronacloudApiV3.PointsOfSaleApi updatePointOfSale PATCH /accounts/{koronaAccountId}/pointsOfSale/{pointOfSaleId} updates a point of sale (works only for coupling (attribute 'couplingId') or updating device information (attribute 'deviceInformation'))
KoronacloudApiV3.PriceGroupsApi getPriceGroup GET /accounts/{koronaAccountId}/priceGroups/{priceGroupId} returns the single price group
KoronacloudApiV3.PriceGroupsApi getPriceGroups GET /accounts/{koronaAccountId}/priceGroups lists all price groups
KoronacloudApiV3.ProductsApi addProducts POST /accounts/{koronaAccountId}/products adds a batch of new products
KoronacloudApiV3.ProductsApi deleteProduct DELETE /accounts/{koronaAccountId}/products/{productId} deletes the single product
KoronacloudApiV3.ProductsApi getProduct GET /accounts/{koronaAccountId}/products/{productId} returns the single product
KoronacloudApiV3.ProductsApi getProductStocks GET /accounts/{koronaAccountId}/products/{productId}/stocks lists the product stocks in different warehouses (KORONA.retail required)
KoronacloudApiV3.ProductsApi getProducts GET /accounts/{koronaAccountId}/products lists all products
KoronacloudApiV3.ProductsApi updateProduct PATCH /accounts/{koronaAccountId}/products/{productId} updates the single product
KoronacloudApiV3.ProductsApi updateProducts PATCH /accounts/{koronaAccountId}/products updates a batch of products
KoronacloudApiV3.ReceiptsApi getReceipt GET /accounts/{koronaAccountId}/receipts/{receiptId} returns the single receipt
KoronacloudApiV3.ReceiptsApi getReceipts GET /accounts/{koronaAccountId}/receipts lists all receipts
KoronacloudApiV3.SalesTaxesApi getSalesTax GET /accounts/{koronaAccountId}/salesTaxes/{salesTaxId} returns the single sales tax
KoronacloudApiV3.SalesTaxesApi getSalesTaxes GET /accounts/{koronaAccountId}/salesTaxes lists all sales taxes
KoronacloudApiV3.SectorsApi getSector GET /accounts/{koronaAccountId}/sectors/{sectorId} returns the single sector
KoronacloudApiV3.SectorsApi getSectors GET /accounts/{koronaAccountId}/sectors lists all sectors
KoronacloudApiV3.StatisticsApi getRevenue GET /accounts/{koronaAccountId}/statistics/revenueData returns information about the revenue in the given period
KoronacloudApiV3.StatisticsApi getRevenueForCustomerGroups GET /accounts/{koronaAccountId}/statistics/revenueDataForCustomerGroups returns the turnover per customer group during the given period
KoronacloudApiV3.StatisticsApi getRevenueHourly GET /accounts/{koronaAccountId}/statistics/revenueDataHourly returns the turnover per hour during the given period
KoronacloudApiV3.StatisticsApi getTopSeller GET /accounts/{koronaAccountId}/statistics/topSeller returns the top-seller
KoronacloudApiV3.StockReceiptsApi addStockReceiptItems POST /accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items adds stock-receipt items
KoronacloudApiV3.StockReceiptsApi addStockReceipts POST /accounts/{koronaAccountId}/stockReceipts adds stock-receipts
KoronacloudApiV3.StockReceiptsApi deleteStockReceiptItem DELETE /accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items/{productIdOrNumber} deletes the single stock-receipt item
KoronacloudApiV3.StockReceiptsApi getStockReceipt GET /accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber} returns the single stock-receipt
KoronacloudApiV3.StockReceiptsApi getStockReceiptItem GET /accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items/{productIdOrNumber} returns the single stock-receipt item
KoronacloudApiV3.StockReceiptsApi getStockReceiptItems GET /accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items lists all stock-receipt items
KoronacloudApiV3.StockReceiptsApi getStockReceipts GET /accounts/{koronaAccountId}/stockReceipts lists all stock-receipts
KoronacloudApiV3.StockReceiptsApi updateStockReceipt PATCH /accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber} updates the single stock-receipt
KoronacloudApiV3.StockReceiptsApi updateStockReceiptItem PATCH /accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items/{productIdOrNumber} updates the single stock-receipt item
KoronacloudApiV3.StockReceiptsApi updateStockReceiptItems PATCH /accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items updates stock-receipt items
KoronacloudApiV3.SuppliersApi getSupplier GET /accounts/{koronaAccountId}/suppliers/{supplierIdOrNumber} returns the single supplier
KoronacloudApiV3.SuppliersApi getSuppliers GET /accounts/{koronaAccountId}/suppliers lists all suppliers
KoronacloudApiV3.TagsApi addTags POST /accounts/{koronaAccountId}/tags adds a batch of new tags
KoronacloudApiV3.TagsApi deleteTag DELETE /accounts/{koronaAccountId}/tags/{tagId} deletes the single tag
KoronacloudApiV3.TagsApi getTag GET /accounts/{koronaAccountId}/tags/{tagId} returns the single tag
KoronacloudApiV3.TagsApi getTags GET /accounts/{koronaAccountId}/tags lists all tags
KoronacloudApiV3.TagsApi updateTag PATCH /accounts/{koronaAccountId}/tags/{tagId} updates the single tag
KoronacloudApiV3.TagsApi updateTags PATCH /accounts/{koronaAccountId}/tags updates a batch of tags
KoronacloudApiV3.TicketingApi getEntryGate GET /accounts/{koronaAccountId}/entryGates/{entryGateId} returns the single entry gate
KoronacloudApiV3.TicketingApi getEntryGates GET /accounts/{koronaAccountId}/entryGates lists all entry gates
KoronacloudApiV3.TicketingApi getEvent GET /accounts/{koronaAccountId}/events/{eventId} return the single event
KoronacloudApiV3.TicketingApi getEvents GET /accounts/{koronaAccountId}/events lists all events
KoronacloudApiV3.TicketingApi getTicketDefinition GET /accounts/{koronaAccountId}/ticketDefinitions/{ticketDefinitionId} returns the single ticket definition
KoronacloudApiV3.TicketingApi getTicketDefinitions GET /accounts/{koronaAccountId}/ticketDefinitions lists all ticket definitions

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication