Skip to main content
PATCH
/
accounting
/
items
/
{itemId}
cURL
curl --request PATCH \
  --url https://api.maesn.dev/accounting/items/{itemId} \
  --header 'Content-Type: application/json' \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '{
  "assetAccountId": "80",
  "expenseAccountId": "81",
  "incomeAccountId": "79",
  "inventoryStartDate": "2021-01-01",
  "itemNumber": "12345-A",
  "name": "Handmade Plastic Chair",
  "priceIncludesTax": true,
  "stockCount": 11,
  "taxCode": "TAX19",
  "taxRatePercentage": 19,
  "type": "PRODUCT",
  "unitName": "PIECE",
  "unitPurchasePrice": 10,
  "unitSalesPrice": 20.5
}'
{
  "meta": {
    "warnings": [
      "Field not used by target system"
    ],
    "pagination": {
      "total": 123,
      "perPage": 123,
      "currentPage": 123,
      "totalPages": 123
    }
  },
  "data": {
    "id": "02c74e8a-b95b-ef11-bfe2-002248e5aac5",
    "assetAccountId": "80",
    "expenseAccountId": "81",
    "incomeAccountId": "79",
    "inventoryStartDate": "2021-01-01",
    "itemNumber": "12345-A",
    "lastModifiedDate": "2021-01-01T00:00:00Z",
    "name": "Handmade Plastic Chair",
    "priceIncludesTax": true,
    "stockCount": 11,
    "taxCode": "TAX19",
    "taxRatePercentage": 19,
    "type": "PRODUCT",
    "unitName": "PIECE",
    "unitPurchasePrice": 10,
    "unitSalesPrice": 20.5
  }
}

Field support per integration

If you’re not using the Interactive Authentication Flow, make sure the query parameters environmentName and companyId are correctly populated. You can obtain these values by using the GET Environments and GET Companies endpoints available under the Authentication section.
Supported Request Parameters:
itemNumber
string
name
string
priceIncludesTax
boolean
stockCount
number
type
enum
Available options: PRODUCT, SERVICE
unitName
string
unitPurchasePrice
number
unitSalesPrice
number

Headers

X-API-KEY
string
required

API key

X-ACCOUNT-KEY
string
required

Account key

Path Parameters

itemId
string
required

Query Parameters

companyId
string
environmentName
string

Body

application/json
assetAccountId
string
Example:

"80"

expenseAccountId
string
Example:

"81"

incomeAccountId
string
Example:

"79"

inventoryStartDate
string
Example:

"2021-01-01"

itemNumber
string
Example:

"12345-A"

name
string
Example:

"Handmade Plastic Chair"

priceIncludesTax
boolean
Example:

true

stockCount
number
Example:

11

taxCode
string
Example:

"TAX19"

taxRatePercentage
number
Example:

19

type
enum<string>
Available options:
PRODUCT,
SERVICE
Example:

"PRODUCT"

unitName
Available options:
PIECE,
STÜCK,
NOT_UNIT,
CUBIC_METRE,
DAY,
GRAM,
HOUR,
KILOGRAM,
KILOMETRE,
LITRE,
METRE,
MILLIGRAM,
MILLILITRE,
MONTH,
NIGHT,
PACK,
PERCENTAGE,
SQUARE_METRE,
TONNE,
UNIT
Example:

"PIECE"

unitPurchasePrice
number
Example:

10

unitSalesPrice
number
Example:

20.5

Response

200 - application/json
meta
object
data
object
I