Saltar al contingut principal
POST

Crear una tarifa

Scope:inventory:rates.write
https://api.holded.com/api/v2/price-lists

Crea 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/json
object
idstring

Respostes d'error

400Sol·licitud incorrectaapplication/json
401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
422Error de validacióapplication/json