Kulea API Documentation

This API provides access to sugar trading data including landed costs, parities, and wholesale prices. The API is designed for businesses and applications that need to track and analyze sugar market data in real-time.

API Overview

The API is organized around REST principles. It has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL

https://api.kulea.com

All endpoints are only accessible via HTTPS.

Authentication

All endpoints require an API key for authentication. Include the API key in the request headers:

Header: apikey
Value: YOUR_API_KEY

Contact support@kulea.com to obtain an API key.

Rate Limiting

All endpoints are rate-limited to 100 requests per 15-minute window per IP address.

API Structure

The Sugar Trading Data API is organized into three main data categories, each providing both latest and historical data endpoints:

1Wholesale Prices

Real-time and historical wholesale sugar prices across different cities, countries, and regions.

Latest:GET /api/v1/sugar/latest/prices
Historical:GET /api/v1/sugar/historical/prices

2Landed Costs

Cost analysis for sugar imports including transportation, customs, and other associated costs.

Latest:GET /api/v1/sugar/latest/landed-costs
Historical:GET /api/v1/sugar/historical/landed-costs

3Parities

Trading parity calculations showing the difference between wholesale prices and landed costs.

Latest:GET /api/v1/sugar/latest/parities
Historical:GET /api/v1/sugar/historical/parities

Key Features

  • โ€ข Latest endpoints provide current market data
  • โ€ข Historical endpoints offer time-series analysis with date filtering
  • โ€ข Consistent filtering across all endpoints (cityIds, countryId, regionId)
  • โ€ข Standardized responses with clear data structures

Sugar Wholesale Prices

Sugar Wholesale Prices (Latest)

Returns the most recent wholesale prices for sugar across different cities.

GET/api/v1/sugar/latest/prices

Parameters

ParameterTypeDescriptionRequiredDefault
cityIdsarrayArray of city IDs in square brackets (e.g., [1,2,15]) to filter resultsNonull
countryIdnumberFilter by country IDNonull
regionIdnumberFilter by region IDNonull

Responses

200 - Successful response

{
  "status": "success",
  "nCities": 5,
  "data": [
    {
      "price": "1030",
      "date": "2025-06-29",
      "city": "Ouagadougou",
      "country": "Burkina Faso",
      "flag": "๐Ÿ‡ง๐Ÿ‡ซ",
      "countryId": 21,
      "regionId": 1,
      "region": "Africa",
      "commodity": "Refined",
      "unit": "$/MT"
    },
    {
      "price": "1020",
      "date": "2025-06-29",
      "city": "Abidjan",
      "country": "Cรดte D'Ivoire",
      "flag": "๐Ÿ‡จ๐Ÿ‡ฎ",
      "countryId": 44,
      "regionId": 1,
      "region": "Africa",
      "commodity": "White (LQW / Ref.)",
      "unit": "$/MT"
    },
    {
      "price": "615",
      "date": "2025-06-29",
      "city": "Djibouti City",
      "country": "Djibouti",
      "flag": "๐Ÿ‡ฉ๐Ÿ‡ฏ",
      "countryId": 58,
      "regionId": 1,
      "region": "Africa",
      "commodity": "LQW",
      "unit": "$/MT"
    },
    {
      "price": "730",
      "date": "2025-06-29",
      "city": "Bukavu",
      "country": "DRC",
      "flag": "๐Ÿ‡จ๐Ÿ‡ฉ",
      "countryId": 40,
      "regionId": 1,
      "region": "Africa",
      "commodity": "VHP",
      "unit": "$/MT"
    },
    {
      "price": "940",
      "date": "2025-06-29",
      "city": "Mbabane",
      "country": "Eswatini",
      "flag": "๐Ÿ‡ธ๐Ÿ‡ฟ",
      "countryId": 214,
      "regionId": 1,
      "region": "Africa",
      "commodity": "Refined",
      "unit": "$/MT"
    }
  ]
}

Sugar Wholesale Prices (Historical)

