Referencja API

Dostęp produkcyjny zamknięty · 37 operacji

Pobierz pakiety i promocje

GET/api/v1/catalog/promotions

Pakiety i dostępne dodatki.

Wymagany zakres listings:read

Przejdź do przykładu

Odpowiedzi

200 Pakiety i dostępne dodatki.
application/json
Schemat object
NazwaTypWymaganyOpis
packagesobject[]Nie—
singlePromotionsobject[]Nie—
JSON Schema
{
  "type": "object",
  "properties": {
    "packages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "systemKey",
          "name",
          "priceCents"
        ],
        "properties": {
          "systemKey": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priceCents": {
            "type": "integer"
          },
          "durationDays": {
            "type": [
              "integer",
              "null"
            ]
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "singlePromotions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "systemKey",
          "name",
          "priceCents"
        ],
        "properties": {
          "systemKey": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priceCents": {
            "type": "integer"
          },
          "durationDays": {
            "type": [
              "integer",
              "null"
            ]
          },
          "description": {
            "type": "string"
          }
        }
      }
    }
  }
}
Pozostałe błędy API Błąd przetwarzania żądania.
application/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]Nie—
JSON Schema
{
  "type": "object",
  "required": [
    "code",
    "message",
    "requestId"
  ],
  "properties": {
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
401 Brak prawidłowego klucza API.
403 Brak zakresu wymaganego przez operację lub żądanie bez HTTPS na produkcji.
429 Przekroczono limit zapytań. Sprawdź Retry-After.
503 Dostęp jest zamknięty lub usługa jest chwilowo niedostępna. Sprawdź code.

Obsługa błędów i limitów ↗