PUT
Actualitzar un projecte
Scope:
projects:projects.writehttps://api.holded.com/api/v2/projects/{projectId}Actualitza les dades d'un projecte existent.
Paràmetres
Paràmetres de ruta
projectId
stringobligatoriID del projecte (ObjectId hexadecimal de 24 caràcters)
Cos de la petició
object
namestring
Nom del projecte
descriptionstring | null
Descripció del projecte
due_datestring<date> | null
Data de lliurament en format ISO 8601
contact_idstring | null
Identificador del client associat
statusinteger | null
Estat del projecte
start_datestring<date> | null
Data d'inici en format ISO 8601
billableboolean | null
Indica si el projecte és facturable
tags[]string[] | null
Etiquetes del projecte
allow_notificationsboolean | null
Indica si es permeten notificacions
lists[]object[] | null
Llistes del projecte
idstringrequired
Identificador de la llista
keystringrequired
Clau de la llista
namestringrequired
Nom de la llista
descstringrequired
Descripció de la llista
statuses[]string[] | nulloptional
Estats disponibles en la llista
completedboolean | nulloptional
Indica si la llista està completada
Petició
python
import requests
url = "https://api.holded.com/api/v2/projects/{projectId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"name": "string",
"description": "string",
"due_date": "2024-01-15",
"contact_id": "string",
"status": 0,
"start_date": "2024-01-15",
"billable": false,
"tags": [
"string"
],
"allow_notifications": false,
"lists": [
{
"id": "string",
"key": "string",
"name": "string",
"desc": "string",
"statuses": [
"string"
],
"completed": false
}
]
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())Respostes
Resposta
json
{
"id": "string"
}Respostes exitoses
200Projecte actualitzatapplication/jsonobject
idstring
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Projecte no trobatapplication/json422Error de validacióapplication/json429Límit de sol·licituds exceditapplication/json