My Products
Help
adrianm
PARTNER

Error creating kit assembly

by adrianm

I'm trying to create a Kit assembly

POST: https://integration.visma.net/API/controller/api/v1/kitassembly
Headers: {
    Accept: application/json
    Authorization: <hidden>
    Content-Type: application/json; charset=utf-8
    Content-Length: 87
}
{
	"type": "P",
	"itemId": {
		"value": "103"
	},
	"revision": {
		"value": "1"
	},
	"quantity": {
		"value": 1.0
	}
}

but get this nonsense error message (how does the API know "103" is 1869032 if it doesn't exist)

{"message":"VismaId: 52d00096-5b37-421d-b743-1b2fdc447ad9. Error creating kit assembly. Error: An error in processing of field Item ID value 1869032 Error: Item ID '1869032' cannot found in the system. Check whether you have access rights to this object."}

Kit specification:

{
			"kitInventoryID": "103                 ",
			"revision": "1",
			"description": "test produktion",
			"isActive": true,
			"allowComponentAddition": false,
			"isNonStock": false,
			"createdDateTime": "2022-11-17T15:07:27.467",
			"lastModifiedDateTime": "2023-09-07T13:04:28.577",
			"stockComponentLines": [
				{
					"lineNbr": 1,
					"componentID": "104                 ",
					"componentQty": 1.0,
					"uom": "STYCK",
					"allowComponentQtyVariance": false,
					"disassemblyCoeff": 1.0,
					"allowComponentSubstitution": false,
					"description": "komponent 3"
				},
				{
					"lineNbr": 2,
					"componentID": "105                 ",
					"componentQty": 1.0,
					"uom": "STYCK",
					"allowComponentQtyVariance": false,
					"disassemblyCoeff": 1.0,
					"allowComponentSubstitution": false,
					"description": "komponent 4"
				}
			],
			"nonStockComponentLines": [
				{
					"lineNbr": 1,
					"componentID": "107                 ",
					"componentQty": 1.0,
					"uom": "STYCK",
					"allowComponentQtyVariance": false,
					"description": "Arbetad tid/tim"
				}
			]
		}

All involved inventory number exists.

 

Creating the same kit assembly works fine i GUI.

 

1 REPLY 1

by Magnus Johnsen

Hi,

We'll forward this to the development team.

Thank you.