ProLasku.fi API Documentation

Welcome to the ProLasku.fi API documentation. This API provides a robust and flexible way to interact with the ProLasku.fi system, allowing for seamless integration and automation of content management, e-commerce, invoicing, and inventory tasks.

Introduction

The ProLasku.fi API is designed to be simple yet powerful, providing developers with the tools to enhance their applications with content management capabilities. Whether you're building a website, a mobile app, a POS integration, or a complex enterprise system, our API can help you manage content efficiently and securely.

Features

  • REST-like API Calls — Intuitive endpoint structure using GET/SET/CHECK pattern
  • No Dependencies — The API is designed to work independently, requiring no additional dependencies for basic operations
  • Super Fast — Optimized for performance with a 50-row query limit ensuring quick responses
  • Extensible — Flexible architecture supporting multi-tenant, multi-language, multi-currency, and multi-location setups
  • Highly Secured — 512-bit encryption key with API key authentication, input sanitization, and scripting protections

Getting Started

To start using the ProLasku.fi API, follow these basic steps:

  1. API Key: Obtain your unique API key from the admin panel. Create / Access API Credentials
  2. Authentication: Include your API key in the Authorization1 header (Base64-encoded) with each request
  3. Make a Request: Send HTTP POST requests to the API endpoints with required parameters
  4. Handle Responses: Process the JSON responses — standard format includes INFO (pagination metadata) and OUTPUT (data array)

PHP Example

$curl = new Curl();
$curl->setHeader('Authorization1', base64_encode($API_KEY));
$curl->post('https://yourdomain.fi/public_api/get_products/', [
    'username' => $API_USERNAME,
    'password' => $API_PASSWORD,
]);
$response = json_decode($curl->response, true);

Attribution: Optional user_email on Setter Calls

Applications calling setter endpoints (set_product, set_stock, set_order, …) may include an optional user_email body parameter to identify which of their own users made the call. When a valid email is provided, activity logs and stock movements attribute the write to API-{username} - {user_email} (e.g. API-Shop_1 - [email protected]); when omitted, the actor stays API-{username}. See API Credential Creation Guide — Identifying the Application User.

Basic Requirements

  • Internet Connectivity — Stable connection to the ProLasku.fi API servers
  • API Credentials — Valid API key and account credentials (Create / Access API Credentials)
  • HTTP Client — Any tool capable of making HTTP POST requests (cURL, PHP Curl Class, Postman, etc.)
  • PHP 8.0.2+ — Server-side compatibility (tested up to PHP 8.4)

Available Public Endpoints

Products

Method Endpoint Description
POST get_products Retrieve products with filters, pagination, and stock data
POST get_products_by_barcode Search products by barcode
POST get_products_by_name Search products by name
POST get_products_by_pids Retrieve specific products by IDs
POST get_products_by_categories Filter products by categories
POST get_products_by_brands Filter products by brands
POST get_products_by_location Filter products by stock location
POST get_products_by_supplier Filter products by supplier
POST get_products_by_customer Filter products by customer pricing
POST get_products_by_price_range Filter products by price range
POST get_products_by_discount_range Filter products by discount range
POST get_products_by_custom_where Custom WHERE clause filtering
POST set_product Create or update a single product
POST set_products Bulk create/update multiple products
POST get_products_multi Get multi-location pricing, scheduled pricing and discount ladder flags
POST set_products_multi Update multi-location pricing, barcodes, schedules and discount ladder flags
POST get_products_costs Get product cost breakdowns
POST get_products_stock Get product stock levels
POST set_products_stock Update product stock levels
POST get_products_incoming_stock Get incoming/expected stock data
POST get_products_stocktransfer Get stock transfer product data
POST get_products_qty_discount Get quantity discount tiers
POST set_products_qty_discount Set quantity discount tiers
POST get_product_bundles Get product bundles
POST set_product_bundles Create or update product bundles
POST get_discounted_items Get currently discounted products (docs pending)

Product Tags

Method Endpoint Description
POST get_product_tags Retrieve product tags
POST set_product_tags Create or update product tags
POST get_product_tags_relations Get product-tag relationships
POST set_product_tags_relations Update product-tag relationships

Categories, Brands & Taxonomy (Inventory)

Method Endpoint Description
POST get_categories Retrieve categories
POST get_categories_by_cids Retrieve specific categories by IDs
POST set_category Create or update a category
POST get_brands Retrieve brands
POST get_brands_by_bids Retrieve specific brands by IDs
POST set_brand Create or update a brand
POST set_tag Create or update tags (docs pending)
POST set_taxonomy Batch taxonomy operations

Customers

Method Endpoint Description
POST get_customers Retrieve customers with pagination
POST get_customer Retrieve a single customer
POST get_customer_exists Check if customer email exists
POST set_customer_register Register a new customer
POST set_customer_update_profile Update customer profile
POST set_customer_password_reset_request Request password reset
POST set_customer_delete_account Delete customer account

Orders

Method Endpoint Description
POST get_orders Retrieve orders with pagination
POST get_orders_by_ids Retrieve specific orders by IDs
POST get_order Retrieve a single order
POST set_order Create or update an order

Stock & Inventory

