> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x-mart.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Crear tiendas y canales de venta

> This endpoint allows registering stores and sales channels in the system. Important!: Each request sent is processed as a new configuration, so if a store, sales channel, warehouse, etc. is not sent, its entire configuration will be deleted



## OpenAPI

````yaml POST /v3/channels-stores
openapi: 3.0.1
info:
  title: Api V3 documentación
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.artisn.desarrollo-redbrand.com/api
  - url: https://api.kfc-group.desarrollo-redbrand.com
  - url: https://{apiId}.execute-api.{region}.amazonaws.com/{stage}
    description: API Gateway (PRIVATE; invocación típica vía VPC endpoint).
    variables:
      apiId:
        default: '{api-id}'
        description: ID del API REST desplegado.
      region:
        default: us-east-1
      stage:
        default: dev
        description: Mismo valor que parámetro EnvironmentName del stack.
security:
  - bearerAuth: []
paths:
  /v3/channels-stores:
    post:
      description: >-
        This endpoint allows registering stores and sales channels in the
        system. Important!: Each request sent is processed as a new
        configuration, so if a store, sales channel, warehouse, etc. is not
        sent, its entire configuration will be deleted
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                stores:
                  type: array
                  description: List of stores to create
                  items:
                    $ref: '#/components/schemas/Store'
                channels:
                  type: array
                  description: List of sales channels to create
                  items:
                    $ref: '#/components/schemas/Channel'
      responses:
        '200':
          description: response upon logging in
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessToken:
                    type: string
                    description: >-
                      The access token to be used in the API. DO NOT EXPOSE THIS
                      TOKEN TO THE CLIENT!
                    example: >-
                      eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
        '401':
          description: authorization error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
      security: []
components:
  schemas:
    Store:
      type: object
      properties:
        name:
          type: string
          example: New store 805
        active:
          type: boolean
          example: true
        storeId:
          type: integer
          example: 805
        services:
          type: array
          items:
            $ref: '#/components/schemas/Service'
        vendorId:
          description: Unique brand identifier. *This identifier is provided by Trade.
          type: integer
          example: 16
        schedulesByChannel:
          type: array
          items:
            $ref: '#/components/schemas/SchedulesByChannel'
        storeCode:
          type: string
          example: T005
        taxesInfo:
          $ref: '#/components/schemas/TaxesInfo'
        contactInfo:
          $ref: '#/components/schemas/ContactInfo'
        deliveryInfo:
          $ref: '#/components/schemas/DeliveryInfo'
        locationInfo:
          $ref: '#/components/schemas/LocationInfo'
        storeChannels:
          type: array
          items:
            type: string
            example: 0F049503-85CF-E511-80C6-000D3A3261F3
    Channel:
      type: object
      properties:
        active:
          type: boolean
          example: true
        channel:
          type: string
          example: Llevar
        vendorId:
          type: integer
          example: 16
        channelId:
          type: string
          example: 0E049503-85CF-E511-80C6-000D3A3261F3
        additionalInfo:
          $ref: '#/components/schemas/AdditionalInfo'
        channelReferenceName:
          type: string
          example: Llevar PICKUP
    Unauthorized:
      type: object
      properties:
        statusCode:
          description: Authentication error code.
          type: string
        message:
          description: Error message
          type: string
    Service:
      type: object
      properties:
        name:
          type: string
          example: DELIVERY
        active:
          type: boolean
          example: true
    SchedulesByChannel:
      type: object
      properties:
        channelId:
          type: string
          example: 0F049503-85CF-E511-80C6-000D3A3261F3
        schedules:
          type: array
          items:
            $ref: '#/components/schemas/Schedule'
    TaxesInfo:
      type: object
      properties:
        taxRate:
          type: number
          example: 0
        vatRatePercentage:
          type: number
          example: 12
    ContactInfo:
      type: object
      properties:
        phone:
          type: string
          example: '23955400'
        address:
          type: string
          example: PICHINCHA / QUITO / INAQUITO / AV. AMERICA N37-288 Y VILLALENGUA
    DeliveryInfo:
      type: object
      properties:
        cookTime:
          type: string
          example: '10'
        deliveryId:
          type: integer
          example: 46356
        minimumOrder:
          type: string
          example: '0.00'
        shippingCost:
          type: number
          example: 1.99
    LocationInfo:
      type: object
      properties:
        city:
          type: string
          example: QUITO
        latitude:
          type: string
          example: '-0.17250869436401206'
        longitude:
          type: string
          example: '-78.49125266075134'
    AdditionalInfo:
      type: object
      properties:
        mediaId:
          type: string
          example: E683B6FE-65A9-4D01-B07B-FA1A3C8BCA8D
        mediaName:
          type: string
          example: PICKUP
        relatedLists:
          type: array
          items:
            $ref: '#/components/schemas/RelatedList'
    Schedule:
      type: object
      properties:
        day:
          type: string
          example: FRIDAY
        endTime:
          type: string
          example: '22:30'
        startTime:
          type: string
          example: '10:00'
    RelatedList:
      type: object
      properties:
        listId:
          type: string
          example: 42203FD3-0194-EA11-80EE-000D3A019254
        listName:
          type: string
          example: PICKUP ECOMMERCE T
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````