MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Looking for a narrative integration guide instead? See the [Frontend Guide](/docs).

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Admin — audit izi

Audit izi ro'yxati

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/audit-log" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/audit-log"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/audit-log

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin — autentifikatsiya

Admin panelga kirish (cookie sessiyasi)

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"|]|{+-\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "|]|{+-"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

validation.email validation.max. Example: gbailey@example.net

password   string     

Example: |]|{+-

Sessiyani yopish

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/admin/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Kirgan adminning profili va ruxsatlari

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/me"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/me

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin — bosh sahifa

Bosh sahifa ko'rsatkichlari

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/dashboard/summary" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/dashboard/summary"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "status": "ok",
    "message": "Success",
    "data": {
        "stats": {
            "users": 3,
            "published_posts": 210,
            "post_views": 15320,
            "assistant_sessions": 41
        },
        "trend": [
            {
                "month": "2026-04",
                "published_posts": 6
            },
            {
                "month": "2026-05",
                "published_posts": 9
            },
            {
                "month": "2026-06",
                "published_posts": 4
            },
            {
                "month": "2026-07",
                "published_posts": 11
            },
            {
                "month": "2026-08",
                "published_posts": 7
            },
            {
                "month": "2026-09",
                "published_posts": 2
            }
        ]
    },
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/dashboard/summary

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin — murojaatlar

Murojaatlar ro'yxati

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/appeals?filter%5Bsearch%5D=2026%2F09&filter%5Bstatus%5D=received&filter%5Btype%5D=complaint&filter%5Bis_anonymous%5D=&filter%5Bopen%5D=1&sort=-created_at&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/appeals"
);

const params = {
    "filter[search]": "2026/09",
    "filter[status]": "received",
    "filter[type]": "complaint",
    "filter[is_anonymous]": "0",
    "filter[open]": "1",
    "sort": "-created_at",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 116,
            "tracking_number": "2026/09-0333",
            "type": "application",
            "status": "received",
            "is_anonymous": false,
            "applicant_name": "Prof. Ashtyn O'Connell",
            "applicant_phone": "+998908980089",
            "applicant_email": "pagac.skylar@example.org",
            "applicant_region": "Toshkent shahri",
            "subject": "Laboriosam est alias.",
            "locale": "uz",
            "deadline_at": "2026-10-01T07:21:36+00:00",
            "is_overdue": false,
            "status_changed_at": "2026-09-16T07:21:36+00:00",
            "responded_at": null,
            "created_at": "2026-09-16T07:21:36+00:00"
        },
        {
            "id": 117,
            "tracking_number": "2026/09-5250",
            "type": "application",
            "status": "received",
            "is_anonymous": false,
            "applicant_name": "Prof. Lydia Brekke V",
            "applicant_phone": "+998909938658",
            "applicant_email": "buster.bauch@example.com",
            "applicant_region": "Toshkent shahri",
            "subject": "Et error neque recusandae.",
            "locale": "uz",
            "deadline_at": "2026-10-01T07:21:36+00:00",
            "is_overdue": false,
            "status_changed_at": "2026-09-16T07:21:36+00:00",
            "responded_at": null,
            "created_at": "2026-09-16T07:21:36+00:00"
        }
    ]
}
 

Request      

GET api/v1/admin/appeals

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

filter[search]   string  optional    

Raqam, mavzu, ism, telefon yoki email bo'yicha. Example: 2026/09

filter[status]   string  optional    

received, in_review, info_requested, answered, rejected. Example: received

filter[type]   string  optional    

application, complaint, proposal, corruption, conflict_of_interest. Example: complaint

filter[is_anonymous]   boolean  optional    

Example: false

filter[open]   boolean  optional    

Faqat yakunlanmaganlar. Example: true

sort   string  optional    

created_at, status_changed_at, status, type yoki id; - teskari. Example: -created_at

per_page   integer  optional    

Example: 20

Bitta murojaat, tarixi bilan

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/appeals/564" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/appeals/564"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 118,
        "tracking_number": "2026/09-6775",
        "type": "application",
        "status": "received",
        "is_anonymous": false,
        "applicant_name": "Jermaine Tillman",
        "applicant_phone": "+998902631582",
        "applicant_email": "aschuster@example.com",
        "applicant_region": "Toshkent shahri",
        "subject": "Quo omnis nostrum aut.",
        "locale": "uz",
        "deadline_at": "2026-10-01T07:21:36+00:00",
        "is_overdue": false,
        "status_changed_at": "2026-09-16T07:21:36+00:00",
        "responded_at": null,
        "created_at": "2026-09-16T07:21:36+00:00",
        "body": "Nostrum qui commodi incidunt iure. Et et modi ipsum nostrum. Autem et consequatur aut dolores enim non facere tempora. Voluptatem laboriosam praesentium quis adipisci.",
        "response": null,
        "access_code": "DL5625",
        "ip": "11.196.14.107",
        "user_agent": null,
        "history": []
    }
}
 

Request      

GET api/v1/admin/appeals/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the appeal. Example: 564

Holatni o'zgartirish

requires authentication

Har bir o'zgarish tarixga yoziladi va fuqaro holat sahifasida ko'radi. answered uchun response shart.

Example request:
curl --request PATCH \
    "https://api.agrofin.uz/api/v1/admin/appeals/564/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"in_review\",
    \"note\": \"Ariza mas\'ul bo\'limga yuborildi.\",
    \"response\": \"Kredit 2026 yil 1 sentabrdan ajratiladi.\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/appeals/564/status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "in_review",
    "note": "Ariza mas'ul bo'limga yuborildi.",
    "response": "Kredit 2026 yil 1 sentabrdan ajratiladi."
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 119,
        "tracking_number": "2026/09-4027",
        "type": "application",
        "status": "received",
        "is_anonymous": false,
        "applicant_name": "Mr. Gerhard Dach Jr.",
        "applicant_phone": "+998906980841",
        "applicant_email": "cecil42@example.com",
        "applicant_region": "Toshkent shahri",
        "subject": "Perspiciatis quo omnis nostrum aut adipisci.",
        "locale": "uz",
        "deadline_at": "2026-10-01T07:21:36+00:00",
        "is_overdue": false,
        "status_changed_at": "2026-09-16T07:21:36+00:00",
        "responded_at": null,
        "created_at": "2026-09-16T07:21:36+00:00",
        "body": "Qui commodi incidunt iure odit. Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora.",
        "response": null,
        "access_code": "MI9365",
        "ip": "158.16.197.2",
        "user_agent": null,
        "history": []
    }
}
 

Request      

PATCH api/v1/admin/appeals/{id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the appeal. Example: 564

Body Parameters

status   string     

received, in_review, info_requested, answered, rejected. Example: in_review

note   string  optional    

Fuqaroga ko'rinadigan izoh. Example: Ariza mas'ul bo'limga yuborildi.

response   string  optional    

Yakuniy javob (answered uchun shart). Example: Kredit 2026 yil 1 sentabrdan ajratiladi.

Admin — raqamli yordamchi

Bilim bazasining qo'lda yoziladigan qismi

requires authentication

Bazada yozuv bo'lmasa yordamchi repodagi faylni ishlatadi — muharrir ham aynan shu matnni ko'rsatadi, aks holda xodim bo'sh maydondan boshlab mavjud bilimni yo'qotib qo'yardi.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/assistant/knowledge" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/assistant/knowledge"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "status": "ok",
    "message": "Success",
    "data": {
        "content": "## Manzil...",
        "updated_at": null,
        "source": "file"
    },
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/assistant/knowledge

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Bilim bazasini yangilash

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/assistant/knowledge" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"## Manzil...\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/assistant/knowledge"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "## Manzil..."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/assistant/knowledge

PATCH api/v1/admin/assistant/knowledge

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

content   string     

Markdown matn. Example: ## Manzil...

Suhbatlar ro'yxati

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/assistant/sessions?filter%5Bsearch%5D=Xusan&filter%5Bdevice_id%5D=dev-3f&filter%5Blocale%5D=uz&filter%5Bwith_phone%5D=1&filter%5Bhuman_takeover%5D=1&sort=-last_seen_at&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/assistant/sessions"
);

const params = {
    "filter[search]": "Xusan",
    "filter[device_id]": "dev-3f",
    "filter[locale]": "uz",
    "filter[with_phone]": "1",
    "filter[human_takeover]": "1",
    "sort": "-last_seen_at",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 281,
            "device_id": "dev-gz37449171",
            "ip": "156.179.93.117",
            "locale": "uz",
            "name": null,
            "phone": null,
            "human_takeover": false,
            "messages_count": 0,
            "daily_count": 0,
            "last_seen_at": null,
            "created_at": "2026-09-16T07:21:36+00:00"
        },
        {
            "id": 282,
            "device_id": "dev-vd73089432",
            "ip": "197.200.161.23",
            "locale": "uz",
            "name": null,
            "phone": null,
            "human_takeover": false,
            "messages_count": 0,
            "daily_count": 0,
            "last_seen_at": null,
            "created_at": "2026-09-16T07:21:36+00:00"
        }
    ]
}
 

Request      

GET api/v1/admin/assistant/sessions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

filter[search]   string  optional    

Qurilma, ism yoki telefon bo'yicha qidiruv. Example: Xusan

filter[device_id]   string  optional    

Qurilma belgisi bo'yicha qisman qidiruv. Example: dev-3f

filter[locale]   string  optional    

uz, ru yoki uz_cyrl. Example: uz

filter[with_phone]   boolean  optional    

Faqat telefon qoldirganlar. Example: true

filter[human_takeover]   boolean  optional    

Faqat xodim qo'lidagi suhbatlar. Example: true

sort   string  optional    

last_seen_at, messages_count yoki id; oldiga - qo'yilsa teskari. Example: -last_seen_at

per_page   integer  optional    

Example: 20

Bitta suhbat, xabarlari bilan

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/assistant/sessions/564" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/assistant/sessions/564"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 283,
        "device_id": "dev-jn96548529",
        "ip": "51.210.32.30",
        "locale": "uz",
        "name": null,
        "phone": null,
        "human_takeover": false,
        "messages_count": 0,
        "daily_count": 0,
        "last_seen_at": null,
        "created_at": "2026-09-16T07:21:36+00:00"
    }
}
 

Request      

GET api/v1/admin/assistant/sessions/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the session. Example: 564

Suhbatni xabarlari bilan o'chirish

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/assistant/sessions/564" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/assistant/sessions/564"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/assistant/sessions/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the session. Example: 564

Xodim javobi

requires authentication

Xabar operator rolida saqlanadi, suhbat xodim qo'liga o'tadi (yordamchi jim turadi).

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/assistant/sessions/564/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"Hujjatlaringizni qabulxonaga olib keling.\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/assistant/sessions/564/messages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "Hujjatlaringizni qabulxonaga olib keling."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "status": "ok",
    "message": "Success",
    "data": {
        "id": 12,
        "role": "operator",
        "content": "...",
        "generator": null,
        "source": null,
        "created_at": "2026-09-11T12:00:00+00:00",
        "human_takeover": true
    },
    "errors": null,
    "meta": null
}
 

Request      