Returns historical wholesale prices for sugar with optional filtering.

GET/api/v1/sugar/historical/prices

Parameters

ParameterTypeDescriptionRequiredDefault
cityIdsarrayArray of city IDs in square brackets (e.g., [1,2,15]) to filter resultsNonull
countryIdnumberFilter by country IDNonull
regionIdnumberFilter by region IDNonull
startDatestringStart date in YYYY-MM-DD formatNonull
endDatestringEnd date in YYYY-MM-DD formatNonull

Responses

200 - Successful response

{
  "status": "success",
  "nCities": 3,
  "data": [
    {
      "cityName": "Abidjan",
      "cityId": 49,
      "country": "Cรดte D'Ivoire",
      "countryEmoji": "๐Ÿ‡จ๐Ÿ‡ฎ",
      "region": "Africa",
      "priceData": [
        {
          "price": 1020,
          "date": "2025-06-29",
          "dateString": "29th Jun 2025",
          "commodity": "White (LQW / Ref.)",
          "unit": "$/MT"
        },
        {
          "price": 1020,
          "date": "2025-06-28",
          "dateString": "28th Jun 2025",
          "commodity": "White (LQW / Ref.)",
          "unit": "$/MT"
        },
        {
          "price": 1020,
          "date": "2025-06-27",
          "dateString": "27th Jun 2025",
          "commodity": "White (LQW / Ref.)",
          "unit": "$/MT"
        },
        {
          "price": 1020,
          "date": "2025-06-26",
          "dateString": "26th Jun 2025",
          "commodity": "White (LQW / Ref.)",
          "unit": "$/MT"
        }
      ]
    },
    {
      "cityName": "Nairobi",
      "cityId": 1,
      "country": "Kenya",
      "countryEmoji": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "region": "Africa",
      "priceData": [
        {
          "price": 850,
          "date": "2025-06-29",
          "dateString": "29th Jun 2025",
          "commodity": "Refined",
          "unit": "$/MT"
        },
        {
          "price": 845,
          "date": "2025-06-28",
          "dateString": "28th Jun 2025",
          "commodity": "Refined",
          "unit": "$/MT"
        },
        {
          "price": 840,
          "date": "2025-06-27",
          "dateString": "27th Jun 2025",
          "commodity": "Refined",
          "unit": "$/MT"
        }
      ]
    },
    {
      "cityName": "Lagos",
      "cityId": 15,
      "country": "Nigeria",
      "countryEmoji": "๐Ÿ‡ณ๐Ÿ‡ฌ",
      "region": "Africa",
      "priceData": [
        {
          "price": 920,
          "date": "2025-06-29",
          "dateString": "29th Jun 2025",
          "commodity": "VHP",
          "unit": "$/MT"
        },
        {
          "price": 925,
          "date": "2025-06-28",
          "dateString": "28th Jun 2025",
          "commodity": "VHP",
          "unit": "$/MT"
        },
        {
          "price": 930,
          "date": "2025-06-27",
          "dateString": "27th Jun 2025",
          "commodity": "VHP",
          "unit": "$/MT"
        }
      ]
    }
  ]
}

Sugar Landed Costs

Sugar Landed Costs (Latest)

Returns the most recent landed costs for sugar across different cities, origins, and shipment modes.

GET/api/v1/sugar/latest/landed-costs

Parameters

ParameterTypeDescriptionRequiredDefault
cityIdsarrayArray of city IDs in square brackets (e.g., [1,2,15]) to filter resultsNonull
countryIdnumberFilter by country IDNonull
regionIdnumberFilter by region IDNonull

Responses

200 - Successful response

{
  "status": "success",
  "data": [
    {
      "cityName": "Mombasa",
      "cityId": 2,
      "countryName": "Kenya",
      "countryEmoji": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "regionName": "East Africa",
      "costs": [
        {
          "origin": "Brazil",
          "commodity": "Raw Sugar",
          "shipmentMode": "Ocean",
          "prices": [
            {
              "value": 780.25,
              "date": "2024-03-20T00:00:00.000Z",
              "dateString": "2024-03-20",
              "unit": "$/MT"
            }
          ]
        }
      ]
    }
  ]
}

