MENU navbar-image

Genel Bilgilendirme

Sopyo API ile birlikte Sopyo üzerinde size ait tüm verileri işleyebilir, kendi uygulamalarınız ile entegre edebilirsiniz.
Sopyo API modülümüzü her geçen gün geliştiriyoruz, görüşlerinizi bize destek@sopyo.com adresinden iletebilirsiniz.

Bu belge, API'mızla çalışmak için ihtiyaç duyduğunuz tüm bilgileri sağlamayı amaçlamaktadır

Base URL

https://api.sopyo.dev

Giriş İşlemleri

Login

Token Al

API Token üretmek için bu endpoint i kullanabilirsiniz

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"api_token\": [
        \"string 1\"
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/auth/login"
);

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

let body = {
    "api_token": [
        "string 1"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/auth/login',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'api_token' => [
                'string 1',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/auth/login'
payload = {
    "api_token": [
        "string 1"
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, Ok):


{
    "status": true,
    "message": "",
    "user": {
        "id": 1,
        "name": "Sopyo Yazılım",
        "email": "bilgi@sopyo.com"
    },
    "access_token": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwMDAvYXBpL3YyL2F1dGgvbG9naW4iLCJpYXQiOjE2NjcyMzA1NDgsImV4cCI6MTY2NzMxNjk0OCwibmJmIjoxNjY3MjMwNTQ4LCJqdGkiOiJ1OXhWSUw3MnlNWHZiRmZCIiwic3ViIjoiMSIsInBydiI6IjEzZThkMDI4YjM5MWYzYjdiNjNmMjE5MzNkYmFkNDU4ZmYyMTA3MmUifQ._ZL7f6irN8HrsKlQDddwBQccjV1nZViympxj3ML3wq8",
        "expire_in": 1440,
        "type": "bearer"
    }
}
 

Request      

POST api/v2/auth/login

Body Parameters

api_token   string   

API TOKEN bilgisine Sopyo uygulamasında Api Ayarları sayfasından ulaşabilirsiniz. Api Ayarları sayfasını göremiyorsunuz lütfen satış temsilciniz ile görüşünüz.

Response

Response Fields

user   object   

Kullanıcıya ait bilgileri vermektedir.

access_token   object   

API erişimi için kullanacağınız token bilgisini vermektedir.

Katalog Yönetimi

Seçenek Grup Yönetimi

Ürün seçenek grupları ile ilgili tüm işlemleri bu bölümde yapabilirsiniz.

Seçenek Grup Listesi

Kimlik doğrulama gerektirir

Seçenek Grup Listesi

// Örnek filtrelemeler

/variant-group?name[eq]=Renk
Seçenek grub adına göre filtreleme
(like,eq)
/variant-group?name[like]=Hafıza
Seçenek grub adına göre filtreleme
(like,eq)
/variant-group?id[eq]=1
Seçenek grub id"sine filtreleme.
(like,eq,lt,lte,gt,gte)
Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/variant-group" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/variant-group',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        {
            "id": 1,
            "name": "Renk",
            "values": [
                "Beyaz",
                "Kırmızı",
                "Lacivert",
                "Mavi",
                "Pembe",
                "Gri",
                "Siyah",
                "Purple"
            ]
        },
        {
            "id": 2,
            "name": "Beden",
            "values": [
                "L",
                "M",
                "S",
                "XL",
                "36",
                "37",
                "38",
                "39",
                "40",
                "35",
                "41"
            ]
        },
        {
            "id": 9,
            "name": "Hafıza",
            "values": [
                "128GB",
                "256GB"
            ]
        },
        {
            "id": 10,
            "name": "RAM",
            "values": [
                "8GB",
                "4GB",
                "16GB"
            ]
        }
    ],
    "links": {
        "first": "/api/v2/variant-group?page=1",
        "last": "/api/v2/variant-group?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Önceki",
                "active": false
            },
            {
                "url": "/api/v2/variant-group?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Sonraki »",
                "active": false
            }
        ],
        "path": "/api/v2/variant-group",
        "per_page": 100,
        "to": 5,
        "total": 5
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

GET api/v2/variant-group

Response

Response Fields

id   integer   

Grup id'si

name   string   

Grup adı

values   array   

Grup değerleri

Seçenek Grubu Ekle

Kimlik doğrulama gerektirir

Ürün seçenek grubu ekleme işleminizi bu bölümde yapabilirsiniz.

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/variant-group" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Beden\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group"
);

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

let body = {
    "name": "Beden"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/variant-group',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Beden',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group'
payload = {
    "name": "Beden"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Televizyon"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

POST api/v2/variant-group

Body Parameters

name   string   

Grup adı bilgisi.

values   array  optional  

Grup değerleri.

Response

Response Fields

id   integer   

Grup id'si

name   string   

Grup adı

values   array   

Grup değerleri

Seçenek Grubu Göster

Kimlik doğrulama gerektirir

Seçenek grubu kaydı göster

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/variant-group/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/variant-group/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 1,
        "name": "Renk",
        "values": [
            "Beyaz",
            "Kırmızı",
            "Lacivert",
            "Mavi",
            "Pembe",
            "Gri",
            "Siyah",
            "Purple"
        ]
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/variant-group/{id}

URL Parameters

id   integer   

Grup ID

Response

Response Fields

id   integer   

Grup id'si

name   string   

Grup adı

values   array   

Grup değerleri

Seçenek Grubu Güncelle

Kimlik doğrulama gerektirir

Ürün seçenek grubu güncelle

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/variant-group/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Beden\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group/5"
);

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

let body = {
    "name": "Beden"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/variant-group/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Beden',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group/5'
payload = {
    "name": "Beden"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 1,
        "name": "Beden"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

PUT api/v2/variant-group/{id}

URL Parameters

id   integer   

Grup ID

Body Parameters

name   string   

Grup ad bilgisi.

Response

Response Fields

id   integer   

Grup id'si

name   string   

Grup adı

values   array   

Grup değerleri

Seçenek Grubu Sil

Kimlik doğrulama gerektirir

Ürün seçenek grubu kaydı sil

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/variant-group/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/variant-group/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/variant-group/{id}

URL Parameters

id   integer   

Grup ID

Seçenek Değer Listesi

Kimlik doğrulama gerektirir

Seçenek Değer Listesi

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/variant-group/{id}/values?name%5Beq%5D=L&name%5Blike%5D=L&id%5Beq%5D=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group/{id}/values"
);

const params = {
    "name[eq]": "L",
    "name[like]": "L",
    "id[eq]": "1",
};
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());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/variant-group/{id}/values',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'name[eq]'=> 'L',
            'name[like]'=> 'L',
            'id[eq]'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group/{id}/values'
params = {
  'name[eq]': 'L',
  'name[like]': 'L',
  'id[eq]': '1',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        {
            "id": 8,
            "group_id": 2,
            "name": "L"
        },
        {
            "id": 9,
            "group_id": 2,
            "name": "M"
        }
    ],
    "links": {
        "first": "api/v2/variant-group/2/values?page=1",
        "last": "api/v2/variant-group/2/values?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Önceki",
                "active": false
            },
            {
                "url": "api/v2/variant-group/2/values?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Sonraki »",
                "active": false
            }
        ],
        "path": "api/v2/variant-group/2/values",
        "per_page": 100,
        "to": 12,
        "total": 12
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/variant-group/{id}/values

Query Parameters

name[eq]   string  optional  

Değer adına göre getir.

name[like]   string  optional  

Değer adına göre filtreleme.

id[eq]   string  optional  

Diğer filtreleme parametreleri
[eq]Eşit
[lt]Küçük
[lte]Küçük ve Eşit
[gt]Büyük
[gte]Büyük ve Eşit

Response

Response Fields

id   integer   

Değer id'si

group_id   integer   

Değer grup Id si

name   string   

Değer adı

Seçenek Değeri Ekle

Kimlik doğrulama gerektirir

Ürün seçenek değeri ekleme işleminizi bu bölümde yapabilirsiniz.

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/variant-group/{id}/values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Beden\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group/{id}/values"
);

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

