Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Update Product Userfields #197

Answered by SebRut
horphi0815 asked this question in Support
Sep 28, 2021 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

Hey, these methods use the "generic entity interactions" (https://en.demo.grocy.info/api#/Generic%20entity%20interactions) APIs internally and just pass the data object as json to the API.
So to add/update userfields you would just pass a data object with the userfields as a key-value repo like this:

data = {
	"userfields": {
		"myField1" : "myValue1"
	}
}
grocy.add_generic(entity_type=EntityType.PRODUCTS, data)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@horphi0815
Comment options

@horphi0815
Comment options

@SebRut
Comment options

@horphi0815
Comment options

@Galapagon
Comment options

Answer selected by horphi0815
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #196 on September 29, 2021 04:31.