You are viewing a non-production environment — the API surface may differ from production.
Menu API

Item Accounts

Bookkeeping accounts for sales lines, per item

POST
/api/v1/integrations/fortnox/item-accounts/sync

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

locationId*number

Location ID

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/integrations/fortnox/item-accounts/sync" \  -H "Content-Type: application/json" \  -d '{    "locationId": 0  }'
{  "status": "success",  "data": {    "created": 0,    "updated": 0,    "total": 0  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}
GET
/api/v1/item-accounts

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Query Parameters

locationId?number

Filter by location ID

companyId?number

Filter by company ID (joined through locations)

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/item-accounts"
{  "status": "success",  "data": {    "itemAccounts": [      {        "vatId": 1,        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "account": "string",        "description": "string",        "locationId": 0,        "isInherited": true,        "sourceLocationId": 0,        "inheritToChildren": true,        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z"      }    ]  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}
POST
/api/v1/item-accounts

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

vatId?|
Range1 <= value
account*string

Account number/code

Length1 <= length
description?|

Human-readable description

locationId?|

Location ID. Defaults to caller location if omitted.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/item-accounts" \  -H "Content-Type: application/json" \  -d '{    "account": "string"  }'
{  "status": "success",  "data": {    "vatId": 1,    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "account": "string",    "description": "string",    "locationId": 0,    "isInherited": true,    "sourceLocationId": 0,    "inheritToChildren": true,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}
GET
/api/v1/item-accounts/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Path Parameters

id*string

Item account UUID

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/item-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "status": "success",  "data": {    "vatId": 1,    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "account": "string",    "description": "string",    "locationId": 0,    "isInherited": true,    "sourceLocationId": 0,    "inheritToChildren": true,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}
DELETE
/api/v1/item-accounts/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Path Parameters

id*string

Item account UUID

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v1/item-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "status": "success",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "deleted": true  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}
PUT
/api/v1/item-accounts/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Path Parameters

id*string

Item account UUID

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

vatId?|
Range1 <= value
account?string
Length1 <= length
description?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/v1/item-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "status": "success",  "data": {    "vatId": 1,    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "account": "string",    "description": "string",    "locationId": 0,    "isInherited": true,    "sourceLocationId": 0,    "inheritToChildren": true,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}
GET
/api/v1/items/{itemId}/accounts

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Path Parameters

itemId*string

Inventory item ID

Match^[0-9]+$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/items/string/accounts"
{  "status": "success",  "data": {    "itemAccounts": [      {        "vatId": 1,        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "account": "string",        "description": "string",        "locationId": 0,        "isInherited": true,        "sourceLocationId": 0,        "inheritToChildren": true,        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z"      }    ]  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}
POST
/api/v1/items/{itemId}/accounts

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Path Parameters

itemId*string

Inventory item ID

Match^[0-9]+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

accountId*string

Item account UUID to link

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/items/string/accounts" \  -H "Content-Type: application/json" \  -d '{    "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9"  }'
{  "status": "success",  "data": {    "itemAccounts": [      {        "vatId": 1,        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "account": "string",        "description": "string",        "locationId": 0,        "isInherited": true,        "sourceLocationId": 0,        "inheritToChildren": true,        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z"      }    ]  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}
DELETE
/api/v1/items/{itemId}/accounts/{accountId}

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Format: karma_live_* or karma_dev_*

In: header

Path Parameters

itemId*string

Inventory item ID

Match^[0-9]+$
accountId*string

Item account UUID

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v1/items/string/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "status": "success",  "data": {    "itemAccounts": [      {        "vatId": 1,        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "account": "string",        "description": "string",        "locationId": 0,        "isInherited": true,        "sourceLocationId": 0,        "inheritToChildren": true,        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z"      }    ]  },  "meta": {    "requestId": "string",    "timestamp": "2019-08-24T14:15:22Z",    "executionTimeMs": 0  }}