let body = {
    "name": "Beden"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/variant-group/{id}/values',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Beden',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group/{id}/values'
payload = {
    "name": "Beden"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 41,
        "group_id": 2,
        "name": "512GB"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

POST api/v2/variant-group/{id}/values

Body Parameters

name   string   

Değer adı bilgisi.

Response

Response Fields

id   integer   

Değer id'si

group_id   string   

Grup Id

name   string   

Değer adı

Seçenek Değeri Göster

Kimlik doğrulama gerektirir

Ürün seçenek değeri işleminizi bu bölümde yapabilirsiniz.

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/variant-group/2/values/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group/2/values/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/variant-group/2/values/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group/2/values/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 41,
        "group_id": 2,
        "name": "512GB"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/variant-group/{id}/values/{value_id}

URL Parameters

id   integer   

Grup ID

value_id   integer   

Değer ID

Response

Response Fields

id   integer   

Değer id'si

group_id   string   

Grup Id

name   string   

Değer adı

Seçenek Değeri Güncelle

Kimlik doğrulama gerektirir

Ürün seçenek değeri güncelleme işleminizi bu bölümde yapabilirsiniz.

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/variant-group/2/values/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Beden\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group/2/values/1"
);

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

let body = {
    "name": "Beden"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/variant-group/2/values/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Beden',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group/2/values/1'
payload = {
    "name": "Beden"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 41,
        "group_id": 2,
        "name": "512GB"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

PUT api/v2/variant-group/{id}/values/{value_id}

URL Parameters

id   integer   

Grup ID

value_id   integer   

Değer ID

Body Parameters

name   string   

Değer adı bilgisi.

Response

Response Fields

id   integer   

Değer id'si

group_id   string   

Grup Id

name   string   

Değer adı

Seçenek Değeri Sil

Kimlik doğrulama gerektirir

Ürün seçenek değeri silme işleminizi bu bölümde yapabilirsiniz.

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/variant-group/2/values/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/variant-group/2/values/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/variant-group/2/values/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/variant-group/2/values/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/variant-group/{id}/values/{value_id}

URL Parameters

id   integer   

Grup ID

value_id   integer   

Değer ID

Ürün Yönetimi

Ürün ile alakalı tüm işlemleri bu alanda yapabilirsiniz

Ürün Listesi

Kimlik doğrulama gerektirir

Ürün Listesi

// Örnek filtrelemeler

/products?sort=asc
Id ile sıralama.
(asc,desc)
/products?title[like]=Çanta
Ürün adına göre filtreleme.
(like,eq)
/products?stock_code[eq]=98
Stok koduna göre filtreleme
(like,eq)
/products?stock[eq]=50
Stok bilgisine göre filtreleme
(like,eq,lt,lte,gt,gte)
/products?barcode[eq]=50
Barkod bilgisine göre filtreleme
(like,eq)
/products?id[eq]=1
Id ile ürün filtreleme.
(like,eq,lt,lte,gt,gte)
/products?brand[eq]=Samsung
Ürün markasına göre filtreleme.
(like,eq)
/products?category[eq]=1
Kategori bilgisine göre filtreleme.
(eq)
/products?tax_rate[eq]=18
KDV bilgisine göre filtreleme.
(like,eq,lt,lte,gt,gte)
/products?source[eq]=sopyo
Kaynak bilgisine göre filtreleme.
(like,eq)
/products?tag[eq]=2
Etiket bilgisine göre filtreleme.
(eq)
Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/products',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        {
            "title": "Varyantsız Ürün Örneği",
            "stock_code": "SPYAPITEST005",
            "stock": 60,
            "category_id": 415750,
            "desi": 5,
            "tax_rate": 8,
            "sub_title": "",
            "barcode": "SPYAPITEST005",
            "brand": "Bot",
            "tag_id": 213,
            "description": "Varyantsız Ürün Örneği",
            "images": [
                "https://app.sopyo.com/public/products/a3150a3c93a90eb882dbecb5e3d7f8f9.jpg",
                "https://app.sopyo.com/public/products/9e15adb60acffcd98af06e02c7241a8a.jpg",
                "https://app.sopyo.com/public/products/516c4c59ab7a0d900f402c9fb07ef96f.jpg"
            ],
            "price1": [
                {
                    "sale_price": 1500,
                    "list_price": 2500
                }
            ]
        }
    ],
    "links": {
        "first": "api/v2/products?page=1",
        "last": "api/v2/products?page=2405",
        "prev": null,
        "next": "api/v2/products?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2405,
        "links": [
            {
                "url": null,
                "label": "« Önceki",
                "active": false
            },
            {
                "url": "api/v2/products?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "api/v2/products?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "api/v2/products?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "api/v2/products?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "api/v2/products?page=5",
                "label": "5",
                "active": false
            },
            {
                "url": "api/v2/products?page=6",
                "label": "6",
                "active": false
            },
            {
                "url": "api/v2/products?page=7",
                "label": "7",
                "active": false
            },
            {
                "url": "api/v2/products?page=8",
                "label": "8",
                "active": false
            },
            {
                "url": "api/v2/products?page=9",
                "label": "9",
                "active": false
            },
            {
                "url": "api/v2/products?page=10",
                "label": "10",
                "active": false
            },
            {
                "url": null,
                "label": "...",
                "active": false
            },
            {
                "url": "api/v2/products?page=2404",
                "label": "2404",
                "active": false
            },
            {
                "url": "api/v2/products?page=2405",
                "label": "2405",
                "active": false
            },
            {
                "url": "api/v2/products?page=2",
                "label": "Sonraki »",
                "active": false
            }
        ],
        "path": "api/v2/products",
        "per_page": 2,
        "to": 2,
        "total": 4810
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

GET api/v2/products

Response

Response Fields

id   integer   

Ürün id'si

title   string   

Ürün adı

sub_title   string   

Ürün alt başlığı

stock   string   

Ürün stok bilgisi

stock_code   string   

Ürün stok kodu bilgisi

barcode   string   

Ürün barkod bilgisi

barcode_2   string   

Ürün ikinci barkod bilgisi

tax_rate   integer   

Ürün KDV oranı bilgisi

currency   string   

Ürün satış para birimi bilgisi

description   string   

Ürün açıklaması

brand   string   

Ürün marka bilgisi

desi   string   

Ürün desi bilgisi

source   string   

Ürünün hangi kaynak üzerinden sisteme eklendiği bilgisini vermektedir

category   object   

Ürünün kategori bilgisini vermektedir

images   array   

Ürün resimlerinin URL adres bilgilerini vermektedir.

variants   array   

Ürün varyantlarını vermektedir.

price_1   object   

Fiyat 1 grubunun fiyat bilgisini vermektedir

price_1.sale_price   decimal   

Fiyat 1 grubunun satış fiyatı bilgisini vermektedir

price_1.list_price   decimal   

Fiyat 1 grubunun liste fiyatı bilgisini vermektedir

price_2   object   

Fiyat 2 grubunun fiyat bilgisini vermektedir

price_2.sale_price   decimal   

Fiyat 2 grubunun satış fiyatı bilgisini vermektedir

price_2.list_price   decimal   

Fiyat 2 grubunun liste fiyatı bilgisini vermektedir

price_3   object   

Fiyat 3 grubunun fiyat bilgisini vermektedir

price_3.sale_price   decimal   

Fiyat 3 grubunun satış fiyatı bilgisini vermektedir

price_3.list_price   decimal   

Fiyat 3 grubunun liste fiyatı bilgisini vermektedir

price_4   object   

Fiyat 4 grubunun fiyat bilgisini vermektedir

price_4.sale_price   decimal   

Fiyat 4 grubunun satış fiyatı bilgisini vermektedir

price_4.list_price   decimal   

Fiyat 4 grubunun liste fiyatı bilgisini vermektedir

price_5   object   

Fiyat 5 grubunun fiyat bilgisini vermektedir

price_5.sale_price   decimal   

Fiyat 5 grubunun satış fiyatı bilgisini vermektedir

price_5.list_price   decimal   

Fiyat 5 grubunun liste fiyatı bilgisini vermektedir

price_6   object   

Fiyat 6 grubunun fiyat bilgisini vermektedir

price_6.sale_price   decimal   

Fiyat 6 grubunun satış fiyatı bilgisini vermektedir

price_6.list_price   decimal   

Fiyat 6 grubunun liste fiyatı bilgisini vermektedir

price_7   object   

Fiyat 7 grubunun fiyat bilgisini vermektedir

price_7.sale_price   decimal   

Fiyat 7 grubunun satış fiyatı bilgisini vermektedir

price_7.list_price   decimal   

Fiyat 7 grubunun liste fiyatı bilgisini vermektedir

price_8   object   

Fiyat 8 grubunun fiyat bilgisini vermektedir

price_8.sale_price   decimal   

Fiyat 8 grubunun satış fiyatı bilgisini vermektedir

price_8.list_price   decimal   

Fiyat 8 grubunun liste fiyatı bilgisini vermektedir

price_9   object   

Fiyat 9 grubunun fiyat bilgisini vermektedir

price_9.sale_price   decimal   

Fiyat 9 grubunun satış fiyatı bilgisini vermektedir

price_9.list_price   decimal   

Fiyat 9 grubunun liste fiyatı bilgisini vermektedir

price_10   object   

Fiyat 10 grubunun fiyat bilgisini vermektedir

price_10.sale_price   decimal   

Fiyat 10 grubunun satış fiyatı bilgisini vermektedir

price_10.list_price   decimal   

Fiyat 10 grubunun liste fiyatı bilgisini vermektedir

Ürün Ekle

Kimlik doğrulama gerektirir

Yeni ürün kaydı oluştur

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Çamaşır Mandalı\",
    \"stock_code\": \"87484554\",
    \"stock\": 45,
    \"category_id\": 25,
    \"desi\": 5,
    \"tax_rate\": 18,
    \"sub_title\": \"Gökkuşağı temalı çamaşır mandalı\",
    \"barcode\": \"5EASDF522\",
    \"barcode_2\": \"5EAEF525\",
    \"brand\": \"YILDIZ\",
    \"description\": \"Gökkuşağı temalı çamaşır mandalları kaliteli malzeme yapısı ile uzun süre kullanılabilir.\",
    \"price1\": [
        {
            \"sale_price\": \"7\",
            \"list_price\": \"3.31\"
        }
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products"
);

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

let body = {
    "title": "Çamaşır Mandalı",
    "stock_code": "87484554",
    "stock": 45,
    "category_id": 25,
    "desi": 5,
    "tax_rate": 18,
    "sub_title": "Gökkuşağı temalı çamaşır mandalı",
    "barcode": "5EASDF522",
    "barcode_2": "5EAEF525",
    "brand": "YILDIZ",
    "description": "Gökkuşağı temalı çamaşır mandalları kaliteli malzeme yapısı ile uzun süre kullanılabilir.",
    "price1": [
        {
            "sale_price": "7",
            "list_price": "3.31"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/products',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'Çamaşır Mandalı',
            'stock_code' => '87484554',
            'stock' => 45,
            'category_id' => 25,
            'desi' => 5.0,
            'tax_rate' => 18.0,
            'sub_title' => 'Gökkuşağı temalı çamaşır mandalı',
            'barcode' => '5EASDF522',
            'barcode_2' => '5EAEF525',
            'brand' => 'YILDIZ',
            'description' => 'Gökkuşağı temalı çamaşır mandalları kaliteli malzeme yapısı ile uzun süre kullanılabilir.',
            'price1' => [
                [
                    'sale_price' => '7',
                    'list_price' => '3.31',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products'
payload = {
    "title": "Çamaşır Mandalı",
    "stock_code": "87484554",
    "stock": 45,
    "category_id": 25,
    "desi": 5,
    "tax_rate": 18,
    "sub_title": "Gökkuşağı temalı çamaşır mandalı",
    "barcode": "5EASDF522",
    "barcode_2": "5EAEF525",
    "brand": "YILDIZ",
    "description": "Gökkuşağı temalı çamaşır mandalları kaliteli malzeme yapısı ile uzun süre kullanılabilir.",
    "price1": [
        {
            "sale_price": "7",
            "list_price": "3.31"
        }
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


[
    {
        "title": "Varyantsız Ürün Örneği",
        "stock_code": "SPYAPITEST005",
        "stock": 60,
        "category_id": 415750,
        "desi": 5,
        "tax_rate": 8,
        "sub_title": "",
        "barcode": "SPYAPITEST005",
        "brand": "Bot",
        "tag_id": 213,
        "description": "Varyantsız Ürün Örneği",
        "images": [
            "https://app.sopyo.com/public/products/a3150a3c93a90eb882dbecb5e3d7f8f9.jpg",
            "https://app.sopyo.com/public/products/9e15adb60acffcd98af06e02c7241a8a.jpg",
            "https://app.sopyo.com/public/products/516c4c59ab7a0d900f402c9fb07ef96f.jpg"
        ],
        "price_1": [
            {
                "sale_price": 1500,
                "list_price": 2500
            }
        ]
    },
    {
        "id": 18248770,
        "title": "Varyantlı Ürün Örneği",
        "sub_title": "",
        "stock": 0,
        "stock_code": "HBCV00002Z3YQM",
        "barcode": "8683323005482",
        "barcode_2": null,
        "tax_rate": 8,
        "currency": "TL",
        "description": "Varyantlı Ürün Örneği",
        "brand": "The North Face",
        "desi": "1",
        "source": "sopyo",
        "tag_id": 453,
        "category": {
            "id": 413616,
            "name": "Bot",
            "status": false
        },
        "images": [
            "https://app.sopyo.com/public/products/a3150a3c93a90eb882dbecb5e3d7f8f9.jpg",
            "https://app.sopyo.com/public/products/9e15adb60acffcd98af06e02c7241a8a.jpg",
            "https://app.sopyo.com/public/products/516c4c59ab7a0d900f402c9fb07ef96f.jpg",
            "https://app.sopyo.com/public/products/ddd0d5d962f4dcf7ad0ac10c713f9fc4.jpg"
        ],
        "variants": [
            {
                "id": 14824969,
                "product_id": 18248770,
                "stock_code": "HBCV00002Z3WEY",
                "stock": 0,
                "barcode": "HBCV00002Z3WEY",
                "option1": {
                    "name": "Ayakkabı Numarası",
                    "value": "40"
                },
                "option2": {
                    "name": "Renk",
                    "value": "Siyah - Sarı"
                },
                "price_1": {
                    "sale_price": 6555,
                    "list_price": null
                },
                "price_2": null,
                "price_3": null,
                "price_4": null,
                "price_5": null,
                "price_6": null,
                "price_7": null,
                "price_8": null,
                "price_9": null,
                "price_10": null
            },
            {
                "id": 14824972,
                "product_id": 18248770,
                "stock_code": "HBCV00002Z3WEZ",
                "stock": 0,
                "barcode": "HBCV00002Z3WEZ",
                "option1": {
                    "name": "Ayakkabı Numarası",
                    "value": "41"
                },
                "option2": {
                    "name": "Renk",
                    "value": "Siyah - Sarı"
                },
                "price_1": {
                    "sale_price": 6555,
                    "list_price": null
                },
                "price_2": null,
                "price_3": null,
                "price_4": null,
                "price_5": null,
                "price_6": null,
                "price_7": null,
                "price_8": null,
                "price_9": null,
                "price_10": null
            },
            {
                "id": 14824975,
                "product_id": 18248770,
                "stock_code": "HBCV00002Z3WF0",
                "stock": 0,
                "barcode": "HBCV00002Z3WF0",
                "option1": {
                    "name": "Ayakkabı Numarası",
                    "value": "42"
                },
                "option2": {
                    "name": "Renk",
                    "value": "Siyah - Sarı"
                },
                "price_1": {
                    "sale_price": 6555,
                    "list_price": null
                },
                "price_2": null,
                "price_3": null,
                "price_4": null,
                "price_5": null,
                "price_6": null,
                "price_7": null,
                "price_8": null,
                "price_9": null,
                "price_10": null
            }
        ]
    }
]
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


"status": false,"message": "Unauthenticated."}
 

Request      

POST api/v2/products

Body Parameters

title   string   

Ürünün adı. Minumum uzunluğu en az 5 karakter olmalıdır. Maksimum uzunluğu en çok 150 karakter olmalıdır.

stock_code   string   

Ürünün stok kodu bilgisi.

stock   integer   

Ürünün stok miktarı bilgisi.

category_id   integer   

Ürün kategori bilgisi. Kategori ID yazmanınız gerekmektedir. .

desi   number   

Ürün desi bilgisi.

tax_rate   number   

Ürün KDV bilgisi. 0, 1, 8, or 18: bu değerlerden bir tanesini girmelisiniz.

sub_title   string  optional  

Ürünün alt başlık bilgisi. Uzunluğu en çok 150 karakter olmalıdır.

barcode   string  optional  

Ürünün barkod bilgisi. Maksimum uzunluğu en çok 100 karakter olmalıdır.

barcode_2   string  optional  

Ürünün 2. barkod bilgisi. Maksimum uzunluğu en çok 100 karakter olmalıdır.

brand   string  optional  

Ürünün marka bilgisi. Maksimum uzunluğu en çok 50 karakter olmalıdır.

description   string  optional  

Ürün açıklaması.

price1   object[]   

Ürün Fiyat 1 Grubu

price1[].sale_price   string   

Fiyat grubu 1 için satış fiyatı.

price[].list_price   string   

Fiyat grubu 1 için liste fiyatı.

price2   array  optional  

price[].sale_price   string   

Fiyat grubu 2 için satış fiyatı.

price3   array  optional  

price3[].sale_price   string   

Fiyat grubu 3 için satış fiyatı.

price3[].list_price   string  optional  

Fiyat grubu 3 için liste fiyatı.

price4   array  optional  

price4[].sale_price   string   

Fiyat grubu 4 için satış fiyatı.

price4[].list_price   string  optional  

Fiyat grubu 4 için liste fiyatı.

price5   array  optional  

price5[].sale_price   string   

Fiyat grubu 5 için satış fiyatı.

price5[].list_price   string  optional  

Fiyat grubu 5 için liste fiyatı.

price6   array  optional  

price6[].sale_price   string   

Fiyat grubu 6 için satış fiyatı.

price6[].list_price   string  optional  

Fiyat grubu 6 için liste fiyatı.

price7   array  optional  

price7[].sale_price   string   

Fiyat grubu 7 için satış fiyatı.

price7[].list_price   string  optional  

Fiyat grubu 7 için liste fiyatı.

price8   array  optional  

price8[].sale_price   string   

Fiyat grubu 8 için satış fiyatı.

price8[].list_price   string  optional  

Fiyat grubu 8 için liste fiyatı.

price9   array  optional  

price9[].sale_price   string   

Fiyat grubu 9 için satış fiyatı.

price9[].list_price   string  optional  

Fiyat grubu 9 için liste fiyatı.

price10   array  optional  

price10[].sale_price   string   

Fiyat grubu 10 için satış fiyatı.

price10[].list_price   string  optional  

Fiyat grubu 10 için liste fiyatı.

variants   array  optional  

variants[].stock_code   string   

Varyant stok kodu gönderiniz.

variants[].barcode   string   

Varyant barkod no gönderiniz.

variants[].stock   integer   

Varyant stok bilgisi gönderiniz.

variants[].values   array  optional  

variants[].values[].name   string   

Varyant seçenek adı bilgisi gönderiniz.

variants[].values[].value   string   

Varyant seçenek değer bilgisi gönderiniz.

variants[].price1   array  optional  

variants[].price1[].sale_price   string   

Fiyat grubu 1 için satış fiyatı.

variants[].price   object  optional  

variants[].price[].list_price   string  optional  

Fiyat grubu 1 için liste fiyatı.

variants[].price2   array  optional  

variants[].price2   object  optional  

variants[].price2[].sale_price   string   

Fiyat grubu 2 için satış fiyatı.

variants[].price2[].list_price   string  optional  

Fiyat grubu 2 için liste fiyatı.

variants[].price3   array  optional  

variants[].price3[].sale_price   string   

Fiyat grubu 3 için satış fiyatı.

variants[].price3[].list_price   string  optional  

Fiyat grubu 3 için liste fiyatı.

variants[].price4   array  optional  

variants[].price4[].sale_price   string   

Fiyat grubu 4 için satış fiyatı.

variants[].price4[].list_price   string  optional  

Fiyat grubu 4 için liste fiyatı.

variants[].price5   array  optional  

variants[].price5[].sale_price   string   

Fiyat grubu 5 için satış fiyatı.

variants[].price5[].list_price   string  optional  

Fiyat grubu 5 için liste fiyatı.

variants[].price6   array  optional  

variants[].price6[].sale_price   string   

Fiyat grubu 6 için satış fiyatı.

variants[].price6[].list_price   string  optional  

Fiyat grubu 6 için liste fiyatı.

variants[].price7   array  optional  

variants[].price7[].sale_price   string   

Fiyat grubu 7 için satış fiyatı.

variants[].price7[].list_price   string  optional  

Fiyat grubu 7 için liste fiyatı.

variants[].price8   array  optional  

variants[].price8   object  optional  

variants[].price8[].sale_price   string   

Fiyat grubu 8 için satış fiyatı.

variants[].price8[].list_price   string  optional  

Fiyat grubu 8 için liste fiyatı.

variants[].price9   array  optional  

variants[].price9[].sale_price   string   

Fiyat grubu 9 için satış fiyatı.

variants[].price9[].list_price   string  optional  

Fiyat grubu 9 için liste fiyatı.

variants[].price10   array  optional  

variants[].price10[].sale_price   string   

Fiyat grubu 10 için satış fiyatı.

variants[].price10[].list_price   string  optional  

Fiyat grubu 10 için liste fiyatı.

price   object  optional  

price[].list_price   string  optional  

Fiyat grubu 2 için liste fiyatı.

Response

Response Fields

id   integer   

Ürün id'si

title   string   

Ürün adı

sub_title   string   

Ürün alt başlığı

stock   string   

Ürün stok bilgisi

stock_code   string   

Ürün stok kodu bilgisi

barcode   string   

Ürün barkod bilgisi

barcode_2   string   

Ürün ikinci barkod bilgisi

tax_rate   integer   

Ürün KDV oranı bilgisi

currency   string   

Ürün satış para birimi bilgisi

description   string   

Ürün açıklaması

brand   string   

Ürün marka bilgisi

desi   string   

Ürün desi bilgisi

source   string   

Ürünün hangi kaynak üzerinden sisteme eklendiği bilgisini vermektedir

category   object   

Ürünün kategori bilgisini vermektedir

images   array   

Ürün resimlerinin URL adres bilgilerini vermektedir.

variants   array   

Ürün varyantlarını vermektedir.

price_1   object   

Fiyat 1 grubunun fiyat bilgisini vermektedir

price_1.sale_price   decimal   

Fiyat 1 grubunun satış fiyatı bilgisini vermektedir

price_1.list_price   decimal   

Fiyat 1 grubunun liste fiyatı bilgisini vermektedir

price_2   object   

Fiyat 2 grubunun fiyat bilgisini vermektedir

price_2.sale_price   decimal   

Fiyat 2 grubunun satış fiyatı bilgisini vermektedir

price_2.list_price   decimal   

Fiyat 2 grubunun liste fiyatı bilgisini vermektedir

price_3   object   

Fiyat 3 grubunun fiyat bilgisini vermektedir

price_3.sale_price   decimal   

Fiyat 3 grubunun satış fiyatı bilgisini vermektedir

price_3.list_price   decimal   

Fiyat 3 grubunun liste fiyatı bilgisini vermektedir

price_4   object   

Fiyat 4 grubunun fiyat bilgisini vermektedir

price_4.sale_price   decimal   

Fiyat 4 grubunun satış fiyatı bilgisini vermektedir

price_4.list_price   decimal   

Fiyat 4 grubunun liste fiyatı bilgisini vermektedir

price_5   object   

Fiyat 5 grubunun fiyat bilgisini vermektedir

price_5.sale_price   decimal   

Fiyat 5 grubunun satış fiyatı bilgisini vermektedir

price_5.list_price   decimal   

Fiyat 5 grubunun liste fiyatı bilgisini vermektedir

price_6   object   

Fiyat 6 grubunun fiyat bilgisini vermektedir

price_6.sale_price   decimal   

Fiyat 6 grubunun satış fiyatı bilgisini vermektedir

price_6.list_price   decimal   

Fiyat 6 grubunun liste fiyatı bilgisini vermektedir

price_7   object   

Fiyat 7 grubunun fiyat bilgisini vermektedir

price_7.sale_price   decimal   

Fiyat 7 grubunun satış fiyatı bilgisini vermektedir

price_7.list_price   decimal   

Fiyat 7 grubunun liste fiyatı bilgisini vermektedir

price_8   object   

Fiyat 8 grubunun fiyat bilgisini vermektedir

price_8.sale_price   decimal   

Fiyat 8 grubunun satış fiyatı bilgisini vermektedir

price_8.list_price   decimal   

Fiyat 8 grubunun liste fiyatı bilgisini vermektedir

price_9   object   

Fiyat 9 grubunun fiyat bilgisini vermektedir

price_9.sale_price   decimal   

Fiyat 9 grubunun satış fiyatı bilgisini vermektedir

price_9.list_price   decimal   

Fiyat 9 grubunun liste fiyatı bilgisini vermektedir

price_10   object   

Fiyat 10 grubunun fiyat bilgisini vermektedir

price_10.sale_price   decimal   

Fiyat 10 grubunun satış fiyatı bilgisini vermektedir

price_10.list_price   decimal   

Fiyat 10 grubunun liste fiyatı bilgisini vermektedir

Ürün Göster

Kimlik doğrulama gerektirir

Ürün Kaydı Göster

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/products/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/5"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/products/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "id": 18248770,
    "title": "Varyantlı Ürün Örneği",
    "sub_title": "",
    "stock": 0,
    "stock_code": "HBCV00002Z3YQM",
    "barcode": "8683323005482",
    "barcode_2": null,
    "tax_rate": 8,
    "currency": "TL",
    "description": "Varyantlı Ürün Örneği",
    "brand": "The North Face",
    "desi": "1",
    "source": "sopyo",
    "tag_id": 453,
    "category": {
        "id": 413616,
        "name": "Bot",
        "status": false
    },
    "images": [
        "https://app.sopyo.com/public/products/a3150a3c93a90eb882dbecb5e3d7f8f9.jpg",
        "https://app.sopyo.com/public/products/9e15adb60acffcd98af06e02c7241a8a.jpg",
        "https://app.sopyo.com/public/products/516c4c59ab7a0d900f402c9fb07ef96f.jpg",
        "https://app.sopyo.com/public/products/ddd0d5d962f4dcf7ad0ac10c713f9fc4.jpg"
    ],
    "variants": [
        {
            "id": 14824969,
            "product_id": 18248770,
            "stock_code": "HBCV00002Z3WEY",
            "stock": 0,
            "barcode": "HBCV00002Z3WEY",
            "option1": {
                "name": "Ayakkabı Numarası",
                "value": "40"
            },
            "option2": {
                "name": "Renk",
                "value": "Siyah - Sarı"
            },
            "price_1": {
                "sale_price": 6555,
                "list_price": null
            },
            "price_2": null,
            "price_3": null,
            "price_4": null,
            "price_5": null,
            "price_6": null,
            "price_7": null,
            "price_8": null,
            "price_9": null,
            "price_10": null
        },
        {
            "id": 14824972,
            "product_id": 18248770,
            "stock_code": "HBCV00002Z3WEZ",
            "stock": 0,
            "barcode": "HBCV00002Z3WEZ",
            "option1": {
                "name": "Ayakkabı Numarası",
                "value": "41"
            },
            "option2": {
                "name": "Renk",
                "value": "Siyah - Sarı"
            },
            "price_1": {
                "sale_price": 6555,
                "list_price": null
            },
            "price_2": null,
            "price_3": null,
            "price_4": null,
            "price_5": null,
            "price_6": null,
            "price_7": null,
            "price_8": null,
            "price_9": null,
            "price_10": null
        },
        {
            "id": 14824975,
            "product_id": 18248770,
            "stock_code": "HBCV00002Z3WF0",
            "stock": 0,
            "barcode": "HBCV00002Z3WF0",
            "option1": {
                "name": "Ayakkabı Numarası",
                "value": "42"
            },
            "option2": {
                "name": "Renk",
                "value": "Siyah - Sarı"
            },
            "price_1": {
                "sale_price": 6555,
                "list_price": null
            },
            "price_2": null,
            "price_3": null,
            "price_4": null,
            "price_5": null,
            "price_6": null,
            "price_7": null,
            "price_8": null,
            "price_9": null,
            "price_10": null
        }
    ]
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/products/{id}

URL Parameters

id   integer   

Ürün ID

Response

Response Fields

id   integer   

Ürün id'si

title   string   

Ürün adı

sub_title   string   

Ürün alt başlığı

stock   string   

Ürün stok bilgisi

stock_code   string   

Ürün stok kodu bilgisi

barcode   string   

Ürün barkod bilgisi

barcode_2   string   

Ürün ikinci barkod bilgisi

tax_rate   integer   

Ürün KDV oranı bilgisi

currency   string   

Ürün satış para birimi bilgisi

description   string   

Ürün açıklaması

brand   string   

Ürün marka bilgisi

desi   string   

Ürün desi bilgisi

source   string   

Ürünün hangi kaynak üzerinden sisteme eklendiği bilgisini vermektedir

category   object   

Ürünün kategori bilgisini vermektedir

images   array   

Ürün resimlerinin URL adres bilgilerini vermektedir.

variants   array   

Ürün varyantlarını vermektedir.

price_1   object   

Fiyat 1 grubunun fiyat bilgisini vermektedir

price_1.sale_price   decimal   

Fiyat 1 grubunun satış fiyatı bilgisini vermektedir

price_1.list_price   decimal   

Fiyat 1 grubunun liste fiyatı bilgisini vermektedir

price_2   object   

Fiyat 2 grubunun fiyat bilgisini vermektedir

price_2.sale_price   decimal   

Fiyat 2 grubunun satış fiyatı bilgisini vermektedir

price_2.list_price   decimal   

Fiyat 2 grubunun liste fiyatı bilgisini vermektedir

price_3   object   

Fiyat 3 grubunun fiyat bilgisini vermektedir

price_3.sale_price   decimal   

Fiyat 3 grubunun satış fiyatı bilgisini vermektedir

price_3.list_price   decimal   

Fiyat 3 grubunun liste fiyatı bilgisini vermektedir

price_4   object   

Fiyat 4 grubunun fiyat bilgisini vermektedir

price_4.sale_price   decimal   

Fiyat 4 grubunun satış fiyatı bilgisini vermektedir

price_4.list_price   decimal   

Fiyat 4 grubunun liste fiyatı bilgisini vermektedir

price_5   object   

Fiyat 5 grubunun fiyat bilgisini vermektedir

price_5.sale_price   decimal   

Fiyat 5 grubunun satış fiyatı bilgisini vermektedir

price_5.list_price   decimal   

Fiyat 5 grubunun liste fiyatı bilgisini vermektedir

price_6   object   

Fiyat 6 grubunun fiyat bilgisini vermektedir

price_6.sale_price   decimal   

Fiyat 6 grubunun satış fiyatı bilgisini vermektedir

price_6.list_price   decimal   

Fiyat 6 grubunun liste fiyatı bilgisini vermektedir

price_7   object   

Fiyat 7 grubunun fiyat bilgisini vermektedir

price_7.sale_price   decimal   

Fiyat 7 grubunun satış fiyatı bilgisini vermektedir

price_7.list_price   decimal   

Fiyat 7 grubunun liste fiyatı bilgisini vermektedir

price_8   object   

Fiyat 8 grubunun fiyat bilgisini vermektedir

price_8.sale_price   decimal   

Fiyat 8 grubunun satış fiyatı bilgisini vermektedir

price_8.list_price   decimal   

Fiyat 8 grubunun liste fiyatı bilgisini vermektedir

price_9   object   

Fiyat 9 grubunun fiyat bilgisini vermektedir

price_9.sale_price   decimal   

Fiyat 9 grubunun satış fiyatı bilgisini vermektedir

price_9.list_price   decimal   

Fiyat 9 grubunun liste fiyatı bilgisini vermektedir

price_10   object   

Fiyat 10 grubunun fiyat bilgisini vermektedir

price_10.sale_price   decimal   

Fiyat 10 grubunun satış fiyatı bilgisini vermektedir

price_10.list_price   decimal   

Fiyat 10 grubunun liste fiyatı bilgisini vermektedir

Ürün Güncelle

Kimlik doğrulama gerektirir

Ürün Kaydı Güncelle

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/products/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Çamaşır Mandalı\",
    \"stock_code\": \"87484554\",
    \"stock\": 45,
    \"category_id\": 25,
    \"desi\": 5,
    \"tax_rate\": 18,
    \"sub_title\": \"Gökkuşağı temalı çamaşır mandalı\",
    \"barcode\": \"5EASDF522\",
    \"barcode_2\": \"5EAEF525\",
    \"brand\": \"YILDIZ\",
    \"description\": \"Gökkuşağı temalı çamaşır mandalları kaliteli malzeme yapısı ile uzun süre kullanılabilir.\",
    \"images\": [
        \"https:\\/\\/app.sopyo.com\\/public\\/2021\\/11\\/MANDAL-GOKKUSAGI-1.jpg\",
        \"https:\\/\\/app.sopyo.com\\/public\\/2021\\/11\\/MANDAL-GOKKUSAGI-1.jpg\"
    ],
    \"price1\": [
        {
            \"sale_price\": \"7913.34\",
            \"list_price\": \"19.7\"
        }
    ],
    \"price2\": [
        {
            \"sale_price\": \"779429\",
            \"list_price\": \"1\"
        }
    ],
    \"price3\": [
        {
            \"sale_price\": \"4\",
            \"list_price\": \"4\"
        }
    ],
    \"price4\": [
        {
            \"sale_price\": \"2\",
            \"list_price\": \"00\"
        }
    ],
    \"price5\": [
        {
            \"sale_price\": \"493\"
        }
    ],
    \"price6\": [
        {
            \"list_price\": \"994721.68\"
        }
    ],
    \"price7\": [
        {
            \"sale_price\": \"029714.4\",
            \"list_price\": \"77\"
        }
    ],
    \"price8\": [
        {
            \"sale_price\": \"111\",
            \"list_price\": \"0.15\"
        }
    ],
    \"price9\": [
        {
            \"sale_price\": \"893.54\",
            \"list_price\": \"3\"
        }
    ],
    \"price10\": [
        {
            \"sale_price\": \"3628\",
            \"list_price\": \"73182.05\"
        }
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/5"
);

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