POST api/v1/admin/assistant/sessions/{id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the session. Example: 564

Body Parameters

content   string     

Javob matni. Example: Hujjatlaringizni qabulxonaga olib keling.

Suhbatni yordamchiga qaytarish

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/assistant/sessions/564/release" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/assistant/sessions/564/release"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "status": "ok",
    "message": "Success",
    "data": {
        "human_takeover": false
    },
    "errors": null,
    "meta": null
}
 

Request      

POST api/v1/admin/assistant/sessions/{id}/release

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the session. Example: 564

Endpoints

GET api/v1/admin/programs

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/programs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/programs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/programs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/programs

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/programs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"program_sector_id\": 16,
    \"sector\": \"greenhouse\",
    \"kind\": \"leasing\",
    \"title\": [],
    \"legal_document_id\": 16,
    \"status\": 0,
    \"sort_order\": 39,
    \"terms\": [
        {
            \"borrower_type\": \"leasing_organization\",
            \"label\": [],
            \"share_percent\": 1,
            \"annual_rate\": 22,
            \"bank_margin\": 7,
            \"rate_discount_a\": 16,
            \"rate_discount_b\": 17,
            \"term_months\": 15,
            \"grace_months\": 8,
            \"sort_order\": 60
        }
    ],
    \"faqs\": [
        {
            \"id\": 16,
            \"question\": [],
            \"answer\": [],
            \"status\": 1,
            \"sort_order\": 27
        }
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/programs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "program_sector_id": 16,
    "sector": "greenhouse",
    "kind": "leasing",
    "title": [],
    "legal_document_id": 16,
    "status": 0,
    "sort_order": 39,
    "terms": [
        {
            "borrower_type": "leasing_organization",
            "label": [],
            "share_percent": 1,
            "annual_rate": 22,
            "bank_margin": 7,
            "rate_discount_a": 16,
            "rate_discount_b": 17,
            "term_months": 15,
            "grace_months": 8,
            "sort_order": 60
        }
    ],
    "faqs": [
        {
            "id": 16,
            "question": [],
            "answer": [],
            "status": 1,
            "sort_order": 27
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/programs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

slug   string     

Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. validation.max. Example: b

program_sector_id   integer  optional    

Must match an existing stored value. Example: 16

sector   string     

Example: greenhouse

Must be one of:
  • cotton
  • wheat
  • seed_wheat
  • commodity_wheat
  • machinery
  • fruit
  • potato
  • greenhouse
  • oilseed
  • livestock
  • fishery
kind   string     

Example: leasing

Must be one of:
  • credit
  • leasing
  • subsidy
title   object     
summary   object  optional    
body   object  optional    
required_documents   object  optional    
legal_document_id   integer  optional    

Must match an existing stored value. Example: 16

status   integer     

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer     

validation.min. Example: 39

terms   object[]  optional    
borrower_type   string     

Example: leasing_organization

Must be one of:
  • farmer
  • seed_farm
  • cluster
  • textile_enterprise
  • grain_receiver
  • leasing_organization
  • entrepreneur
label   object     
share_percent   number  optional    

validation.min validation.max. Example: 1

annual_rate   number  optional    

validation.min validation.max. Example: 22

bank_margin   number  optional    

validation.min validation.max. Example: 7

rate_discount_a   number  optional    

validation.min validation.max. Example: 16

rate_discount_b   number  optional    

validation.min validation.max. Example: 17

term_months   integer  optional    

validation.min validation.max. Example: 15

grace_months   integer  optional    

validation.min validation.max. Example: 8

note   object  optional    
sort_order   integer     

validation.min. Example: 60

faqs   object[]  optional    
id   integer  optional    

Example: 16

question   object     
answer   object     
status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.min. Example: 27

GET api/v1/admin/programs/{program_id}

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/programs/15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/programs/15"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/programs/{program_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

program_id   integer     

The ID of the program. Example: 15

PUT api/v1/admin/programs/{program_id}

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/programs/15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"program_sector_id\": 16,
    \"sector\": \"greenhouse\",
    \"kind\": \"subsidy\",
    \"legal_document_id\": 16,
    \"status\": 1,
    \"sort_order\": 39,
    \"terms\": [
        {
            \"id\": 16,
            \"borrower_type\": \"seed_farm\",
            \"share_percent\": 22,
            \"annual_rate\": 7,
            \"bank_margin\": 16,
            \"rate_discount_a\": 17,
            \"rate_discount_b\": 15,
            \"term_months\": 8,
            \"grace_months\": 1,
            \"sort_order\": 42
        }
    ],
    \"faqs\": [
        {
            \"id\": 16,
            \"status\": 1,
            \"sort_order\": 39
        }
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/programs/15"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "program_sector_id": 16,
    "sector": "greenhouse",
    "kind": "subsidy",
    "legal_document_id": 16,
    "status": 1,
    "sort_order": 39,
    "terms": [
        {
            "id": 16,
            "borrower_type": "seed_farm",
            "share_percent": 22,
            "annual_rate": 7,
            "bank_margin": 16,
            "rate_discount_a": 17,
            "rate_discount_b": 15,
            "term_months": 8,
            "grace_months": 1,
            "sort_order": 42
        }
    ],
    "faqs": [
        {
            "id": 16,
            "status": 1,
            "sort_order": 39
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/programs/{program_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

program_id   integer     

The ID of the program. Example: 15

Body Parameters

slug   string  optional    

Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. validation.max. Example: b

program_sector_id   integer  optional    

Must match an existing stored value. Example: 16

sector   string  optional    

Example: greenhouse

Must be one of:
  • cotton
  • wheat
  • seed_wheat
  • commodity_wheat
  • machinery
  • fruit
  • potato
  • greenhouse
  • oilseed
  • livestock
  • fishery
kind   string  optional    

Example: subsidy

Must be one of:
  • credit
  • leasing
  • subsidy
title   object  optional    
summary   object  optional    
body   object  optional    
required_documents   object  optional    
legal_document_id   integer  optional    

Must match an existing stored value. Example: 16

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.min. Example: 39

terms   object[]  optional    
id   integer  optional    

Example: 16

borrower_type   string  optional    

Example: seed_farm

Must be one of:
  • farmer
  • seed_farm
  • cluster
  • textile_enterprise
  • grain_receiver
  • leasing_organization
  • entrepreneur
label   object  optional    
share_percent   number  optional    

validation.min validation.max. Example: 22

annual_rate   number  optional    

validation.min validation.max. Example: 7

bank_margin   number  optional    

validation.min validation.max. Example: 16

rate_discount_a   number  optional    

validation.min validation.max. Example: 17

rate_discount_b   number  optional    

validation.min validation.max. Example: 15

term_months   integer  optional    

validation.min validation.max. Example: 8

grace_months   integer  optional    

validation.min validation.max. Example: 1

note   object  optional    
sort_order   integer  optional    

validation.min. Example: 42

faqs   object[]  optional    
id   integer  optional    

Example: 16

question   object  optional    
answer   object  optional    
status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.min. Example: 39

DELETE api/v1/admin/programs/{program_id}

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/programs/15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/programs/15"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/programs/{program_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

program_id   integer     

The ID of the program. Example: 15

POST api/v1/login

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"|]|{+-\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "|]|{+-"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 163,
        "name": "Mrs. Justina Gaylord",
        "email": "lafayette.considine@example.com",
        "created_at": "2026-09-16 07:21:37",
        "updated_at": "2026-09-16 07:21:37"
    }
}
 

Request      

POST api/v1/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

validation.email. Example: gbailey@example.net

password   string     

Example: |]|{+-

Revoke the current access token.

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/user

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 164,
        "name": "Viva Marquardt",
        "email": "hirthe.theo@example.com",
        "created_at": "2026-09-16 07:21:37",
        "updated_at": "2026-09-16 07:21:37"
    }
}
 

Request      

GET api/v1/user

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/user/{id}

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/user/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/user/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 165,
        "name": "Jazlyn Keebler",
        "email": "ferne52@example.com",
        "created_at": "2026-09-16 07:21:37",
        "updated_at": "2026-09-16 07:21:37"
    }
}
 

Request      

GET api/v1/user/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the user. Example: 1

PUT api/v1/user

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"|]|{+-\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "|]|{+-"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 166,
        "name": "Mrs. Justina Gaylord",
        "email": "cormier.nick@example.com",
        "created_at": "2026-09-16 07:21:37",
        "updated_at": "2026-09-16 07:21:37"
    }
}
 

Request      

PUT api/v1/user

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

validation.max. Example: b

email   string  optional    

validation.email validation.max. Example: zbailey@example.net

password   string  optional    

