> For the complete documentation index, see [llms.txt](https://developer.nilvera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.nilvera.com/api/magaza-api/magaza-islemleri/yeni-magaza-olusturur..md).

# Yeni mağaza oluşturur.

## POST /Stores

> Yeni Mağaza Oluşturur.

```json
{"openapi":"3.0.1","info":{"title":"Market Place API","version":"v1"},"servers":[{"url":"/marketplace"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CreateStoreCommand":{"type":"object","properties":{"StoreAccount":{"allOf":[{"$ref":"#/components/schemas/StoreAccount"}],"nullable":true},"Name":{"type":"string","nullable":true}},"additionalProperties":false},"StoreAccount":{"type":"object","oneOf":[{"$ref":"#/components/schemas/AmazonStore"},{"$ref":"#/components/schemas/CiceksepetiStore"},{"$ref":"#/components/schemas/EtsyStore"},{"$ref":"#/components/schemas/FarmazonStore"},{"$ref":"#/components/schemas/HepsiburadaStore"},{"$ref":"#/components/schemas/IdefixStore"},{"$ref":"#/components/schemas/IkasStore"},{"$ref":"#/components/schemas/N11Store"},{"$ref":"#/components/schemas/PazaramaStore"},{"$ref":"#/components/schemas/PttAvmStore"},{"$ref":"#/components/schemas/QukasoftStore"},{"$ref":"#/components/schemas/ShopierStore"},{"$ref":"#/components/schemas/ShopifyStore"},{"$ref":"#/components/schemas/TrendyolStore"},{"$ref":"#/components/schemas/WooCommerceStore"}],"properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true}},"additionalProperties":false},"AmazonStore":{"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"TaxPercent":{"type":"number","format":"double"}},"additionalProperties":false},"StoreType":{"enum":["Trendyol","Hepsiburada","n11","Ciceksepeti","Pazarama","Amazon","Idefix","PttAvm","GetirFood","GetirCarsi","Yemeksepeti","Etsy","Shopier","Ikas","WooCommerce","Farmazon","Shopify","Qukasoft"],"type":"string"},"CiceksepetiStore":{"required":["ApiKey","EntegratorName","SellerId"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"SellerId":{"minLength":1,"type":"string"},"ApiKey":{"minLength":1,"type":"string"},"EntegratorName":{"minLength":1,"type":"string"}},"additionalProperties":false},"EtsyStore":{"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true}},"additionalProperties":false},"FarmazonStore":{"required":["Password","UserName"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"UserName":{"minLength":1,"type":"string"},"Password":{"minLength":1,"type":"string"}},"additionalProperties":false},"HepsiburadaStore":{"required":["ApiAccount","Key","MerchantID"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"MerchantID":{"minLength":1,"type":"string"},"Key":{"minLength":1,"type":"string"},"ApiAccount":{"minLength":1,"type":"string"}},"additionalProperties":false},"IdefixStore":{"required":["ApiKey","SecretKey","VendorID"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"ApiKey":{"minLength":1,"type":"string"},"SecretKey":{"minLength":1,"type":"string"},"VendorID":{"minLength":1,"type":"string"}},"additionalProperties":false},"IkasStore":{"required":["ClientID","ClientSecret","Subdomain"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"Subdomain":{"minLength":1,"type":"string"},"ClientID":{"minLength":1,"type":"string"},"ClientSecret":{"minLength":1,"type":"string"},"IsAllChannels":{"type":"boolean"}},"additionalProperties":false},"N11Store":{"required":["Appkey","Appsecret"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"Appkey":{"minLength":1,"type":"string"},"Appsecret":{"minLength":1,"type":"string"}},"additionalProperties":false},"PazaramaStore":{"required":["ClientId","ClientSecret"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"ClientId":{"minLength":1,"type":"string"},"ClientSecret":{"minLength":1,"type":"string"}},"additionalProperties":false},"PttAvmStore":{"required":["Token"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"Token":{"minLength":1,"type":"string"}},"additionalProperties":false},"QukasoftStore":{"required":["ApiKey","ApiSecret","StoreUrl"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"StoreUrl":{"minLength":1,"type":"string"},"ApiKey":{"minLength":1,"type":"string"},"ApiSecret":{"minLength":1,"type":"string"}},"additionalProperties":false},"ShopierStore":{"required":["Key"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"Key":{"minLength":1,"type":"string"}},"additionalProperties":false},"ShopifyStore":{"required":["ClientId","ClientSecret","StoreName"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"StoreName":{"minLength":1,"type":"string"},"ClientId":{"minLength":1,"type":"string"},"ClientSecret":{"minLength":1,"type":"string"}},"additionalProperties":false},"TrendyolStore":{"required":["Key","Secret","SupplierID"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"SupplierID":{"minLength":1,"type":"string"},"Key":{"minLength":1,"type":"string"},"Secret":{"minLength":1,"type":"string"}},"additionalProperties":false},"WooCommerceStore":{"required":["ApiKey","ApiSecret","StoreUrl"],"type":"object","properties":{"StoreType":{"allOf":[{"$ref":"#/components/schemas/StoreType"}],"readOnly":true},"StoreUrl":{"minLength":1,"type":"string"},"ApiKey":{"minLength":1,"type":"string"},"ApiSecret":{"minLength":1,"type":"string"}},"additionalProperties":false}}},"paths":{"/Stores":{"post":{"tags":["Stores"],"summary":"Yeni Mağaza Oluşturur.","requestBody":{"content":{"application/json-patch+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateStoreCommand"}]}},"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateStoreCommand"}]}},"text/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateStoreCommand"}]}},"application/*+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateStoreCommand"}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Geçersiz İstek | Gönderdiğiniz istekte geçersiz veriler bulunduğu anlamında gelmektedir | Detaylar için <a target=\"_blank\" href=\"https://developer.nilvera.com/hata-kodlari#badrequest-400\">tıklayınız</a>"},"403":{"description":"Yetkisiz Erişim | Bu uca erişmek için gerekli yetkiye sahip olmadığınız durumda dönülür"},"404":{"description":"Parametrede belirtilen kayıt bulunamadığında dönülür | Detaylar için <a target=\"_blank\" href=\"https://developer.nilvera.com/hata-kodlari#notfound-404\">tıklayınız</a>"}}}}}}
```

{% hint style="info" %}
`StoreAccount` değeri mağaza entegrasyon bilgilerini içermelidir. Mağaza entegrasyon bilgilerini nasıl oluşturacağınıza dair kılavuza [buradan](/api/magaza-api.md) erişebilirsiniz.

`StoreAccount` değeri `StoreType` değerine uygun tanımlanmalıdır.&#x20;

{% tabs fullWidth="false" %}
{% tab title="Trendyol" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"Trendyol",
  "SupplierID" :"Trendyol Satıcı ID",
  "Key":"Trendyol API Key",
  "Secret":"Trendyol API Secret"
}
```

{% endcode %}
{% endtab %}

{% tab title="Hepsiburada" %}

<pre class="language-json" data-title="StoreAccount"><code class="lang-json">{
<strong>  "StoreType" :"Hepsiburada",
</strong>  "MerchantID":"Hepsiburada Mağaza ID",
  "Key":"Hepsiburada Servis Anahtarı",
  "ApiAccount":"nilverasoft_dev"
}
</code></pre>

{% endtab %}

{% tab title="n11" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"n11",
  "Appkey":"n11 API Anahtar",
  "Appsecret":"n11 API Şifre"
}
```

{% endcode %}
{% endtab %}

{% tab title="Ciceksepeti" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"Ciceksepeti",
  "SellerId":"Çiçeksepeti Satıcı ID",
  "ApiKey":"Çiçeksepeti API Key",
  "EntegratorName":"Çiçeksepeti Entegratör Adı"
}
```

{% endcode %}
{% endtab %}

{% tab title="Pazarama" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"Pazarama",
  "ClientId":"Pazarama API Key",
  "ClientSecret":"Pazarama API Secret"
}
```

{% endcode %}
{% endtab %}

{% tab title="Idefix" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"Idefix",
  "ApiKey":"Idefix API KEY",
  "SecretKey":"Idefix API SECRET KEY",
  "VendorID":"Idefix Satıcı ID"
}
```

{% endcode %}
{% endtab %}

{% tab title="PttAvm" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"PttAvm",
  "UserName":"PttAvm API Kullanıcı Adı",
  "Password":"PttAvm API Şifre",
}
```

{% endcode %}
{% endtab %}

{% tab title="Ikas" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"Ikas",
  "Subdomain":"Ikas Mağaza adresi subdomain adı",
  "ClientID":"Ikas client_id",
  "ClientSecret":"Ikas client_secret"
}
```

{% endcode %}
{% endtab %}

{% tab title="WooCommerce" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"WooCommerce",
  "StoreUrl":"WooCommerce Mağaza Website Adresi",
  "ApiKey":"WooCommerce Tüketici anahtarı",
  "ApiSecret":"WooCommerce Tüketici gizli anahtarı"
}
```

{% endcode %}
{% endtab %}

{% tab title="Shopify" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"Shopify",
  "StoreName":"Shopify mağaza adı",
  "ClientId":"Shopify ClientId",
  "ClientSecret":"Shopify ClientSecret"
}
```

{% endcode %}
{% endtab %}

{% tab title="Qukasoft" %}
{% code title="StoreAccount" %}

```json
{
  "StoreType" :"Qukasoft",
  "StoreUrl":"Qukasoft Mağaza Website Adresi",
  "ApiKey":"Qukasoft API Key",
  "ApiSecret":"Qukasoft API Secret"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
{% endhint %}

Oluşturulan mağazanın `ConnectionStatus` değeri `Checking` ise doğrulama süreci devam etmektedir. Bu aşamada bağlantının tamamlanması için durumun `Success` veya `Failed` olarak güncellenmesi beklenmelidir.

* `Checking:` Entegrasyon doğrulama süreci devam etmektedir.
* `Success`: Mağaza doğrulama işlemi başarıyla tamamlanmıştır.
* `Failed`: Mağaza doğrulama işlemi tamamlanmış ancak başarısız olmuştur. Bu durumda mağaza erişim bilgilerini kontrol ederek güncellemeniz gereklidir.

## The StoreType object

```json
{"openapi":"3.0.1","info":{"title":"Market Place API","version":"v1"},"components":{"schemas":{"StoreType":{"enum":["Trendyol","Hepsiburada","n11","Ciceksepeti","Pazarama","Amazon","Idefix","PttAvm","GetirFood","GetirCarsi","Yemeksepeti","Etsy","Shopier","Ikas","WooCommerce","Farmazon","Shopify","Qukasoft"],"type":"string"}}}}
```