Method Endpoint Description
POST get_stockcurrent Get current stock levels
POST set_stock Update stock levels (with stock diary entries)
POST set_stockcurrent Direct stock current updates (docs pending)
POST get_stock_transfers Retrieve stock transfers
POST set_stock_transfer Create or update stock transfers
POST set_transfer_confirm Confirm received stock transfer receipt
POST get_locations Retrieve stock locations
POST get_locations_by_ids Retrieve specific locations by IDs
POST set_locations Create or update stock locations
POST get_shelves Retrieve shelves
POST get_shelves_by_ids Retrieve specific shelves by IDs
POST get_shelves_by_location_id Get shelves by location
POST set_shelves Create or update shelves
POST get_stock_types Retrieve stock types (units of measure)
POST get_stock_types_by_ids Retrieve specific stock types by IDs
POST set_stock_types Create or update stock types
POST get_cn_codes Retrieve CN customs codes
POST set_cn_codes Create or update CN customs codes

Purchase Orders

Method Endpoint Description
POST get_purchase_orders Retrieve purchase orders
POST set_purchase_order Create or update a purchase order
POST set_purchase_order_enhanced Enhanced PO creation with line items (docs pending)
POST set_purchase_order_line Create or update a PO line
POST set_purchase_order_confirm Confirm received purchase order quantities and move stock

Suppliers

Method Endpoint Description
POST get_suppliers Retrieve suppliers
POST set_supplier Create or update a supplier
POST get_supplier_catalog Retrieve a supplier's shared product catalog (Supplier Access)
POST get_supplier_catalog_meta Retrieve a supplier's catalog categories, brands and tags (Supplier Access)

POS / Cash Register

Method Endpoint Description
POST get_receipts Retrieve receipts
POST get_receipts_by_ids Retrieve specific receipts by IDs
POST get_receipt Retrieve a single receipt

Reference Data

Method Endpoint Description
POST get_taxes Retrieve VAT/tax rates
POST get_taxes_by_ids Retrieve specific tax rates by IDs
POST set_taxes Create or update VAT/tax rates
POST get_currencies Retrieve supported currencies
POST get_countries Retrieve countries
POST get_cities Retrieve cities
POST get_languages Retrieve supported languages
POST get_payment_methods Retrieve payment methods
POST get_shipping_methods Retrieve shipping methods
POST get_barcode_types Retrieve barcode types
POST set_barcode_types Create or update barcode types
POST get_newsletters Retrieve newsletters (docs pending)
POST get_vouchers Retrieve vouchers / coupons (docs pending)
POST get_joined_data Retrieve joined / cross-referenced data (docs pending)
POST get_ip Get caller's IP address (docs pending)

Additional Endpoints

These endpoints are available but do not yet have dedicated documentation pages:

Method Endpoint Description
POST set_order_update Update an existing order
POST set_order_cash_register Create/update cash register order
POST set_delivery_note_cashregister Create delivery note for cash register
POST set_customer_register_wp Register a new club member (WordPress)
POST set_customer_update_profile_wp Update club member profile (WordPress)
POST set_voucher_used Mark a voucher as used
POST set_firebase_token Register Firebase push notification token
POST set_push_notification Send push notification
POST delete_purchase_order_line Delete a purchase order line
POST delete_customer Delete a customer
POST get_stockcurrent_full Full stock current data (unfiltered)
POST get_firebase_token Retrieve Firebase tokens
POST get_html_aboutus Retrieve About Us HTML content
POST get_html_appguide Retrieve App Guide HTML content
POST get_html_moreinfo Retrieve More Info HTML content
POST get_html_privacypolicy Retrieve Privacy Policy HTML content

Mobile App Authentication (User QR on top of account API credentials)

Mobile applications authenticate the account with the normal API credentials (either authentication mode), then log a specific CMS user in with a per-user login token — the single token string encoded in the user's QR code (Users → Mobile app tab, Employees editor, or the user's own Profile page). verify_user takes the account credentials plus user_token and returns the user's profile (never passwords).

Method Endpoint Description
POST verify_user Verify a mobile-app user token (on top of account API auth) and return the user profile (never passwords)

Validation & Utility Endpoints

Method Endpoint Description
POST check_authorization_header Validate API authorization header
POST check_post_data Validate POST request data
POST check_get_data Validate GET request data
POST check_request_type Check allowed request methods

Response Format

All endpoints return JSON in the following structure:

{
    "INFO": {
        "start": 0,
        "limit": 50,
        "count": 25,
        "total_count": 150
    },
    "OUTPUT": [ ... ]
}

Maximum 50 rows per request. Use start and limit parameters for pagination.

Error Handling

"UN-AUTHORIZED!"

HTTP status codes are used for error responses (e.g., 404 Not Authorized for invalid credentials).

Security Considerations

  • Input Sanitization — All user input is properly escaped and sanitized server-side
  • Scripting Protections — Additional safeguards sanitize scripting vectors in requests and responses
  • API Key Authentication — All requests require a valid API key in the authorization header
  • Encryption — Data protected with 512-bit encryption keys

For detailed information on individual endpoints, request/response parameters, and advanced usage, refer to the endpoint-specific documentation pages linked above.