Klar API
Programatically import your data into Klar via Klar API
By Frank and 1 other2 authors26 articles
Build a Klar Attribution MCP Server with ClaudeThis guide shows you how to connect the Klar Attribution API to an AI
assistant like Claude using the Model Context Protocol (MCP).
Endpoints
List of endpoints available via Klar API
API AuthenticationHow to generate your Klar API token and authenticate your requests using Bearer authentication.
COGSUse this endpoint if COGS (Costs of Goods Sold) are coming from a non-shop system source & order data doesn't contain COGS information.
Orders (API Endpoint)Use this endpoint if you want to import complete order payloads, including order statuses, line items, shipping and returns info in one go.
Refunds (API Endpoint)Use this endpoint if returns are part of your orders. Order data is coming via different data source and doesn't contain returns information
Transaction Costs (API Endpoint)Allows you to upload payment & transaction costs for orders via API
Logistics Costs (API Endpoint)Use this endpoint to import logistics costs missing in your shop system / are coming via another system, e.g. ERP.
Object Schemas
Detailed description of the entities for the Klar API Endpoints
COGSCosts Of Goods Sold (COGS) object schema
CustomerCustomer object schema for Klar API
DiscountDiscount object schema for Klar API
LineItemLineItem object schema for order products.
LogisticsCostsObject Schema for the Logistics Costs endpoint of Klar API.
OptionalIdentifiersObject schema for Klar APi. While those attributes are optional, they are very useful in linking up the order data with your marketing data.
OrderThe Order object — field definitions, types, and example values for the Klar REST API.
RefundObject schema for Klar API.
RefundedLineItemRefunded products object schema.
ShippingShipping object schema for shipping revenue, costs, address, tax and shipping discount info
TaxObject schema for Klar API.
Transaction CostsObject Schema for the Transaction Costs endpoint of Klar API.
Examples
Example calls for the Klar API endpoints
COGSExample payload for COGS for Klar API.
Logistics CostsExample for logistics costs for Klar API.
Order Example #1Example for an order submitted via Klar API, paid & delivered, no returns
Order Example #2Example Order for Klar API, partially refunded
Refunds
