Sanly Platforma Integrasiýa Resminamasy
Mazmuny
Sanly platformanyň dokumentasiýasyna hoş geldiňiz. Bu gollanma, siziň platformalaryňyzy biziň platformamyz bilen birleşdirmek üçin kategoriýalary we önümleri filtrleme mümkinçiligi bilen almak üçin API-lary üpjün etmek arkaly size kömek eder.
Talaplar
- Platforma iki API görkezmeli: biri kategoriýalar üçin, biri önümler üçin.
- Her iki API RESTful formatda we JSON görnüşinde bolmaly.
- API-ler üçin sahypalama hökman bolmaly.
Kategoriýa API
URL
GET /categories
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | int | Optional | Page number for pagination. |
| limit | int | Optional | Number of items per page (default: 10). |
Example Request
GET /categories?page=1&limit=10
Response Format
{
"success": true,
"last_page": 5,
"current_page": 1,
"page_size": 10,
"total": 50,
"data": [
{
"id": 1,
"name_tm": "Kategoriýa TM",
"name_ru": "Категория RU",
"name_en": "Category EN",
"image": " https://example.com/category-image.jpg "
}
]
}Önüm API
URL
GET /products
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | int | Optional | Filter products by category ID. |
| page | int | Optional | Page number for pagination. |
| limit | int | Optional | Number of items per page (default: 10). |
Example request
GET /products?category=1&page=1&limit=10
Response Format
{
"success": true,
"last_page": 10,
"current_page": 1,
"page_size": 10,
"total": 100,
"data": [
{
"id": 101,
"name_tm": "Haryt TM",
"name_ru": "Товар RU",
"name_en": "Product EN",
"description_tm": "Düşündiriş TM",
"description_ru": "Описание RU",
"description_en": "Description EN",
"image": " https://example.com/product-image.jpg ",
"category": {
"id": 1,
"name_tm": "Kategoriýa TM",
"name_ru": "Категория RU",
"name_en": "Category EN"
},
"price": 100.0,
"special_price": 80.0,
"discount_percent": 20
}
]
}Goldaw üçin
Eger soraglaryňyz bar bolsa, support@sanlyplatform.com salgysy boýunça bize ýüz tutuň.