Example: |]|{+-

DELETE api/v1/user

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/user

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Fotogalereya (Photo Gallery)

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/photo-galleries" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/photo-galleries"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
content-language: uz
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
vary: Origin
 

{
    "status": "ok",
    "message": "Amal muvaffaqiyatli bajarildi.",
    "data": [
        {
            "id": 1,
            "title": "Paxta yig‘im-terimi, Sirdaryo viloyati",
            "date": "2026-09-01",
            "image_url": "https://api.agrofin.uz/storage/268/hero-agro-poster.jpg",
            "sort_order": 1
        },
        {
            "id": 2,
            "title": "Bug‘doy hosilini moliyalashtirish seminari",
            "date": "2026-06-01",
            "image_url": "https://api.agrofin.uz/storage/269/feed-news.jpg",
            "sort_order": 2
        },
        {
            "id": 3,
            "title": "Imtiyozli lizing texnikasini topshirish",
            "date": "2026-05-01",
            "image_url": "https://api.agrofin.uz/storage/270/feed-tenders.jpg",
            "sort_order": 3
        },
        {
            "id": 4,
            "title": "Hamkor banklar bilan kengaytirilgan yig‘ilish",
            "date": "2026-04-01",
            "image_url": "https://api.agrofin.uz/storage/271/feed-indicators.jpg",
            "sort_order": 4
        },
        {
            "id": 5,
            "title": "Issiqxona xo‘jaligiga tashrif, Toshkent viloyati",
            "date": "2026-03-01",
            "image_url": "https://api.agrofin.uz/storage/272/hero-youtube-poster.jpg",
            "sort_order": 5
        },
        {
            "id": 6,
            "title": "Yillik hisobot taqdimoti",
            "date": "2026-02-01",
            "image_url": "https://api.agrofin.uz/storage/273/hero-agro-poster.jpg",
            "sort_order": 6
        },
        {
            "id": 7,
            "title": "Klaster rahbarlari bilan davra suhbati",
            "date": "2026-01-01",
            "image_url": "https://api.agrofin.uz/storage/274/feed-news.jpg",
            "sort_order": 7
        },
        {
            "id": 8,
            "title": "G‘alla qabul punkti, Jizzax viloyati",
            "date": "2025-07-01",
            "image_url": "https://api.agrofin.uz/storage/275/feed-tenders.jpg",
            "sort_order": 8
        },
        {
            "id": 9,
            "title": "Kartoshkachilik xo‘jaligi, Samarqand viloyati",
            "date": "2025-06-01",
            "image_url": "https://api.agrofin.uz/storage/276/feed-indicators.jpg",
            "sort_order": 9
        },
        {
            "id": 10,
            "title": "Subsidiya mexanizmlari bo‘yicha mintaqaviy seminar",
            "date": "2025-05-01",
            "image_url": "https://api.agrofin.uz/storage/277/hero-youtube-poster.jpg",
            "sort_order": 10
        }
    ],
    "errors": null,
    "meta": {
        "pagination": {
            "total": 12,
            "per_page": 10,
            "current_page": 1,
            "last_page": 2,
            "from": 1,
            "to": 10,
            "path": "https://api.agrofin.uz/api/v1/photo-galleries",
            "first_page_url": "https://api.agrofin.uz/api/v1/photo-galleries?page=1",
            "last_page_url": "https://api.agrofin.uz/api/v1/photo-galleries?page=2",
            "next_page_url": "https://api.agrofin.uz/api/v1/photo-galleries?page=2",
            "prev_page_url": null
        }
    }
}
 

Request      

GET api/v1/photo-galleries

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Fotogalereya — boshqaruv

GET api/v1/admin/photo-galleries

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/photo-galleries" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/photo-galleries"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/photo-galleries

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/photo-galleries

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/photo-galleries" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "date=2026-09-16T07:21:36"\
    --form "image_url=http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html"\
    --form "status=0"\
    --form "sort_order=0"\
    --form "photo=@/tmp/phpjiJcHM" 
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/photo-galleries"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('date', '2026-09-16T07:21:36');
body.append('image_url', 'http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html');
body.append('status', '0');
body.append('sort_order', '0');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/admin/photo-galleries

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

title   object     
date   string  optional    

validation.date. Example: 2026-09-16T07:21:36

image_url   string  optional    

validation.max. Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

photo   file  optional    

validation.image validation.max. Example: /tmp/phpjiJcHM

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 0

GET api/v1/admin/photo-galleries/{photoGallery_id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/photo-galleries/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/photo-galleries/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/photo-galleries/{photoGallery_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

photoGallery_id   integer     

The ID of the photoGallery. Example: 1

PUT api/v1/admin/photo-galleries/{photoGallery_id}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/photo-galleries/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "date=2026-09-16T07:21:36"\
    --form "image_url=http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html"\
    --form "status=0"\
    --form "sort_order=0"\
    --form "photo=@/tmp/phpNeJiMM" 
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/photo-galleries/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('date', '2026-09-16T07:21:36');
body.append('image_url', 'http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html');
body.append('status', '0');
body.append('sort_order', '0');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/v1/admin/photo-galleries/{photoGallery_id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

photoGallery_id   integer     

The ID of the photoGallery. Example: 1

Body Parameters

title   object  optional    
date   string  optional    

validation.date. Example: 2026-09-16T07:21:36

image_url   string  optional    

validation.max. Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

photo   file  optional    

validation.image validation.max. Example: /tmp/phpNeJiMM

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 0

DELETE api/v1/admin/photo-galleries/{photoGallery_id}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/photo-galleries/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/photo-galleries/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/photo-galleries/{photoGallery_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

photoGallery_id   integer     

The ID of the photoGallery. Example: 1

Foydalanuvchilar (Admin Users)

GET api/v1/admin/users

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/users

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/users

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"-0pBNvYgxw\",
    \"status\": 0,
    \"roles\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "-0pBNvYgxw",
    "status": 0,
    "roles": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/users

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

validation.max. Example: b

email   string     

validation.email validation.max. Example: zbailey@example.net

password   string     

validation.min. Example: -0pBNvYgxw

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
roles   string[]  optional    

Must match an existing stored value.

GET api/v1/admin/users/{user_id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/users/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/users/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/users/{user_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_id   integer     

The ID of the user. Example: 1

PUT api/v1/admin/users/{user_id}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/users/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"-0pBNvYgxw\",
    \"status\": 1,
    \"roles\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/users/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "-0pBNvYgxw",
    "status": 1,
    "roles": [
        "architecto"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/users/{user_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_id   integer     

The ID of the user. Example: 1

Body Parameters

name   string  optional    

validation.max. Example: b

email   string  optional    

validation.email validation.max. Example: zbailey@example.net

password   string  optional    

validation.min. Example: -0pBNvYgxw

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
roles   string[]  optional    

Must match an existing stored value.

DELETE api/v1/admin/users/{user_id}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/users/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/users/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/users/{user_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_id   integer     

The ID of the user. Example: 1

Fuqarolar qabuli

Qabul jadvali

Shanba, yakshanba va bayram kunlari qabul o'tkazilmaydi.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/reception-slots" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/reception-slots"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 82,
            "full_name": "Jarred Williamson",
            "position": "Bindery Machine Operator",
            "address": "170 Lexus Stream Apt. 969\nNew Camylleland, CA 21265-6781",
            "weekday": "wednesday",
            "starts_at": "10:00",
            "ends_at": "12:00",
            "phone": null
        },
        {
            "id": 83,
            "full_name": "Derek Powlowski",
            "position": "Private Sector Executive",
            "address": "61265 Annette Rue\nLake Toni, MO 49885",
            "weekday": "monday",
            "starts_at": "10:00",
            "ends_at": "12:00",
            "phone": null
        }
    ]
}
 

Request      

GET api/v1/reception-slots

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Hujjat turlari — boshqaruv

GET api/v1/admin/doc-types

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/doc-types" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/doc-types"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/doc-types

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/doc-types

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/doc-types" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": [],
    \"slug\": \"b\",
    \"status\": 0,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/doc-types"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": [],
    "slug": "b",
    "status": 0,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/doc-types

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   object     
slug   string     

validation.max. Example: b

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

GET api/v1/admin/doc-types/{docType_id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/doc-types/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/doc-types/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/doc-types/{docType_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

docType_id   integer     

The ID of the docType. Example: 1

PUT api/v1/admin/doc-types/{docType_id}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/doc-types/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"status\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/doc-types/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "status": 1,
    "sort_order": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/doc-types/{docType_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

docType_id   integer     

The ID of the docType. Example: 1

Body Parameters

name   object  optional    
slug   string  optional    

validation.max. Example: b

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

DELETE api/v1/admin/doc-types/{docType_id}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/doc-types/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/doc-types/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/doc-types/{docType_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

docType_id   integer     

The ID of the docType. Example: 1

Jamg'arma tarixi (History Milestones)

GET api/v1/history-milestones

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/history-milestones" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/history-milestones"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
content-language: uz
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
vary: Origin
 

{
    "status": "ok",
    "message": "Amal muvaffaqiyatli bajarildi.",
    "data": [
        {
            "id": 1,
            "date": "2018-yil 12-iyul",
            "text": "Vazirlar Mahkamasining 533-son qarori bilan Jamg‘arma to‘g‘risidagi Nizom tasdiqlandi.",
            "sort_order": 1
        },
        {
            "id": 2,
            "date": "2021-yil 26-fevral",
            "text": "Prezidentning PF–6179-son Farmoni bilan Jamg‘arma faoliyati tubdan takomillashtirildi va Jamg‘armani boshqarish departamenti tashkil etildi.",
            "sort_order": 2
        },
        {
            "id": 3,
            "date": "2023-yil 25-dekabr",
            "text": "Vazirlar Mahkamasining 680-son qarori bilan paxta xom ashyosini yetishtirish va yig‘im-terimni kreditlashning amaldagi tartibi belgilandi.",
            "sort_order": 3
        },
        {
            "id": 4,
            "date": "2026-yil 8-may",
            "text": "Prezidentning PF–82-son Farmoni bilan paxta va bug‘doy yetishtiruvchilarni qo‘llab-quvvatlashning qo‘shimcha choralari va Departamentning amaldagi tuzilmasi tasdiqlandi.",
            "sort_order": 4
        }
    ],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/history-milestones

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Jamg'arma tarixi — boshqaruv

GET api/v1/admin/history-milestones

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/history-milestones" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/history-milestones"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/history-milestones

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/history-milestones

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/history-milestones" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": [],
    \"text\": [],
    \"status\": 0,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/history-milestones"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "date": [],
    "text": [],
    "status": 0,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/history-milestones

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

date   object     
text   object     
status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

GET api/v1/admin/history-milestones/{historyMilestone_id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/history-milestones/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/history-milestones/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/history-milestones/{historyMilestone_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

historyMilestone_id   integer     

The ID of the historyMilestone. Example: 1

PUT api/v1/admin/history-milestones/{historyMilestone_id}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/history-milestones/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/history-milestones/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": 1,
    "sort_order": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/history-milestones/{historyMilestone_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

historyMilestone_id   integer     

The ID of the historyMilestone. Example: 1

Body Parameters

date   object  optional    
text   object  optional    
status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

DELETE api/v1/admin/history-milestones/{historyMilestone_id}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/history-milestones/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/history-milestones/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/history-milestones/{historyMilestone_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

historyMilestone_id   integer     

The ID of the historyMilestone. Example: 1

Mijoz autentifikatsiyasi (Client Auth)

POST api/v1/auth/register

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"-0pBNvYgxw\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/auth/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "password": "-0pBNvYgxw"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

validation.max. Example: b

email   string     

validation.email validation.max. Example: zbailey@example.net

password   string     

validation.min. Example: -0pBNvYgxw

POST api/v1/auth/verify-email

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/auth/verify-email" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"code\": \"miyvdl\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/auth/verify-email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "code": "miyvdl"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/verify-email

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

validation.email. Example: gbailey@example.net

code   string     

validation.size. Example: miyvdl

POST api/v1/auth/login

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"|]|{+-\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "|]|{+-"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

validation.email. Example: gbailey@example.net

password   string     

Example: |]|{+-

POST api/v1/auth/resend-code

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/auth/resend-code" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"type\": \"password_reset\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/auth/resend-code"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "type": "password_reset"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/resend-code

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

validation.email. Example: gbailey@example.net

type   string     

Example: password_reset

Must be one of:
  • register
  • password_reset

POST api/v1/auth/forgot-password

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/auth/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/auth/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

validation.email. Example: gbailey@example.net

POST api/v1/auth/reset-password

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/auth/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"code\": \"miyvdl\",
    \"password\": \"vYgxwmi\\/#\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/auth/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "code": "miyvdl",
    "password": "vYgxwmi\/#"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

validation.email. Example: gbailey@example.net

code   string     

validation.size. Example: miyvdl

password   string     

validation.min. Example: vYgxwmi/#

GET api/v1/auth/me

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/auth/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/auth/me"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/auth/me

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/logout

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/auth/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/auth/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Moliyalashtirish dasturlari

Dasturlar ro'yxati

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/programs?filter%5Bsector%5D=cotton&filter%5Bkind%5D=credit&filter%5Bsearch%5D=paxta&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/programs"
);

const params = {
    "filter[sector]": "cotton",
    "filter[kind]": "credit",
    "filter[search]": "paxta",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 205,
            "slug": "fugiat-sunt-nihil",
            "sector": "cotton",
            "kind": "credit",
            "title": "Mollitia modi deserunt aut ab provident perspiciatis quo.",
            "summary": "Aut adipisci quidem nostrum qui commodi incidunt iure. Et et modi ipsum nostrum. Autem et consequatur aut dolores enim non facere tempora.",
            "body": null,
            "required_documents": null
        },
        {
            "id": 206,
            "slug": "voluptatem-laboriosam-praesentium",
            "sector": "cotton",
            "kind": "credit",
            "title": "Molestias fugit deleniti distinctio eum doloremque id.",
            "summary": "Aliquam veniam corporis dolorem mollitia deleniti nemo. Quia officia est dignissimos neque. Odio veritatis excepturi doloribus delectus fugit qui repudiandae. Est alias tenetur ratione.",
            "body": null,
            "required_documents": null
        }
    ]
}
 

Request      

GET api/v1/programs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

filter[sector]   string  optional    

Yo'nalish. Example: cotton

filter[kind]   string  optional    

Turi: credit, leasing, subsidy. Example: credit

filter[search]   string  optional    

Sarlavha bo'yicha qidiruv. Example: paxta

per_page   integer  optional    

Sahifadagi yozuvlar soni (eng ko'pi 100). Example: 20

Sizga mos moliyalashtirishni toping

Uchta savolga javob asosida mos dasturlarni qaytaradi.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/programs/match?borrower_type=farmer%2Cseed_farm&sector=cotton%2Cwheat&kind=credit" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"borrower_type\": \"b\",
    \"sector\": \"n\",
    \"kind\": \"architecto\",
    \"borrower_types\": [
        \"architecto\"
    ],
    \"sectors\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/programs/match"
);

const params = {
    "borrower_type": "farmer,seed_farm",
    "sector": "cotton,wheat",
    "kind": "credit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "borrower_type": "b",
    "sector": "n",
    "kind": "architecto",
    "borrower_types": [
        "architecto"
    ],
    "sectors": [
        "architecto"
    ]
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 207,
            "slug": "et-animi-quos",
            "sector": "commodity_wheat",
            "kind": "credit",
            "title": "Fugiat sunt nihil accusantium harum mollitia.",
            "summary": "Aut ab provident perspiciatis quo omnis nostrum aut. Quidem nostrum qui commodi incidunt iure odit. Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora.",
            "body": null,
            "required_documents": null
        },
        {
            "id": 208,
            "slug": "adipisci-molestias-fugit-deleniti",
            "sector": "oilseed",
            "kind": "credit",
            "title": "Doloremque id aut libero aliquam veniam corporis.",
            "summary": "Deleniti nemo odit quia officia. Dignissimos neque blanditiis odio. Excepturi doloribus delectus fugit qui repudiandae laboriosam.",
            "body": null,
            "required_documents": null
        }
    ]
}
 

Request      

GET api/v1/programs/match

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

borrower_type   string  optional    

Qarz oluvchi turi yoki vergul bilan bir nechtasi. Example: farmer,seed_farm

sector   string  optional    

Yo'nalish yoki vergul bilan bir nechtasi. Example: cotton,wheat

kind   string  optional    

Turi: credit, leasing, subsidy. Example: credit

Body Parameters

borrower_type   string  optional    

validation.max. Example: b

sector   string  optional    

validation.max. Example: n

kind   string  optional    

Example: architecto

Must be one of:
  • credit
  • leasing
  • subsidy
borrower_types   string[]  optional    
Must be one of:
  • farmer
  • seed_farm
  • cluster
  • textile_enterprise
  • grain_receiver
  • leasing_organization
  • entrepreneur
sectors   string[]  optional    
Must be one of:
  • cotton
  • wheat
  • seed_wheat
  • commodity_wheat
  • machinery
  • fruit
  • potato
  • greenhouse
  • oilseed
  • livestock
  • fishery

Bitta dastur

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/programs/paxta-yetishtirish" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/programs/paxta-yetishtirish"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 209,
        "slug": "et-fugiat-sunt",
        "sector": "commodity_wheat",
        "kind": "credit",
        "title": "Harum mollitia modi deserunt aut ab provident perspiciatis quo.",
        "summary": "Aut adipisci quidem nostrum qui commodi incidunt iure. Et et modi ipsum nostrum. Autem et consequatur aut dolores enim non facere tempora.",
        "body": null,
        "required_documents": null
    }
}
 

Request      

GET api/v1/programs/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

Dastur manzili. Example: paxta-yetishtirish

Murojaatlar

Elektron qabulxona: murojaat yuborish va uning holatini raqam + kirish kodi bo'yicha tekshirish. Ro'yxatdan o'tish talab qilinmaydi.

Murojaat yuborish

Javobda tracking_number va access_code qaytadi — ikkalasi holatni tekshirish uchun kerak. Anonim yuborish faqat corruption va conflict_of_interest turlarida mumkin.

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/appeals" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"application\",
    \"is_anonymous\": false,
    \"applicant_name\": \"Alisher Karimov\",
    \"applicant_phone\": \"+998901234567\",
    \"applicant_email\": \"alisher@example.com\",
    \"applicant_region\": \"Farg\'ona viloyati\",
    \"subject\": \"Bug\'doy krediti bo\'yicha savol\",
    \"body\": \"2026 yil hosili uchun kredit ajratish muddati qachon boshlanadi?\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/appeals"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "application",
    "is_anonymous": false,
    "applicant_name": "Alisher Karimov",
    "applicant_phone": "+998901234567",
    "applicant_email": "alisher@example.com",
    "applicant_region": "Farg'ona viloyati",
    "subject": "Bug'doy krediti bo'yicha savol",
    "body": "2026 yil hosili uchun kredit ajratish muddati qachon boshlanadi?"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "status": "ok",
    "message": "Murojaatingiz qabul qilindi.",
    "data": {
        "tracking_number": "2026/09-0001",
        "access_code": "K7M4QP",
        "status": "received",
        "deadline_at": "2026-09-27T10:00:00+00:00",
        "created_at": "2026-09-12T10:00:00+00:00"
    },
    "errors": null,
    "meta": null
}
 

Request      

POST api/v1/appeals

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

type   string     

application, complaint, proposal, corruption yoki conflict_of_interest. Example: application

is_anonymous   boolean  optional    

Faqat korrupsiya kanalida. Example: false

applicant_name   string  optional    

Anonim bo'lmasa shart. Example: Alisher Karimov

applicant_phone   string  optional    

Anonim bo'lmasa shart. Example: +998901234567

applicant_email   string  optional    

Example: alisher@example.com

applicant_region   string  optional    

Example: Farg'ona viloyati

subject   string     

5–200 belgi. Example: Bug'doy krediti bo'yicha savol

body   string     

20–5000 belgi. Example: 2026 yil hosili uchun kredit ajratish muddati qachon boshlanadi?

website   string  optional    

Murojaat holatini tekshirish

POST, chunki kirish kodi URL va server jurnallariga tushmasligi kerak.

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/appeals/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tracking_number\": \"2026\\/09-0001\",
    \"access_code\": \"K7M4QP\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/appeals/status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tracking_number": "2026\/09-0001",
    "access_code": "K7M4QP"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "tracking_number": "2026/09-7195",
        "type": "application",
        "subject": "Nostrum omnis autem et.",
        "body": "Dolores enim non facere tempora. Voluptatem laboriosam praesentium quis adipisci. Fugit deleniti distinctio eum doloremque id aut libero. Veniam corporis dolorem mollitia.",
        "status": "received",
        "is_final": false,
        "response": null,
        "responded_at": null,
        "deadline_at": "2026-10-01T07:21:36+00:00",
        "is_overdue": false,
        "created_at": "2026-09-16T07:21:36+00:00",
        "history": []
    }
}
 

Example response (404):


{
    "status": "error",
    "message": "Murojaat topilmadi. Raqam va kirish kodini tekshiring.",
    "data": [],
    "errors": {
        "error": "Murojaat topilmadi. Raqam va kirish kodini tekshiring."
    },
    "meta": null
}
 

Request      

POST api/v1/appeals/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

tracking_number   string     

Example: 2026/09-0001

access_code   string     

Example: K7M4QP

Normativ hujjatlar

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/legal-documents?filter%5Bdoc_type%5D=cabinet_resolution&filter%5Brelevance%5D=direct_primary&filter%5Bstate%5D=in_force&filter%5Byear%5D=2023&filter%5Bdirection%5D=Paxtachilik&filter%5Bsearch%5D=680&sort=-adopted_on&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/legal-documents"
);

const params = {
    "filter[doc_type]": "cabinet_resolution",
    "filter[relevance]": "direct_primary",
    "filter[state]": "in_force",
    "filter[year]": "2023",
    "filter[direction]": "Paxtachilik",
    "filter[search]": "680",
    "sort": "-adopted_on",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 287,
            "doc_type": "presidential_resolution",
            "doc_type_title": null,
            "number": "690",
            "adopted_on": "2021-09-26",
            "title": "Quis adipisci molestias fugit deleniti distinctio eum.",
            "direction": "doloremque id aut",
            "relevance": "direct",
            "state": "in_force",
            "external_url": null
        },
        {
            "id": 288,
            "doc_type": "ministry_order",
            "doc_type_title": null,
            "number": "3374",
            "adopted_on": "2026-08-27",
            "title": "Mollitia deleniti nemo odit quia officia.",
            "direction": "est dignissimos neque",
            "relevance": "related",
            "state": "in_force",
            "external_url": null
        }
    ]
}
 

Qonunchilikka eng yaqinda o'zgartirish kiritilgan hujjatlar.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/legal-documents/changes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/legal-documents/changes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 289,
            "doc_type": "presidential_resolution",
            "doc_type_title": null,
            "number": "1789",
            "adopted_on": "2024-09-21",
            "title": "Delectus fugit qui repudiandae laboriosam.",
            "direction": "est alias tenetur",
            "relevance": "direct_primary",
            "state": "in_force",
            "external_url": null
        },
        {
            "id": 290,
            "doc_type": "charter",
            "doc_type_title": null,
            "number": "1104",
            "adopted_on": "2021-04-23",
            "title": "Et recusandae modi rerum ex repellendus assumenda et.",
            "direction": "tenetur ab reiciendis",
            "relevance": "direct_primary",
            "state": "in_force",
            "external_url": null
        }
    ]
}
 