Sugar Landed Costs (Historical)

Returns historical landed costs for sugar with optional filtering.

GET/api/v1/sugar/historical/landed-costs

Parameters

ParameterTypeDescriptionRequiredDefault
cityIdsarrayArray of city IDs in square brackets (e.g., [1,2,15]) to filter resultsNonull
countryIdnumberFilter by country IDNonull
regionIdnumberFilter by region IDNonull
startDatestringStart date in YYYY-MM-DD formatNonull
endDatestringEnd date in YYYY-MM-DD formatNonull

Responses

200 - Successful response

{
  "status": "success",
  "data": [
    {
      "cityName": "Mombasa",
      "cityId": 2,
      "countryName": "Kenya",
      "countryEmoji": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "regionName": "East Africa",
      "costs": [
        {
          "origin": "Brazil",
          "commodity": "Raw Sugar",
          "shipmentMode": "Ocean",
          "prices": [
            {
              "value": 780.25,
              "date": "2024-03-20T00:00:00.000Z",
              "dateString": "2024-03-20",
              "unit": "$/MT"
            },
            {
              "value": 775.5,
              "date": "2024-03-19T00:00:00.000Z",
              "dateString": "2024-03-19",
              "unit": "$/MT"
            }
          ]
        }
      ]
    }
  ]
}

Sugar Parities

Sugar Parities (Latest)

Returns the most recent sugar parities across different cities, origins, and shipment modes.

GET/api/v1/sugar/latest/parities

Parameters

ParameterTypeDescriptionRequiredDefault
cityIdsarrayArray of city IDs in square brackets (e.g., [1,2,15]) to filter resultsNonull
countryIdnumberFilter by country IDNonull
regionIdnumberFilter by region IDNonull

Responses

200 - Successful response

{
  "status": "success",
  "data": [
    {
      "cityName": "Nairobi",
      "cityId": 1,
      "countryName": "Kenya",
      "countryEmoji": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "regionName": "East Africa",
      "parities": [
        {
          "origin": "Brazil",
          "commodity": "Raw Sugar",
          "shipmentMode": "Ocean",
          "wholesalePrice": 850.5,
          "landedCost": 780.25,
          "parity": 70.25,
          "date": "2024-03-20T00:00:00.000Z",
          "dateString": "2024-03-20",
          "unit": "$/MT"
        }
      ]
    }
  ]
}

Sugar Parities (Historical)

Returns historical sugar parities with optional filtering.

GET/api/v1/sugar/historical/parities

Parameters

ParameterTypeDescriptionRequiredDefault
cityIdsarrayArray of city IDs in square brackets (e.g., [1,2,15]) to filter resultsNonull
countryIdnumberFilter by country IDNonull
regionIdnumberFilter by region IDNonull
startDatestringStart date in YYYY-MM-DD formatNonull
endDatestringEnd date in YYYY-MM-DD formatNonull

Responses

200 - Successful response

