---
Title: Custom Webservice API
Language: en-US
Canonical URL to this Markdown version of this page: [https://docs.kvik.shop/custom-webservice-api.md](https://docs.kvik.shop/custom-webservice-api.md)
Canonical URL to HTML version of this page (for humans): [https://docs.kvik.shop/custom-webservice-api](https://docs.kvik.shop/custom-webservice-api)
---

# Custom Webservice API

Breadcrumb: [Custom Webservice API](https://docs.kvik.shop/custom-webservice-api.md)



# Overview

The Custom Webservice API allows integration with local stock systems to retrieve real-time product availability and pricing information.

## Configuration

The Custom Webservice requires the following configuration settings:

- `apiUrl`: The URL endpoint of your local stock webservice
- `apiAuthUser`: Username for API authentication
- `apiAuthPassword`: Password for API authentication
- `isPriceChangeEnabled`: Whether price updates from the webservice are enabled
- `isAvailabilityChangeEnabled`: Whether availability updates from the webservice are enabled

## Request

When the system needs to check stock availability or pricing, it sends a request to your configured API endpoint with JSON array as a request body. Multiple items could be requested at the same time.

```http
POST /localstock HTTP/1.1
Authorization: Basic dGVzdDp0ZXN0
Content-Type: application/json; charset=utf-8
Host: localstock.tld

[
  {
    "supplierCodename": "custom1",
    "itemCode": "1234",
    "orderingNumber": "4567"
  },
  {
  ...
  }
]
```

### Request Fields

- `supplierCodename: string`: Supplier identifier
- `itemCode: string`: Item identifier
- `orderingNumber: string|null` Alternative item ordering number

## Response Format

Your webservice should respond with body containing JSON array with item objects

```http
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Connection: close

[
  {
    "supplierCodename": "custom1",
    "itemCode": "1234",
    "orderingNumber": "4567",
    "isAvailable": true,
    "availableCount": 33,
    "price": {
      "amountWithoutVat": 100.00,
      "currencyCode": "EUR",
      "vatRate": 21.00
    }
  },
  {
  ...
  }
]
```

### Response Fields

- `supplierCodename: string`: Supplier identifier
- `itemCode: string`: Item identifier
- `orderingNumber: string`: (optional) Alternative product ordering number
- `isAvailable: bool`: Indicates if the product is currently available
- `availableCount: int|null`: Number of available items
- `price: object|null`: Price object
  - `amountWithoutVat`: Final price amount (excluding VAT)
  - `currencyCode`: Currency code (e.g., EUR).
  - `vatRate`: Applicable VAT rate percentage (e.g., 21.00 for 21%)