Faol hujjatlarda uchraydigan yo'nalish yorliqlari (joriy tilda) — saytdagi filtr uchun.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/legal-documents/directions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/legal-documents/directions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "status": "ok",
    "message": "Success",
    "data": [
        "Chorvachilik",
        "Lizing",
        "Paxtachilik"
    ],
    "errors": null,
    "meta": null
}
 

Faol hujjat turlari (joriy tildagi sarlavha bilan) — saytdagi filtr uchun.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/legal-documents/types" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/legal-documents/types"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "status": "ok",
    "message": "Success",
    "data": [
        {
            "slug": "cabinet_resolution",
            "title": "Vazirlar Mahkamasi qarori"
        }
    ],
    "errors": null,
    "meta": null
}
 

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/legal-documents/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/legal-documents/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 291,
        "doc_type": "presidential_decree",
        "doc_type_title": null,
        "number": "9925",
        "adopted_on": "2024-11-20",
        "title": "Accusantium harum mollitia modi deserunt aut ab.",
        "direction": "provident perspiciatis quo",
        "relevance": "direct_primary",
        "state": "in_force",
        "external_url": null,
        "content": null,
        "files": []
    }
}
 

Normativ hujjatlar — boshqaruv

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/legal-documents?filter%5Bstatus%5D=0&filter%5Bdoc_type%5D=cabinet_resolution&filter%5Brelevance%5D=direct_primary&filter%5Bstate%5D=in_force&filter%5Byear%5D=2023&filter%5Bdirection%5D=Paxtachilik&filter%5Bsearch%5D=680&sort=-adopted_on&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-documents"
);