{
  "status": "success",
  "nCities": 3,
  "data": [
    {
      "cityName": "Ashgabat",
      "cityId": 23,
      "countryName": "Turkmenistan",
      "countryEmoji": "๐Ÿ‡น๐Ÿ‡ฒ",
      "regionName": "CIS",
      "costs": [
        {
          "origin": "ExW Ufa",
          "commodity": "LQW",
          "shipmentMode": "Road / Rail",
          "parities": [
            {
              "value": "-165.00",
              "status": "closed",
              "landedCost": "865.00",
              "price": "700",
              "date": "2025-06-30",
              "dateString": "30th Jun 2025"
            },
            {
              "value": "-165.00",
              "status": "closed",
              "landedCost": "865.00",
              "price": "700",
              "date": "2025-06-29",
              "dateString": "29th Jun 2025"
            },
            {
              "value": "-165.00",
              "status": "closed",
              "landedCost": "865.00",
              "price": "700",
              "date": "2025-06-28",
              "dateString": "28th Jun 2025"
            },
            {
              "value": "-165.00",
              "status": "closed",
              "landedCost": "865.00",
              "price": "700",
              "date": "2025-06-27",
              "dateString": "27th Jun 2025"
            }
          ]
        }
      ]
    },
    {
      "cityName": "Nairobi",
      "cityId": 1,
      "countryName": "Kenya",
      "countryEmoji": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "regionName": "Africa",
      "costs": [
        {
          "origin": "Brazil",
          "commodity": "Raw Sugar",
          "shipmentMode": "Ocean",
          "parities": [
            {
              "value": "70.25",
              "status": "open",
              "landedCost": "780.25",
              "price": "850",
              "date": "2025-06-30",
              "dateString": "30th Jun 2025"
            },
            {
              "value": "70.25",
              "status": "open",
              "landedCost": "775.50",
              "price": "845",
              "date": "2025-06-29",
              "dateString": "29th Jun 2025"
            },
            {
              "value": "70.25",
              "status": "open",
              "landedCost": "770.75",
              "price": "840",
              "date": "2025-06-28",
              "dateString": "28th Jun 2025"
            }
          ]
        }
      ]
    },
    {
      "cityName": "Lagos",
      "cityId": 15,
      "countryName": "Nigeria",
      "countryEmoji": "๐Ÿ‡ณ๐Ÿ‡ฌ",
      "regionName": "Africa",
      "costs": [
        {
          "origin": "Thailand",
          "commodity": "VHP",
          "shipmentMode": "Ocean",
          "parities": [
            {
              "value": "45.50",
              "status": "open",
              "landedCost": "874.50",
              "price": "920",
              "date": "2025-06-30",
              "dateString": "30th Jun 2025"
            },
            {
              "value": "45.50",
              "status": "open",
              "landedCost": "879.50",
              "price": "925",
              "date": "2025-06-29",
              "dateString": "29th Jun 2025"
            },
            {
              "value": "45.50",
              "status": "open",
              "landedCost": "884.50",
              "price": "930",
              "date": "2025-06-28",
              "dateString": "28th Jun 2025"
            }
          ]
        }
      ]
    }
  ]
}

Response Format

All endpoints return responses in the following format:

{
  "status": "success",
  "data": [
    {}
  ]
}

Error Responses

The API uses standard HTTP status codes:

  • 200 OK: Request successful
  • 400 Bad Request: Invalid parameters
  • 401 Unauthorized: Invalid or missing API key
  • 403 Forbidden: API key doesn't have access to the requested endpoint
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server error

Error responses follow this format:

{
  "status": "error",
  "message": "Error message details"
}

Query Examples

This section provides practical examples of how to use query parameters with the API endpoints. These examples can be applied to any endpoint that supports the respective parameters.

Filtering by Cities

Filter results to specific cities using their IDs:

GET /api/v1/sugar/latest/prices?cityIds=[1,2,15]

# Example response structure
{
  "status": "success",
  "nCities": 3,
  "data": [
    {
      "price": "850",
      "date": "2025-06-29",
      "city": "Nairobi",
      "country": "Kenya",
      "flag": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "countryId": 1,
      "regionId": 1,
      "region": "Africa",
      "commodity": "Refined",
      "unit": "$/MT"
    }
    // ... more cities
  ]
}

Filtering by Region

Get all data for a specific region:

GET /api/v1/sugar/latest/prices?regionId=1

# Returns all cities in Africa (regionId=1)
{
  "status": "success",
  "nCities": 25,
  "data": [
    {
      "price": "1030",
      "date": "2025-06-29",
      "city": "Ouagadougou",
      "country": "Burkina Faso",
      "flag": "๐Ÿ‡ง๐Ÿ‡ซ",
      "countryId": 21,
      "regionId": 1,
      "region": "Africa",
      "commodity": "Refined",
      "unit": "$/MT"
    }
    // ... more African cities
  ]
}