let body = {
    "title": "Çamaşır Mandalı",
    "stock_code": "87484554",
    "stock": 45,
    "category_id": 25,
    "desi": 5,
    "tax_rate": 18,
    "sub_title": "Gökkuşağı temalı çamaşır mandalı",
    "barcode": "5EASDF522",
    "barcode_2": "5EAEF525",
    "brand": "YILDIZ",
    "description": "Gökkuşağı temalı çamaşır mandalları kaliteli malzeme yapısı ile uzun süre kullanılabilir.",
    "images": [
        "https:\/\/app.sopyo.com\/public\/2021\/11\/MANDAL-GOKKUSAGI-1.jpg",
        "https:\/\/app.sopyo.com\/public\/2021\/11\/MANDAL-GOKKUSAGI-1.jpg"
    ],
    "price1": [
        {
            "sale_price": "7913.34",
            "list_price": "19.7"
        }
    ],
    "price2": [
        {
            "sale_price": "779429",
            "list_price": "1"
        }
    ],
    "price3": [
        {
            "sale_price": "4",
            "list_price": "4"
        }
    ],
    "price4": [
        {
            "sale_price": "2",
            "list_price": "00"
        }
    ],
    "price5": [
        {
            "sale_price": "493"
        }
    ],
    "price6": [
        {
            "list_price": "994721.68"
        }
    ],
    "price7": [
        {
            "sale_price": "029714.4",
            "list_price": "77"
        }
    ],
    "price8": [
        {
            "sale_price": "111",
            "list_price": "0.15"
        }
    ],
    "price9": [
        {
            "sale_price": "893.54",
            "list_price": "3"
        }
    ],
    "price10": [
        {
            "sale_price": "3628",
            "list_price": "73182.05"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/products/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'Çamaşır Mandalı',
            'stock_code' => '87484554',
            'stock' => 45,
            'category_id' => 25,
            'desi' => 5.0,
            'tax_rate' => 18.0,
            'sub_title' => 'Gökkuşağı temalı çamaşır mandalı',
            'barcode' => '5EASDF522',
            'barcode_2' => '5EAEF525',
            'brand' => 'YILDIZ',
            'description' => 'Gökkuşağı temalı çamaşır mandalları kaliteli malzeme yapısı ile uzun süre kullanılabilir.',
            'images' => [
                'https://app.sopyo.com/public/2021/11/MANDAL-GOKKUSAGI-1.jpg',
                'https://app.sopyo.com/public/2021/11/MANDAL-GOKKUSAGI-1.jpg',
            ],
            'price1' => [
                [
                    'sale_price' => '7913.34',
                    'list_price' => '19.7',
                ],
            ],
            'price2' => [
                [
                    'sale_price' => '779429',
                    'list_price' => '1',
                ],
            ],
            'price3' => [
                [
                    'sale_price' => '4',
                    'list_price' => '4',
                ],
            ],
            'price4' => [
                [
                    'sale_price' => '2',
                    'list_price' => '00',
                ],
            ],
            'price5' => [
                [
                    'sale_price' => '493',
                ],
            ],
            'price6' => [
                [
                    'list_price' => '994721.68',
                ],
            ],
            'price7' => [
                [
                    'sale_price' => '029714.4',
                    'list_price' => '77',
                ],
            ],
            'price8' => [
                [
                    'sale_price' => '111',
                    'list_price' => '0.15',
                ],
            ],
            'price9' => [
                [
                    'sale_price' => '893.54',
                    'list_price' => '3',
                ],
            ],
            'price10' => [
                [
                    'sale_price' => '3628',
                    'list_price' => '73182.05',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/5'
payload = {
    "title": "Çamaşır Mandalı",
    "stock_code": "87484554",
    "stock": 45,
    "category_id": 25,
    "desi": 5,
    "tax_rate": 18,
    "sub_title": "Gökkuşağı temalı çamaşır mandalı",
    "barcode": "5EASDF522",
    "barcode_2": "5EAEF525",
    "brand": "YILDIZ",
    "description": "Gökkuşağı temalı çamaşır mandalları kaliteli malzeme yapısı ile uzun süre kullanılabilir.",
    "images": [
        "https:\/\/app.sopyo.com\/public\/2021\/11\/MANDAL-GOKKUSAGI-1.jpg",
        "https:\/\/app.sopyo.com\/public\/2021\/11\/MANDAL-GOKKUSAGI-1.jpg"
    ],
    "price1": [
        {
            "sale_price": "7913.34",
            "list_price": "19.7"
        }
    ],
    "price2": [
        {
            "sale_price": "779429",
            "list_price": "1"
        }
    ],
    "price3": [
        {
            "sale_price": "4",
            "list_price": "4"
        }
    ],
    "price4": [
        {
            "sale_price": "2",
            "list_price": "00"
        }
    ],
    "price5": [
        {
            "sale_price": "493"
        }
    ],
    "price6": [
        {
            "list_price": "994721.68"
        }
    ],
    "price7": [
        {
            "sale_price": "029714.4",
            "list_price": "77"
        }
    ],
    "price8": [
        {
            "sale_price": "111",
            "list_price": "0.15"
        }
    ],
    "price9": [
        {
            "sale_price": "893.54",
            "list_price": "3"
        }
    ],
    "price10": [
        {
            "sale_price": "3628",
            "list_price": "73182.05"
        }
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "id": 1,
    "title": "Sırt Çantası",
    "sub_title": null,
    "stock": 50,
    "stock_code": "SPE80693",
    "barcode": "1234556",
    "barcode_2": null,
    "tax_rate": 18,
    "currency": "TL",
    "description": "",
    "brand": "Sopyo",
    "desi": "1",
    "source": "ankasync",
    "price_1": {
        "sale_price": 681.08,
        "list_price": 690.08
    },
    "price_2": null,
    "price_3": null,
    "price_4": null,
    "price_5": null,
    "price_6": null,
    "price_7": null,
    "price_8": null,
    "price_9": null,
    "price_10": null,
    "category": {
        "id": 1,
        "name": "Çanta",
        "status": false
    },
    "images": [
        "https://www.app.sopyo.com/images/urunler/sirt-can-5253_1.jpg"
    ],
    "variants": []
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


"status": false,"message": "Unauthenticated."}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

PUT api/v2/products/{id}

PATCH api/v2/products/{id}

URL Parameters

id   integer   

Ürün ID

Body Parameters

title   string  optional  

Ürünün adı. Minumum uzunluğu en az 5 karakter olmalıdır. Maksimum uzunluğu en çok 150 karakter olmalıdır.

stock_code   string  optional  

Ürünün stok kodu bilgisi. Maksimum uzunluğu en çok 150 karakter olmalıdır.

stock   integer  optional  

Ürünün stok miktarı bilgisi.

category_id   integer  optional  

Ürün kategori bilgisi. Kategori id yazmanınız gerekmektedir. .

desi   number  optional  

Ürün desi bilgisi.

tax_rate   number  optional  

Ürün KDV bilgisi. 0, 1, 8, or 18 bu değerlerden herhangi biri olmalıdır.

sub_title   string  optional  

Ürünün alt başlık bilgisi. Maksimum uzunluğu en çok 150 karakter olmalıdır.

barcode   string  optional  

Ürünün barkod bilgisi. Maksimum uzunluğu en çok 100 karakter olmalıdır.

barcode_2   string  optional  

Ürünün 2. barkod bilgisi. Maksimum uzunluğu en çok 100 karakter olmalıdır.

brand   string  optional  

Ürünün marka bilgisi. Maksimum uzunluğu en çok 50 karakter olmalıdır.

description   string  optional  

Ürün açıklaması.

images   string[]  optional  

Ürün resimleri için URL olarak göndeririniz. Geçerli bir URL olmalıdır.

price1   object[]  optional  

Fiyat 1 Grubu

price1[].sale_price   string   

Fiyat grubu 1 için satış fiyatı.

price1[].list_price   string   

Fiyat grubu 1 için liste fiyatı.

price2   object[]  optional  

price2[].sale_price   string   

Fiyat grubu 2 için satış fiyatı.

price2[].list_price   string  optional  

Fiyat grubu 2 için liste fiyatı.

price3   object[]  optional  

price3[].sale_price   string   

Fiyat grubu 3 için satış fiyatı.

price3[].list_price   string  optional  

Fiyat grubu 3 için liste fiyatı.

price4   object[]  optional  

price4[].sale_price   string   

Fiyat grubu 4 için satış fiyatı.

price4[].list_price   string  optional  

Fiyat grubu 4 için liste fiyatı.

price5   object[]  optional  

price5[].sale_price   string   

Fiyat grubu 5 için satış fiyatı.

price6   object[]  optional  

price6[].list_price   string  optional  

Fiyat grubu 6 için liste fiyatı.

price7   object[]  optional  

price7[].sale_price   string   

Fiyat grubu 7 için satış fiyatı.

price7[].list_price   string  optional  

Fiyat grubu 7 için liste fiyatı.

price8   object[]  optional  

price8[].sale_price   string   

Fiyat grubu 8 için satış fiyatı.

price8[].list_price   string  optional  

Fiyat grubu 8 için liste fiyatı.

price9   object[]  optional  

price9[].sale_price   string   

Fiyat grubu 9 için satış fiyatı.

price9[].list_price   string  optional  

Fiyat grubu 9 için liste fiyatı.

price10   object[]  optional  

price10[].sale_price   string   

Fiyat grubu 10 için satış fiyatı.

price10[].list_price   string  optional  

Fiyat grubu 10 için liste fiyatı.

price_5   object  optional  

price5[].list_price   string  optional  

Fiyat grubu 5 için liste fiyatı.

price_6   object  optional  

price6[].sale_price   string   

Fiyat grubu 6 için satış fiyatı.

Response

Response Fields

id   integer   

Ürün id'si

title   string   

Ürün adı

sub_title   string   

Ürün alt başlığı

stock   string   

Ürün stok bilgisi

stock_code   string   

Ürün stok kodu bilgisi

barcode   string   

Ürün barkod bilgisi

barcode_2   string   

Ürün ikinci barkod bilgisi

tax_rate   integer   

Ürün KDV oranı bilgisi

currency   string   

Ürün satış para birimi bilgisi

description   string   

Ürün açıklaması

brand   string   

Ürün marka bilgisi

desi   string   

Ürün desi bilgisi

source   string   

Ürünün hangi kaynak üzerinden sisteme eklendiği bilgisini vermektedir

category   object   

Ürünün kategori bilgisini vermektedir

images   array   

Ürün resimlerinin URL adres bilgilerini vermektedir.

variants   array   

Ürün varyantlarını vermektedir.

price_1   object   

Fiyat 1 grubunun fiyat bilgisini vermektedir

price_1.sale_price   decimal   

Fiyat 1 grubunun satış fiyatı bilgisini vermektedir

price_1.list_price   decimal   

Fiyat 1 grubunun liste fiyatı bilgisini vermektedir

price_2   object   

Fiyat 2 grubunun fiyat bilgisini vermektedir

price_2.sale_price   decimal   

Fiyat 2 grubunun satış fiyatı bilgisini vermektedir

price_2.list_price   decimal   

Fiyat 2 grubunun liste fiyatı bilgisini vermektedir

price_3   object   

Fiyat 3 grubunun fiyat bilgisini vermektedir

price_3.sale_price   decimal   

Fiyat 3 grubunun satış fiyatı bilgisini vermektedir

price_3.list_price   decimal   

Fiyat 3 grubunun liste fiyatı bilgisini vermektedir

price_4   object   

Fiyat 4 grubunun fiyat bilgisini vermektedir

price_4.sale_price   decimal   

Fiyat 4 grubunun satış fiyatı bilgisini vermektedir

price_4.list_price   decimal   

Fiyat 4 grubunun liste fiyatı bilgisini vermektedir

price_5   object   

Fiyat 5 grubunun fiyat bilgisini vermektedir

price_5.sale_price   decimal   

Fiyat 5 grubunun satış fiyatı bilgisini vermektedir

price_5.list_price   decimal   

Fiyat 5 grubunun liste fiyatı bilgisini vermektedir

price_6   object   

Fiyat 6 grubunun fiyat bilgisini vermektedir

price_6.sale_price   decimal   

Fiyat 6 grubunun satış fiyatı bilgisini vermektedir

price_6.list_price   decimal   

Fiyat 6 grubunun liste fiyatı bilgisini vermektedir

price_7   object   

Fiyat 7 grubunun fiyat bilgisini vermektedir

price_7.sale_price   decimal   

Fiyat 7 grubunun satış fiyatı bilgisini vermektedir

price_7.list_price   decimal   

Fiyat 7 grubunun liste fiyatı bilgisini vermektedir

price_8   object   

Fiyat 8 grubunun fiyat bilgisini vermektedir

price_8.sale_price   decimal   

Fiyat 8 grubunun satış fiyatı bilgisini vermektedir

price_8.list_price   decimal   

Fiyat 8 grubunun liste fiyatı bilgisini vermektedir

price_9   object   

Fiyat 9 grubunun fiyat bilgisini vermektedir

price_9.sale_price   decimal   

Fiyat 9 grubunun satış fiyatı bilgisini vermektedir

price_9.list_price   decimal   

Fiyat 9 grubunun liste fiyatı bilgisini vermektedir

price_10   object   

Fiyat 10 grubunun fiyat bilgisini vermektedir

price_10.sale_price   decimal   

Fiyat 10 grubunun satış fiyatı bilgisini vermektedir

price_10.list_price   decimal   

Fiyat 10 grubunun liste fiyatı bilgisini vermektedir

Ürün Sil

Kimlik doğrulama gerektirir

Ürün Kaydı Sil

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/products/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/5"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/products/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/products/{id}

URL Parameters

id   integer   

Ürün ID

Ürün Seçenek Listesi (Varyant)

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/products/1/variants" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/1/variants"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/products/1/variants',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/1/variants'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        {
            "id": 21,
            "product_id": 2,
            "stock_code": "hgfkzm1-1063-020beyazl",
            "stock": 50,
            "barcode": "",
            "option1": {
                "name": "Renk",
                "value": "Beyaz"
            },
            "option2": {
                "name": "Beden",
                "value": "L"
            },
            "price_1": {
                "sale_price": 0,
                "list_price": 0
            },
            "price_2": null,
            "price_3": null,
            "price_4": null,
            "price_5": null,
            "price_6": null,
            "price_7": null,
            "price_8": null,
            "price_9": null,
            "price_10": null
        }
    ],
    "links": {
        "first": "/api/v2/products/2/variants?page=1",
        "last": "/api/v2/products/2/variants?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Önceki",
                "active": false
            },
            {
                "url": "/api/v2/products/2/variants?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Sonraki »",
                "active": false
            }
        ],
        "path": "/api/v2/products/2/variants",
        "per_page": 100,
        "to": 3,
        "total": 3
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/products/{id}/variants

URL Parameters

id   integer   

Ürün Id

Response

Response Fields

id   integer   

Varyant id'si

product_id   integer   

Ürün id'si

stock_code   string   

Varyant stok kodu bilgisi

stock   number   

Varyant stok bilgisi

barcode   string   

Varyant barkod bilgisi

option1   object   

Varyant seçenek bilgisi

option1.name   string   

Varyant seçenek adı

option1.value   string   

Varyant seçenek değeri

option2   object   

Varyant seçenek bilgisi

option2.name   string   

Varyant seçenek adı

option2.value   string   

Varyant seçenek değeri

price_1   object   

Fiyat 1 grubunun fiyat bilgisini vermektedir

price_1.sale_price   decimal   

Fiyat 1 grubunun satış fiyatı bilgisini vermektedir

price_1.list_price   decimal   

Fiyat 1 grubunun liste fiyatı bilgisini vermektedir

price_2   object   

Fiyat 2 grubunun fiyat bilgisini vermektedir

price_2.sale_price   decimal   

Fiyat 2 grubunun satış fiyatı bilgisini vermektedir

price_2.list_price   decimal   

Fiyat 2 grubunun liste fiyatı bilgisini vermektedir

price_3   object   

Fiyat 3 grubunun fiyat bilgisini vermektedir

price_3.sale_price   decimal   

Fiyat 3 grubunun satış fiyatı bilgisini vermektedir

price_3.list_price   decimal   

Fiyat 3 grubunun liste fiyatı bilgisini vermektedir

price_4   object   

Fiyat 4 grubunun fiyat bilgisini vermektedir

price_4.sale_price   decimal   

Fiyat 4 grubunun satış fiyatı bilgisini vermektedir

price_4.list_price   decimal   

Fiyat 4 grubunun liste fiyatı bilgisini vermektedir

price_5   object   

Fiyat 5 grubunun fiyat bilgisini vermektedir

price_5.sale_price   decimal   

Fiyat 5 grubunun satış fiyatı bilgisini vermektedir

price_5.list_price   decimal   

Fiyat 5 grubunun liste fiyatı bilgisini vermektedir

price_6   object   

Fiyat 6 grubunun fiyat bilgisini vermektedir

price_6.sale_price   decimal   

Fiyat 6 grubunun satış fiyatı bilgisini vermektedir

price_6.list_price   decimal   

Fiyat 6 grubunun liste fiyatı bilgisini vermektedir

price_7   object   

Fiyat 7 grubunun fiyat bilgisini vermektedir

price_7.sale_price   decimal   

Fiyat 7 grubunun satış fiyatı bilgisini vermektedir

price_7.list_price   decimal   

Fiyat 7 grubunun liste fiyatı bilgisini vermektedir

price_8   object   

Fiyat 8 grubunun fiyat bilgisini vermektedir

price_8.sale_price   decimal   

Fiyat 8 grubunun satış fiyatı bilgisini vermektedir

price_8.list_price   decimal   

Fiyat 8 grubunun liste fiyatı bilgisini vermektedir

price_9   object   

Fiyat 9 grubunun fiyat bilgisini vermektedir

price_9.sale_price   decimal   

Fiyat 9 grubunun satış fiyatı bilgisini vermektedir

price_9.list_price   decimal   

Fiyat 9 grubunun liste fiyatı bilgisini vermektedir

price_10   object   

Fiyat 10 grubunun fiyat bilgisini vermektedir

price_10.sale_price   decimal   

Fiyat 10 grubunun satış fiyatı bilgisini vermektedir

price_10.list_price   decimal   

Fiyat 10 grubunun liste fiyatı bilgisini vermektedir

Ürün Seçenek Ekle (Varyant)

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/products/1/variants" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"stock_code\": \"qui\",
    \"stock\": 3,
    \"barcode\": \"voluptates\",
    \"values\": [
        {
            \"name\": \"voluptates\",
            \"value\": \"corrupti\"
        }
    ],
    \"price_1\": [
        {
            \"sale_price\": \"1643\",
            \"list_price\": \"3.35\"
        }
    ],
    \"price_2\": [
        {
            \"sale_price\": \"715\",
            \"list_price\": \"0331797.4\"
        }
    ],
    \"price_3\": [
        {
            \"sale_price\": \"048\",
            \"list_price\": \"404.54\"
        }
    ],
    \"price_4\": [
        {
            \"sale_price\": \"2257\",
            \"list_price\": \"610\"
        }
    ],
    \"price_5\": [
        {
            \"sale_price\": \"53\",
            \"list_price\": \"9\"
        }
    ],
    \"price_6\": [
        {
            \"sale_price\": \"232957478\",
            \"list_price\": \"363238.31\"
        }
    ],
    \"price_7\": [
        {
            \"sale_price\": \"84\",
            \"list_price\": \"5\"
        }
    ],
    \"price_8\": [
        {
            \"sale_price\": \"1946042.8\",
            \"list_price\": \"6944\"
        }
    ],
    \"price_9\": [
        {
            \"sale_price\": \"2.74\",
            \"list_price\": \"4890.2\"
        }
    ],
    \"price_10\": [
        {
            \"sale_price\": \"2.48\",
            \"list_price\": \"3.33\"
        }
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/1/variants"
);

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