const params = {
    "filter[status]": "0",
    "filter[doc_type]": "cabinet_resolution",
    "filter[relevance]": "direct_primary",
    "filter[state]": "in_force",
    "filter[year]": "2023",
    "filter[direction]": "Paxtachilik",
    "filter[search]": "680",
    "sort": "-adopted_on",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 292,
            "doc_type": "ministry_order",
            "number": "4387",
            "adopted_on": "2020-12-02",
            "title": {
                "uz": "Nobis consequuntur facere est qui."
            },
            "direction": {
                "uz": "est minima quia"
            },
            "legal_direction_id": null,
            "legal_direction": null,
            "legal_document_type_id": null,
            "document_type": null,
            "relevance": "direct_primary",
            "state": "in_force",
            "external_url": null,
            "status": 1,
            "sort_order": 0,
            "created_at": "2026-09-16T07:21:36+00:00",
            "updated_at": "2026-09-16T07:21:36+00:00"
        },
        {
            "id": 293,
            "doc_type": "presidential_resolution",
            "number": "2585",
            "adopted_on": "2021-12-17",
            "title": {
                "uz": "Modi necessitatibus et tempora quidem aut."
            },
            "direction": {
                "uz": "sequi minima enim"
            },
            "legal_direction_id": null,
            "legal_direction": null,
            "legal_document_type_id": null,
            "document_type": null,
            "relevance": "related",
            "state": "in_force",
            "external_url": null,
            "status": 1,
            "sort_order": 0,
            "created_at": "2026-09-16T07:21:36+00:00",
            "updated_at": "2026-09-16T07:21:36+00:00"
        }
    ]
}
 

requires authentication

status yuborilmasa nofaol saqlanadi. Darhol faol (status: 1) qilish publish legal-documents ruxsatini talab qiladi. revisions bilan o'zgartirishlar tarixini ham bir so'rovda kiritish mumkin.

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/legal-documents" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"doc_type\": \"b\",
    \"number\": \"n\",
    \"adopted_on\": \"2026-09-16\",
    \"title\": [],
    \"legal_direction_id\": 16,
    \"legal_document_type_id\": 16,
    \"relevance\": \"direct\",
    \"state\": \"repealed\",
    \"external_url\": \"http:\\/\\/bailey.com\\/\",
    \"status\": 0,
    \"sort_order\": 0,
    \"revisions\": [
        {
            \"changed_on\": \"2026-09-16\",
            \"amending_document_id\": 16,
            \"summary\": []
        }
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-documents"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "doc_type": "b",
    "number": "n",
    "adopted_on": "2026-09-16",
    "title": [],
    "legal_direction_id": 16,
    "legal_document_type_id": 16,
    "relevance": "direct",
    "state": "repealed",
    "external_url": "http:\/\/bailey.com\/",
    "status": 0,
    "sort_order": 0,
    "revisions": [
        {
            "changed_on": "2026-09-16",
            "amending_document_id": 16,
            "summary": []
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 294,
        "doc_type": "ministry_order",
        "number": "9571",
        "adopted_on": "2021-05-25",
        "title": {
            "uz": "Quos velit et fugiat sunt nihil accusantium harum."
        },
        "direction": {
            "uz": "mollitia modi deserunt"
        },
        "legal_direction_id": null,
        "legal_direction": null,
        "legal_document_type_id": null,
        "document_type": null,
        "relevance": "direct_primary",
        "state": "in_force",
        "external_url": null,
        "status": 1,
        "sort_order": 0,
        "created_at": "2026-09-16T07:21:36+00:00",
        "updated_at": "2026-09-16T07:21:36+00:00",
        "content": null,
        "files": []
    }
}
 

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/legal-documents/113" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 295,
        "doc_type": "presidential_decree",
        "number": "6748",
        "adopted_on": "2025-12-13",
        "title": {
            "uz": "Omnis nostrum aut adipisci quidem nostrum qui commodi."
        },
        "direction": {
            "uz": "incidunt iure odit"
        },
        "legal_direction_id": null,
        "legal_direction": null,
        "legal_document_type_id": null,
        "document_type": null,
        "relevance": "related",
        "state": "in_force",
        "external_url": null,
        "status": 1,
        "sort_order": 0,
        "created_at": "2026-09-16T07:21:36+00:00",
        "updated_at": "2026-09-16T07:21:36+00:00",
        "content": null,
        "files": []
    }
}
 

requires authentication

Qisman yangilash: yuborilmagan maydonlar o'zgarmaydi. revisions yuborilsa, tarix to'liq shu ro'yxatga keltiriladi (id bor — yangilanadi, yo'q — qo'shiladi, ro'yxatda bo'lmagani — o'chiriladi). statusni o'zgartirish publish legal-documents ruxsatini talab qiladi.

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"doc_type\": \"b\",
    \"number\": \"n\",
    \"adopted_on\": \"2026-09-16\",
    \"legal_direction_id\": 16,
    \"legal_document_type_id\": 16,
    \"relevance\": \"direct_primary\",
    \"state\": \"repealed\",
    \"external_url\": \"http:\\/\\/bailey.com\\/\",
    \"status\": 1,
    \"sort_order\": 0,
    \"revisions\": [
        {
            \"id\": 16,
            \"changed_on\": \"2026-09-16\",
            \"amending_document_id\": 16,
            \"summary\": []
        }
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "doc_type": "b",
    "number": "n",
    "adopted_on": "2026-09-16",
    "legal_direction_id": 16,
    "legal_document_type_id": 16,
    "relevance": "direct_primary",
    "state": "repealed",
    "external_url": "http:\/\/bailey.com\/",
    "status": 1,
    "sort_order": 0,
    "revisions": [
        {
            "id": 16,
            "changed_on": "2026-09-16",
            "amending_document_id": 16,
            "summary": []
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 296,
        "doc_type": "ministry_order",
        "number": "6106",
        "adopted_on": "2024-01-16",
        "title": {
            "uz": "Velit et fugiat sunt nihil accusantium."
        },
        "direction": {
            "uz": "harum mollitia modi"
        },
        "legal_direction_id": null,
        "legal_direction": null,
        "legal_document_type_id": null,
        "document_type": null,
        "relevance": "direct_primary",
        "state": "in_force",
        "external_url": null,
        "status": 1,
        "sort_order": 0,
        "created_at": "2026-09-16T07:21:36+00:00",
        "updated_at": "2026-09-16T07:21:36+00:00",
        "content": null,
        "files": []
    }
}
 

requires authentication

Yumshoq o'chirish — yozuv bazada qoladi va qaytarib olinishi mumkin.

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

requires authentication

Har bir til uchun bitta fayl: o'sha tilning avvalgi nusxasi almashadi.

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113/files" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "locale=uz"\
    --form "file=@/tmp/phpcfAneE" 
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113/files"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('locale', 'uz');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 297,
        "doc_type": "ministry_order",
        "number": "165",
        "adopted_on": "2026-04-18",
        "title": {
            "uz": "Et fugiat sunt nihil accusantium."
        },
        "direction": {
            "uz": "harum mollitia modi"
        },
        "legal_direction_id": null,
        "legal_direction": null,
        "legal_document_type_id": null,
        "document_type": null,
        "relevance": "direct_primary",
        "state": "in_force",
        "external_url": null,
        "status": 1,
        "sort_order": 0,
        "created_at": "2026-09-16T07:21:36+00:00",
        "updated_at": "2026-09-16T07:21:36+00:00",
        "content": null,
        "files": []
    }
}
 

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113/files/12" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-documents/113/files/12"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Ochiq ma'lumotlar (Open Data)

GET api/v1/open-data

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/open-data" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/open-data"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
content-language: uz
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
vary: Origin
 

