Add a project template

Add a new project template identified by the UUID of the project.

POST /aos/v1/projects/{projectId}/templates

Query params

Parameter Type Mandatory
projectId string (uuid) yes

Headers

Header Value
Content-Type application/json
Accept application/json

Body params

Parameter Type Mandatory Description
trade_id string (uuid) yes The uuid of the trade.
slice_name string no The name of the slice. If the field is empty, the template will be created without slice.
budget float no The budget of the template or the slice. If not specified the value will be 0.

{danger.fa-close} A slice cannot be added alone if the template does not exist first. You have to make a first POST request to add the template and a second request to add the slice later.

Example of request

{
    "trade_id": "977de940-2633-4123-8d74-874171b64e69",
    "slice_name": "Tranche A",
    "budget": 100000.50
}

Response

Status: 201 Created

It returns a project template object as described in the Retrieve the project templates

{
    "template": {
        "id": "97740903-8a9b-4c40-83e2-71ead47f1c2b",
        "project_id": "97740900-803b-4582-a67d-ab7a2fc71107",
        "is_slice": true,
        "slice": "Tranche A"
        //...
    }
}