> ## 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 Gateway



## OpenAPI

````yaml api-reference/openapi.json post /v1/api/marketplace/gateway
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/gateway:
    post:
      tags:
        - Marketplace
      summary: Create Gateway
      operationId: create_gateway_api_v1_api_marketplace_gateway_post
      parameters:
        - name: api-key
          in: header
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarketPlaceGatewayCreateSchemas'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketPlaceGatewayGetSchemas'
        '400':
          description: There is a market place on this api key
          content:
            application/json:
              examples:
                Unknow Phone Number:
                  summary: Unknow Phone Number
                  value:
                    detail:
                      message: Unknow Phone Number
                      type: UNKNOWN_PHONE_NUMBER
                Invalid country:
                  summary: Invalid Country
                  value:
                    detail:
                      message: Invalid Country
                      type: INVALID_COUNTRY
                Invalid Phone number:
                  summary: The phone number should only contain digits.
                  value:
                    detail:
                      message: The phone number should only contain digits.
                      type: INVALID_PHONE_NUMBER
                Invalid Phone:
                  summary: The phone number should not contain any whitespace.
                  value:
                    detail:
                      message: The phone number should not contain any whitespace.
                      type: INVALID_PHONE_NUMBER_WHITESPACE
                Invalid Phone Length:
                  summary: Invalid phone length.
                  value:
                    detail:
                      message: Invalid phone length.
                      type: INVALID_PHONE_LENGTH
        '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
                MARKET Place Not found:
                  summary: Market place not found.
                  value:
                    detail:
                      message: Market place not found.
                      type: MARKETPLACE_NOT_FOUND
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MarketPlaceGatewayCreateSchemas:
      properties:
        amount:
          type: integer
          title: Amount
        shop_name:
          type: string
          title: Shop Name
        fee:
          anyOf:
            - type: number
            - type: 'null'
          title: Fee
          default: 2
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: ''
        phone_number:
          type: string
          title: Phone Number
      type: object
      required:
        - amount
        - shop_name
        - phone_number
      title: MarketPlaceGatewayCreateSchemas
    MarketPlaceGatewayGetSchemas:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        amount:
          type: integer
          title: Amount
        currency:
          type: string
          title: Currency
        country:
          type: string
          title: Country
        fee:
          type: number
          title: Fee
        shop_name:
          type: string
          title: Shop Name
        phone_number:
          type: string
          title: Phone Number
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: ''
        marketplace_id:
          type: string
          format: uuid
          title: Marketplace Id
        favicon:
          anyOf:
            - type: string
            - type: 'null'
          title: Favicon
          default: ''
        link:
          type: string
          title: Link
        form_blocks:
          anyOf:
            - items:
                $ref: '#/components/schemas/MarketFormBlock'
              type: array
            - type: 'null'
          title: Form Blocks
          default: []
        creation_date:
          type: string
          format: date-time
          title: Creation Date
        marketplace_logo:
          type: string
          title: Marketplace Logo
        marketplace_favicon:
          anyOf:
            - type: string
            - type: 'null'
          title: Marketplace Favicon
        marketplace_color:
          type: string
          title: Marketplace Color
      type: object
      required:
        - id
        - amount
        - currency
        - country
        - fee
        - shop_name
        - phone_number
        - marketplace_id
        - link
        - creation_date
        - marketplace_logo
        - marketplace_color
      title: MarketPlaceGatewayGetSchemas
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````