{
    "status": "ok",
    "message": "Amal muvaffaqiyatli bajarildi.",
    "data": [
        {
            "id": 1,
            "title": "Moliyalashtirish statistikasi — viloyatlar kesimida",
            "period": "2026 I–II chorak",
            "format": "csv",
            "size": "1,8 MB",
            "file_url": "/open-data#statistics",
            "sort_order": 1
        },
        {
            "id": 2,
            "title": "Imtiyozli lizingga berilgan texnika reyestri",
            "period": "2026",
            "format": "xlsx",
            "size": "740 KB",
            "file_url": "/open-data#datasets",
            "sort_order": 2
        },
        {
            "id": 3,
            "title": "Jamg‘armaning moliyaviy hisoboti",
            "period": "2025-yil yakuni",
            "format": "pdf",
            "size": "3,2 MB",
            "file_url": "/open-data#datasets",
            "sort_order": 3
        },
        {
            "id": 4,
            "title": "Tijorat banklari bo‘yicha mablag‘lar taqsimoti",
            "period": "2026 II chorak",
            "format": "json",
            "size": "120 KB",
            "file_url": "/open-data#datasets",
            "sort_order": 4
        }
    ],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/open-data

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Ochiq ma'lumotlar — boshqaruv

GET api/v1/admin/open-data

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/open-data" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/open-data"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/open-data

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/open-data

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/open-data" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": [],
    \"period\": [],
    \"format\": \"b\",
    \"size\": \"n\",
    \"file_url\": \"http:\\/\\/crooks.biz\\/et-fugiat-sunt-nihil-accusantium\",
    \"status\": 0,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/open-data"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": [],
    "period": [],
    "format": "b",
    "size": "n",
    "file_url": "http:\/\/crooks.biz\/et-fugiat-sunt-nihil-accusantium",
    "status": 0,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/open-data

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   object     
period   object     
format   string     

validation.max. Example: b

size   string  optional    

validation.max. Example: n

file_url   string  optional    

validation.max. Example: http://crooks.biz/et-fugiat-sunt-nihil-accusantium

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

GET api/v1/admin/open-data/{openDataset_id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/open-data/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/open-data/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/open-data/{openDataset_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

openDataset_id   integer     

The ID of the openDataset. Example: 1

PUT api/v1/admin/open-data/{openDataset_id}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/open-data/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"format\": \"b\",
    \"size\": \"n\",
    \"file_url\": \"http:\\/\\/crooks.biz\\/et-fugiat-sunt-nihil-accusantium\",
    \"status\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/open-data/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "format": "b",
    "size": "n",
    "file_url": "http:\/\/crooks.biz\/et-fugiat-sunt-nihil-accusantium",
    "status": 1,
    "sort_order": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/open-data/{openDataset_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

openDataset_id   integer     

The ID of the openDataset. Example: 1

Body Parameters

title   object  optional    
period   object  optional    
format   string  optional    

validation.max. Example: b

size   string  optional    

validation.max. Example: n

file_url   string  optional    

validation.max. Example: http://crooks.biz/et-fugiat-sunt-nihil-accusantium

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

DELETE api/v1/admin/open-data/{openDataset_id}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/open-data/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/open-data/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/open-data/{openDataset_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

openDataset_id   integer     

The ID of the openDataset. Example: 1

Qidiruv

Sayt bo'ylab yagona qidiruv: normativ hujjatlar (nomi, yo'nalishi va raqami), moliyalashtirish dasturlari, savol-javoblar (savol va javob) va yangiliklar. Atama har ikki o'zbek yozuvida va barcha tillarda izlanadi.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/search?q=paxta&limit=5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"b\",
    \"limit\": 12
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/search"
);

const params = {
    "q": "paxta",
    "limit": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "b",
    "limit": 12
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "status": "ok",
    "message": "Success",
    "data": {
        "query": "paxta",
        "total": 7,
        "groups": [
            {
                "kind": "legal_documents",
                "count": 2,
                "items": [
                    {
                        "id": 3,
                        "doc_type": "cabinet_resolution",
                        "number": "680",
                        "adopted_on": "2023-12-25",
                        "title": "Paxta xom ashyosini yetishtirishni kreditlash tartibi",
                        "direction": "Paxtachilik",
                        "relevance": "direct_primary",
                        "state": "in_force",
                        "external_url": null,
                        "revisions_count": 0
                    }
                ]
            },
            {
                "kind": "programs",
                "count": 1,
                "items": [
                    {
                        "id": 1,
                        "slug": "paxta-krediti",
                        "sector": "cotton",
                        "kind": "credit",
                        "title": "Paxta yetishtirish krediti",
                        "summary": "...",
                        "body": null,
                        "required_documents": null
                    }
                ]
            },
            {
                "kind": "faqs",
                "count": 3,
                "items": [
                    {
                        "id": 12,
                        "question": "Paxta uchun kredit qancha?",
                        "answer": "...",
                        "category": {
                            "id": 1,
                            "slug": "kredit",
                            "title": "Kreditlar"
                        }
                    }
                ]
            },
            {
                "kind": "posts",
                "count": 1,
                "items": [
                    {
                        "id": 210,
                        "slug": "paxta-hosili",
                        "title": "Paxta hosili",
                        "intro": "...",
                        "published_at": "2026-09-01T10:00:00+00:00",
                        "is_featured": false,
                        "cover_url": null,
                        "is_machine_translated": false,
                        "view_count": 0,
                        "categories": []
                    }
                ]
            }
        ]
    },
    "errors": null,
    "meta": null
}
 

Rahbariyat (Management)

GET api/v1/management

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/management" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/management"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
content-language: uz
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
vary: Origin
 

{
    "status": "ok",
    "message": "Amal muvaffaqiyatli bajarildi.",
    "data": [
        {
            "id": 1,
            "name": "Isroilov Abdurashid Abduraxmonovich",
            "position": "Departament direktori",
            "reception_days": "Dushanba – juma, 9:00 – 18:00",
            "phone": "+998 71 231-02-17",
            "email": "info@agrofin.uz",
            "sort_order": 1
        },
        {
            "id": 2,
            "name": "Ro‘ziqulov Sayfulla Mansurovich",
            "position": "Departament direktori o‘rinbosari",
            "reception_days": "Dushanba – juma, 9:00 – 18:00",
            "phone": "+998 71 231-02-17",
            "email": "info@agrofin.uz",
            "sort_order": 2
        },
        {
            "id": 3,
            "name": "Xatamova Dilbar Abduvaxobovna",
            "position": "Moliya-iqtisod bo‘limi - Bosh buxgalter",
            "reception_days": "Dushanba – juma, 9:00 – 18:00",
            "phone": "+998 71 231-02-17",
            "email": "info@agrofin.uz",
            "sort_order": 3
        },
        {
            "id": 4,
            "name": "Mavlonov G‘iyos Ibroximovich",
            "position": "Agrar sohani moliyalashtirish bo‘limi - Bo‘lim boshlig‘i",
            "reception_days": "Dushanba – juma, 9:00 – 18:00",
            "phone": "+998 71 231-02-17",
            "email": "info@agrofin.uz",
            "sort_order": 4
        },
        {
            "id": 5,
            "name": "Ochilov Innatulla Nematullayevich",
            "position": "Qishloq xo‘jaligini texnika bilan jihozlashni moliyalashtirish bo‘limi - Bo‘lim boshlig‘i",
            "reception_days": "Dushanba – juma, 9:00 – 18:00",
            "phone": "+998 71 231-02-17",
            "email": "info@agrofin.uz",
            "sort_order": 5
        },
        {
            "id": 6,
            "name": "Baxridinov Abduaziz Abdimajidovich",
            "position": "Meva-sabzavot mahsulotlarini moliyalashtirish bo‘limi - Bo‘lim boshlig‘i",
            "reception_days": "Dushanba – juma, 9:00 – 18:00",
            "phone": "+998 71 231-02-17",
            "email": "info@agrofin.uz",
            "sort_order": 6
        }
    ],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/management

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Rahbariyat — boshqaruv

GET api/v1/admin/management-members

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/management-members" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/management-members"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/management-members

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/management-members

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/management-members" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": [],
    \"position\": [],
    \"phone\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"status\": 0,
    \"sort_order\": 0
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/management-members"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": [],
    "position": [],
    "phone": "b",
    "email": "zbailey@example.net",
    "status": 0,
    "sort_order": 0
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/management-members

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   object     
position   object     
reception_days   object  optional    
phone   string  optional    

validation.max. Example: b

email   string  optional    

validation.email validation.max. Example: zbailey@example.net

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 0

GET api/v1/admin/management-members/{managementMember_id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/management-members/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/management-members/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/management-members/{managementMember_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

managementMember_id   integer     

The ID of the managementMember. Example: 1

PUT api/v1/admin/management-members/{managementMember_id}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/management-members/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"status\": 1,
    \"sort_order\": 0
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/management-members/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "phone": "b",
    "email": "zbailey@example.net",
    "status": 1,
    "sort_order": 0
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/management-members/{managementMember_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

managementMember_id   integer     

The ID of the managementMember. Example: 1

Body Parameters

name   object  optional    
position   object  optional    
reception_days   object  optional    
phone   string  optional    

validation.max. Example: b

email   string  optional    

validation.email validation.max. Example: zbailey@example.net

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 0

DELETE api/v1/admin/management-members/{managementMember_id}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/management-members/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/management-members/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/management-members/{managementMember_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

managementMember_id   integer     

The ID of the managementMember. Example: 1

Raqamli yordamchi

Savol berish

Javob faqat Jamg'armaning tasdiqlangan bilim bazasidan olinadi. Bazada javob bo'lmasa, yordamchi buni ochiq aytadi va ishonch telefonini ko'rsatadi — o'ylab topilgan javob bermaydi.

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/assistant/ask" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"device_id\": \"dev-3f8a2b91c4\",
    \"question\": \"Paxta uchun kredit qanday shartlarda beriladi?\",
    \"name\": \"Xusan\"
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/assistant/ask"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "device_id": "dev-3f8a2b91c4",
    "question": "Paxta uchun kredit qanday shartlarda beriladi?",
    "name": "Xusan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "status": "ok",
    "message": "Operation completed successfully.",
    "data": {
        "answer": "...",
        "source": "680 — ...",
        "legal_document_id": null,
        "generator": "gemini",
        "confident": true,
        "name": "Xusan",
        "card": null,
        "human_takeover": false
    },
    "errors": null,
    "meta": null
}
 

Example response (429):


{
    "status": "error",
    "message": "Kunlik xabar limiti (100) tugadi. Iltimos, ertaga qayta urinib ko‘ring yoki ishonch telefoniga murojaat qiling: +998 71 231-02-17.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

POST api/v1/assistant/ask

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

device_id   string     

Brauzer yaratgan qurilma belgisi. Example: dev-3f8a2b91c4

question   string     

Xabar matni (500 belgigacha). Example: Paxta uchun kredit qanday shartlarda beriladi?

name   string  optional    

Foydalanuvchi ismi — yordamchi so'raganida widget yuboradi. Example: Xusan

Suhbat tarixi

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/assistant/history/dev-3f8a2b91c4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/assistant/history/dev-3f8a2b91c4"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 506,
            "role": "user",
            "content": "Et animi quos velit et fugiat.",
            "source": null,
            "created_at": "2026-09-16T07:21:36+00:00"
        },
        {
            "id": 507,
            "role": "user",
            "content": "Deserunt aut ab provident perspiciatis quo omnis nostrum.",
            "source": null,
            "created_at": "2026-09-16T07:21:36+00:00"
        }
    ]
}
 

Request      

GET api/v1/assistant/history/{deviceId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

deviceId   string     

Qurilma belgisi. Example: dev-3f8a2b91c4

Savol-javoblar

Savol-javoblar

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/faqs?filter%5Bfaq_category_id%5D=1&filter%5Bprogram_id%5D=1&filter%5Bsearch%5D=subsidiya&per_page=50" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/faqs"
);

const params = {
    "filter[faq_category_id]": "1",
    "filter[program_id]": "1",
    "filter[search]": "subsidiya",
    "per_page": "50",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 229,
            "question": "Quasi asperiores officia qui veniam tenetur molestiae minima.?",
            "answer": "Et illo error quaerat non facere eos. Fugit nesciunt aut aut doloribus eos quo hic. In repudiandae quas qui dolores modi earum."
        },
        {
            "id": 230,
            "question": "Dolores ipsum fuga harum velit qui explicabo dolor.?",
            "answer": "Fugiat ullam explicabo corporis autem et et minima. Eaque laudantium voluptatem facilis voluptas numquam. Rem est officia ex nobis enim quis molestiae."
        }
    ]
}
 

Request      

GET api/v1/faqs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

filter[faq_category_id]   integer  optional    

Kategoriya. Example: 1

filter[program_id]   integer  optional    

Dastur. Example: 1

filter[search]   string  optional    

Savol matni bo'yicha qidiruv. Example: subsidiya

per_page   integer  optional    

Sahifadagi yozuvlar soni (eng ko'pi 100). Example: 50

Savol-javob kategoriyalari

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/faq-categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/faq-categories"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 165,
            "slug": "ut-non",
            "title": "cupiditate facilis"
        },
        {
            "id": 166,
            "slug": "debitis-recusandae",
            "title": "qui repudiandae"
        }
    ]
}
 

Request      

GET api/v1/faq-categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Sektorlar — boshqaruv

GET api/v1/admin/program-sectors

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/program-sectors" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/program-sectors"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/program-sectors

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/program-sectors

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/program-sectors" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": [],
    \"slug\": \"b\",
    \"status\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/program-sectors"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": [],
    "slug": "b",
    "status": 1,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program-sectors

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   object     
slug   string     

validation.max. Example: b

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

GET api/v1/admin/program-sectors/{programSector}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/program-sectors/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/program-sectors/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/program-sectors/{programSector}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programSector   string     

Example: architecto

PUT api/v1/admin/program-sectors/{programSector}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/program-sectors/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"status\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/program-sectors/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "status": 1,
    "sort_order": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program-sectors/{programSector}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programSector   string     

Example: architecto

Body Parameters

name   object  optional    
slug   string  optional    

validation.max. Example: b

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

DELETE api/v1/admin/program-sectors/{programSector}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/program-sectors/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/program-sectors/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program-sectors/{programSector}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programSector   string     

Example: architecto

Tashkiliy tuzilma

Tashkiliy tuzilma

Organogramma uchun daraxt ko'rinishida: ildizlar va ularning bo'linmalari.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/staff-units" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/staff-units"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 93,
            "name": "laborum quibusdam qui",
            "head_name": "Dock Bradtke",
            "duties": null,
            "phone": null,
            "email": null
        },
        {
            "id": 94,
            "name": "delectus ea et",
            "head_name": "Mr. Vito Stiedemann II",
            "duties": null,
            "phone": null,
            "email": null
        }
    ]
}
 

