SparkCostingConfig
Get SparkCostingConfig(GET)
Get default 3D Spark costing configuration.
Return Data
Parameter | Description | Type | Example |
name | Configuration Name | string | “3D Spark” |
uid | CostingConfig UUID | string | “6ba40dc05533401caa9f47f014efd1f8” |
designer_hr | Designer Hourly Rate [€/h] | float | 80.0 |
am_expert_hr | AM Expert Hourly Rate [€/h] | float | 100.0 |
technician_hr | Technician Hourly Rate [€/h] | float | 60.0 |
overhead | Overhead [-] | float | 0.3 |
margin_default | Margin in [-] | float | 0.2 |
Errors
Precondition | Status code | Error message |
SparkCostingConfig exists | 404 | No 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
Parameter | Description | Type | Example |
name | Configuration Name | string | “3D Spark” |
uid | CostingConfig UUID | string | “6ba40dc05533401caa9f47f014efd1f8” |
designer_hr | Designer Hourly Rate [€/h] | float | 80.0 |
am_expert_hr | AM Expert Hourly Rate [€/h] | float | 100.0 |
technician_hr | Technician Hourly Rate [€/h] | float | 60.0 |
overhead | Overhead [-] | float | 0.3 |
margin_default | Margin in [-] | float | 0.2 |
Errors
Precondition | Status code | Error message |
User is member of an organization | 400 | User is not a member of an organization. |
If no uid was passed, the organization has to have a default CostingConfig | 400 | Organization has no default costing configuration. |
The user has access to the CostingConfig passed by uid | 403 | Unauthorized request on costing configuration. |
The passed uid represents an existing CostingConfig | 404 | Costing 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
Parameter | Description | Required | Type | Unit | Valid Values |
name | Configuration Name | true | string | | [1, 255] |
designer_hr | Designer Hourly Rate | false | number | €/h | greater then 0 |
am_expert_hr | AM Expert Hourly Rate | false | number | €/h | greater then 0 |
technician_hr | Technician Hourly Rate | false | number | €/h | greater then 0 |
margin_default | Margin in [-] | false | number | | ]0, 1] |
overhead | Overhead [-] | false | number | | greater then 0 |
Return Data
Parameter | Description | Type | Example |
name | Configuration Name | string | “3D Spark” |
uid | CostingConfig UUID | string | “6ba40dc05533401caa9f47f014efd1f8” |
designer_hr | Designer Hourly Rate [€/h] | float | 80.0 |
am_expert_hr | AM Expert Hourly Rate [€/h] | float | 100.0 |
technician_hr | Technician Hourly Rate [€/h] | float | 60.0 |
overhead | Overhead [-] | float | 0.3 |
margin_default | Margin in [-] | float | 0.2 |
Errors
Precondition | Status code | Error message |
Formdata are valid | 422 | Invalid user input. |
User is manager of the organization | 403 | Access 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
Parameter | Description | Required | Type | Unit | Valid Values |
name | Configuration Name | true | string | | [1, 255] |
designer_hr | Designer Hourly Rate | false | number | €/h | greater then 0 |
am_expert_hr | AM Expert Hourly Rate | false | number | €/h | greater then 0 |
technician_hr | Technician Hourly Rate | false | number | €/h | greater then 0 |
margin_default | Margin in [-] | false | number | | ]0, 1] |
overhead | Overhead [-] | false | number | | greater then 0 |
Return Data
Parameter | Description | Type | Example |
name | Configuration Name | string | “3D Spark” |
uid | CostingConfig UUID | string | “6ba40dc05533401caa9f47f014efd1f8” |
designer_hr | Designer Hourly Rate [€/h] | float | 30.0 |
am_expert_hr | AM Expert Hourly Rate [€/h] | float | 54.0 |
technician_hr | Technician Hourly Rate [€/h] | float | 20.0 |
overhead | Overhead [-] | float | 0.5 |
margin_default | Margin in [-] | float | 0.7 |
Errors
Precondition | Status code | Error message |
UID was passed | 400 | No UID specified. |
CostingConfig exists | 404 | Configuration not found. |
User is member of an organization | 400 | User is not a member of an organization. |
User is manager of the organization | 403 | Access forbidden. |
Formdata are valid | 422 | Invalid 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
Precondition | Status code | Error message |
UID was passed | 400 | No UID specified. |
User is member of an organization | 400 | User is not a member of an organization. |
User is manager of the organization | 403 | Access forbidden. |
CostingConfig exists | 404 | Configuration 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
Precondition | Status code | Error message |
UID was passed | 400 | No UID specified. |
CostingConfig exists | 404 | Invalid configuration uid specified. |
User is member of an organization | 400 | User is not a member of an organization. |
User is manager of the organization | 403 | Access 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);
})