let body = {
    "stock_code": "qui",
    "stock": 3,
    "barcode": "voluptates",
    "values": [
        {
            "name": "voluptates",
            "value": "corrupti"
        }
    ],
    "price_1": [
        {
            "sale_price": "1643",
            "list_price": "3.35"
        }
    ],
    "price_2": [
        {
            "sale_price": "715",
            "list_price": "0331797.4"
        }
    ],
    "price_3": [
        {
            "sale_price": "048",
            "list_price": "404.54"
        }
    ],
    "price_4": [
        {
            "sale_price": "2257",
            "list_price": "610"
        }
    ],
    "price_5": [
        {
            "sale_price": "53",
            "list_price": "9"
        }
    ],
    "price_6": [
        {
            "sale_price": "232957478",
            "list_price": "363238.31"
        }
    ],
    "price_7": [
        {
            "sale_price": "84",
            "list_price": "5"
        }
    ],
    "price_8": [
        {
            "sale_price": "1946042.8",
            "list_price": "6944"
        }
    ],
    "price_9": [
        {
            "sale_price": "2.74",
            "list_price": "4890.2"
        }
    ],
    "price_10": [
        {
            "sale_price": "2.48",
            "list_price": "3.33"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/products/1/variants',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'stock_code' => 'qui',
            'stock' => 3,
            'barcode' => 'voluptates',
            'values' => [
                [
                    'name' => 'voluptates',
                    'value' => 'corrupti',
                ],
            ],
            'price_1' => [
                [
                    'sale_price' => '1643',
                    'list_price' => '3.35',
                ],
            ],
            'price_2' => [
                [
                    'sale_price' => '715',
                    'list_price' => '0331797.4',
                ],
            ],
            'price_3' => [
                [
                    'sale_price' => '048',
                    'list_price' => '404.54',
                ],
            ],
            'price_4' => [
                [
                    'sale_price' => '2257',
                    'list_price' => '610',
                ],
            ],
            'price_5' => [
                [
                    'sale_price' => '53',
                    'list_price' => '9',
                ],
            ],
            'price_6' => [
                [
                    'sale_price' => '232957478',
                    'list_price' => '363238.31',
                ],
            ],
            'price_7' => [
                [
                    'sale_price' => '84',
                    'list_price' => '5',
                ],
            ],
            'price_8' => [
                [
                    'sale_price' => '1946042.8',
                    'list_price' => '6944',
                ],
            ],
            'price_9' => [
                [
                    'sale_price' => '2.74',
                    'list_price' => '4890.2',
                ],
            ],
            'price_10' => [
                [
                    'sale_price' => '2.48',
                    'list_price' => '3.33',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/1/variants'
payload = {
    "stock_code": "qui",
    "stock": 3,
    "barcode": "voluptates",
    "values": [
        {
            "name": "voluptates",
            "value": "corrupti"
        }
    ],
    "price_1": [
        {
            "sale_price": "1643",
            "list_price": "3.35"
        }
    ],
    "price_2": [
        {
            "sale_price": "715",
            "list_price": "0331797.4"
        }
    ],
    "price_3": [
        {
            "sale_price": "048",
            "list_price": "404.54"
        }
    ],
    "price_4": [
        {
            "sale_price": "2257",
            "list_price": "610"
        }
    ],
    "price_5": [
        {
            "sale_price": "53",
            "list_price": "9"
        }
    ],
    "price_6": [
        {
            "sale_price": "232957478",
            "list_price": "363238.31"
        }
    ],
    "price_7": [
        {
            "sale_price": "84",
            "list_price": "5"
        }
    ],
    "price_8": [
        {
            "sale_price": "1946042.8",
            "list_price": "6944"
        }
    ],
    "price_9": [
        {
            "sale_price": "2.74",
            "list_price": "4890.2"
        }
    ],
    "price_10": [
        {
            "sale_price": "2.48",
            "list_price": "3.33"
        }
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 21,
        "product_id": 2,
        "stock_code": "hgfkzm1-1063-020beyazl",
        "stock": 50,
        "barcode": "",
        "option1": {
            "name": "Renk",
            "value": "Beyaz"
        },
        "option2": {
            "name": "Beden",
            "value": "L"
        },
        "price_1": {
            "sale_price": 0,
            "list_price": 0
        },
        "price_2": null,
        "price_3": null,
        "price_4": null,
        "price_5": null,
        "price_6": null,
        "price_7": null,
        "price_8": null,
        "price_9": null,
        "price_10": null
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

PUT api/v2/products/{id}/variants

URL Parameters

id   integer   

Ürün Id

Body Parameters

stock_code   string   

Varyant stok kodu gönderiniz.

stock   integer   

Varyant stok bilgisi gönderiniz.

barcode   string   

Varyant barkod no gönderiniz.

values   object[]   

values[].name   string   

Varyant seçenek adı bilgisi gönderiniz.

values[].value   string   

Varyant seçenek değer bilgisi gönderiniz.

price_1   object[]   

price_1[].sale_price   decimal   

Fiyat grubu 1 için satış fiyatı.

price_1[].list_price   decimal   

Fiyat grubu 1 için liste fiyatı.

price_2   object[]  optional  

price_2[].sale_price   decimal   

Fiyat grubu 2 için satış fiyatı.

price_2[].list_price   decimal  optional  

Fiyat grubu 2 için liste fiyatı.

price_3   object[]  optional  

price_3[].sale_price   decimal   

Fiyat grubu 3 için satış fiyatı.

price_3[].list_price   decimal  optional  

Fiyat grubu 3 için liste fiyatı.

price_4   object[]  optional  

price_4[].sale_price   decimal   

Fiyat grubu 4 için satış fiyatı.

price_4[].list_price   decimal  optional  

Fiyat grubu 4 için liste fiyatı.

price_5   object[]  optional  

price_5[].sale_price   decimal   

Fiyat grubu 5 için satış fiyatı.

price_5[].list_price   string  optional  

Fiyat grubu 5 için liste fiyatı.

price_6   object[]  optional  

price_6[].sale_price   decimal   

Fiyat grubu 6 için satış fiyatı.

price_6[].list_price   decimal  optional  

Fiyat grubu 6 için liste fiyatı.

price_7   object[]  optional  

price_7[].sale_price   decimal   

Fiyat grubu 7 için satış fiyatı.

price_7[].list_price   decimal  optional  

Fiyat grubu 7 için liste fiyatı.

price_8   object[]  optional  

price_8[].sale_price   string   

Fiyat grubu 8 için satış fiyatı.

price_8[].list_price   decimal  optional  

Fiyat grubu 8 için liste fiyatı.

price_9   object[]  optional  

price_9[].sale_price   decimal   

Fiyat grubu 9 için satış fiyatı.

price_9[].list_price   decimal  optional  

Fiyat grubu 9 için liste fiyatı.

price_10   object[]  optional  

price_10[].sale_price   decimal   

Fiyat grubu 10 için satış fiyatı.

price_10[].list_price   decimal  optional  

Fiyat grubu 10 için liste fiyatı.

Response

Response Fields

id   integer   

Varyant id'si

product_id   integer   

Ürün id'si

stock_code   string   

Varyant stok kodu bilgisi

stock   number   

Varyant stok bilgisi

barcode   string   

Varyant barkod bilgisi

option1   object   

Varyant seçenek bilgisi

option1.name   string   

Varyant seçenek adı

option1.value   string   

Varyant seçenek değeri

option2   object   

Varyant seçenek bilgisi

option2.name   string   

Varyant seçenek adı

option2.value   string   

Varyant seçenek değeri

price_1   object   

Fiyat 1 grubunun fiyat bilgisini vermektedir

price_1.sale_price   decimal   

Fiyat 1 grubunun satış fiyatı bilgisini vermektedir

price_1.list_price   decimal   

Fiyat 1 grubunun liste fiyatı bilgisini vermektedir

price_2   object   

Fiyat 2 grubunun fiyat bilgisini vermektedir

price_2.sale_price   decimal   

Fiyat 2 grubunun satış fiyatı bilgisini vermektedir

price_2.list_price   decimal   

Fiyat 2 grubunun liste fiyatı bilgisini vermektedir

price_3   object   

Fiyat 3 grubunun fiyat bilgisini vermektedir

price_3.sale_price   decimal   

Fiyat 3 grubunun satış fiyatı bilgisini vermektedir

price_3.list_price   decimal   

Fiyat 3 grubunun liste fiyatı bilgisini vermektedir

price_4   object   

Fiyat 4 grubunun fiyat bilgisini vermektedir

price_4.sale_price   decimal   

Fiyat 4 grubunun satış fiyatı bilgisini vermektedir

price_4.list_price   decimal   

Fiyat 4 grubunun liste fiyatı bilgisini vermektedir

price_5   object   

Fiyat 5 grubunun fiyat bilgisini vermektedir

price_5.sale_price   decimal   

Fiyat 5 grubunun satış fiyatı bilgisini vermektedir

price_5.list_price   decimal   

Fiyat 5 grubunun liste fiyatı bilgisini vermektedir

price_6   object   

Fiyat 6 grubunun fiyat bilgisini vermektedir

price_6.sale_price   decimal   

Fiyat 6 grubunun satış fiyatı bilgisini vermektedir

price_6.list_price   decimal   

Fiyat 6 grubunun liste fiyatı bilgisini vermektedir

price_7   object   

Fiyat 7 grubunun fiyat bilgisini vermektedir

price_7.sale_price   decimal   

Fiyat 7 grubunun satış fiyatı bilgisini vermektedir

price_7.list_price   decimal   

Fiyat 7 grubunun liste fiyatı bilgisini vermektedir

price_8   object   

Fiyat 8 grubunun fiyat bilgisini vermektedir

price_8.sale_price   decimal   

Fiyat 8 grubunun satış fiyatı bilgisini vermektedir

price_8.list_price   decimal   

Fiyat 8 grubunun liste fiyatı bilgisini vermektedir

price_9   object   

Fiyat 9 grubunun fiyat bilgisini vermektedir

price_9.sale_price   decimal   

Fiyat 9 grubunun satış fiyatı bilgisini vermektedir

price_9.list_price   decimal   

Fiyat 9 grubunun liste fiyatı bilgisini vermektedir

price_10   object   

Fiyat 10 grubunun fiyat bilgisini vermektedir

price_10.sale_price   decimal   

Fiyat 10 grubunun satış fiyatı bilgisini vermektedir

price_10.list_price   decimal   

Fiyat 10 grubunun liste fiyatı bilgisini vermektedir

Ürün Seçenek Göster (Varyant)

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/products/13/variants/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/13/variants/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/products/13/variants/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/13/variants/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 21,
        "product_id": 2,
        "stock_code": "hgfkzm1-1063-020beyazl",
        "stock": 50,
        "barcode": "",
        "option1": {
            "name": "Renk",
            "value": "Beyaz"
        },
        "option2": {
            "name": "Beden",
            "value": "L"
        },
        "price_1": {
            "sale_price": 0,
            "list_price": 0
        },
        "price_2": null,
        "price_3": null,
        "price_4": null,
        "price_5": null,
        "price_6": null,
        "price_7": null,
        "price_8": null,
        "price_9": null,
        "price_10": null
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/products/{id}/variants/{variant_id}

URL Parameters

id   integer   

Ürün id

variant_id   integer   

Varyant id

Response

Response Fields

id   integer   

Varyant id'si

product_id   integer   

Ürün id'si

stock_code   string   

Varyant stok kodu bilgisi

stock   number   

Varyant stok bilgisi

barcode   string   

Varyant barkod bilgisi

option1   object   

Varyant seçenek bilgisi

option1.name   string   

Varyant seçenek adı

option1.value   string   

Varyant seçenek değeri

option2   object   

Varyant seçenek bilgisi

option2.name   string   

Varyant seçenek adı

option2.value   string   

Varyant seçenek değeri

price_1   object   

Fiyat 1 grubunun fiyat bilgisini vermektedir

price_1.sale_price   decimal   

Fiyat 1 grubunun satış fiyatı bilgisini vermektedir

price_1.list_price   decimal   

Fiyat 1 grubunun liste fiyatı bilgisini vermektedir

price_2   object   

Fiyat 2 grubunun fiyat bilgisini vermektedir

price_2.sale_price   decimal   

Fiyat 2 grubunun satış fiyatı bilgisini vermektedir

price_2.list_price   decimal   

Fiyat 2 grubunun liste fiyatı bilgisini vermektedir

price_3   object   

Fiyat 3 grubunun fiyat bilgisini vermektedir

price_3.sale_price   decimal   

Fiyat 3 grubunun satış fiyatı bilgisini vermektedir

price_3.list_price   decimal   

Fiyat 3 grubunun liste fiyatı bilgisini vermektedir

price_4   object   

Fiyat 4 grubunun fiyat bilgisini vermektedir

price_4.sale_price   decimal   

Fiyat 4 grubunun satış fiyatı bilgisini vermektedir

price_4.list_price   decimal   

Fiyat 4 grubunun liste fiyatı bilgisini vermektedir

price_5   object   

Fiyat 5 grubunun fiyat bilgisini vermektedir

price_5.sale_price   decimal   

Fiyat 5 grubunun satış fiyatı bilgisini vermektedir

price_5.list_price   decimal   

Fiyat 5 grubunun liste fiyatı bilgisini vermektedir

price_6   object   

Fiyat 6 grubunun fiyat bilgisini vermektedir

price_6.sale_price   decimal   

Fiyat 6 grubunun satış fiyatı bilgisini vermektedir

price_6.list_price   decimal   

Fiyat 6 grubunun liste fiyatı bilgisini vermektedir

price_7   object   

Fiyat 7 grubunun fiyat bilgisini vermektedir

price_7.sale_price   decimal   

Fiyat 7 grubunun satış fiyatı bilgisini vermektedir

price_7.list_price   decimal   

Fiyat 7 grubunun liste fiyatı bilgisini vermektedir

price_8   object   

Fiyat 8 grubunun fiyat bilgisini vermektedir

price_8.sale_price   decimal   

Fiyat 8 grubunun satış fiyatı bilgisini vermektedir

price_8.list_price   decimal   

Fiyat 8 grubunun liste fiyatı bilgisini vermektedir

price_9   object   

Fiyat 9 grubunun fiyat bilgisini vermektedir

price_9.sale_price   decimal   

Fiyat 9 grubunun satış fiyatı bilgisini vermektedir

price_9.list_price   decimal   

Fiyat 9 grubunun liste fiyatı bilgisini vermektedir

price_10   object   

Fiyat 10 grubunun fiyat bilgisini vermektedir

price_10.sale_price   decimal   

Fiyat 10 grubunun satış fiyatı bilgisini vermektedir

price_10.list_price   decimal   

Fiyat 10 grubunun liste fiyatı bilgisini vermektedir

Ürün Seçenek Güncelle (Varyant)

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/products/2/variants/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"stock_code\": \"animi\",
    \"stock\": 5,
    \"barcode\": \"quae\",
    \"values\": [
        {
            \"name\": \"et\",
            \"value\": \"repellendus\"
        }
    ],
    \"price_1\": [
        {
            \"sale_price\": \"7178923.84\",
            \"list_price\": \"078547.10\"
        }
    ],
    \"price_2\": [
        {
            \"sale_price\": \"8\",
            \"list_price\": \"30680.32\"
        }
    ],
    \"price_3\": [
        {
            \"sale_price\": \"42\",
            \"list_price\": \"447.3\"
        }
    ],
    \"price_4\": [
        {
            \"sale_price\": \"79\",
            \"list_price\": \"31590247.19\"
        }
    ],
    \"price_5\": [
        {
            \"sale_price\": \"00\",
            \"list_price\": \"10\"
        }
    ],
    \"price_6\": [
        {
            \"sale_price\": \"1.31\",
            \"list_price\": \"1.82\"
        }
    ],
    \"price_7\": [
        {
            \"sale_price\": \"09.07\",
            \"list_price\": \"1328016\"
        }
    ],
    \"price_8\": [
        {
            \"sale_price\": \"172750.9\",
            \"list_price\": \"8.12\"
        }
    ],
    \"price_9\": [
        {
            \"sale_price\": \"1.3\",
            \"list_price\": \"71600\"
        }
    ],
    \"price_10\": [
        {
            \"sale_price\": \"000975.5\",
            \"list_price\": \"4\"
        }
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/2/variants/1"
);

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

