Add used material
To add a used material send a POST request with product reference and quantity. Material is linked to specific job and provided service.
Add used material
$ curl -X POST \
-H "Authorization: Bearer api-key" \
-H "Content-Type: application/json" \
-d '{"product": {"external_id":"cable"}, "quantity": 4.5}' \
https://api.planadoapp.com/v2/jobs/50c773b3-a4f8-5619-be47-cb6a0edb22cc/provided_services/34b3d97e-b129-4aca-a7ca-999819436465/used_materials | jq
{
"job_uuid": "50c773b3-a4f8-5619-be47-cb6a0edb22cc"
}
Request schema
Field | Type | JSON type | Required | Can be null |
Description |
---|---|---|---|---|---|
|
Record |
Object |
Yes |
No |
Object containing UUID or external_id |
|
Number |
Number |
Yes |
No |
Quantity of used material |
Update used material
To update used material quantity send a corresponding PATCH request to the url ending with product_uuid
.
Update used material
$ curl -X PATCH \
-H "Authorization: Bearer api-key" \
-H "Content-Type: application/json" \
-d '{"quantity": 7}' \
https://api.planadoapp.com/v2/jobs/50c773b3-a4f8-5619-be47-cb6a0edb22cc/provided_services/34b3d97e-b129-4aca-a7ca-999819436465/used_materials/08795623-f3aa-4b67-b449-6df88e116965 | jq
{
"job_uuid": "50c773b3-a4f8-5619-be47-cb6a0edb22cc"
}
Remove used material
To remove used material send a DELETE request.
Remove used material
$ curl -X DELETE \
-H "Authorization: Bearer api-key" \
https://api.planadoapp.com/v2/jobs/50c773b3-a4f8-5619-be47-cb6a0edb22cc/provided_services/34b3d97e-b129-4aca-a7ca-999819436465/used_materials/08795623-f3aa-4b67-b449-6df88e116965 | jq
{
"message": "Performed"
}