Visma Stocktake V2 API

The StocktakeV2 API from Visma — 2 operation(s) for stocktakev2.

Operations 3

GET /v2/stocktake/{referenceNumber} Get a specific #
PUT /v2/stocktake/{referenceNumber} Update a specific stocktake #
GET /v2/stocktake Get a range of stocktakes - ScreenId=IN305000 Request page size must be lower… #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/visma-stocktakev2-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

visma-stocktakev2-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Visma.net ERP Stocktake V2 API
  version: v1
servers:
- url: https://api.finance.visma.net
tags:
- name: StocktakeV2
paths:
  /v2/stocktake/{referenceNumber}:
    get:
      tags:
      - StocktakeV2
      summary: Get a specific
      operationId: StocktakeV2_GetByreferenceNumber
      parameters:
      - name: referenceNumber
        in: path
        description: Identifies the Stocktake
        required: true
        schema:
          type: string
      - name: erp-api-background
        in: header
        description: 'Accepts the request and queues it to be executed in the background by our least busy worker. Responds with 202 Accepted and a document containing a JobId reference and details state location.

          Supported values:

          * a URL: when the background operation is finished, a notification will be posted to the URL with a document containing a reference id, status code and a details state location.

          * "none" (without quotes): Fire and forget; no notification will be sent when background operation is finished.

          * "subscription[:<name_1>=<value_1>,..,<name_n>=<value_n>]" (without quotes): when the background operation is finsihed, a notification is posted to the Webhook subscription set up in Developer Portal for your integration client.

          Optionally a set of name-value pairs can be added. These will be sent as headers in the POST request to the Webhook subscription''s url.


          To find status and details of a background-api operation, GET .. v1/background/{id}. To get the response payload of a background-api operation, if any, GET .. v1/background/{id}/content'
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StocktakeV2Dto'
            text/json:
              schema:
                $ref: '#/components/schemas/StocktakeV2Dto'
        '400':
          description: Bad Request
          content:
            application/json: {}
            text/json: {}
        '401':
          description: Unauthorized
          content:
            application/json: {}
            text/json: {}
        '404':
          description: Not Found
          content:
            application/json: {}
            text/json: {}
        '500':
          description: Internal Server Error
          content:
            application/json: {}
            text/json: {}
        '202':
          description: Server accepted and queued the request for background execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackgroundApiAcceptedDto'
            text/json:
              schema:
                $ref: '#/components/schemas/BackgroundApiAcceptedDto'
      security:
      - interactiveapi: []
    put:
      tags:
      - StocktakeV2
      summary: Update a specific stocktake
      description: 'Response Message has StatusCode NoContent if PUT operation succeed


        Response Message has StatusCode BadRequest if PUT operation failed


        If PUT operation failed, Response body contains all stocktake line details (the ones that have values), the error message and also an error code (The first member of StocktakeExceptionErrorCode will be 0, and the value of each successive enum member is increased by 1)'
      operationId: StocktakeV2_PutByreferenceNumber
      parameters:
      - name: referenceNumber
        in: path
        description: Identifies the stocktake to update
        required: true
        schema:
          type: string
      - name: erp-api-background
        in: header
        description: 'Accepts the request and queues it to be executed in the background by our least busy worker. Responds with 202 Accepted and a document containing a JobId reference and details state location.

          Supported values:

          * a URL: when the background operation is finished, a notification will be posted to the URL with a document containing a reference id, status code and a details state location.

          * "none" (without quotes): Fire and forget; no notification will be sent when background operation is finished.

          * "subscription[:<name_1>=<value_1>,..,<name_n>=<value_n>]" (without quotes): when the background operation is finsihed, a notification is posted to the Webhook subscription set up in Developer Portal for your integration client.

          Optionally a set of name-value pairs can be added. These will be sent as headers in the POST request to the Webhook subscription''s url.


          To find status and details of a background-api operation, GET .. v1/background/{id}. To get the response payload of a background-api operation, if any, GET .. v1/background/{id}/content'
        schema:
          type: string
      requestBody:
        description: The data to update for stocktake
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StocktakeUpdateDto'
          text/json:
            schema:
              $ref: '#/components/schemas/StocktakeUpdateDto'
          application/xml:
            schema:
              $ref: '#/components/schemas/StocktakeUpdateDto'
          text/xml:
            schema:
              $ref: '#/components/schemas/StocktakeUpdateDto'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/StocktakeUpdateDto'
        required: true
        x-bodyName: stocktake
      responses:
        '204':
          description: NoContent
          content:
            application/json:
              schema:
                type: object
            text/json:
              schema:
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StocktakeV2ExceptionDto'
            text/json:
              schema:
                $ref: '#/components/schemas/StocktakeV2ExceptionDto'
        '401':
          description: Unauthorized
          content:
            application/json: {}
            text/json: {}
        '403':
          description: Forbidden
          content:
            application/json: {}
            text/json: {}
        '404':
          description: Not Found
          content:
            application/json: {}
            text/json: {}
        '500':
          description: Internal Server Error
          content:
            application/json: {}
            text/json: {}
        '202':
          description: Server accepted and queued the request for background execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackgroundApiAcceptedDto'
            text/json:
              schema:
                $ref: '#/components/schemas/BackgroundApiAcceptedDto'
      security:
      - interactiveapi: []
  /v2/stocktake:
    get:
      tags:
      - StocktakeV2
      summary: Get a range of stocktakes - ScreenId=IN305000 Request page size must be lower…
      operationId: StocktakeV2_GetAllStocktakes
      parameters:
      - name: warehouse
        in: query
        description: Filter by Warehouse.
        schema:
          type: string
      - name: location
        in: query
        description: Filter by Location.
        schema:
          type: string
      - name: inventory
        in: query
        description: Filter by Inventory.
        schema:
          type: string
      - name: lotSerialNumber
        in: query
        description: Filter by LotSerialNumber.
        schema:
          type: string
      - name: summaryStatus
        in: query
        description: Filter by SummaryStatus.
        schema:
          enum:
          - Cancelled
          - Completed
          - Counting
          - Entering
          type: string
      - name: startWithLine
        in: query
        description: Filter by LineNumber GreaterEqual StartWithLine.
        schema:
          type: integer
          format: int32
      - name: endWithLine
        in: query
        description: Filter by by LineNumber LessEqual EndWithLine.
        schema:
          type: integer
          format: int32
      - name: freezeDateTime
        in: query
        description: Filter by FreezeDateTime.
        schema:
          type: string
      - name: freezeDateTimeCondition
        in: query
        description: Filter by FreezeDateTimeCondition.
        schema:
          type: string
      - name: lastModifiedDateTime
        in: query
        description: 'System generated value for last modification of transaction/record. Use format: YYYY-MM-DD HH:MM (date and time) to filter from date to present..'
        schema:
          type: string
      - name: lastModifiedDateTimeCondition
        in: query
        description: System retrieved information for state/condition.
        schema:
          type: string
      - name: expirationDateTime
        in: query
        description: Filter by ExpirationDateTime.
        schema:
          type: string
      - name: expirationDateTimeCondition
        in: query
        description: Filter by ExpirationDateTimeCondition.
        schema:
          type: string
      - name: status
        in: query
        description: Filter by StocktakeLineStatus.
        schema:
          enum:
          - NotEntered
          - Entered
          - Skipped
          type: string
      - name: pageNumber
        in: query
        description: Pagination parameter. Page number.
        schema:
          type: integer
          format: int32
      - name: pageSize
        in: query
        description: 'Pagination parameter. Number of items to be collected.

          Please use a page size lower or equal to the allowed max page size which is returned as part of the metadata information.

          If requested page size is greater than allowed max page size, request will be limited to max page size.'
        schema:
          type: integer
          format: int32
      - name: erp-api-background
        in: header
        description: 'Accepts the request and queues it to be executed in the background by our least busy worker. Responds with 202 Accepted and a document containing a JobId reference and details state location.

          Supported values:

          * a URL: when the background operation is finished, a notification will be posted to the URL with a document containing a reference id, status code and a details state location.

          * "none" (without quotes): Fire and forget; no notification will be sent when background operation is finished.

          * "subscription[:<name_1>=<value_1>,..,<name_n>=<value_n>]" (without quotes): when the background operation is finsihed, a notification is posted to the Webhook subscription set up in Developer Portal for your integration client.

          Optionally a set of name-value pairs can be added. These will be sent as headers in the POST request to the Webhook subscription''s url.


          To find status and details of a background-api operation, GET .. v1/background/{id}. To get the response payload of a background-api operation, if any, GET .. v1/background/{id}/content'
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StocktakeV2Dto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StocktakeV2Dto'
        '400':
          description: Bad Request
          content:
            application/json: {}
            text/json: {}
        '401':
          description: Unauthorized
          content:
            application/json: {}
            text/json: {}
        '404':
          description: Not Found
          content:
            application/json: {}
            text/json: {}
        '500':
          description: Internal Server Error
          content:
            application/json: {}
            text/json: {}
        '202':
          description: Server accepted and queued the request for background execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackgroundApiAcceptedDto'
            text/json:
              schema:
                $ref: '#/components/schemas/BackgroundApiAcceptedDto'
      security:
      - interactiveapi: []