Request      

GET api/v1/staff-units

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Tuzilma (Staff Units) — boshqaruv

GET api/v1/admin/staff-units

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/staff-units" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/staff-units"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/staff-units

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/staff-units

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/staff-units" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": [],
    \"parent_id\": 16,
    \"phone\": \"n\",
    \"email\": \"ashly64@example.com\",
    \"status\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/staff-units"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": [],
    "parent_id": 16,
    "phone": "n",
    "email": "ashly64@example.com",
    "status": 1,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/staff-units

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   object     
parent_id   integer  optional    

Must match an existing stored value. Example: 16

head_name   object  optional    
duties   object  optional    
phone   string  optional    

validation.max. Example: n

email   string  optional    

validation.email validation.max. Example: ashly64@example.com

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

GET api/v1/admin/staff-units/{staffUnit_id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/staff-units/42" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/staff-units/42"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/staff-units/{staffUnit_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

staffUnit_id   integer     

The ID of the staffUnit. Example: 42

PUT api/v1/admin/staff-units/{staffUnit_id}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/staff-units/42" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"parent_id\": 16,
    \"phone\": \"n\",
    \"email\": \"ashly64@example.com\",
    \"status\": 0,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/staff-units/42"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "parent_id": 16,
    "phone": "n",
    "email": "ashly64@example.com",
    "status": 0,
    "sort_order": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/staff-units/{staffUnit_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

staffUnit_id   integer     

The ID of the staffUnit. Example: 42

Body Parameters

name   object  optional    
parent_id   integer  optional    

Must match an existing stored value. Example: 16

head_name   object  optional    
duties   object  optional    
phone   string  optional    

validation.max. Example: n

email   string  optional    

validation.email validation.max. Example: ashly64@example.com

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

DELETE api/v1/admin/staff-units/{staffUnit_id}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/staff-units/42" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/staff-units/42"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/staff-units/{staffUnit_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

staffUnit_id   integer     

The ID of the staffUnit. Example: 42

Videogalereya (Video Gallery)

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/videos" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/videos"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
content-language: uz
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
vary: Origin
 

{
    "status": "ok",
    "message": "Amal muvaffaqiyatli bajarildi.",
    "data": [
        {
            "id": 1,
            "youtube_id": "LRz9vMQCUa8",
            "title": "Jamg‘arma: hosil ortidagi moliyaviy kafolat",
            "date": "2026-08-01",
            "duration": "2:40",
            "is_featured": true,
            "poster": "https://img.youtube.com/vi/LRz9vMQCUa8/hqdefault.jpg",
            "sort_order": 1
        },
        {
            "id": 2,
            "youtube_id": "LRz9vMQCUa8",
            "title": "Paxta yetishtirishni kreditlash qanday ishlaydi",
            "date": "2026-07-01",
            "duration": "4:15",
            "is_featured": false,
            "poster": "https://img.youtube.com/vi/LRz9vMQCUa8/hqdefault.jpg",
            "sort_order": 2
        },
        {
            "id": 3,
            "youtube_id": "LRz9vMQCUa8",
            "title": "Texnika lizingi: ariza berishdan topshirishgacha",
            "date": "2026-06-01",
            "duration": "3:05",
            "is_featured": false,
            "poster": "https://img.youtube.com/vi/LRz9vMQCUa8/hqdefault.jpg",
            "sort_order": 3
        },
        {
            "id": 4,
            "youtube_id": "LRz9vMQCUa8",
            "title": "Subsidiyalar: kim va qanday oladi",
            "date": "2026-05-01",
            "duration": "5:20",
            "is_featured": false,
            "poster": "https://img.youtube.com/vi/LRz9vMQCUa8/hqdefault.jpg",
            "sort_order": 4
        },
        {
            "id": 5,
            "youtube_id": "LRz9vMQCUa8",
            "title": "Hamkor banklar bilan yig‘ilish lavhalari",
            "date": "2026-04-01",
            "duration": "1:50",
            "is_featured": false,
            "poster": "https://img.youtube.com/vi/LRz9vMQCUa8/hqdefault.jpg",
            "sort_order": 5
        }
    ],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/videos

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Videogalereya — boshqaruv

GET api/v1/admin/videos

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/videos" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/videos"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/videos

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/admin/videos

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/videos" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"youtube_id\": \"b\",
    \"title\": [],
    \"date\": \"2026-09-16T07:21:36\",
    \"duration\": \"b\",
    \"is_featured\": false,
    \"status\": 1,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/videos"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "youtube_id": "b",
    "title": [],
    "date": "2026-09-16T07:21:36",
    "duration": "b",
    "is_featured": false,
    "status": 1,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/videos

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

youtube_id   string     

validation.max. Example: b

title   object     
date   string  optional    

validation.date. Example: 2026-09-16T07:21:36

duration   string  optional    

validation.max. Example: b

is_featured   boolean  optional    

Example: false

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 1

GET api/v1/admin/videos/{video_id}

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/videos/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/videos/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/videos/{video_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

video_id   integer     

The ID of the video. Example: 1

PUT api/v1/admin/videos/{video_id}

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/videos/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"youtube_id\": \"b\",
    \"date\": \"2026-09-16T07:21:36\",
    \"duration\": \"n\",
    \"is_featured\": true,
    \"status\": 0,
    \"sort_order\": 0
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/videos/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "youtube_id": "b",
    "date": "2026-09-16T07:21:36",
    "duration": "n",
    "is_featured": true,
    "status": 0,
    "sort_order": 0
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/videos/{video_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

video_id   integer     

The ID of the video. Example: 1

Body Parameters

youtube_id   string  optional    

validation.max. Example: b

title   object  optional    
date   string  optional    

validation.date. Example: 2026-09-16T07:21:36

duration   string  optional    

validation.max. Example: n

is_featured   boolean  optional    

Example: true

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.between. Example: 0

DELETE api/v1/admin/videos/{video_id}

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/videos/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/videos/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/videos/{video_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

video_id   integer     

The ID of the video. Example: 1

Yangiliklar

Yangiliklar ro'yxati

Faqat chop etilgan va so'ralgan tilda mavjud maqolalar qaytadi.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/posts?filter%5Bcategory%5D=tenderlar&filter%5Bsearch%5D=paxta&filter%5Byear%5D=2026&filter%5Bis_featured%5D=1&sort=-published_at&per_page=12" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/posts"
);

const params = {
    "filter[category]": "tenderlar",
    "filter[search]": "paxta",
    "filter[year]": "2026",
    "filter[is_featured]": "1",
    "sort": "-published_at",
    "per_page": "12",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 733,
            "slug": "modi-deserunt-aut-ab",
            "title": "Modi deserunt aut ab.",
            "intro": "Quo omnis nostrum aut adipisci.",
            "published_at": "2024-04-26T01:27:17+00:00",
            "is_featured": false,
            "cover_url": null,
            "is_machine_translated": false,
            "view_count": 0
        },
        {
            "id": 734,
            "slug": "voluptatem-laboriosam-praesentium",
            "title": "Voluptatem laboriosam praesentium.",
            "intro": "Molestias fugit deleniti distinctio eum doloremque id.",
            "published_at": "2025-05-04T11:44:36+00:00",
            "is_featured": false,
            "cover_url": null,
            "is_machine_translated": false,
            "view_count": 0
        }
    ]
}
 

Request      

GET api/v1/posts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

filter[category]   string  optional    

Kategoriya slug'i. Example: tenderlar

filter[search]   string  optional    

Sarlavha bo'yicha qidiruv. Example: paxta

filter[year]   integer  optional    

Chop etilgan yil. Example: 2026

filter[is_featured]   integer  optional    

Faqat asosiy yangiliklar. Example: 1

sort   string  optional    

Tartib: published_at, id (oldiga «-» teskari). Example: -published_at

per_page   integer  optional    

Sahifadagi yozuvlar soni (eng ko'pi 100). Example: 12

Yangilik kategoriyalari

Faol kategoriyalar, har birida joriy tildagi chop etilgan maqolalar soni bilan.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/news-categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/news-categories"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 157,
            "slug": "voluptate-accusamus",
            "title": "ut et",
            "parent_id": null
        },
        {
            "id": 158,
            "slug": "modi-rerum-ex",
            "title": "repellendus assumenda",
            "parent_id": null
        }
    ]
}
 

Request      

GET api/v1/news-categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Bitta maqola

Maqola matni, kategoriyalari va uchta o'xshash maqola bilan qaytadi. Har chaqiriqda ko'rishlar soni bittaga oshadi.

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/posts/paxta-2026" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/posts/paxta-2026"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 735,
        "slug": "et-animi-quos-velit",
        "title": "Et animi quos velit.",
        "intro": "Sunt nihil accusantium harum mollitia.",
        "published_at": "2025-07-27T16:38:13+00:00",
        "is_featured": false,
        "cover_url": null,
        "is_machine_translated": false,
        "view_count": 0,
        "content": "<p>Aut ab provident perspiciatis quo omnis nostrum aut. Quidem nostrum qui commodi incidunt iure odit. Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora.</p>",
        "related": []
    }
}
 

Request      

GET api/v1/posts/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

Maqola manzil qismi. Example: paxta-2026

Yangiliklar — boshqaruv

Maqolalar ro'yxati (barcha holatlar)

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/posts?filter%5Bpublication_status%5D=draft&filter%5Bcategory%5D=tenderlar&filter%5Bsearch%5D=paxta&filter%5Byear%5D=2026&sort=-id&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/posts"
);

const params = {
    "filter[publication_status]": "draft",
    "filter[category]": "tenderlar",
    "filter[search]": "paxta",
    "filter[year]": "2026",
    "sort": "-id",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 736,
            "slug": "assumenda-occaecati-ea",
            "publication_status": "published",
            "published_at": "2026-02-01T23:29:14+00:00",
            "title": {
                "uz": "Assumenda occaecati ea."
            },
            "intro": {
                "uz": "Accusamus in ipsam est perspiciatis repudiandae quia."
            },
            "content": {
                "uz": "<p>Facilis asperiores dignissimos aut quo aut ea veniam qui. Omnis adipisci necessitatibus iste non odit repellendus ut. Omnis quidem facilis et expedita impedit.</p>"
            },
            "is_featured": false,
            "cover_url": null,
            "generated_locales": [],
            "legacy_slugs": null,
            "view_count": 0,
            "created_at": "2026-09-16T07:21:36+00:00",
            "updated_at": "2026-09-16T07:21:36+00:00"
        },
        {
            "id": 737,
            "slug": "natus-distinctio-assumenda",
            "publication_status": "published",
            "published_at": "2024-11-10T19:26:04+00:00",
            "title": {
                "uz": "Natus distinctio assumenda."
            },
            "intro": {
                "uz": "Modi et aut sapiente doloremque adipisci quas eos."
            },
            "content": {
                "uz": "<p>Maiores cum atque voluptatum a reprehenderit. Nihil numquam aut sunt ex. Autem hic voluptatem non nihil iste nesciunt officiis. Neque quisquam exercitationem et ullam.</p>"
            },
            "is_featured": false,
            "cover_url": null,
            "generated_locales": [],
            "legacy_slugs": null,
            "view_count": 0,
            "created_at": "2026-09-16T07:21:36+00:00",
            "updated_at": "2026-09-16T07:21:36+00:00"
        }
    ]
}
 

