CostingConfig

SparkCostingConfig

Get SparkCostingConfig(GET)

Get default 3D Spark costing configuration.

Return Data
ParameterDescriptionTypeExample
nameConfiguration Namestring“3D Spark”
uidCostingConfig UUIDstring“6ba40dc05533401caa9f47f014efd1f8”
designer_hrDesigner Hourly Rate [€/h]float80.0
am_expert_hrAM Expert Hourly Rate [€/h]float100.0
technician_hrTechnician Hourly Rate [€/h]float60.0
overheadOverhead [-]float0.3
margin_defaultMargin in [-]float0.2
Errors
PreconditionStatus codeError message
SparkCostingConfig exists404No CostingConfig matches the given query.
Usage
# GET "https://platform.3dspark.de/api/v1/default-costing-config/"

this.axiosInstance
  .get("/api/v1/default-costing-config/")
  .then((response) => {
    console.log(response.data);
  })

CostingConfig

Get CostingConfig (Get)

Will return the serialized costing configuration by given uid.
If no uid is given, it will return default configuration of the users organization.

Return Data
ParameterDescriptionTypeExample
nameConfiguration Namestring“3D Spark”
uidCostingConfig UUIDstring“6ba40dc05533401caa9f47f014efd1f8”
designer_hrDesigner Hourly Rate [€/h]float80.0
am_expert_hrAM Expert Hourly Rate [€/h]float100.0
technician_hrTechnician Hourly Rate [€/h]float60.0
overheadOverhead [-]float0.3
margin_defaultMargin in [-]float0.2
Errors
PreconditionStatus codeError message
User is member of an organization400User is not a member of an organization.
If no uid was passed, the organization has to have a default CostingConfig400Organization has no default costing configuration.
The user has access to the CostingConfig passed by uid403Unauthorized request on costing configuration.
The passed uid represents an existing CostingConfig404Costing configuration not found.
Usage
# GET "https://platform.3dspark.de/api/v1/costing-config/6ba40dc05533401caa9f47f014efd1f8/"

this.axiosInstance
  .get("/api/v1/costing-config/")
  .then((response) => {
    console.log(response.data);
  })

Create CostingConfig (Post)

Create costing configuration

Form Data
ParameterDescriptionRequiredTypeUnitValid Values
nameConfiguration Nametruestring[1, 255]
designer_hrDesigner Hourly Ratefalsenumber€/hgreater then 0
am_expert_hrAM Expert Hourly Ratefalsenumber€/hgreater then 0
technician_hrTechnician Hourly Ratefalsenumber€/hgreater then 0
margin_defaultMargin in [-]falsenumber]0, 1]
overheadOverhead [-]falsenumbergreater then 0
Return Data
ParameterDescriptionTypeExample
nameConfiguration Namestring“3D Spark”
uidCostingConfig UUIDstring“6ba40dc05533401caa9f47f014efd1f8”
designer_hrDesigner Hourly Rate [€/h]float80.0
am_expert_hrAM Expert Hourly Rate [€/h]float100.0
technician_hrTechnician Hourly Rate [€/h]float60.0
overheadOverhead [-]float0.3
margin_defaultMargin in [-]float0.2
Errors
PreconditionStatus codeError message
Formdata are valid422Invalid user input.
User is manager of the organization 403Access forbidden.
Usage
# POST "https://platform.3dspark.de/api/v1/costing-config/"

let formData = {
  "name":"MyOrganization",
  "designer_hr":80.0,
  "am_expert_hr":100.0,
  "technician_hr":60.0,
  "overhead": 0.3,
  "margin_default": 0.2,
}
this.axiosInstance
  .post("/api/v1/costing-config/", formData)
  .then((response) => {
    console.log(response.data);
  })

Update CostingConfig (Put)

Updates costing configuration

Form Data
ParameterDescriptionRequiredTypeUnitValid Values
nameConfiguration Nametruestring[1, 255]
designer_hrDesigner Hourly Ratefalsenumber€/hgreater then 0
am_expert_hrAM Expert Hourly Ratefalsenumber€/hgreater then 0
technician_hrTechnician Hourly Ratefalsenumber€/hgreater then 0
margin_defaultMargin in [-]falsenumber]0, 1]
overheadOverhead [-]falsenumbergreater then 0
Return Data
ParameterDescriptionTypeExample
nameConfiguration Namestring“3D Spark”
uidCostingConfig UUIDstring“6ba40dc05533401caa9f47f014efd1f8”
designer_hrDesigner Hourly Rate [€/h]float30.0
am_expert_hrAM Expert Hourly Rate [€/h]float54.0
technician_hrTechnician Hourly Rate [€/h]float20.0
overheadOverhead [-]float0.5
margin_defaultMargin in [-]float0.7

Errors

PreconditionStatus codeError message
UID was passed400No UID specified.
CostingConfig exists404Configuration not found.
User is member of an organization400User is not a member of an organization.
User is manager of the organization403Access forbidden.
Formdata are valid422Invalid user input.
Usage
# PUT "https://platform.3dspark.de/api/v1/costing-config/6ba40dc05533401caa9f47f014efd1f8/"

let formData = {
  "name":"MyOrganization",
  "designer_hr":30.0,
  "am_expert_hr":54.0,
  "technician_hr":20.0,
  "overhead": 0.5,
  "margin_default": 0.7,
}
this.axiosInstance
  .put("/api/v1/costing-config/6ba40dc05533401caa9f47f014efd1f8/", formData)
  .then((response) => {
    console.log(response.data);
  })

Delete CostingConfig (Delete)

Updates costing configuration

Return Data
"Deleted costing config: 6ba40dc05533401caa9f47f014efd1f8"
Error
PreconditionStatus codeError message
UID was passed400No UID specified.
User is member of an organization400User is not a member of an organization.
User is manager of the organization403Access forbidden.
CostingConfig exists404Configuration not found.
Usage
# DELETE "https://platform.3dspark.de/api/v1/costing-config/6ba40dc05533401caa9f47f014efd1f8/"

this.axiosInstance
  .delete("/api/v1/costing-config/6ba40dc05533401caa9f47f014efd1f8/")
  .then((response) => {
    console.log(response.data);
  })

DefaultCostingConfig

Set default CostingConfig (Post)

Set Default Costing Configuration for Organization

Return Data
Costing configuration for organization MyOrganization set to 3D Spark.
Error
PreconditionStatus codeError message
UID was passed400No UID specified.
CostingConfig exists404Invalid configuration uid specified.
User is member of an organization400User is not a member of an organization.
User is manager of the organization403Access forbidden.
Usage
# POST "https://platform.3dspark.de/api/v1/costing-config-selection/6ba40dc05533401caa9f47f014efd1f8/"

this.axiosInstance
  .post("/api/v1/costing-config-selection/6ba40dc05533401caa9f47f014efd1f8/")
  .then((response) => {
    console.log(response.data);
  })