API referansı
Ürünler
/productsÜrünleri listele
Parametreler
| Ad | Konum | Açıklama |
|---|---|---|
| status | sorgu | DRAFT | ACTIVE | ARCHIVED |
| type | sorgu | PHYSICAL | DIGITAL | SERVICE |
| limit | sorgu | Sayfa başına kayıt (1–100, varsayılan 25) |
| cursor | sorgu | Önceki yanıttaki nextCursor değeri |
İstek
curl https://odecik.com/api/v1/products \
-H "Authorization: Bearer $ODECIK_API_KEY"Yanıt
Başarılı: 200400 Geçersiz istek401 Geçersiz veya iptal edilmiş API anahtarı403 Anahtarda gerekli yetki (scope) yok404 Kaynak bulunamadı429 Hız sınırı aşıldı
| Alan | Tür | Açıklama |
|---|---|---|
| object | string | |
| hasMore | boolean | |
| nextCursor | string? |
{
"object": "list",
"hasMore": false,
"nextCursor": "string"
}/productsÜrün oluştur
`write` yetkisi gerekir.
Gövde (JSON)
| Alan | Tür | Açıklama |
|---|---|---|
| namezorunlu | string | |
| description | string | |
| typezorunlu | PHYSICAL | DIGITAL | SERVICE | |
| priceKuruszorunlu | integer | |
| compareAtKurus | integer? | |
| imageUrl | string | |
| images | string[] | |
| digitalFileUrl | string | |
| stock | integer? | |
| status | DRAFT | ACTIVE | ARCHIVED | |
| category | string | |
| tags | string[] | |
| sku | string | |
| brand | string | |
| highlights | string[] | |
| weightGrams | integer? | |
| minOrderQty | integer | |
| warrantyMonths | integer? | |
| shippingNote | string | |
| returnPolicy | string |
İstek
curl -X POST https://odecik.com/api/v1/products \
-H "Authorization: Bearer $ODECIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium şablon paketi",
"type": "DIGITAL",
"priceKurus": 14900,
"description": "12 sayfalık UI kit"
}'Yanıt
Başarılı: 201400 Geçersiz istek401 Geçersiz veya iptal edilmiş API anahtarı403 Anahtarda gerekli yetki (scope) yok404 Kaynak bulunamadı429 Hız sınırı aşıldı
| Alan | Tür | Açıklama |
|---|---|---|
| id | string | |
| slug | string | |
| name | string | |
| description | string? | |
| type | PHYSICAL | DIGITAL | SERVICE | |
| status | DRAFT | ACTIVE | ARCHIVED | |
| priceKurus | integer | |
| compareAtKurus | integer? | |
| currency | string | |
| imageUrl | string? | |
| images | string[] | |
| stock | integer? | |
| category | string? | |
| tags | string[] | |
| sku | string? | |
| brand | string? | |
| minOrderQty | integer | |
| url | string | Herkese açık ödeme sayfası |
| variants | object[] | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) |
{
"id": "string",
"slug": "string",
"name": "string",
"description": "string",
"type": "PHYSICAL",
"status": "DRAFT",
"priceKurus": 0,
"compareAtKurus": 0,
"currency": "string",
"imageUrl": "string",
"images": [
"string"
],
"stock": 0,
"category": "string",
"tags": [
"string"
],
"sku": "string",
"brand": "string",
"minOrderQty": 0,
"url": "string",
"variants": [
{
"id": "string",
"name": "string",
"options": {},
"priceKurus": 0,
"stock": 0,
"sku": "string",
"isActive": false
}
],
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}/products/{id}Ürün getir
`id` olarak ürün kimliği veya slug kullanılabilir.
Parametreler
| Ad | Konum | Açıklama |
|---|---|---|
| idzorunlu | yol |
İstek
curl https://odecik.com/api/v1/products/ODC-M2K9X1-A4F2 \
-H "Authorization: Bearer $ODECIK_API_KEY"Yanıt
Başarılı: 200400 Geçersiz istek401 Geçersiz veya iptal edilmiş API anahtarı403 Anahtarda gerekli yetki (scope) yok404 Kaynak bulunamadı429 Hız sınırı aşıldı
| Alan | Tür | Açıklama |
|---|---|---|
| id | string | |
| slug | string | |
| name | string | |
| description | string? | |
| type | PHYSICAL | DIGITAL | SERVICE | |
| status | DRAFT | ACTIVE | ARCHIVED | |
| priceKurus | integer | |
| compareAtKurus | integer? | |
| currency | string | |
| imageUrl | string? | |
| images | string[] | |
| stock | integer? | |
| category | string? | |
| tags | string[] | |
| sku | string? | |
| brand | string? | |
| minOrderQty | integer | |
| url | string | Herkese açık ödeme sayfası |
| variants | object[] | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) |
{
"id": "string",
"slug": "string",
"name": "string",
"description": "string",
"type": "PHYSICAL",
"status": "DRAFT",
"priceKurus": 0,
"compareAtKurus": 0,
"currency": "string",
"imageUrl": "string",
"images": [
"string"
],
"stock": 0,
"category": "string",
"tags": [
"string"
],
"sku": "string",
"brand": "string",
"minOrderQty": 0,
"url": "string",
"variants": [
{
"id": "string",
"name": "string",
"options": {},
"priceKurus": 0,
"stock": 0,
"sku": "string",
"isActive": false
}
],
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}/products/{id}Ürünü güncelle
Kısmi güncelleme — yalnız gönderdiğin alanlar değişir. `write` yetkisi gerekir.
Parametreler
| Ad | Konum | Açıklama |
|---|---|---|
| idzorunlu | yol |
Gövde (JSON)
| Alan | Tür | Açıklama |
|---|---|---|
| namezorunlu | string | |
| description | string | |
| typezorunlu | PHYSICAL | DIGITAL | SERVICE | |
| priceKuruszorunlu | integer | |
| compareAtKurus | integer? | |
| imageUrl | string | |
| images | string[] | |
| digitalFileUrl | string | |
| stock | integer? | |
| status | DRAFT | ACTIVE | ARCHIVED | |
| category | string | |
| tags | string[] | |
| sku | string | |
| brand | string | |
| highlights | string[] | |
| weightGrams | integer? | |
| minOrderQty | integer | |
| warrantyMonths | integer? | |
| shippingNote | string | |
| returnPolicy | string |
İstek
curl -X PATCH https://odecik.com/api/v1/products/ODC-M2K9X1-A4F2 \
-H "Authorization: Bearer $ODECIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"type": "PHYSICAL",
"priceKurus": 0,
"compareAtKurus": 0,
"imageUrl": "string",
"images": [
"string"
],
"digitalFileUrl": "string",
"stock": 0,
"status": "DRAFT",
"category": "string",
"tags": [
"string"
],
"sku": "string",
"brand": "string",
"highlights": [
"string"
],
"weightGrams": 0,
"minOrderQty": 0,
"warrantyMonths": 0,
"shippingNote": "string",
"returnPolicy": "string"
}'Yanıt
Başarılı: 200400 Geçersiz istek401 Geçersiz veya iptal edilmiş API anahtarı403 Anahtarda gerekli yetki (scope) yok404 Kaynak bulunamadı429 Hız sınırı aşıldı
| Alan | Tür | Açıklama |
|---|---|---|
| id | string | |
| slug | string | |
| name | string | |
| description | string? | |
| type | PHYSICAL | DIGITAL | SERVICE | |
| status | DRAFT | ACTIVE | ARCHIVED | |
| priceKurus | integer | |
| compareAtKurus | integer? | |
| currency | string | |
| imageUrl | string? | |
| images | string[] | |
| stock | integer? | |
| category | string? | |
| tags | string[] | |
| sku | string? | |
| brand | string? | |
| minOrderQty | integer | |
| url | string | Herkese açık ödeme sayfası |
| variants | object[] | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) |
{
"id": "string",
"slug": "string",
"name": "string",
"description": "string",
"type": "PHYSICAL",
"status": "DRAFT",
"priceKurus": 0,
"compareAtKurus": 0,
"currency": "string",
"imageUrl": "string",
"images": [
"string"
],
"stock": 0,
"category": "string",
"tags": [
"string"
],
"sku": "string",
"brand": "string",
"minOrderQty": 0,
"url": "string",
"variants": [
{
"id": "string",
"name": "string",
"options": {},
"priceKurus": 0,
"stock": 0,
"sku": "string",
"isActive": false
}
],
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}/products/{id}Ürünü sil
Siparişi olan ürün silinmez, arşivlenir (`archived: true`). `write` yetkisi gerekir.
Parametreler
| Ad | Konum | Açıklama |
|---|---|---|
| idzorunlu | yol |
İstek
curl -X DELETE https://odecik.com/api/v1/products/ODC-M2K9X1-A4F2 \
-H "Authorization: Bearer $ODECIK_API_KEY"Yanıt
Başarılı: 200400 Geçersiz istek401 Geçersiz veya iptal edilmiş API anahtarı403 Anahtarda gerekli yetki (scope) yok404 Kaynak bulunamadı429 Hız sınırı aşıldı
| Alan | Tür | Açıklama |
|---|---|---|
| id | string | |
| deleted | boolean | |
| archived | boolean |
{
"id": "string",
"deleted": false,
"archived": false
}