Saltar al contingut principal
GET

Obtenir un canal de venda per ID

Scope:sales:sales-channels.read
https://api.holded.com/api/v2/sales-channels/{salesChannelId}

Recupera els detalls d'un canal de venda específic pel seu identificador únic.

Paràmetres

Paràmetres de ruta

salesChannelIdstringobligatori

ID del canal de vendes (ObjectId hexadecimal de 24 caràcters)

Petició

python
import requests

url = "https://api.holded.com/api/v2/sales-channels/{salesChannelId}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respostes

Resposta

json
{
  "id": "507f1f77bcf86cd799439011",
  "name": "Office Expenses",
  "color": "#FF5733",
  "account_num": 6290001,
  "archived": false,
  "description": "string"
}

Respostes exitoses

200Canal de venda trobatapplication/json
object
idstring

Unique identifier of the accounting account

namestring

Display name of the accounting account

colorstring

Hex color code used in the UI

account_numinteger

Numeric accounting code from the chart of accounts

archivedboolean

Whether the account is archived

descriptionstring | null

Description of the accounting account

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Canal de venda no trobatapplication/json