Filtering by Country

Get data for a specific country:

GET /api/v1/sugar/latest/prices?countryId=116

# Returns all cities in Kenya (countryId=116)
{
  "status": "success",
  "nCities": 2,
  "data": [
    {
      "price": "850",
      "date": "2025-06-29",
      "city": "Nairobi",
      "country": "Kenya",
      "flag": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "countryId": 1,
      "regionId": 1,
      "region": "Africa",
      "commodity": "Refined",
      "unit": "$/MT"
    },
    {
      "price": "820",
      "date": "2025-06-29",
      "city": "Mombasa",
      "country": "Kenya",
      "flag": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "countryId": 1,
      "regionId": 1,
      "region": "Africa",
      "commodity": "Raw Sugar",
      "unit": "$/MT"
    }
  ]
}

Historical Data with Date Range

Get historical data for a specific date range:

GET /api/v1/sugar/historical/prices?startDate=2025-06-01&endDate=2025-06-30

# Returns historical data for June 2025
{
  "status": "success",
  "nCities": 51,
  "data": [
    {
      "cityName": "Abidjan",
      "cityId": 49,
      "country": "Cรดte D'Ivoire",
      "countryEmoji": "๐Ÿ‡จ๐Ÿ‡ฎ",
      "region": "Africa",
      "priceData": [
        {
          "price": 1020,
          "date": "2025-06-29",
          "dateString": "29th Jun 2025",
          "commodity": "White (LQW / Ref.)",
          "unit": "$/MT"
        }
        // ... more historical data points
      ]
    }
    // ... more cities
  ]
}

Combining Multiple Parameters

Use multiple parameters together for precise filtering:

GET /api/v1/sugar/historical/prices?regionId=1&countryId=116&cityIds=[1,2]&startDate=2025-06-01&endDate=2025-06-15

# Returns historical data for:
# - Region: Africa (regionId=1)
# - Country: Kenya (countryId=116) 
# - Cities: Nairobi and Mombasa (cityIds=[1,2])
# - Date range: June 1-15, 2025

{
  "status": "success",
  "nCities": 2,
  "data": [
    {
      "cityName": "Nairobi",
      "cityId": 1,
      "country": "Kenya",
      "countryEmoji": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "region": "Africa",
      "priceData": [
        {
          "price": 850,
          "date": "2025-06-15",
          "dateString": "15th Jun 2025",
          "commodity": "Refined",
          "unit": "$/MT"
        }
        // ... more data points
      ]
    },
    {
      "cityName": "Mombasa",
      "cityId": 2,
      "country": "Kenya",
      "countryEmoji": "๐Ÿ‡ฐ๐Ÿ‡ช",
      "region": "Africa",
      "priceData": [
        {
          "price": 820,
          "date": "2025-06-15",
          "dateString": "15th Jun 2025",
          "commodity": "Raw Sugar",
          "unit": "$/MT"
        }
        // ... more data points
      ]
    }
  ]
}

Parameter Usage Notes

  • โ€ข cityIds: Array of city IDs in square brackets (e.g., "[1,2,15]")
  • โ€ข countryId: Single country ID (e.g., "1")
  • โ€ข regionId: Single region ID (e.g., "1")
  • โ€ข startDate: Date in YYYY-MM-DD format (e.g., "2025-06-01")
  • โ€ข endDate: Date in YYYY-MM-DD format (e.g., "2025-06-30")
  • โ€ข All parameters are optional and can be combined
  • โ€ข Date parameters only apply to historical endpoints

Best Practices

  • โ€ข Use specific city IDs for precise data retrieval
  • โ€ข Combine region and country filters for broader analysis
  • โ€ข Limit date ranges for historical data to improve performance
  • โ€ข Check the Valid IDs Reference section for available IDs
  • โ€ข Consider using multiple smaller requests instead of one large request

Valid IDs Reference

This section provides reference tables for all valid region IDs, country IDs, and city IDs that can be used as parameters in the API endpoints.

