Inbound endpoints
Costs endpoints
10 min
quick reference verb path method post /api/v1/costs/schema/create schema/ define cost schema post /api/v1/costs/bulk create or update bulk update costs entries define costs schema description with our api, you can easily create or update costs this table keeps track of all your costs for different suppliers pricemoov supports dated costs which means pricemoov will keep track of the updated costs in the past this is useful when analyzing past performance before that you need to define costs schema curl location request post 'https //api pricemoov com/api/v1/costs/schema/create schema/' \\ \ header 'authorization jwt \<your token>' \\ \ header 'content type application/json' \\ \ data raw '{ "name" "costs per website", "description" "my description", "attributes config" \["code", “category”, "website"], "columns config" \[ {"column name" "value 1"}, {"column name" "value 2", "default value" 100}], "is dated" true }' parameters name description attributes columns is dated type string , required the name of the cost table type string , default none , optional the description of the cost type list , required the granularity of the costs type list , required a list of mapping of cost columns type boolean , default false , optional if need costs to be historized by default example upon success, the response is 200 ok and returns {"id" id of table created} bulk update costs entries description by utilizing our api, you have the convenience of effortlessly updating costs this table effectively maintains a record of all your costs related to various suppliers pricemoov facilitates the inclusion of dated costs, allowing for accurate tracking of historical cost updates this feature proves particularly valuable when analyzing previous performance however, prior to that, it is necessary to establish a defined cost schema this is how you achieve that curl location request post 'https //api pricemoov com/api/v1/costs/bulk create or update/' \\ \ header 'authorization jwt \<your token>' \\ \ header 'content type application/json' \\ \ data raw '{ "name" "costs per website", "payload" \[ { "attributes" {"code" "shirt123", "category" "sport", "website" 456, "date" }, "columns" {"value 1" 1, "value 2" 2, "effective start date" "2023 02 22" }, } , ] } ' parameters name payload type string , required name of the cost table to update type string , required a list of dicts, that should have the following field attributes columns effective start date (if table is dated) example upon success, the response is 200 ok and returns \[ids of rows created or updated]