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

# Create Marketplace



## OpenAPI

````yaml api-reference/openapi.json post /v1/api/marketplace
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.lygosapp.com
    description: Production Server
security: []
paths:
  /v1/api/marketplace:
    post:
      tags:
        - Marketplace
      summary: Create Marketplace
      operationId: create_marketplace_api_v1_api_marketplace_post
      parameters:
        - name: api-key
          in: header
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_create_marketplace_api_v1_api_marketplace_post
            examples:
              example1:
                summary: Exemple de création de marketplace
                value:
                  name: Ma Marketplace
                  color: '#FF5733'
                  fee: 2.5
                  logo: '[fichier binaire ou URL]'
                  favicon: '[fichier binaire ou URL]'
                  form_blocks: >-
                    {"blocks":[{"type":"text","label":"Nom du
                    produit","required":true}]}
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketPlaceGetSchemas'
        '400':
          description: Market place found on API Key
          content:
            application/json:
              examples:
                Market place found on API Key:
                  summary: There is a market place on this api key
                  value:
                    detail:
                      message: There is a market place on this api key
                      type: API_KEY_HAS_MARKETPLACE
                JSON malformé.:
                  summary: 'Champ ''form_blocks'' : JSON malformé.'
                  value:
                    detail:
                      message: 'Champ ''form_blocks'' : JSON malformé.'
                      type: MALFORM_DATA
        '401':
          description: No API key
          content:
            application/json:
              examples:
                No API Key:
                  summary: No API Key
                  value:
                    detail:
                      message: No API Key.
                      type: NO_API_KEY_PROVIDED
        '404':
          description: API Key Not Found
          content:
            application/json:
              examples:
                API Key Not found:
                  summary: API Key Not found
                  value:
                    detail:
                      message: API Key not found
                      type: API_KEY_NOT_FOUND
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_create_marketplace_api_v1_api_marketplace_post:
      properties:
        name:
          type: string
          title: Name
        color:
          type: string
          title: Color
        fee:
          type: number
          title: Fee
        logo:
          anyOf:
            - type: string
              format: binary
            - type: string
          title: Logo
        favicon:
          anyOf:
            - type: string
              format: binary
            - type: string
            - type: 'null'
          title: Favicon
        form_blocks:
          anyOf:
            - type: string
            - type: 'null'
          title: Form Blocks
          default: ''
      type: object
      required:
        - name
        - fee
        - logo
      title: Body_create_marketplace_api_v1_api_marketplace_post
      example:
        name: Ma Marketplace
        color: '#FF5733'
        fee: 2.5
        logo: https://example.com/logo.png
        favicon: https://example.com/favicon.ico
        form_blocks: '{"blocks":[{"type":"text","label":"Nom du produit","required":true}]}'
    MarketPlaceGetSchemas:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
        fee:
          type: number
          title: Fee
        logo:
          anyOf:
            - $ref: '#/components/schemas/ImageSchema'
            - type: 'null'
        favicon:
          anyOf:
            - type: string
            - type: 'null'
          title: Favicon
        form_blocks:
          anyOf:
            - items:
                $ref: '#/components/schemas/MarketFormBlock'
              type: array
            - type: 'null'
          title: Form Blocks
        is_active:
          type: boolean
          title: Is Active
        api_key_id:
          type: string
          format: uuid
          title: Api Key Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - fee
        - is_active
        - api_key_id
        - created_at
      title: MarketPlaceGetSchemas
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ImageSchema:
      properties:
        url:
          type: string
          title: Url
        contentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Contenttype
        fileName:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
        fileType:
          anyOf:
            - type: string
            - type: 'null'
          title: Filetype
        fileKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Filekey
        fileSize:
          anyOf:
            - type: number
            - type: 'null'
          title: Filesize
        id:
          type: string
          format: uuid
          title: Id
        entityType:
          type: string
          title: Entitytype
      type: object
      required:
        - url
        - id
        - entityType
      title: ImageSchema
    MarketFormBlock:
      properties:
        fieldName:
          type: string
          title: Fieldname
        fieldType:
          type: string
          title: Fieldtype
        fieldLabel:
          anyOf:
            - type: string
            - type: 'null'
          title: Fieldlabel
        fieldDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Fielddescription
        fieldOptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/MarketPlaceFormOption'
              type: array
            - type: 'null'
          title: Fieldoptions
        required:
          type: boolean
          title: Required
      type: object
      required:
        - fieldName
        - fieldType
        - required
      title: MarketFormBlock
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MarketPlaceFormOption:
      properties:
        name:
          type: string
          title: Name
        value:
          type: string
          title: Value
      type: object
      required:
        - name
        - value
      title: MarketPlaceFormOption

````