import requests

headers = {
    'authority': 'www.letgo.com',
    'accept': '*/*',
    'accept-language': 'tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7',
    'content-type': 'application/json',
    'newrelic': '' , # token  değeri
    'origin': 'https://www.letgo.com',
    'referer': 'https://www.letgo.com/post/attributes',
    'sec-ch-ua': '"Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"',
    'sec-ch-ua-mobile': '?1',
    'sec-ch-ua-platform': '"Android"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-origin',
    'traceparent': '',
    'tracestate': '',
    'user-agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36',
    'x-newrelic-id': '',
    'x-panamera-fingerprint': '',
}
json_data = {
    'data': {
        'ad_index_id': 'ilanid', #ilan id
        'description': 'ürün açıklaması',
        'images': [
            {
                'id': '', #yüklenen resim idsi buraya eklenecek
            },
        ],
        'locations': [
            {
                'lat': 00.00000, #konum
                'lon': 00.0000, #konum
            },
        ],
        'location_source': {
            'source': 'sphere',
            'name': None,
        },
        'parameters': [
            {
                'price': {
                    'raw': 212.00, # fiyat bilgisi
                    'currency': {
                        'iso_4217': 'TRY',
                    },
                },
            },
            {
                'make': 'car-anadol', #marka
            },
            {
                'condition': 'condition-new', #ürünün bilgisi yeni 
            },
        ],
        'needSmsVerification': False,
        'extra_parameters': [],
        'verifiedPhone': False,
        'category_id': 501,  # kategori idsi..
        'title': 'ilan başlığı',
    },
}
response = requests.post('https://www.letgo.com/api/v2/items', headers=headers, json=json_data)
bilgi = response.json()
print(bilgi)