let body = {
    "stock_code": "animi",
    "stock": 5,
    "barcode": "quae",
    "values": [
        {
            "name": "et",
            "value": "repellendus"
        }
    ],
    "price_1": [
        {
            "sale_price": "7178923.84",
            "list_price": "078547.10"
        }
    ],
    "price_2": [
        {
            "sale_price": "8",
            "list_price": "30680.32"
        }
    ],
    "price_3": [
        {
            "sale_price": "42",
            "list_price": "447.3"
        }
    ],
    "price_4": [
        {
            "sale_price": "79",
            "list_price": "31590247.19"
        }
    ],
    "price_5": [
        {
            "sale_price": "00",
            "list_price": "10"
        }
    ],
    "price_6": [
        {
            "sale_price": "1.31",
            "list_price": "1.82"
        }
    ],
    "price_7": [
        {
            "sale_price": "09.07",
            "list_price": "1328016"
        }
    ],
    "price_8": [
        {
            "sale_price": "172750.9",
            "list_price": "8.12"
        }
    ],
    "price_9": [
        {
            "sale_price": "1.3",
            "list_price": "71600"
        }
    ],
    "price_10": [
        {
            "sale_price": "000975.5",
            "list_price": "4"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/products/2/variants/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'stock_code' => 'animi',
            'stock' => 5,
            'barcode' => 'quae',
            'values' => [
                [
                    'name' => 'et',
                    'value' => 'repellendus',
                ],
            ],
            'price_1' => [
                [
                    'sale_price' => '7178923.84',
                    'list_price' => '078547.10',
                ],
            ],
            'price_2' => [
                [
                    'sale_price' => '8',
                    'list_price' => '30680.32',
                ],
            ],
            'price_3' => [
                [
                    'sale_price' => '42',
                    'list_price' => '447.3',
                ],
            ],
            'price_4' => [
                [
                    'sale_price' => '79',
                    'list_price' => '31590247.19',
                ],
            ],
            'price_5' => [
                [
                    'sale_price' => '00',
                    'list_price' => '10',
                ],
            ],
            'price_6' => [
                [
                    'sale_price' => '1.31',
                    'list_price' => '1.82',
                ],
            ],
            'price_7' => [
                [
                    'sale_price' => '09.07',
                    'list_price' => '1328016',
                ],
            ],
            'price_8' => [
                [
                    'sale_price' => '172750.9',
                    'list_price' => '8.12',
                ],
            ],
            'price_9' => [
                [
                    'sale_price' => '1.3',
                    'list_price' => '71600',
                ],
            ],
            'price_10' => [
                [
                    'sale_price' => '000975.5',
                    'list_price' => '4',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/2/variants/1'
payload = {
    "stock_code": "animi",
    "stock": 5,
    "barcode": "quae",
    "values": [
        {
            "name": "et",
            "value": "repellendus"
        }
    ],
    "price_1": [
        {
            "sale_price": "7178923.84",
            "list_price": "078547.10"
        }
    ],
    "price_2": [
        {
            "sale_price": "8",
            "list_price": "30680.32"
        }
    ],
    "price_3": [
        {
            "sale_price": "42",
            "list_price": "447.3"
        }
    ],
    "price_4": [
        {
            "sale_price": "79",
            "list_price": "31590247.19"
        }
    ],
    "price_5": [
        {
            "sale_price": "00",
            "list_price": "10"
        }
    ],
    "price_6": [
        {
            "sale_price": "1.31",
            "list_price": "1.82"
        }
    ],
    "price_7": [
        {
            "sale_price": "09.07",
            "list_price": "1328016"
        }
    ],
    "price_8": [
        {
            "sale_price": "172750.9",
            "list_price": "8.12"
        }
    ],
    "price_9": [
        {
            "sale_price": "1.3",
            "list_price": "71600"
        }
    ],
    "price_10": [
        {
            "sale_price": "000975.5",
            "list_price": "4"
        }
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 21,
        "product_id": 2,
        "stock_code": "hgfkzm1-1063-020beyazl",
        "stock": 50,
        "barcode": "",
        "option1": {
            "name": "Renk",
            "value": "Beyaz"
        },
        "option2": {
            "name": "Beden",
            "value": "L"
        },
        "price_1": {
            "sale_price": 0,
            "list_price": 0
        },
        "price_2": null,
        "price_3": null,
        "price_4": null,
        "price_5": null,
        "price_6": null,
        "price_7": null,
        "price_8": null,
        "price_9": null,
        "price_10": null
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

PUT api/v2/products/{id}/variants/{variant_id}

URL Parameters

id   integer   

Ürün id

variant_id   string   

Varyant id

Body Parameters

stock_code   string   

Varyant stok kodu gönderiniz.

stock   integer   

Varyant stok bilgisi gönderiniz.

barcode   string   

Varyant barkod no gönderiniz.

values   object[]  optional  

values[].name   string   

Varyant seçenek adı bilgisi gönderiniz.

values[].value   string   

Varyant seçenek değer bilgisi gönderiniz.

price_1   object[]  optional  

price_1[].sale_price   string   

Fiyat grubu 1 için satış fiyatı.

price_1[].list_price   string   

Fiyat grubu 1 için liste fiyatı.

price_2   object[]  optional  

price_2[].sale_price   string   

Fiyat grubu 2 için satış fiyatı.

price_2[].list_price   string  optional  

Fiyat grubu 2 için liste fiyatı.

price_3   object[]  optional  

price_3[].sale_price   string   

Fiyat grubu 3 için satış fiyatı.

price_3[].list_price   string  optional  

Fiyat grubu 3 için liste fiyatı.

price_4   object[]  optional  

price_4[].sale_price   string   

Fiyat grubu 4 için satış fiyatı.

price_4[].list_price   string  optional  

Fiyat grubu 4 için liste fiyatı.

price_5   object[]  optional  

price_5[].sale_price   string   

Fiyat grubu 5 için satış fiyatı.

price_5[].list_price   string  optional  

Fiyat grubu 5 için liste fiyatı.

price_6   object[]  optional  

price_6[].sale_price   string   

Fiyat grubu 6 için satış fiyatı.

price_6[].list_price   string  optional  

Fiyat grubu 6 için liste fiyatı.

price_7   object[]  optional  

price_7[].sale_price   string   

Fiyat grubu 7 için satış fiyatı.

price_7[].list_price   string  optional  

Fiyat grubu 7 için liste fiyatı.

price_8   object[]  optional  

price_8[].sale_price   string   

Fiyat grubu 8 için satış fiyatı.

price_8[].list_price   string  optional  

Fiyat grubu 8 için liste fiyatı.

price_9   object[]  optional  

price_9[].sale_price   string   

Fiyat grubu 9 için satış fiyatı.

price_9[].list_price   string  optional  

Fiyat grubu 9 için liste fiyatı.

price_10   object[]  optional  

price_10[].sale_price   string   

Fiyat grubu 10 için satış fiyatı.

price_10[].list_price   string  optional  

Fiyat grubu 10 için liste fiyatı.

Response

Response Fields

id   integer   

Varyant id'si

product_id   integer   

Ürün id'si

stock_code   string   

Varyant stok kodu bilgisi

stock   number   

Varyant stok bilgisi

barcode   string   

Varyant barkod bilgisi

option1   object   

Varyant seçenek bilgisi

option1.name   string   

Varyant seçenek adı

option1.value   string   

Varyant seçenek değeri

option2   object   

Varyant seçenek bilgisi

option2.name   string   

Varyant seçenek adı

option2.value   string   

Varyant seçenek değeri

price_1   object   

Fiyat 1 grubunun fiyat bilgisini vermektedir

price_1.sale_price   decimal   

Fiyat 1 grubunun satış fiyatı bilgisini vermektedir

price_1.list_price   decimal   

Fiyat 1 grubunun liste fiyatı bilgisini vermektedir

price_2   object   

Fiyat 2 grubunun fiyat bilgisini vermektedir

price_2.sale_price   decimal   

Fiyat 2 grubunun satış fiyatı bilgisini vermektedir

price_2.list_price   decimal   

Fiyat 2 grubunun liste fiyatı bilgisini vermektedir

price_3   object   

Fiyat 3 grubunun fiyat bilgisini vermektedir

price_3.sale_price   decimal   

Fiyat 3 grubunun satış fiyatı bilgisini vermektedir

price_3.list_price   decimal   

Fiyat 3 grubunun liste fiyatı bilgisini vermektedir

price_4   object   

Fiyat 4 grubunun fiyat bilgisini vermektedir

price_4.sale_price   decimal   

Fiyat 4 grubunun satış fiyatı bilgisini vermektedir

price_4.list_price   decimal   

Fiyat 4 grubunun liste fiyatı bilgisini vermektedir

price_5   object   

Fiyat 5 grubunun fiyat bilgisini vermektedir

price_5.sale_price   decimal   

Fiyat 5 grubunun satış fiyatı bilgisini vermektedir

price_5.list_price   decimal   

Fiyat 5 grubunun liste fiyatı bilgisini vermektedir

price_6   object   

Fiyat 6 grubunun fiyat bilgisini vermektedir

price_6.sale_price   decimal   

Fiyat 6 grubunun satış fiyatı bilgisini vermektedir

price_6.list_price   decimal   

Fiyat 6 grubunun liste fiyatı bilgisini vermektedir

price_7   object   

Fiyat 7 grubunun fiyat bilgisini vermektedir

price_7.sale_price   decimal   

Fiyat 7 grubunun satış fiyatı bilgisini vermektedir

price_7.list_price   decimal   

Fiyat 7 grubunun liste fiyatı bilgisini vermektedir

price_8   object   

Fiyat 8 grubunun fiyat bilgisini vermektedir

price_8.sale_price   decimal   

Fiyat 8 grubunun satış fiyatı bilgisini vermektedir

price_8.list_price   decimal   

Fiyat 8 grubunun liste fiyatı bilgisini vermektedir

price_9   object   

Fiyat 9 grubunun fiyat bilgisini vermektedir

price_9.sale_price   decimal   

Fiyat 9 grubunun satış fiyatı bilgisini vermektedir

price_9.list_price   decimal   

Fiyat 9 grubunun liste fiyatı bilgisini vermektedir

price_10   object   

Fiyat 10 grubunun fiyat bilgisini vermektedir

price_10.sale_price   decimal   

Fiyat 10 grubunun satış fiyatı bilgisini vermektedir

price_10.list_price   decimal   

Fiyat 10 grubunun liste fiyatı bilgisini vermektedir

Ürün Seçenek Sil (Varyant)

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/products/2/variants/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/2/variants/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/products/2/variants/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/2/variants/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/products/{id}/variants/{variant_id}

URL Parameters

id   integer   

Ürün id

variant_id   string   

Varyant id

Ürün Resimleri

Kimlik doğrulama gerektirir

Ürün Resimleri

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/products/5/images" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/products/5/images"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/products/5/images',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/products/5/images'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        "https://www.app.sopyo.com/images/urunler/sirt-can-5253_1.jpg",
        "https://www.app.sopyo.com/images/urunler/sirt-can-5253_2.jpg"
    ]
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/products/{id}/images

URL Parameters

id   integer   

Ürün ID

Kategori Yönetimi

Kategori ile alakalı tüm işlemleri bu alanda yapabilirsiniz

Kategori Listesi

Kimlik doğrulama gerektirir

Kategori Listesi

// Örnek filtrelemeler

/categories?name[eq]=Televizyon
Kategori adına göre filtreleme
(like,eq)
/categories?id[eq]=1
Kategori id"sine filtreleme.
(like,eq,lt,lte,gt,gte)
Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/categories"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/categories',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/categories'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        {
            "id": 1,
            "name": "Telefon"
        },
        {
            "id": 2,
            "name": "Televizyon"
        }
    ],
    "links": {
        "first": "/api/v2/categories?page=1",
        "last": "/api/v2/categories?page=2",
        "prev": null,
        "next": "/api/v2/categories?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "« Önceki",
                "active": false
            },
            {
                "url": "/api/v2/categories?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "/api/v2/categories?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "/api/v2/categories?page=2",
                "label": "Sonraki »",
                "active": false
            }
        ],
        "path": "/api/v2/categories",
        "per_page": 100,
        "to": 100,
        "total": 124
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

GET api/v2/categories

Response

Response Fields

id   integer   

Marka id'si

name   string   

Marka adı

Kategori Ekle

Kimlik doğrulama gerektirir

Yeni kategori kaydı oluştur

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Televizyon\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/categories"
);

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

let body = {
    "name": "Televizyon"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/categories',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Televizyon',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/categories'
payload = {
    "name": "Televizyon"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Televizyon"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

POST api/v2/categories

Body Parameters

name   string   

Kategori ad bilgisi.

Response

Response Fields

id   integer   

Kategori id'si

name   string   

Kategori adı

Kategori Göster

Kimlik doğrulama gerektirir

Kategori Kaydı Göster

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/categories/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/categories/5"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/categories/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/categories/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Televizyon"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/categories/{id}

URL Parameters

id   integer   

Kategori ID

Response

Response Fields

id   integer   

Kategori id'si

name   string   

Kategori adı

Kategori Güncelle

Kimlik doğrulama gerektirir

Kategori Kaydı Güncelle

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/categories/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Televizyon\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/categories/5"
);

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

let body = {
    "name": "Televizyon"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/categories/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Televizyon',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/categories/5'
payload = {
    "name": "Televizyon"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Apple"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

PUT api/v2/categories/{id}

PATCH api/v2/categories/{id}

URL Parameters

id   integer   

Kategori ID

Body Parameters

name   string   

Kategori ad bilgisi.

Response

Response Fields

id   integer   

Kategori id'si

name   string   

Kategori adı

Kategori Sil

Kimlik doğrulama gerektirir

Kategori Kaydı Sil

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/categories/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/categories/5"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/categories/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/categories/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/categories/{id}

URL Parameters

id   integer   

Kategori ID

Marka Yönetimi

Marka ile alakalı tüm işlemleri bu alanda yapabilirsiniz

Marka Listesi

Kimlik doğrulama gerektirir

Marka Listesi

// Örnek filtrelemeler

/brands?name[eq]=Televizyon
Marka adına göre filtreleme
(like,eq)
/brands?id[eq]=1
Marka id"sine filtreleme.
(like,eq,lt,lte,gt,gte)
Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/brands" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/brands"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/brands',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/brands'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        {
            "id": 1,
            "name": "Sopyo"
        },
        {
            "id": 2,
            "name": "diğer"
        }
    ],
    "links": {
        "first": "/api/v2/brands?page=1",
        "last": "/api/v2/brands?page=2",
        "prev": null,
        "next": "/api/v2/brands?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "« Önceki",
                "active": false
            },
            {
                "url": "/api/v2/brands?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "/api/v2/brands?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "/api/v2/brands?page=2",
                "label": "Sonraki »",
                "active": false
            }
        ],
        "path": "/api/v2/brands",
        "per_page": 100,
        "to": 100,
        "total": 124
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

GET api/v2/brands

Response

Response Fields

id   integer   

Marka id'si

name   string   

Marka adı

Marka Ekle

Kimlik doğrulama gerektirir

Yeni marka kaydı oluştur

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/brands" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Apple\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/brands"
);

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

let body = {
    "name": "Apple"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/brands',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Apple',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/brands'
payload = {
    "name": "Apple"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Apple"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):



 

Request      

POST api/v2/brands

Body Parameters

name   string   

Marka ad bilgisi.

Response

Response Fields

id   integer   

Marka id'si

name   string   

Marka adı

Marka Göster

Kimlik doğrulama gerektirir

Marka Kaydı Göster

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/brands/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/brands/5"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/brands/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/brands/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Apple"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/brands/{id}

URL Parameters

id   integer   

Marka ID

Response

Response Fields

id   integer   

Marka id'si

name   string   

Marka adı

Marka Güncelle

Kimlik doğrulama gerektirir

Marka Kaydı Güncelle

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/brands/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Samsung\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/brands/5"
);

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

let body = {
    "name": "Samsung"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/brands/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Samsung',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/brands/5'
payload = {
    "name": "Samsung"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Apple"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

PUT api/v2/brands/{id}

PATCH api/v2/brands/{id}

URL Parameters

id   integer   

Marka ID

Body Parameters

name   string   

Marka ad bilgisi.

Response

Response Fields

id   integer   

Marka id'si

name   string   

Marka adı

Marka Sil

Kimlik doğrulama gerektirir

Marka Kaydı Sil

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/brands/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/brands/5"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/brands/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/brands/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/brands/{id}

URL Parameters

id   integer   

Marka ID

Etiket Yönetimi

Ürün etiket işlemlerini bu bölümde yapabilirsiniz.

Etiket Listesi

Kimlik doğrulama gerektirir

Etiket Listesi

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/tags"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/tags',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/tags'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        {
            "id": 1,
            "name": "test",
            "color": "#582d2d"
        },
        {
            "id": 2,
            "name": "Test 3",
            "color": "black"
        }
    ],
    "links": {
        "first": "/api/v2/tags?page=1",
        "last": "/api/v2/tags?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Önceki",
                "active": false
            },
            {
                "url": "/api/v2/tags?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Sonraki »",
                "active": false
            }
        ],
        "path": "/api/v2/tags",
        "per_page": 100,
        "to": 4,
        "total": 4
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

GET api/v2/tags

Response

Response Fields

id   integer   

Etiket id'si

name   string   

Etiket adı

color   string   

Etiket renk kodu

Etiket Ekle

Kimlik doğrulama gerektirir

Yeni etiket kaydı oluştur

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Popüler\",
    \"color\": \"black\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/tags"
);

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

let body = {
    "name": "Popüler",
    "color": "black"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/tags',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Popüler',
            'color' => 'black',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/tags'
payload = {
    "name": "Popüler",
    "color": "black"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Test 3",
        "color": "black"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):



 

Request      

POST api/v2/tags

Body Parameters

name   string   

Etiket ad bilgisi.

color   string   

Etiket renk kodu bilgisi.

Response

Response Fields

id   integer   

Etiket id'si

name   string   

Etiket adı

color   string   

Etiket renk kodu

Etiket Göster

Kimlik doğrulama gerektirir

Etiket Kaydı Göster

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/tags/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/tags/5"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/tags/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/tags/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Test 3",
        "color": "black"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):



 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/tags/{id}

URL Parameters

id   integer   

Etiket ID

Response

Response Fields

id   integer   

Etiket id'si

name   string   

Etiket adı

color   string   

Etiket renk kodu

Etiket Güncelle

Kimlik doğrulama gerektirir

Etiket Kaydı Güncelle

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/tags/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Popüler\",
    \"color\": \"Popüler\"
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/tags/5"
);

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

