README

Slug

Welcome to slug documentation file.

This documentation file 'slug operations' and implementation of modules contains.

Note!!

Slug must unique. This rule check by server-side. This rule check is applied during insertion and updating.

These modules;

  • Brand
  • Product
  • Showcase
  • Category

Slug for Brand Module

A template is required when creating each slug.

The template for the brand is as follows.

Brand slugs generate by brand name.

Users can set or edit slug. In addition, the system will suggestion.

Only the brand name is required for recommendations.

Suggestion Slug Of Brand

METHOD : POST

URL : /apps//slugs

Payload

{
  "name": "??Store of HP Products//////"
}

Note!!

SuggestionSlug endpoint does not include invalid characters.

{
  "success": true,
  "data": "store-of-hp-products"
}

Effect of Seo Option on the Brand

With the addition of Seo Option to the Brand model, some endpoints have been updated. These models are;

BrandSeoOption Model

{
        "slug": "string",
        "pageTitle": "string",
        "description": "string"
}

SeoOption model add to BrandRequestDto

  • InsertBrand

SeoOption model add to BrandResponseDto

  • GetBrands

  • GetSingleBrand

  • FilterBrands

  • InsertBrand

  • UpdateBrand

SeoOption model add to BrandUpdateRequestDto

  • UpdateBrand

Slug for Category Module

Here, a similar structure to Brand is used.

The only difference is that the Seo Option fields are localized.

Suggestion Slug Of Category

METHOD : POST

URL : /apps//slugs

We are sending the localized category slug name as a parameter.

Payload

{
  "name": {
    "tr": "Kate?go)ri 117",
    "en": "Ca*te//gory    117"
  }
}

Note!!

SuggestionSlug endpoint does not include invalid characters.

{
  "success": true,
  "data": {
    "tr": "kategori-117",
    "en": "category-117"
  }
}

Effect of Seo Option on the Category

With the addition of Seo Option to the Category model, some endpoints have been updated.

These models are;

CategorySeoOption Model

{
 
    "slug": {
       "tr": "Kategori 117",
       "en": "Category 117"
    },
    "pageTitle": {
      "tr": "başlık 117",
      "en": "title 117"
    },
    "description": {
      "tr": "açık 117",
      "en": "desc 117"
    }
}

CategorySeoOption model add to CategoryRequestDto

  • InsertCategory
  • InsertSubCategory

CategorySeoOption model add to CategoryResponseDto

  • InsertCategory
  • GetCategories
  • InsertSubCategory
  • FindCategory
  • GetCategoriesByParentCategory
  • GetCategoriesForClient
  • GetCategoryForClient
  • FilterCategories
  • MoveCategoryAsync
  • GetCategoriesWithOptionForClient

CategorySeoOption model add to CategoryUpdateRequestDto

  • UpdateCategory

Slug for Showcase

Here, a same structure to Category is used.

Seo Option fields are localized for auto show cases and manual show cases.

Suggestion Slug Of Showcase

This part is same with Category module.

Effect of Seo Option on the Showcase

With the addition of Seo Option to the Showcase model, some endpoints have been updated.

These endpoints are;

ShowcaseSeoOption Model

{
 
    "slug": {
       "tr": "Vitrin 117",
       "en": "Showcase 117"
    },
    "pageTitle": {
      "tr": "başlık 117",
      "en": "title 117"
    },
    "description": {
      "tr": "açık 117",
      "en": "desc 117"
    }
}

ShowcaseSeoOption model add to ShowcaseRequestDto

  • InsertShowcase

ShowcaseSeoOption model add to ShowcaseResponseDto

  • GetSingleShowcase
  • MoveProductForShowcase
  • GetShowcasesIgnoreProduct
  • GetShowcases
  • GetShowcasesForClient
  • GetSingleWithProductPaginationForClient
  • FilterShowcase
  • GetFilterModelForShowcase
  • GetIncludesShowcaseByProduct

ShowcaseSeoOption model add to ShowcaseUpdateRequestDto

  • UpdateShowcase

Slug for Product Module

Seo Option fields are localized like category and showcase modules.

Adding a Seo Option field to the main product is mandatory.

Since it is a laborious process for the user to enter the Seo Options of the variants of the main product, the seo options of the variant products are created in the background.

When there is an update process of the Variant Group, the seo options of the products of that variant are updated in the background.

Structure of variant product slug.

{variantName1}-{variantName2}-{variantNameN}-{slug}

Suggestion Slug Of Product

METHOD : POST

URL : /apps//products/slugs

While receiving the Slug suggestion, the request is sent with the name, category id and brand id information to be given to the localized Slug.

If there is a Category and Brand, it is added to the slug and returned.

Structure of response slug name.

{categoryName:optional}-{brandName:optional}-{name:mandatory}

Payload

{
  "name": {
    "en": "Prod*u??ct 204",
    "tr": "Ürün 204"
  },
  "categoryId": "63a6b178c3389f94fd9e7f42",
  "brandId": "63a6b24ec3389f94fd9e7fa9"
}

Note!!

SuggestionSlug endpoint does not include invalid characters.

{
  "success": true,
  "data": {
    "en": "test-category-1-marka-1-product-204",
    "tr": "kategori-1-marka-1-urun-204"
  }
}

Effect of Seo Option on the Product

With the addition of Seo Option to the Product model, some endpoints have been updated.

These models are;

CategorySeoOption Model

{
 
    "slug": {
       "tr": "Ürün 117",
       "en": "Product 117"
    },
    "pageTitle": {
      "tr": "başlık 117",
      "en": "title 117"
    },
    "description": {
      "tr": "açık 117",
      "en": "desc 117"
    }
}

ProductSeoOption model add to ResponseRequestDto

  • InsertProductAsync
  • InsertProductCombineVariant
  • UpdateProductCombineVariant
  • PatchProduct
  • UpdateProductAsync
  • ImportProducts

ProductSeoOption model add to ResponseResponseDto

  • GetProductsWithAdvancedFilter
  • GetProductsWithCategoryAsync
  • GetProductsAsync
  • GetSingleProductAsync
  • GetVariantsOfProduct
  • GetProductsForClient
  • GetProductsWithAdvancedFilterForClient
  • GetProductForClient
  • GetVariantsOfProductForClient