Referencja API

Dostęp produkcyjny zamknięty · 37 operacji

Pobierz statystyki sprzedawcy

POST/api/v1/statistics/listings

Podsumowanie i strona statystyk właściciela.

Wymagany zakres statistics:read

Przejdź do przykładu

Treść żądania

Schemat StatisticsQuery
NazwaTypWymaganyOpis
rangeobjectNie—
filtersobjectNie—
pageintegerNieminimum 1
limitintegerNieminimum 5 · maksimum 100
sort"views" | "contacts" | "conversion" | "quality" | "price" | "updated" | "action"Nie"views" | "contacts" | "conversion" | "quality" | "price" | "updated" | "action"
direction"asc" | "desc"Nie"asc" | "desc"
JSON Schema
{
  "$ref": "#/components/schemas/StatisticsQuery"
}

Odpowiedzi

200 Żądanie zakończone pomyślnie.
application/json
Schemat StatisticsPage
NazwaTypWymaganyOpis
rangeobjectNie—
generatedAtstringNieformat date-time
accountType"private" | "dealer"Nie"private" | "dealer"
summaryobjectNie—
itemsobject[]Nie—
metaobjectNie—
JSON Schema
{
  "$ref": "#/components/schemas/StatisticsPage"
}
403 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"
      }
    }
  }
}
429 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"
      }
    }
  }
}
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.
503 Dostęp jest zamknięty lub usługa jest chwilowo niedostępna. Sprawdź code.

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

Powiązane schematy

StatisticsQuery
{
  "type": "object",
  "properties": {
    "range": {
      "type": "object",
      "properties": {
        "preset": {
          "type": "string",
          "enum": [
            "7",
            "30",
            "90",
            "365",
            "custom"
          ]
        },
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "filters": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "ended",
            "all",
            "draft",
            "expired",
            "sold"
          ]
        },
        "category": {
          "type": "string"
        },
        "make": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "generation": {
          "type": "string"
        },
        "fuelType": {
          "type": "string"
        },
        "gearbox": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "voivodeship": {
          "type": "string"
        },
        "packageTier": {
          "type": "string"
        },
        "priceFrom": {
          "type": "integer",
          "minimum": 0
        },
        "priceTo": {
          "type": "integer",
          "minimum": 0
        },
        "mileageFrom": {
          "type": "integer",
          "minimum": 0
        },
        "mileageTo": {
          "type": "integer",
          "minimum": 0
        },
        "yearFrom": {
          "type": "integer",
          "minimum": 0
        },
        "yearTo": {
          "type": "integer",
          "minimum": 0
        },
        "onlyActionRequired": {
          "type": "boolean"
        }
      }
    },
    "page": {
      "type": "integer",
      "minimum": 1
    },
    "limit": {
      "type": "integer",
      "minimum": 5,
      "maximum": 100
    },
    "sort": {
      "type": "string",
      "enum": [
        "views",
        "contacts",
        "conversion",
        "quality",
        "price",
        "updated",
        "action"
      ]
    },
    "direction": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    }
  }
}
StatisticsPage
{
  "type": "object",
  "properties": {
    "range": {
      "type": "object"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "accountType": {
      "type": "string",
      "enum": [
        "private",
        "dealer"
      ]
    },
    "summary": {
      "type": "object"
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer"
        },
        "limit": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        },
        "pages": {
          "type": "integer"
        }
      }
    }
  }
}