let body = {
    "name": "Popüler",
    "color": "Popüler"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/tags/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Popüler',
            'color' => 'Popüler',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/tags/5'
payload = {
    "name": "Popüler",
    "color": "Popüler"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 5,
        "name": "Test 3",
        "color": "black"
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

PUT api/v2/tags/{id}

PATCH api/v2/tags/{id}

URL Parameters

id   integer   

Etiket ID

Body Parameters

name   string   

Etiket ad bilgisi.

color   string   

Etiket renk kodu bilgisi.

Response

Response Fields

id   integer   

Etiket id'si

name   string   

Etiket adı

color   string   

Etiket renk kodu

Etiket Sil

Kimlik doğrulama gerektirir

Etiket Kaydı Sil

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/tags/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/tags/5"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/tags/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/tags/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/tags/{id}

URL Parameters

id   integer   

Etiket ID

Etiket'e Ürün Atama

Kimlik doğrulama gerektirir

Etikete Ürün Atama

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/tags/5/add-product" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"products\": [
        1,
        2,
        3,
        4,
        5
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/tags/5/add-product"
);

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

let body = {
    "products": [
        1,
        2,
        3,
        4,
        5
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/tags/5/add-product',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'products' => [
                1,
                2,
                3,
                4,
                5,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/tags/5/add-product'
payload = {
    "products": [
        1,
        2,
        3,
        4,
        5
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

POST api/v2/tags/{id}/add-product

URL Parameters

id   integer   

Etiket ID

Body Parameters

products   object   

Eklemek istediğiniz ürünlerin id bilgilerini yazınız.

Etiket'den Ürün Çıkartma

Kimlik doğrulama gerektirir

Etiket'den Ürün Çıkartma

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/tags/5/remove-product" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"products\": [
        1,
        2,
        3,
        4,
        5
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/tags/5/remove-product"
);

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

let body = {
    "products": [
        1,
        2,
        3,
        4,
        5
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/tags/5/remove-product',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'products' => [
                1,
                2,
                3,
                4,
                5,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/tags/5/remove-product'
payload = {
    "products": [
        1,
        2,
        3,
        4,
        5
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/tags/{id}/remove-product

URL Parameters

id   integer   

Etiket ID

Body Parameters

products   object   

Çıkartmak istediğiniz ürünlerin id bilgilerini yazınız.

Sipariş Yönetimi

Sipariş ile ilgili işlemleri bu bölümde yapabilirsiniz.

Sipariş Listesi

Kimlik doğrulama gerektirir

Sipariş Listesi

// Örnek filtrelemeler

/orders?sort=asc
Id ile sıralama.
(asc,desc)
/orders?order_code[eq]=2554
Sipariş koduna göre filtreleme.
(like,eq)
/orders?order_type[eq]=sopyo
Sipariş tipine göre filtreleme
(like,eq)
/orders?erp_transfer_status[eq]=1
Sipariş ERP Aktarım Durumuna Göre Filtreleme
(eq)
/orders?full_name[eq]=Sopyo
Müşteri adına göre filtreleme
(like,eq)
/orders?order_date[eq]=26-09-2022
Sipariş tarihine göre filtreleme
(eq)
/orders?order_date[btw]=01-09-2022,30-09-2022
Sipariş tarihine göre filtreleme
(btw)
/orders?id[eq]=1
Id ile sipariş filtreleme.
(like,eq,lt,lte,gt,gte)
/orders?id[in]=342,432,233
Sipariş Id`lerine göre filtreleme.
(in)
/orders?order_status[eq]=1
Sipariş durumuna göre filtreleme.
(like,eq)
/orders?order_status[in]=1,2,3
Sipariş durumuna göre filtreleme.
(in)
/orders?page=1
Sayfalama ile filtreleme
(eq)
/orders?cargo_tracking_no[eq]=322
Kargo takip num. göre filtreleme.
(eq,like)
Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/orders"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/orders',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/orders'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": [
        {
            "id": 111,
            "order_code": "1277750982",
            "order_type": "trendyol",
            "order_date": "2022-08-26 20:50",
            "order_status": 1,
            "market_place_id": "55206377",
            "commission_total": 0,
            "total_price": 100000,
            "customer_info": {
                "email": "pf+7vw6nvnq@trendyolmail.com"
            },
            "shipping_info": {
                "full_name": "Yasin AYDOĞDU",
                "gsm": "1231231212",
                "identification_no": "11111111111",
                "city": "İstanbul",
                "district": "Esenler",
                "neighborhood": "Esenler",
                "postal_code": "01010",
                "address": "Çifte Havuzlar, YTÜ Davutpaşa Kampüsü, Teknopark D:C1 Blok/205, 34220 Esenler/İstanbul  Bina No:1  Daire:2 Esenler İstanbul Oms Address Description"
            },
            "billing_info": {
                "full_name": "Proj-e Yazılım",
                "gsm": "1231231212",
                "identification_no": "11111111111",
                "tax_number": "11111111111",
                "tax_office": null,
                "city": "İstanbul",
                "district": "Esenler",
                "neighborhood": "Esenler",
                "postal_code": "01010",
                "address": null
            },
            "cargo_info": {
                "company": null,
                "type": "Satıcı Öder",
                "campaing_no": "7250000006671572",
                "tracking_no": null
            },
            "order_items": [
                {
                    "marketplace_id": "4221437",
                    "marketplace_product_id": "194768909016",
                    "stock_code": "M520L11",
                    "product_name": "NB Performance Mens Shoes-Sonay",
                    "variant_stock_code": null,
                    "variant_name": null,
                    "commission_price": 0,
                    "quantity": 2,
                    "total_price": 100000
                }
            ]
        },
        {
            "id": 110,
            "order_code": "1168935936",
            "order_type": "trendyol",
            "order_date": "2022-08-26 21:11",
            "order_status": 1,
            "market_place_id": "55206382",
            "commission_total": 0,
            "total_price": 1299,
            "customer_info": {
                "email": "pf+gllw353w@trendyolmail.com"
            },
            "shipping_info": {
                "full_name": "Yasin AYDOĞDU",
                "gsm": "1231231212",
                "identification_no": "11111111111",
                "city": "İstanbul",
                "district": "Esenler",
                "neighborhood": "Esenler",
                "postal_code": "01010",
                "address": "Çifte Havuzlar, YTÜ Davutpaşa Kampüsü, Teknopark D:C1 Blok/205, 34220 Esenler/İstanbul  Bina No:1  Daire:2 Esenler İstanbul Oms Address Description"
            },
            "billing_info": {
                "full_name": "Proj-e Yazılım",
                "gsm": "1231231212",
                "identification_no": "11111111111",
                "tax_number": "11111111111",
                "tax_office": null,
                "city": "İstanbul",
                "district": "Esenler",
                "neighborhood": "Esenler",
                "postal_code": "01010",
                "address": null
            },
            "cargo_info": {
                "company": null,
                "type": "Satıcı Öder",
                "campaing_no": "7250000006671626",
                "tracking_no": null
            },
            "order_items": [
                {
                    "marketplace_id": "4221440",
                    "marketplace_product_id": "194182165036",
                    "stock_code": "M520LN6",
                    "product_name": "New Balance 520",
                    "variant_stock_code": null,
                    "variant_name": null,
                    "commission_price": 0,
                    "quantity": 1,
                    "total_price": 1299
                }
            ]
        },
        {
            "id": 109,
            "order_code": "730729781",
            "order_type": "trendyol",
            "order_date": "2022-08-26 21:22",
            "order_status": 1,
            "market_place_id": "55206384",
            "commission_total": 0,
            "total_price": 1299,
            "customer_info": {
                "email": "pf+de2j8m5l@trendyolmail.com"
            },
            "shipping_info": {
                "full_name": "Yasin AYDOĞDU",
                "gsm": "1231231212",
                "identification_no": "11111111111",
                "city": "İstanbul",
                "district": "Esenler",
                "neighborhood": "Esenler",
                "postal_code": "01010",
                "address": "Çifte Havuzlar, YTÜ Davutpaşa Kampüsü, Teknopark D:C1 Blok/205, 34220 Esenler/İstanbul  Bina No:1  Daire:2 Esenler İstanbul Oms Address Description"
            },
            "billing_info": {
                "full_name": "Proj-e Yazılım",
                "gsm": "1231231212",
                "identification_no": "11111111111",
                "tax_number": "11111111111",
                "tax_office": null,
                "city": "İstanbul",
                "district": "Esenler",
                "neighborhood": "Esenler",
                "postal_code": "01010",
                "address": null
            },
            "cargo_info": {
                "company": null,
                "type": "Satıcı Öder",
                "campaing_no": "7250000006671640",
                "tracking_no": null
            },
            "order_items": [
                {
                    "marketplace_id": "4221441",
                    "marketplace_product_id": "194182165036",
                    "stock_code": "M520LN6",
                    "product_name": "New Balance 520",
                    "variant_stock_code": null,
                    "variant_name": null,
                    "commission_price": 0,
                    "quantity": 1,
                    "total_price": 1299
                }
            ]
        }
    ],
    "links": {
        "first": "/api/v2/orders?page=1",
        "last": "/api/v2/orders?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Önceki",
                "active": false
            },
            {
                "url": "/api/v2/orders?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Sonraki »",
                "active": false
            }
        ],
        "path": "/api/v2/orders",
        "per_page": 100,
        "to": 3,
        "total": 3
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

GET api/v2/orders

Response

Response Fields

id   int   

Sipariş Id si

order_code   string   

Sipariş kodu bilgisi vermektedir.

order_type   string   

Sipariş tipi, Trendyol,Hepsiburada,N11 vs siparişin oluşturulduğu market bilgisini vermektedir.

order_status   string   

Sipariş durumu bilgisini vermektedir.
Onay Bekleyen Siparişler 1
Onaylanan Siparişler 2
Kargolanan Siparişler 3
İptal Edilen Siparişler 4

market_place_id   string   

Sipariş pazaryeri bilgisini vermektedir.

commission_total   decimal   

Sipariş komisyon tutarı bilgisini vermektedir.

total_price   decimal   

Siparişin toplam tutarı bilgisini vermektedir.

customer_info   object   

Müşteri bilgisini vermektedir.

shipping_info   object   

Siparişin teslimat adresi bilgilerini vermektedir..

billing_info   object   

Siparişin faturalandırma bilgilerini vermektedir..

cargo_info   object   

Siparişi kargo bilgilerini vermektedir.

order_items   object   

Sipariş oluşturan ürünlerin bilgisini vermektedir vermektedir.

Sipariş Oluştur

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_code\": null,
    \"order_status\": null,
    \"total_price\": null,
    \"customer_info\": {
        \"email\": null,
        \"name\": null
    },
    \"shipping_info\": {
        \"full_name\": null,
        \"gsm\": null,
        \"identification_no\": null,
        \"city\": null,
        \"district\": null,
        \"neighborhood\": null,
        \"address\": null
    },
    \"billing_info\": {
        \"full_name\": null,
        \"gsm\": null,
        \"city\": null,
        \"district\": null,
        \"neighborhood\": null,
        \"address\": null
    },
    \"order_items\": null
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/orders"
);

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

let body = {
    "order_code": null,
    "order_status": null,
    "total_price": null,
    "customer_info": {
        "email": null,
        "name": null
    },
    "shipping_info": {
        "full_name": null,
        "gsm": null,
        "identification_no": null,
        "city": null,
        "district": null,
        "neighborhood": null,
        "address": null
    },
    "billing_info": {
        "full_name": null,
        "gsm": null,
        "city": null,
        "district": null,
        "neighborhood": null,
        "address": null
    },
    "order_items": null
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/orders',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'order_code' => null,
            'order_status' => null,
            'total_price' => null,
            'customer_info' => [
                'email' => null,
                'name' => null,
            ],
            'shipping_info' => [
                'full_name' => null,
                'gsm' => null,
                'identification_no' => null,
                'city' => null,
                'district' => null,
                'neighborhood' => null,
                'address' => null,
            ],
            'billing_info' => [
                'full_name' => null,
                'gsm' => null,
                'city' => null,
                'district' => null,
                'neighborhood' => null,
                'address' => null,
            ],
            'order_items' => null,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/orders'
payload = {
    "order_code": null,
    "order_status": null,
    "total_price": null,
    "customer_info": {
        "email": null,
        "name": null
    },
    "shipping_info": {
        "full_name": null,
        "gsm": null,
        "identification_no": null,
        "city": null,
        "district": null,
        "neighborhood": null,
        "address": null
    },
    "billing_info": {
        "full_name": null,
        "gsm": null,
        "city": null,
        "district": null,
        "neighborhood": null,
        "address": null
    },
    "order_items": null
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 198,
        "order_code": 881448484,
        "order_type": "SOPYOAPI",
        "order_date": "2022-11-10 12:34",
        "order_status": 1,
        "erp_transfer_status": 0,
        "market_place_id": null,
        "commission_total": 0,
        "total_price": 0,
        "customer_info": {
            "id": 169,
            "name": "Sinan Gülsever",
            "email": "sinan@sopyo.com",
            "phone": null,
            "tax_no": null,
            "tax_office": null
        },
        "shipping_info": {
            "full_name": "Sinan Gülsever",
            "gsm": "5346656326",
            "identification_no": "0525841",
            "city": "BURSA",
            "district": "Demirtaş",
            "neighborhood": "Demirtaş",
            "postal_code": null,
            "address": "BURSA"
        },
        "billing_info": {
            "full_name": "Sinan Gülsever",
            "gsm": "5346656326",
            "identification_no": null,
            "tax_number": 5588,
            "tax_office": "Nilüfer",
            "city": "BURSA",
            "district": "Demirtaş",
            "neighborhood": null,
            "postal_code": null,
            "address": "BURSA"
        },
        "cargo_info": {
            "company": null,
            "type": null,
            "campaing_no": null,
            "tracking_no": null
        },
        "order_items": [
            {
                "marketplace_id": null,
                "marketplace_product_id": null,
                "stock_code": "7070",
                "product_name": "Test ürün",
                "variant_stock_code": null,
                "variant_name": null,
                "commission_price": null,
                "quantity": 1,
                "total_price": 780
            }
        ]
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Request      

POST api/v2/orders

Body Parameters

order_code   string   

Sipariş kodu bilgisi

order_status   int   

Sipariş durum bilgisi.(0,1,2,3 değerlerinden birini içermelidir)

total_price   decimal   

Sipariş toplam tutar bilgisi

commission_total   decimal  optional  

Toplam komisyon tutarı bilgisi

customer_info   object   

Müşteri bilgisi

customer_info.email   string   

Müşteri e-posta bilgisi

customer_info.name   string   

Müşteri ad soyad bilgisi.

customer_info.phone   string  optional  

Müşteri telefon bilgisi.

customer_info.tax_no   string  optional  

Müşteri vergi numarası bilgisi.

customer_info.tax_office   string  optional  

Müşteri vergi dairesi bilgisi.

shipping_info   object   

Sipariş teslimat bilgisi.

shipping_info.full_name   string   

Sipariş teslimat müşteri ad soyad bilgisi.

shipping_info.gsm   string   

Sipariş teslimat müşteri telefon bilgisi.

shipping_info.identification_no   string   

Sipariş teslimat müşteri T.C kimlik no bilgisi.

shipping_info.city   string   

Sipariş teslimat şehir bilgisi.

shipping_info.district   string   

Sipariş teslimat ilçe bilgisi.

shipping_info.neighborhood   string   

Sipariş teslimat mahalle bilgisi.

shipping_info.postal_code   string  optional  

Sipariş teslimat posta kodu bilgisi.

shipping_info.address   string   

Sipariş teslimat adres bilgisi.

billing_info   object   

Sipariş fatura bilgisi.

billing_info.full_name   string   

Müşteri ad soyad bilgisi.

billing_info.full_name   string   

Fatura müşteri telefon bilgisi.

billing_info.tax_number   string  optional  

Müşteri vergi no bilgisi.

billing_info.tax_office   string  optional  

Müşteri vergi dairesi bilgisi.

billing_info.tax_office   string  optional  

Müşteri T.C kimlik no bilgisi.

billing_info.city   string   

Müşteri şehir bilgisi.

billing_info.district   string   

Müşteri ilçe bilgisi.

billing_info.neighborhood   string   

Müşteri mahalle bilgisi.

billing_info.neighborhood   string  optional  

Müşteri adres posta kodu bilgisi.

billing_info.address   string   

Müşteri adres bilgisi.

cargo_info   object  optional  

Sipariş kargo bilgisi.

billing_info.company   string  optional  

Kargo firma bilgisi.

billing_info.type   string  optional  

Kargo tipi bilgisi. (Alıcı Öder/Gönderici Öder)

billing_info.campaing_no   string  optional  

Kargo kapmanya kodu bilgisi

billing_info.tracking_no   string  optional  

Kargo takip kodu bilgisi

order_items   array   

Sipariş verilen ürünlerin bilgisi.

order_items[].stock_code   string   

Ürün stok kodu bilgisi. (Sipariş edilen ürün varyant ise variant_stock_code,variant_name alanları değilse stock_code,product_name alanlarını doldurunuz)

order_items[].product_name   string   

Ürün adı bilgisi.

order_items[].variant_stock_code   string  optional  

Ürün varyant stok kodu bilgisi.

order_items[].variant_name   string  optional  

Ürün varyant adı bilgisi.

order_items[].total_price   decimal   

Ürün fiyat bilgisi.

order_items[].commission_price   decimal  optional  

Ürün komisyon tutarı bilgisi.

order_items[].quantity   int   

Ürün miktar bilgisi.

Response

Response Fields

id   int   

Sipariş Id si

order_code   string   

Sipariş kodu bilgisi vermektedir.

order_type   string   

Sipariş tipi, Trendyol,Hepsiburada,N11 vs siparişin oluşturulduğu market bilgisini vermektedir.

order_status   string   

Sipariş durumu bilgisini vermektedir.
Onay Bekleyen Siparişler 1
Onaylanan Siparişler 2
Kargolanan Siparişler 3
İptal Edilen Siparişler 4

erp_transfer_status   number   

Sipariş erp aktarım durumunu vermektedir.
Aktarılan 1
Aktarılmayan 0

market_place_id   string   

Sipariş pazaryeri bilgisini vermektedir.

commission_total   decimal   

Sipariş komisyon tutarı bilgisini vermektedir.

total_price   decimal   

Siparişin toplam tutarı bilgisini vermektedir.

customer_info   object   

Müşteri bilgisini vermektedir.

shipping_info   object   

Siparişin teslimat adresi bilgilerini vermektedir..

billing_info   object   

Siparişin faturalandırma bilgilerini vermektedir..

cargo_info   object   

Siparişi kargo bilgilerini vermektedir.

order_items   object   

Sipariş oluşturan ürünlerin bilgisini vermektedir vermektedir.

Sipariş Göster

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request GET \
    --get "https://api.sopyo.dev/api/v2/orders/" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/orders/"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.sopyo.dev/api/v2/orders/',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/orders/'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Örnek Servis Cevabı (201, İşlem Başarılı):


{
    "data": {
        "id": 198,
        "order_code": 881448484,
        "order_type": "SOPYOAPI",
        "order_date": "2022-11-10 12:34",
        "order_status": 1,
        "market_place_id": null,
        "commission_total": 0,
        "total_price": 0,
        "customer_info": {
            "id": 169,
            "name": "Sinan Gülsever",
            "email": "sinan@sopyo.com",
            "phone": null,
            "tax_no": null,
            "tax_office": null
        },
        "shipping_info": {
            "full_name": "Sinan Gülsever",
            "gsm": "5346656326",
            "identification_no": "0525841",
            "city": "BURSA",
            "district": "Demirtaş",
            "neighborhood": "Demirtaş",
            "postal_code": null,
            "address": "BURSA"
        },
        "billing_info": {
            "full_name": "Sinan Gülsever",
            "gsm": "5346656326",
            "identification_no": null,
            "tax_number": 5588,
            "tax_office": "Nilüfer",
            "city": "BURSA",
            "district": "Demirtaş",
            "neighborhood": null,
            "postal_code": null,
            "address": "BURSA"
        },
        "cargo_info": {
            "company": null,
            "type": null,
            "campaing_no": null,
            "tracking_no": null
        },
        "order_items": [
            {
                "marketplace_id": null,
                "marketplace_product_id": null,
                "stock_code": "7070",
                "product_name": "Test ürün",
                "variant_stock_code": null,
                "variant_name": null,
                "commission_price": null,
                "quantity": 1,
                "total_price": 780
            }
        ]
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

GET api/v2/orders/{id}

URL Parameters

id   integer   

Sipariş ID

Response

Response Fields

id   int   

Sipariş Id si

order_code   string   

Sipariş kodu bilgisi vermektedir.

order_type   string   

Sipariş tipi, Trendyol,Hepsiburada,N11 vs siparişin oluşturulduğu market bilgisini vermektedir.

order_status   string   

Sipariş durumu bilgisini vermektedir.
Onay Bekleyen Siparişler 1
Onaylanan Siparişler 2
Kargolanan Siparişler 3
İptal Edilen Siparişler 4

market_place_id   string   

Sipariş pazaryeri bilgisini vermektedir.

commission_total   decimal   

Sipariş komisyon tutarı bilgisini vermektedir.

total_price   decimal   

Siparişin toplam tutarı bilgisini vermektedir.

customer_info   object   

Müşteri bilgisini vermektedir.

shipping_info   object   

Siparişin teslimat adresi bilgilerini vermektedir..

billing_info   object   

Siparişin faturalandırma bilgilerini vermektedir..

cargo_info   object   

Siparişi kargo bilgilerini vermektedir.

order_items   object   

Sipariş oluşturan ürünlerin bilgisini vermektedir vermektedir.

Siparişi Sipariş Kodu ile Güncelle

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/orders/orderCode/" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cargo_info\": {
        \"company\": null,
        \"type\": null,
        \"campaing_no\": null,
        \"tracking_no\": null
    }
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/orders/orderCode/"
);

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

let body = {
    "cargo_info": {
        "company": null,
        "type": null,
        "campaing_no": null,
        "tracking_no": null
    }
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/orders/orderCode/',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'cargo_info' => [
                'company' => null,
                'type' => null,
                'campaing_no' => null,
                'tracking_no' => null,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/orders/orderCode/'
payload = {
    "cargo_info": {
        "company": null,
        "type": null,
        "campaing_no": null,
        "tracking_no": null
    }
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 198,
        "order_code": 881448484,
        "order_type": "SOPYOAPI",
        "order_date": "2022-11-10 12:34",
        "order_status": 1,
        "market_place_id": null,
        "commission_total": 0,
        "total_price": 0,
        "customer_info": {
            "id": 169,
            "name": "Sinan Gülsever",
            "email": "sinan@sopyo.com",
            "phone": null,
            "tax_no": null,
            "tax_office": null
        },
        "shipping_info": {
            "full_name": "Sinan Gülsever",
            "gsm": "5346656326",
            "identification_no": "0525841",
            "city": "BURSA",
            "district": "Demirtaş",
            "neighborhood": "Demirtaş",
            "postal_code": null,
            "address": "BURSA"
        },
        "billing_info": {
            "full_name": "Sinan Gülsever",
            "gsm": "5346656326",
            "identification_no": null,
            "tax_number": 5588,
            "tax_office": "Nilüfer",
            "city": "BURSA",
            "district": "Demirtaş",
            "neighborhood": null,
            "postal_code": null,
            "address": "BURSA"
        },
        "cargo_info": {
            "company": null,
            "type": null,
            "campaing_no": null,
            "tracking_no": null
        },
        "order_items": [
            {
                "marketplace_id": null,
                "marketplace_product_id": null,
                "stock_code": "7070",
                "product_name": "Test ürün",
                "variant_stock_code": null,
                "variant_name": null,
                "commission_price": null,
                "quantity": 1,
                "total_price": 780
            }
        ]
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Not Found"
}
 

Request      

PUT api/v2/orders/orderCode/{orderCode}

URL Parameters

orderCode   string   

Sipariş Kodu

Body Parameters

order_status   number  optional  

Sipariş durumu, 1,2,3,4 değerleri içermelidir

erp_transfer_status   number  optional  

Sipariş erp aktarım durumu 0,1 değerleri içermelidir

cargo_info   object   

Sipariş kargo bilgisi

billing_info.company   string   

Kargo firma bilgisi.

billing_info.type   string   

Kargo tipi bilgisi. (Alıcı Öder/Gönderici Öder)

billing_info.campaing_no   string   

Kargo kapmanya kodu bilgisi

billing_info.tracking_no   string   

Kargo takip kodu bilgisi

Response

Response Fields

id   int   

Sipariş Id si

order_code   string   

Sipariş kodu bilgisi vermektedir.

erp_transfer_status   number   

Sipariş erp aktarım durumu, 0,1 değerleri içermelidir

order_type   string   

Sipariş tipi, Trendyol,Hepsiburada,N11 vs siparişin oluşturulduğu market bilgisini vermektedir.

order_status   string   

Sipariş durumu bilgisini vermektedir.
Onay Bekleyen Siparişler 1
Onaylanan Siparişler 2
Kargolanan Siparişler 3
İptal Edilen Siparişler 4

market_place_id   string   

Sipariş pazaryeri bilgisini vermektedir.

commission_total   decimal   

Sipariş komisyon tutarı bilgisini vermektedir.

total_price   decimal   

Siparişin toplam tutarı bilgisini vermektedir.

customer_info   object   

Müşteri bilgisini vermektedir.

shipping_info   object   

Siparişin teslimat adresi bilgilerini vermektedir..

billing_info   object   

Siparişin faturalandırma bilgilerini vermektedir..

cargo_info   object   

Siparişi kargo bilgilerini vermektedir.

order_items   object   

Sipariş oluşturan ürünlerin bilgisini vermektedir vermektedir.

Siparişi Sipariş ID ile Güncelle

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request PUT \
    "https://api.sopyo.dev/api/v2/orders/id/{id}" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"cargo_info\": {
        \"company\": null,
        \"type\": null,
        \"campaing_no\": null,
        \"tracking_no\": null
    }
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/orders/id/{id}"
);

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

let body = {
    "cargo_info": {
        "company": null,
        "type": null,
        "campaing_no": null,
        "tracking_no": null
    }
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.sopyo.dev/api/v2/orders/id/{id}',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'cargo_info' => [
                'company' => null,
                'type' => null,
                'campaing_no' => null,
                'tracking_no' => null,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/orders/id/{id}'
payload = {
    "cargo_info": {
        "company": null,
        "type": null,
        "campaing_no": null,
        "tracking_no": null
    }
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "data": {
        "id": 198,
        "order_code": 881448484,
        "order_type": "SOPYOAPI",
        "order_date": "2022-11-10 12:34",
        "order_status": 1,
        "market_place_id": null,
        "commission_total": 0,
        "total_price": 0,
        "customer_info": {
            "id": 169,
            "name": "Sinan Gülsever",
            "email": "sinan@sopyo.com",
            "phone": null,
            "tax_no": null,
            "tax_office": null
        },
        "shipping_info": {
            "full_name": "Sinan Gülsever",
            "gsm": "5346656326",
            "identification_no": "0525841",
            "city": "BURSA",
            "district": "Demirtaş",
            "neighborhood": "Demirtaş",
            "postal_code": null,
            "address": "BURSA"
        },
        "billing_info": {
            "full_name": "Sinan Gülsever",
            "gsm": "5346656326",
            "identification_no": null,
            "tax_number": 5588,
            "tax_office": "Nilüfer",
            "city": "BURSA",
            "district": "Demirtaş",
            "neighborhood": null,
            "postal_code": null,
            "address": "BURSA"
        },
        "cargo_info": {
            "company": null,
            "type": null,
            "campaing_no": null,
            "tracking_no": null
        },
        "order_items": [
            {
                "marketplace_id": null,
                "marketplace_product_id": null,
                "stock_code": "7070",
                "product_name": "Test ürün",
                "variant_stock_code": null,
                "variant_name": null,
                "commission_price": null,
                "quantity": 1,
                "total_price": 780
            }
        ]
    }
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Not Found"
}
 

Request      

PUT api/v2/orders/id/{id}

Body Parameters

order_status   number  optional  

Sipariş durumu, 1,2,3,4 değerleri içermelidir

erp_transfer_status   number  optional  

Sipariş erp aktarım durumu 0,1 değerleri içermelidir

cargo_info   object   

Sipariş kargo bilgisi

billing_info.company   string   

Kargo firma bilgisi.

billing_info.type   string   

Kargo tipi bilgisi. (Alıcı Öder/Gönderici Öder)

billing_info.campaing_no   string   

Kargo kapmanya kodu bilgisi

billing_info.tracking_no   string   

Kargo takip kodu bilgisi

Response

Response Fields

id   int   

Sipariş Id si

order_code   string   

Sipariş kodu bilgisi vermektedir.

order_type   string   

Sipariş tipi, Trendyol,Hepsiburada,N11 vs siparişin oluşturulduğu market bilgisini vermektedir.

order_status   string   

Sipariş durumu bilgisini vermektedir.
Onay Bekleyen Siparişler 1
Onaylanan Siparişler 2
Kargolanan Siparişler 3
İptal Edilen Siparişler 4

market_place_id   string   

Sipariş pazaryeri bilgisini vermektedir.

commission_total   decimal   

Sipariş komisyon tutarı bilgisini vermektedir.

total_price   decimal   

Siparişin toplam tutarı bilgisini vermektedir.

customer_info   object   

Müşteri bilgisini vermektedir.

shipping_info   object   

Siparişin teslimat adresi bilgilerini vermektedir..

billing_info   object   

Siparişin faturalandırma bilgilerini vermektedir..

cargo_info   object   

Siparişi kargo bilgilerini vermektedir.

order_items   object   

Sipariş oluşturan ürünlerin bilgisini vermektedir vermektedir.

Sipariş Kaydı Sil

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request DELETE \
    "https://api.sopyo.dev/api/v2/orders/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.sopyo.dev/api/v2/orders/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.sopyo.dev/api/v2/orders/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/orders/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

DELETE api/v2/orders/{id}

URL Parameters

id   integer   

Sipariş ID

Sipariş Fatura İletimi

Kimlik doğrulama gerektirir

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/orders/sendOrderMarketPlace/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
const url = new URL(
    "https://api.sopyo.dev/api/v2/orders/sendOrderMarketPlace/1"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/orders/sendOrderMarketPlace/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/orders/sendOrderMarketPlace/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Örnek Servis Cevabı (200, İşlem Başarılı):


{
    "status": true,
    "message": "İşlem başarılı"
}
 

Örnek Servis Cevabı (401, Kimlik Doğrulanmamış):


{
    "status": false,
    "message": "Unauthenticated."
}
 

Örnek Servis Cevabı (404, Kayıt Bulunamadı):


{
    "status": false,
    "message": "Kayıt Bulunamadı !"
}
 

Request      

POST api/v2/orders/sendOrderMarketPlace/{order_code}

URL Parameters

order_code   string   

Sipariş Kodu

Body Parameters

base64   string  optional  

Siparişe ait faturanın pdfinin base64 hali

Stok & Fiyat Yönetimi

Stok ve Fiyat güncelleme işlemleri bu bölümde yapabilirsiniz.

Stok & Fiyat Güncelle

Kimlik doğrulama gerektirir

Stok ve fiyat güncelleme işlemi

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/process/price-and-stock" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"stock_code\": \"584854854\",
            \"type\": \"product\",
            \"stock\": 60,
            \"price_1\": [
                {
                    \"sale_price\": \"7\",
                    \"list_price\": \"3.31\"
                }
            ],
            \"price_2\": [
                {
                    \"sale_price\": \"72810\",
                    \"list_price\": \"14586\"
                }
            ],
            \"price_3\": [
                {
                    \"sale_price\": \"7.1\",
                    \"list_price\": \"0.27\"
                }
            ],
            \"price_4\": [
                {
                    \"sale_price\": \"494\",
                    \"list_price\": \"83\"
                }
            ],
            \"price_5\": [
                {
                    \"sale_price\": \"03\",
                    \"list_price\": \"3.6\"
                }
            ],
            \"price_6\": [
                {
                    \"sale_price\": \"0.39\",
                    \"list_price\": \"4.40\"
                }
            ],
            \"price_7\": [
                {
                    \"sale_price\": \"883537.9\",
                    \"list_price\": \"69770\"
                }
            ],
            \"price_8\": [
                {
                    \"sale_price\": \"80.8\",
                    \"list_price\": \"74.7\"
                }
            ],
            \"price_9\": [
                {
                    \"sale_price\": \"0391\",
                    \"list_price\": \"4\"
                }
            ],
            \"price_10\": [
                {
                    \"sale_price\": \"71336328.3\",
                    \"list_price\": \"2\"
                }
            ]
        }
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/process/price-and-stock"
);

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

let body = {
    "items": [
        {
            "stock_code": "584854854",
            "type": "product",
            "stock": 60,
            "price_1": [
                {
                    "sale_price": "7",
                    "list_price": "3.31"
                }
            ],
            "price_2": [
                {
                    "sale_price": "72810",
                    "list_price": "14586"
                }
            ],
            "price_3": [
                {
                    "sale_price": "7.1",
                    "list_price": "0.27"
                }
            ],
            "price_4": [
                {
                    "sale_price": "494",
                    "list_price": "83"
                }
            ],
            "price_5": [
                {
                    "sale_price": "03",
                    "list_price": "3.6"
                }
            ],
            "price_6": [
                {
                    "sale_price": "0.39",
                    "list_price": "4.40"
                }
            ],
            "price_7": [
                {
                    "sale_price": "883537.9",
                    "list_price": "69770"
                }
            ],
            "price_8": [
                {
                    "sale_price": "80.8",
                    "list_price": "74.7"
                }
            ],
            "price_9": [
                {
                    "sale_price": "0391",
                    "list_price": "4"
                }
            ],
            "price_10": [
                {
                    "sale_price": "71336328.3",
                    "list_price": "2"
                }
            ]
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/process/price-and-stock',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'items' => [
                [
                    'stock_code' => '584854854',
                    'type' => 'product',
                    'stock' => 60,
                    'price_1' => [
                        [
                            'sale_price' => '7',
                            'list_price' => '3.31',
                        ],
                    ],
                    'price_2' => [
                        [
                            'sale_price' => '72810',
                            'list_price' => '14586',
                        ],
                    ],
                    'price_3' => [
                        [
                            'sale_price' => '7.1',
                            'list_price' => '0.27',
                        ],
                    ],
                    'price_4' => [
                        [
                            'sale_price' => '494',
                            'list_price' => '83',
                        ],
                    ],
                    'price_5' => [
                        [
                            'sale_price' => '03',
                            'list_price' => '3.6',
                        ],
                    ],
                    'price_6' => [
                        [
                            'sale_price' => '0.39',
                            'list_price' => '4.40',
                        ],
                    ],
                    'price_7' => [
                        [
                            'sale_price' => '883537.9',
                            'list_price' => '69770',
                        ],
                    ],
                    'price_8' => [
                        [
                            'sale_price' => '80.8',
                            'list_price' => '74.7',
                        ],
                    ],
                    'price_9' => [
                        [
                            'sale_price' => '0391',
                            'list_price' => '4',
                        ],
                    ],
                    'price_10' => [
                        [
                            'sale_price' => '71336328.3',
                            'list_price' => '2',
                        ],
                    ],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/process/price-and-stock'
payload = {
    "items": [
        {
            "stock_code": "584854854",
            "type": "product",
            "stock": 60,
            "price_1": [
                {
                    "sale_price": "7",
                    "list_price": "3.31"
                }
            ],
            "price_2": [
                {
                    "sale_price": "72810",
                    "list_price": "14586"
                }
            ],
            "price_3": [
                {
                    "sale_price": "7.1",
                    "list_price": "0.27"
                }
            ],
            "price_4": [
                {
                    "sale_price": "494",
                    "list_price": "83"
                }
            ],
            "price_5": [
                {
                    "sale_price": "03",
                    "list_price": "3.6"
                }
            ],
            "price_6": [
                {
                    "sale_price": "0.39",
                    "list_price": "4.40"
                }
            ],
            "price_7": [
                {
                    "sale_price": "883537.9",
                    "list_price": "69770"
                }
            ],
            "price_8": [
                {
                    "sale_price": "80.8",
                    "list_price": "74.7"
                }
            ],
            "price_9": [
                {
                    "sale_price": "0391",
                    "list_price": "4"
                }
            ],
            "price_10": [
                {
                    "sale_price": "71336328.3",
                    "list_price": "2"
                }
            ]
        }
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, Ok):


{
    "status": true,
    "message": "",
    "success": [],
    "errors": [],
    "success_count": 0,
    "error_count": 0
}
 

Request      

POST api/v2/process/price-and-stock

Body Parameters

items   object   

Fiyat ve stok güncelleme yapacağınız ürünleri items değeri ile gönderiniz.
Ürün veya fiyat güncellemek için fiyat grublarına (price_2,price_2...), stok bilgisi güncellemek için stock bilgisi gönderebilirsiniz.

items[].stock_code   string   

Ürün veya varyant stok kodu gönderiniz.

items[].type   string   

Tip olarak ürün ise product varyant ise variant şeklinde gönderiniz.

items[].stock   integer  optional  

Ürün veya varyant stok bilgisi gönderiniz.

price_1   object[]  optional  

price_1[].sale_price   decimal   

Fiyat grubu 1 için satış fiyatı.

price_1[].list_price   decimal  optional  

Fiyat grubu 1 için liste fiyatı.

price_2   object[]  optional  

price_2[].sale_price   string   

Fiyat grubu 2 için satış fiyatı.

price_2[].list_price   string  optional  

Fiyat grubu 2 için liste fiyatı.

price_3   object[]  optional  

price_3[].sale_price   string   

Fiyat grubu 3 için satış fiyatı.

price_3[].list_price   string  optional  

Fiyat grubu 3 için liste fiyatı.

price_4   object[]  optional  

price_4[].sale_price   string   

Fiyat grubu 4 için satış fiyatı.

price_4[].list_price   string  optional  

Fiyat grubu 4 için liste fiyatı.

price_5   object[]  optional  

price_5[].sale_price   string   

Fiyat grubu 5 için satış fiyatı.

price_5[].list_price   string  optional  

Fiyat grubu 5 için liste fiyatı.

price_6   object[]  optional  

price_6[].sale_price   string   

Fiyat grubu 6 için satış fiyatı.

price_6[].list_price   string  optional  

Fiyat grubu 6 için liste fiyatı.

price_7   object[]  optional  

price_7[].sale_price   string   

Fiyat grubu 7 için satış fiyatı.

price_7[].list_price   string  optional  

Fiyat grubu 7 için liste fiyatı.

price_8   object[]  optional  

price_8[].sale_price   string   

Fiyat grubu 8 için satış fiyatı.

price_8[].list_price   string  optional  

Fiyat grubu 8 için liste fiyatı.

price_9   object[]  optional  

price_9[].sale_price   string   

Fiyat grubu 9 için satış fiyatı.

price_9[].list_price   string  optional  

Fiyat grubu 9 için liste fiyatı.

price_10   object[]  optional  

price_10[].sale_price   string   

Fiyat grubu 10 için satış fiyatı.

price_10[].list_price   string  optional  

Fiyat grubu 10 için liste fiyatı.

Response

Response Fields

success   object   

Başarılı güncellemelerin stok kodu bilgisini vermektedir.

errors   object   

Başarısız işlemleri, içerisinde stok kodu ve başarısız bilgi mesajı ile birlikte vermektedir.

success_count   integer   

Başarılı olan işlemlerin toplam sayısını vermektedir.

errors   integer   

Başarısız olan işlemlerini toplam sayısını vermektedir.

Fiyat Güncelle

Kimlik doğrulama gerektirir

Ürün ve varyant fiyat güncelleme işlemi

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/process/price" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"stock_code\": \"584854854\",
            \"type\": \"product\",
            \"price_1\": [
                {
                    \"sale_price\": \"7\",
                    \"list_price\": \"3.31\"
                }
            ],
            \"price_2\": [
                {
                    \"sale_price\": \"72810\",
                    \"list_price\": \"14586\"
                }
            ],
            \"price_3\": [
                {
                    \"sale_price\": \"7.1\",
                    \"list_price\": \"0.27\"
                }
            ],
            \"price_4\": [
                {
                    \"sale_price\": \"494\",
                    \"list_price\": \"83\"
                }
            ],
            \"price_5\": [
                {
                    \"sale_price\": \"03\",
                    \"list_price\": \"3.6\"
                }
            ],
            \"price_6\": [
                {
                    \"sale_price\": \"0.39\",
                    \"list_price\": \"4.40\"
                }
            ],
            \"price_7\": [
                {
                    \"sale_price\": \"883537.9\",
                    \"list_price\": \"69770\"
                }
            ],
            \"price_8\": [
                {
                    \"sale_price\": \"80.8\",
                    \"list_price\": \"74.7\"
                }
            ],
            \"price_9\": [
                {
                    \"sale_price\": \"0391\",
                    \"list_price\": \"4\"
                }
            ],
            \"price_10\": [
                {
                    \"sale_price\": \"71336328.3\",
                    \"list_price\": \"2\"
                }
            ]
        }
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/process/price"
);

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

let body = {
    "items": [
        {
            "stock_code": "584854854",
            "type": "product",
            "price_1": [
                {
                    "sale_price": "7",
                    "list_price": "3.31"
                }
            ],
            "price_2": [
                {
                    "sale_price": "72810",
                    "list_price": "14586"
                }
            ],
            "price_3": [
                {
                    "sale_price": "7.1",
                    "list_price": "0.27"
                }
            ],
            "price_4": [
                {
                    "sale_price": "494",
                    "list_price": "83"
                }
            ],
            "price_5": [
                {
                    "sale_price": "03",
                    "list_price": "3.6"
                }
            ],
            "price_6": [
                {
                    "sale_price": "0.39",
                    "list_price": "4.40"
                }
            ],
            "price_7": [
                {
                    "sale_price": "883537.9",
                    "list_price": "69770"
                }
            ],
            "price_8": [
                {
                    "sale_price": "80.8",
                    "list_price": "74.7"
                }
            ],
            "price_9": [
                {
                    "sale_price": "0391",
                    "list_price": "4"
                }
            ],
            "price_10": [
                {
                    "sale_price": "71336328.3",
                    "list_price": "2"
                }
            ]
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/process/price',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'items' => [
                [
                    'stock_code' => '584854854',
                    'type' => 'product',
                    'price_1' => [
                        [
                            'sale_price' => '7',
                            'list_price' => '3.31',
                        ],
                    ],
                    'price_2' => [
                        [
                            'sale_price' => '72810',
                            'list_price' => '14586',
                        ],
                    ],
                    'price_3' => [
                        [
                            'sale_price' => '7.1',
                            'list_price' => '0.27',
                        ],
                    ],
                    'price_4' => [
                        [
                            'sale_price' => '494',
                            'list_price' => '83',
                        ],
                    ],
                    'price_5' => [
                        [
                            'sale_price' => '03',
                            'list_price' => '3.6',
                        ],
                    ],
                    'price_6' => [
                        [
                            'sale_price' => '0.39',
                            'list_price' => '4.40',
                        ],
                    ],
                    'price_7' => [
                        [
                            'sale_price' => '883537.9',
                            'list_price' => '69770',
                        ],
                    ],
                    'price_8' => [
                        [
                            'sale_price' => '80.8',
                            'list_price' => '74.7',
                        ],
                    ],
                    'price_9' => [
                        [
                            'sale_price' => '0391',
                            'list_price' => '4',
                        ],
                    ],
                    'price_10' => [
                        [
                            'sale_price' => '71336328.3',
                            'list_price' => '2',
                        ],
                    ],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/process/price'
payload = {
    "items": [
        {
            "stock_code": "584854854",
            "type": "product",
            "price_1": [
                {
                    "sale_price": "7",
                    "list_price": "3.31"
                }
            ],
            "price_2": [
                {
                    "sale_price": "72810",
                    "list_price": "14586"
                }
            ],
            "price_3": [
                {
                    "sale_price": "7.1",
                    "list_price": "0.27"
                }
            ],
            "price_4": [
                {
                    "sale_price": "494",
                    "list_price": "83"
                }
            ],
            "price_5": [
                {
                    "sale_price": "03",
                    "list_price": "3.6"
                }
            ],
            "price_6": [
                {
                    "sale_price": "0.39",
                    "list_price": "4.40"
                }
            ],
            "price_7": [
                {
                    "sale_price": "883537.9",
                    "list_price": "69770"
                }
            ],
            "price_8": [
                {
                    "sale_price": "80.8",
                    "list_price": "74.7"
                }
            ],
            "price_9": [
                {
                    "sale_price": "0391",
                    "list_price": "4"
                }
            ],
            "price_10": [
                {
                    "sale_price": "71336328.3",
                    "list_price": "2"
                }
            ]
        }
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, Ok):


{
    "status": true,
    "message": "",
    "success": [],
    "errors": [],
    "success_count": 0,
    "error_count": 0
}
 

Request      

POST api/v2/process/price

Body Parameters

items   object   

Fiyat güncelleme yapacağınız ürünleri items değeri ile gönderiniz

items[].stock_code   string   

Ürün veya varyant stok kodu gönderiniz.

items[].type   string   

Tip olarak ürün ise product varyant ise variant şeklinde gönderiniz.

price_1   object[]  optional  

price_1[].sale_price   decimal   

Fiyat grubu 1 için satış fiyatı.

price_1[].list_price   decimal  optional  

Fiyat grubu 1 için liste fiyatı.

price_2   object[]  optional  

price_2[].sale_price   string   

Fiyat grubu 2 için satış fiyatı.

price_2[].list_price   string  optional  

Fiyat grubu 2 için liste fiyatı.

price_3   object[]  optional  

price_3[].sale_price   string   

Fiyat grubu 3 için satış fiyatı.

price_3[].list_price   string  optional  

Fiyat grubu 3 için liste fiyatı.

price_4   object[]  optional  

price_4[].sale_price   string   

Fiyat grubu 4 için satış fiyatı.

price_4[].list_price   string  optional  

Fiyat grubu 4 için liste fiyatı.

price_5   object[]  optional  

price_5[].sale_price   string   

Fiyat grubu 5 için satış fiyatı.

price_5[].list_price   string  optional  

Fiyat grubu 5 için liste fiyatı.

price_6   object[]  optional  

price_6[].sale_price   string   

Fiyat grubu 6 için satış fiyatı.

price_6[].list_price   string  optional  

Fiyat grubu 6 için liste fiyatı.

price_7   object[]  optional  

price_7[].sale_price   string   

Fiyat grubu 7 için satış fiyatı.

price_7[].list_price   string  optional  

Fiyat grubu 7 için liste fiyatı.

price_8   object[]  optional  

price_8[].sale_price   string   

Fiyat grubu 8 için satış fiyatı.

price_8[].list_price   string  optional  

Fiyat grubu 8 için liste fiyatı.

price_9   object[]  optional  

price_9[].sale_price   string   

Fiyat grubu 9 için satış fiyatı.

price_9[].list_price   string  optional  

Fiyat grubu 9 için liste fiyatı.

price_10   object[]  optional  

price_10[].sale_price   string   

Fiyat grubu 10 için satış fiyatı.

price_10[].list_price   string  optional  

Fiyat grubu 10 için liste fiyatı.

Response

Response Fields

success   object   

Başarılı güncellemelerin stok kodu bilgisini vermektedir.

errors   object   

Başarısız işlemleri, içerisinde stok kodu ve başarısız bilgi mesajı ile birlikte vermektedir.

success_count   integer   

Başarılı olan işlemlerin toplam sayısını vermektedir.

errors   integer   

Başarısız olan işlemlerini toplam sayısını vermektedir.

Stok Güncelle

Kimlik doğrulama gerektirir

Ürün ve varyant stok güncelleme işlemi

Örnek Servis İsteği:
curl --request POST \
    "https://api.sopyo.dev/api/v2/process/stock" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"stock_code\": \"584854854\",
            \"type\": \"product\",
            \"stock\": 60
        }
    ]
}"
const url = new URL(
    "https://api.sopyo.dev/api/v2/process/stock"
);

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

let body = {
    "items": [
        {
            "stock_code": "584854854",
            "type": "product",
            "stock": 60
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sopyo.dev/api/v2/process/stock',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'items' => [
                [
                    'stock_code' => '584854854',
                    'type' => 'product',
                    'stock' => 60,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.sopyo.dev/api/v2/process/stock'
payload = {
    "items": [
        {
            "stock_code": "584854854",
            "type": "product",
            "stock": 60
        }
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Örnek Servis Cevabı (200, Ok):


{
    "status": true,
    "message": "",
    "success": [],
    "errors": [],
    "success_count": 0,
    "error_count": 0
}
 

Request      

POST api/v2/process/stock

Body Parameters

items   object   

Stok güncelleme yapacağınız ürünleri items değeri ile gönderiniz.

items[].stock_code   string   

Ürün veya varyant stok kodu gönderiniz.

items[].type   string   

Tip olarak ürün ise product varyant ise variant şeklinde gönderiniz.

items[].stock   integer   

Ürün veya varyant stok bilgisi gönderiniz.

Response

Response Fields

success   object   

Başarılı güncellemelerin stok kodu bilgisini vermektedir.

errors   object   

Başarısız işlemleri, içerisinde stok kodu ve başarısız bilgi mesajı ile birlikte vermektedir.

success_count   integer   

Başarılı olan işlemlerin toplam sayısını vermektedir.

errors   integer   

Başarısız olan işlemlerini toplam sayısını vermektedir.