Request      

GET api/v1/admin/posts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

filter[publication_status]   string  optional    

draft, published yoki archived. Example: draft

filter[category]   string  optional    

Kategoriya slug'i. Example: tenderlar

filter[search]   string  optional    

Sarlavha bo'yicha qidiruv. Example: paxta

filter[year]   integer  optional    

Chop etilgan yil. Example: 2026

sort   string  optional    

Tartib: published_at, id. Example: -id

per_page   integer  optional    

Sahifadagi yozuvlar soni (eng ko'pi 100). Example: 20

Yangi maqola

requires authentication

slug bo'sh qoldirilsa sarlavhadan hosil qilinadi. content HTML'i saqlashdan oldin tozalanadi; intro bo'sh bo'lsa matndan chiqariladi.

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/posts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"publication_status\": \"archived\",
    \"published_at\": \"2026-09-16T07:21:36\",
    \"title\": [],
    \"is_featured\": false,
    \"category_ids\": [
        16
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/posts"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "publication_status": "archived",
    "published_at": "2026-09-16T07:21:36",
    "title": [],
    "is_featured": false,
    "category_ids": [
        16
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 738,
        "slug": "fugiat-sunt-nihil-accusantium",
        "publication_status": "published",
        "published_at": "2026-03-16T12:15:31+00:00",
        "title": {
            "uz": "Fugiat sunt nihil accusantium."
        },
        "intro": {
            "uz": "Modi deserunt aut ab provident perspiciatis."
        },
        "content": {
            "uz": "<p>Nostrum aut adipisci quidem nostrum. Commodi incidunt iure odit. Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora.</p>"
        },
        "is_featured": false,
        "cover_url": null,
        "generated_locales": [],
        "legacy_slugs": null,
        "view_count": 0,
        "created_at": "2026-09-16T07:21:36+00:00",
        "updated_at": "2026-09-16T07:21:36+00:00"
    }
}
 

Request      

POST api/v1/admin/posts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

slug   string  optional    

Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. validation.max. Example: b

publication_status   string     

Example: archived

Must be one of:
  • draft
  • published
  • archived
published_at   string  optional    

validation.date. Example: 2026-09-16T07:21:36

title   object     
intro   object  optional    
content   object  optional    
is_featured   boolean  optional    

Example: false

category_ids   integer[]  optional    

Must match an existing stored value.

Muqova rasmini yuklash

requires authentication

Kolleksiya bitta faylli — eski rasm avtomatik almashadi.

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/posts/images" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "image=@/tmp/phpgGCpkK" 
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/posts/images"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 739,
        "slug": "eius-et-animi-quos",
        "publication_status": "published",
        "published_at": "2025-12-30T13:17:13+00:00",
        "title": {
            "uz": "Eius et animi quos."
        },
        "intro": {
            "uz": "Fugiat sunt nihil accusantium harum mollitia."
        },
        "content": {
            "uz": "<p>Aut ab provident perspiciatis quo omnis nostrum aut. Quidem nostrum qui commodi incidunt iure odit. Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora.</p>"
        },
        "is_featured": false,
        "cover_url": null,
        "generated_locales": [],
        "legacy_slugs": null,
        "view_count": 0,
        "created_at": "2026-09-16T07:21:36+00:00",
        "updated_at": "2026-09-16T07:21:36+00:00"
    }
}
 

Request      

POST api/v1/admin/posts/images

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

post   integer     

Maqola raqami. Example: 1

Body Parameters

image   file     

validation.image validation.max. Example: /tmp/phpgGCpkK

Bitta maqola — tahrirlash uchun, barcha tillari bilan

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/posts/220" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/posts/220"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 740,
        "slug": "adipisci-molestias-fugit-deleniti-distinctio-eum",
        "publication_status": "published",
        "published_at": "2024-02-04T03:45:34+00:00",
        "title": {
            "uz": "Adipisci molestias fugit deleniti distinctio eum."
        },
        "intro": {
            "uz": "Aut libero aliquam veniam corporis."
        },
        "content": {
            "uz": "<p>Deleniti nemo odit quia officia. Dignissimos neque blanditiis odio. Excepturi doloribus delectus fugit qui repudiandae laboriosam.</p>"
        },
        "is_featured": false,
        "cover_url": null,
        "generated_locales": [],
        "legacy_slugs": null,
        "view_count": 0,
        "created_at": "2026-09-16T07:21:36+00:00",
        "updated_at": "2026-09-16T07:21:36+00:00"
    }
}
 

Request      

GET api/v1/admin/posts/{post_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

post_id   integer     

The ID of the post. Example: 220

post   integer     

Maqola raqami. Example: 1

Maqolani tahrirlash

requires authentication

Muharrir matnini tuzatgan til generated_locales ro'yxatidan chiqadi — ya'ni «avtomatik o'girilgan» yorlig'i o'chadi.

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/posts/220" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"publication_status\": \"published\",
    \"published_at\": \"2026-09-16T07:21:36\",
    \"is_featured\": false,
    \"category_ids\": [
        16
    ]
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/posts/220"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "publication_status": "published",
    "published_at": "2026-09-16T07:21:36",
    "is_featured": false,
    "category_ids": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 741,
        "slug": "mollitia-modi-deserunt-aut-ab",
        "publication_status": "published",
        "published_at": "2024-04-26T01:27:17+00:00",
        "title": {
            "uz": "Mollitia modi deserunt aut ab."
        },
        "intro": {
            "uz": "Quo omnis nostrum aut adipisci."
        },
        "content": {
            "uz": "<p>Qui commodi incidunt iure odit. Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora.</p>"
        },
        "is_featured": false,
        "cover_url": null,
        "generated_locales": [],
        "legacy_slugs": null,
        "view_count": 0,
        "created_at": "2026-09-16T07:21:36+00:00",
        "updated_at": "2026-09-16T07:21:36+00:00"
    }
}
 

Request      

PUT api/v1/admin/posts/{post_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

post_id   integer     

The ID of the post. Example: 220

post   integer     

Maqola raqami. Example: 1

Body Parameters

slug   string  optional    

Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. validation.max. Example: b

publication_status   string  optional    

Example: published

Must be one of:
  • draft
  • published
  • archived
published_at   string  optional    

validation.date. Example: 2026-09-16T07:21:36

title   object  optional    
intro   object  optional    
content   object  optional    
is_featured   boolean  optional    

Example: false

category_ids   integer[]  optional    

Must match an existing stored value.

Maqolani o'chirish

requires authentication

Yumshoq o'chirish — yozuv bazada qoladi va qaytarib olinishi mumkin.

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/posts/220" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/posts/220"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/posts/{post_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

post_id   integer     

The ID of the post. Example: 220

post   integer     

Maqola raqami. Example: 1

POST api/v1/admin/posts/{post_id}/cover

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/posts/220/cover" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "cover=@/tmp/phppfjEaL" 
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/posts/220/cover"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('cover', document.querySelector('input[name="cover"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/admin/posts/{post_id}/cover

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

post_id   integer     

The ID of the post. Example: 220

Body Parameters

cover   file     

validation.image validation.max. Example: /tmp/phppfjEaL

Muqova rasmini o'chirish

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/posts/220/cover" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/posts/220/cover"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/posts/{post_id}/cover

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

post_id   integer     

The ID of the post. Example: 220

post   integer     

Maqola raqami. Example: 1

Kategoriyalar ro'yxati (nofaollari bilan)

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/news-categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/news-categories"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 159,
            "slug": "eius-et",
            "title": {
                "uz": "animi quos"
            },
            "parent_id": null,
            "status": 1,
            "sort_order": 0
        },
        {
            "id": 160,
            "slug": "et-fugiat",
            "title": {
                "uz": "sunt nihil"
            },
            "parent_id": null,
            "status": 1,
            "sort_order": 0
        }
    ]
}
 

Request      

GET api/v1/admin/news-categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Kategoriyani ko'rish

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/news-categories/7" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/news-categories/7"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

Request      

GET api/v1/admin/news-categories/{newsCategory_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

newsCategory_id   integer     

The ID of the newsCategory. Example: 7

Yangi kategoriya

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/news-categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"title\": [],
    \"parent_id\": 16,
    \"status\": 1,
    \"sort_order\": 22
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/news-categories"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "title": [],
    "parent_id": 16,
    "status": 1,
    "sort_order": 22
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/news-categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

slug   string     

Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. validation.max. Example: b

title   object     
parent_id   integer  optional    

Must match an existing stored value. Example: 16

status   integer  optional    

Example: 1

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.min validation.max. Example: 22

Kategoriyani tahrirlash

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/news-categories/7" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"parent_id\": 16,
    \"status\": 0,
    \"sort_order\": 22
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/news-categories/7"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "parent_id": 16,
    "status": 0,
    "sort_order": 22
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/news-categories/{newsCategory_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

newsCategory_id   integer     

The ID of the newsCategory. Example: 7

newsCategory   integer     

Kategoriya raqami. Example: 1

Body Parameters

slug   string  optional    

Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. validation.max. Example: b

title   object  optional    
parent_id   integer  optional    

Must match an existing stored value. Must not be one of . Example: 16

status   integer  optional    

Example: 0

Must be one of:
  • 1
  • 0
sort_order   integer  optional    

validation.min validation.max. Example: 22

Kategoriyani o'chirish

requires authentication

Maqolalari bor kategoriya o'chirilmaydi — avval maqolalar boshqa kategoriyaga ko'chirilishi kerak.

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/news-categories/7" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/news-categories/7"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/news-categories/{newsCategory_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

newsCategory_id   integer     

The ID of the newsCategory. Example: 7

newsCategory   integer     

Kategoriya raqami. Example: 1

Yo'nalishlar — boshqaruv

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/legal-directions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-directions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

requires authentication

Example request:
curl --request POST \
    "https://api.agrofin.uz/api/v1/admin/legal-directions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": [],
    \"slug\": \"b\",
    \"status\": 0,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-directions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": [],
    "slug": "b",
    "status": 0,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

requires authentication

Example request:
curl --request GET \
    --get "https://api.agrofin.uz/api/v1/admin/legal-directions/2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-directions/2"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "status": "error",
    "message": "Autentifikatsiyadan o‘tilmagan.",
    "data": [],
    "errors": null,
    "meta": null
}
 

requires authentication

Example request:
curl --request PUT \
    "https://api.agrofin.uz/api/v1/admin/legal-directions/2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"status\": 0,
    \"sort_order\": 1
}"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-directions/2"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slug": "b",
    "status": 0,
    "sort_order": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

requires authentication

Example request:
curl --request DELETE \
    "https://api.agrofin.uz/api/v1/admin/legal-directions/2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.agrofin.uz/api/v1/admin/legal-directions/2"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());