Documentation / Endpoints / GET /api/pricing

GET /api/pricing

Paid

Retrieve comprehensive pricing intelligence for a specific variant including buyback, resale, historical data, and market confidence metrics.

Authentication

Requires Paid tier or higher.

Query Parameters

ParameterTypeRequiredDescription
variant_idstringVariant identifier
pricing_typestringFilter by type: "buyback", "resale", or "both" (default: "both")
conditionstringFilter by condition (not currently implemented)
daysintegerHistorical data range in days (not currently implemented)

Example Request

curl "https://api.souratlas.io/api/pricing?variant_id=var_iphone14pro_128_black&pricing_type=both" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "success": true,
  "data": {
    "variant_id": "var_iphone14pro_128_black",
    "device_name": "Apple iPhone 14 Pro",
    "variant_name": "128GB Space Black",
    "buyback": {
      "current": {
        "Excellent": 65000,
        "Good": 55000,
        "Fair": 45000,
        "Poor": 30000
      },
      "historical": [
        { "date": "2024-01-01", "value": 67000, "currency": "USD", "condition": "Excellent" },
        { "date": "2024-01-08", "value": 66000, "currency": "USD", "condition": "Excellent" },
        { "date": "2024-01-15", "value": 65000, "currency": "USD", "condition": "Excellent" }
      ],
      "last_updated": "2024-01-15T10:30:00Z",
      "source": "aggregated"
    },
    "resale": {
      "current": {
        "Excellent": 85000,
        "Good": 75000,
        "Fair": 60000,
        "Poor": 45000
      },
      "historical": [
        { "date": "2024-01-01", "value": 87000, "currency": "USD", "condition": "Excellent" },
        { "date": "2024-01-08", "value": 86000, "currency": "USD", "condition": "Excellent" },
        { "date": "2024-01-15", "value": 85000, "currency": "USD", "condition": "Excellent" }
      ],
      "trend": "falling",
      "liquidity_score": 85,
      "last_updated": "2024-01-15T10:30:00Z",
      "source": "aggregated"
    },
    "market_confidence": 92,
    "data_points": 1247,
    "currency": "USD"
  },
  "timestamp": "2024-01-15T10:30:00Z"
}

Response follows the VariantPricing schema. All prices in cents (USD).

Error Responses

StatusError CodeDescription
400VALIDATION_ERRORMissing required variant_id parameter
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENRequires paid tier access
404NOT_FOUNDVariant not found
429RATE_LIMIT_EXCEEDEDRate limit exceeded
500INTERNAL_ERRORInternal server error