components:
  schemas:
    DtoValueOfNullableOfInt32:
      type: object
      properties:
        value:
          type: integer
          format: int32
    MetadataDto:
      type: object
      properties:
        totalCount:
          type: integer
          format: int64
        maxPageSize:
          type: integer
          format: int64
    BackgroundApiAcceptedDto:
      type: object
      properties:
        id:
          type: string
        stateLocation:
          type: string
    DtoValueOfString:
      type: object
      properties:
        value:
          type: string
    StocktakeV2Dto:
      type: object
      properties:
        referenceNbr:
          type: string
          description: The top part &gt; Ref. no. &gt; The reference number of the stocktaking document to be reviewed.
        description:
          type: string
          description: The top part &gt; Description &gt; The description of the stocktaking.
        summaryStatus:
          enum:
          - Cancelled
          - Completed
          - Counting
          - Entering
          type: string
          description: The top part &gt; Status &gt; An info field that shows the current status of this stocktaking document.
        freezeDate:
          type: string
          description: The top part &gt; Freeze date &gt; An info field that shows the date when the stocktaking document was created.
          format: date-time
        numberOfLines:
          type: integer
          format: int32
        physicalQty:
          type: number
          description: The top part &gt; Total physical qty. &gt; An info field showing the total actual quantity of all stock items listed in the document.
          format: double
        varianceQty:
          type: number
          description: The top part &gt; Total variance qty. &gt; An info field showing the total variance quantity for the document.
          format: double
        varianceCost:
          type: number
          description: The top part &gt; Total variance cost &gt; An info field showing the total variance cost for all stock items listed in the document.
          format: double
        lastModifiedDateTime:
          type: string
          description: System generated information.
          format: date-time
        lines:
          type: array
          items:
            $ref: '#/components/schemas/StocktakeLineV2Dto'
          description: Stocktaking details tab &gt;
        timestamp:
          type: string
          description: Timestamp of the stocktake record
        errorInfo:
          type: string
        metadata:
          $ref: '#/components/schemas/MetadataDto'
    StocktakeLineV2Dto:
      type: object
      properties:
        status:
          enum:
          - NotEntered
          - Entered
          - Skipped
          type: string
          description: Stocktaking details tab &gt; Status &gt; The status of the line of the stocktaking document, which indicates whether the actual physical quantity has been specified for the line.
        lineNbr:
          type: integer
          description: Stocktaking details tab &gt; Line no. &gt; The number of the line in the stocktaking document.
          format: int32
        tagNbr:
          type: integer
          description: Stocktaking details tab &gt; Tag no. &gt; The tag number for the line item, which is the stock item with the properties specified in the line, such as location, subitem, and lot or serial number.
          format: int32
        inventory:
          $ref: '#/components/schemas/inventoryInStocktakeLineV2Dto'
        location:
          $ref: '#/components/schemas/locationInStocktakeLineV2Dto'
        warehouse:
          $ref: '#/components/schemas/warehouseInStocktakeLineV2Dto'
        lotSerialNbr:
          type: string
          description: Stocktaking details tab &gt; Lot/serial number &gt; The lot or serial number of the item.
        expirationDate:
          type: string
          description: Stocktaking details tab &gt; Expiration date &gt; The expiration date of the item with this specific lot or serial number.
          format: date-time
        bookQuantity:
          type: number
          description: Stocktaking details tab &gt; Book quantity &gt; The book quantity of the item, which is calculated based on the system records.
          format: double
        physicalQuantity:
          type: number
          description: Stocktaking details tab &gt; Physical quantity &gt; The physical quantity of the item as entered manually.
          format: double
        varianceQuantity:
          type: number
          description: Stocktaking details tab &gt; Variance quantity &gt; The difference between the book quantity and the physical quantity for the line item.
          format: double
        unitCost:
          type: number
          description: Stocktaking details tab &gt; Unit cost &gt; The last cost of the item’s base unit as approximation of its unit cost during the count.
          format: double
        extVarianceCost:
          type: number
          description: Stocktaking details tab &gt; Variance cost &gt; The difference between the extended cost calculated based on the book quantity and the extended cost calculated based on the physical quantity for the item.
          format: double
        reasonCode:
          type: string
          description: Stocktaking details tab &gt; Reason code &gt; The reason code for the item.
        lastModifiedDateTime:
          type: string
          description: System generated information.
          format: date-time
        baseUnit:
          type: string
          description: Stocktaking details tab &gt; Base Unit &gt; The base unit for the item.
    inventoryInStocktakeLineV2Dto:
      properties:
        internalId:
          type: integer
          description: Click the magnifier &gt; The identifier
          format: int32
        id:
          type: string
          description: Click the magnifier &gt; The displayed name
        description:
          type: string
          description: Click on the magnifier. &gt; The description.
      description: Stocktaking details tab &gt; Item ID &gt; The item ID of the item.
    StocktakeV2ExceptionDto:
      type: object
      properties:
        inventoryId:
          type: string
          description: Stocktaking details tab &gt; Item ID &gt; The item ID of the item.
        locationId:
          type: string
          description: Stocktaking details tab &gt; Location &gt; The warehouse location of the item.
        physicalQuantity:
          type: number
          description: Stocktaking details tab &gt; Variance quantity &gt; The difference between the book quantity and the physical quantity for the line item.
          format: double
        reasonCode:
          type: string
          description: Stocktaking details tab &gt; Reason code &gt; The reason code for the item.
        lotSerialNumber:
          type: string
          description: Stocktaking details tab &gt; Expiration date &gt; The expiration date of the item with this specific lot or serial number.
        expirationDate:
          type: string
          description: Stocktaking details tab &gt; Book quantity &gt; The book quantity of the item, which is calculated based on the system records.
          format: date-time
        message:
          type: string
          description: Exception message
        errorCode:
          enum:
          - NotDefined
          - InventoryIDNotFound
          - LocationIDNotFound
          - ReasonCodeNotFound
          - ItemIsNotStockItem
          - CombinationAlreadyInUse
          - CombinationNotAllowed
          - LotSerialNumberAlreadyInUse
          type: string
          description: Exception error code
    DtoValueOfNullableOfDateTime:
      type: object
      properties:
        value:
          type: string
          format: date-time
    DtoValueOfNullableOfDecimal:
      type: object
      properties:
        value:
          type: number
          format: double
    warehouseInStocktakeLineV2Dto:
      properties:
        id:
          type: string
          description: Click on the magnifier. &gt; The identifier.
        description:
          type: string
          description: Click on the magnifier. &gt; The description.
      description: The top part &gt; Warehouse &gt; An info field that shows the warehouse where the stocktaking count is performed.
    StocktakeUpdateDto:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/StocktakeLineUpdateDto'
      description: This class represents a Stocktake in StocktakeController. Used to update Stocktake.
    StocktakeLineUpdateDto:
      type: object
      properties:
        operation:
          enum:
          - Insert
          - Update
          - Delete
          type: string
        lineNbr:
          $ref: '#/components/schemas/DtoValueOfNullableOfInt32'
        physicalQuantity:
          $ref: '#/components/schemas/DtoValueOfNullableOfDecimal'
        inventoryId:
          $ref: '#/components/schemas/DtoValueOfString'
        locationId:
          $ref: '#/components/schemas/DtoValueOfString'
        reasonCode:
          $ref: '#/components/schemas/DtoValueOfString'
        lotSerialNumber:
          $ref: '#/components/schemas/DtoValueOfString'
        expirationDate:
          $ref: '#/components/schemas/DtoValueOfNullableOfDateTime'
      description: This class represent a Stocktake line in StocktakeContoller. Used to update a Stocktake line
    locationInStocktakeLineV2Dto:
      properties:
        internalId:
          type: integer
          description: Click the magnifier &gt; The identifier
          format: int32
        id:
          type: string
          description: Click the magnifier &gt; The displayed name
        description:
          type: string
          description: Click on the magnifier. &gt; The description.
      description: Stocktaking details tab &gt; Location &gt; The warehouse location of the item.
  securitySchemes:
    interactiveapi:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://connect.visma.com/connect/authorize
          tokenUrl: https://connect.visma.com/connect/token
          scopes:
            vismanet_erp_interactive_api:read: vismanet_erp_interactive_api:read
            vismanet_erp_interactive_api:update: vismanet_erp_interactive_api:update
            vismanet_erp_interactive_api:create: vismanet_erp_interactive_api:create
            vismanet_erp_interactive_api:delete: vismanet_erp_interactive_api:delete
            vismanet_erp_interactive_api:ui-extension: vismanet_erp_interactive_api:ui-extension