Modificare un prodotto
Risposta senza relazioni: usare GET per rileggere opzioni e foto. Cambiare il nome senza reference rigenera lo slug. timezone/locale null ripristinano l'eredità dal fornitore.
/api/v1/products/{id}Authorization
Path
Body
curl -X PATCH "https://api.takoconnect.com/api/v1/products/{id}" \
-H "Authorization: Bearer $TAKO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "ACTIVE"
}'{
"id": "entity-id",
"tenantId": "tenant-id",
"name": "name",
"reference": "tour-di-esempio",
"createdAt": "2030-06-15T08:00:00.000Z",
"updatedAt": "2030-06-15T08:00:00.000Z",
"supplierId": "supplier-id",
"shortDescription": "shortDescription",
"description": "description",
"features": [
{
"type": "type",
"shortDescription": "shortDescription"
}
],
"depositPercentage": 0,
"durationMinutesFrom": 0,
"durationMinutesTo": 0,
"timezone": "timezone",
"locale": "locale",
"availabilityType": "START_TIME",
"status": "ACTIVE",
"metadata": {}
}Autorizzazione
AuthorizationBearer <token>
Chiave tenant emessa dalla dashboard o da POST /api-keys, usata come Bearer token.
Scope richiesti: catalog:write
In: header
Parametri di percorso
idstring
Body
Content-Type: application/json
name?string
minLength 1
reference?string
shortDescription?string | null
minLength 1
description?string | null
minLength 1
features?object[] | null
Mostra proprietà
typeenum
INCLUSIONEXCLUSIONPREBOOKING_INFORMATIONADDITIONAL_INFORMATION
shortDescriptionstring
minLength 1
depositPercentage?integer
min 0max 100
durationMinutesFrom?integer | null
min 0
durationMinutesTo?integer | null
min 0
timezone?string | null
minLength 1
locale?string | null
minLength 2
availabilityType?enum
START_TIMEOPENING_HOURS
status?enum
ACTIVEINACTIVE
metadata?object
Risposte
200object
Operazione riuscita. Lo schema descrive il JSON restituito.
Mostra schema
idstring
tenantIdstring
namestring
referencestring
createdAtdatetime
date-time
updatedAtdatetime
date-time
supplierIdstring
shortDescriptionstring | null
descriptionstring | null
featuresobject[] | null
Mostra proprietà
typestring
shortDescriptionstring
depositPercentageinteger
durationMinutesFrominteger | null
durationMinutesTointeger | null
timezonestring | null
localestring | null
availabilityTypeenum
START_TIMEOPENING_HOURS
statusenum
ACTIVEINACTIVE
metadataany
Valore JSON libero; non usare per dedurre campi strutturati non documentati.
400object
Validazione o regola di dominio non soddisfatta; correggere la richiesta.
401object
Credenziale assente, revocata, scaduta o non valida.
403object
Scope, ruolo o tipo di credenziale non consentito.
404object
Risorsa assente o non accessibile nel perimetro risolto.
409object
Conflitto di stato, capacità, versione o riferimenti; rileggere lo stato e correggere.
413object
Corpo JSON oltre il limite di 15 MB.
500object
Errore interno. Prima di ripetere una mutazione verificarne l'esito.