POST
Crear una tarifa
Scope:
inventory:rates.writehttps://api.holded.com/api/v2/price-listsCrea una nova tarifa (llista de preus). Les tarifes permeten oferir preus diferents a distints segments de clients.
Cos de la petició
object
namestringrequired
Nom per mostrar de la tarifa
descriptionstring | nulloptional
Descripció opcional de la tarifa
Petició
python
import requests
url = "https://api.holded.com/api/v2/price-lists"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"name": "string",
"description": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Respostes
Resposta
json
{
"id": "507f1f77bcf86cd799439011"
}Respostes exitoses
201Tarifa creadaapplication/jsonobject
idstring
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json422Error de validacióapplication/json