Regions

Region IDRegion NameDescription
1AfricaAfrican countries and territories
2EuropeEuropean countries and territories
3CISCommonwealth of Independent States

Countries

Country IDCountry NameFlagRegion ID
7Armenia๐Ÿ‡ฆ๐Ÿ‡ฒ3
16Azerbaijan๐Ÿ‡ฆ๐Ÿ‡ฟ3
21Burkina Faso๐Ÿ‡ง๐Ÿ‡ซ1
36Belarus๐Ÿ‡ง๐Ÿ‡พ3
40DRC๐Ÿ‡จ๐Ÿ‡ฉ1
44Cรดte D'Ivoire๐Ÿ‡จ๐Ÿ‡ฎ1
58Djibouti๐Ÿ‡ฉ๐Ÿ‡ฏ1
69Ethiopia๐Ÿ‡ช๐Ÿ‡น1
80Georgia๐Ÿ‡ฌ๐Ÿ‡ช3
83Ghana๐Ÿ‡ฌ๐Ÿ‡ญ1
116Kenya๐Ÿ‡ฐ๐Ÿ‡ช1
117Kyrgyzstan๐Ÿ‡ฐ๐Ÿ‡ฌ3
126Kazakhstan๐Ÿ‡ฐ๐Ÿ‡ฟ3
140Moldova๐Ÿ‡ฒ๐Ÿ‡ฉ3
165Nigeria๐Ÿ‡ณ๐Ÿ‡ฌ1
192Russia๐Ÿ‡ท๐Ÿ‡บ3
193Rwanda๐Ÿ‡ท๐Ÿ‡ผ1
197Sudan๐Ÿ‡ธ๐Ÿ‡ฉ1
206Senegal๐Ÿ‡ธ๐Ÿ‡ณ1
207Somalia๐Ÿ‡ธ๐Ÿ‡ด1
209South Sudan๐Ÿ‡ธ๐Ÿ‡ธ1
214Eswatini๐Ÿ‡ธ๐Ÿ‡ฟ1
218Togo๐Ÿ‡น๐Ÿ‡ฌ1
220Tajikistan๐Ÿ‡น๐Ÿ‡ฏ3
223Turkmenistan๐Ÿ‡น๐Ÿ‡ฒ3
230Tanzania๐Ÿ‡น๐Ÿ‡ฟ1
231Ukraine๐Ÿ‡บ๐Ÿ‡ฆ3
232Uganda๐Ÿ‡บ๐Ÿ‡ฌ1
236Uzbekistan๐Ÿ‡บ๐Ÿ‡ฟ3
249South Africa๐Ÿ‡ฟ๐Ÿ‡ฆ1

Cities

City IDCity NameCountry IDRegion ID
1Nairobi1161
2Mombasa1161
3Kigali1931
4Durban2491
5Johannesburg2491
6Cape Town2491
7Djibouti City581
8Mogadishu2071
9Kampala2321
10Dar Es Salaam2301
11Krasnodar1923
12Ufa1923
13Novosibirsk1923
14Altai Region1923
15Minsk363
16Yerevan73
17Astana1263
18Tashkent2363
19Bishkek1173
20Tbilisi803
21Dushanbe2203
22Baku163
23Ashgabat2233
24ChiลŸinฤƒu1403
25Kyiv2313
26Voronezh1923
40Bukavu401
41Juba2091
42Dire Dawa691
43Abuja1651
44Adamawa1651
45Kano1651
46Kwara1651
47Lagos1651
48Addis Ababa691
49Abidjan441
50Lomรฉ2181
51Mbabane2141
52Dakar2061
53Port Sudan1971
54Northern1971
55Gedaref1971
56White Nile1971
57Gezira1971
58Khartoum1971
59Darfur1971
60Kordofan1971
61Blue Nile1971
62River Nile1971
63Naheer Alneel1971
64Sennar1971
65Kassala1971
66Accra831
67Ouagadougou211