openapi: 3.0.3
info:
  title: 'API Services Document'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://api.nomeo.com'
paths:
  /clients:
    get:
      summary: 'Get list clients'
      description: ''
      parameters:
        -
          in: query
          name: keyword
          description: 'Filter string on (part of) firstname, lastname, companyname.'
          example: test
          required: false
          schema:
            type: string
            description: 'Filter string on (part of) firstname, lastname, companyname.'
            example: test
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'List clients'
                  data:
                    -
                      id: '1'
                      firstname: Joe
                      lastname: Bin
                      company: ''
                      address1: 'Address 1'
                      address2: ''
                      city: CT
                      postcode: '8840'
                      country: BE
                      phone: '111111111'
                      email: mail@domain.be
                      client_type: 'Managed Client'
                      vat_number: ''
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'List clients'
                  data:
                    type: array
                    example:
                      -
                        id: '1'
                        firstname: Joe
                        lastname: Bin
                        company: ''
                        address1: 'Address 1'
                        address2: ''
                        city: CT
                        postcode: '8840'
                        country: BE
                        phone: '111111111'
                        email: mail@domain.be
                        client_type: 'Managed Client'
                        vat_number: ''
                    items:
                      type: object
                  customData:
                    type: array
                    example: []
      tags:
        - Clients
  /clients/add:
    post:
      summary: 'Add client'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Added Client'
                  data:
                    -
                      id: 11287
                      firstname: test
                      lastname: test2
                      company: MS
                      address1: 'test add 1'
                      address2: ''
                      city: London
                      postcode: '134'
                      country: BE
                      phone: '222222'
                      email: testdomain7@test.be
                      client_type: 'Managed Client'
                      vat_number: '111'
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Added Client'
                  data:
                    type: array
                    example:
                      -
                        id: 11287
                        firstname: test
                        lastname: test2
                        company: MS
                        address1: 'test add 1'
                        address2: ''
                        city: London
                        postcode: '134'
                        country: BE
                        phone: '222222'
                        email: testdomain7@test.be
                        client_type: 'Managed Client'
                        vat_number: '111'
                    items:
                      type: object
                  customData:
                    type: array
                    example: []
      tags:
        - Clients
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                firstname:
                  type: string
                  description: 'First name, Number of chars between 1-100.'
                  example: Joe
                lastname:
                  type: string
                  description: 'Last name, Number of chars between 1-100.'
                  example: Bin
                company:
                  type: string
                  description: 'Company name, Number of chars between 1-100.'
                  example: Google
                password:
                  type: string
                  description: "Password, Number of chars between 6-100. <br/>The password contains characters from at least three of the following five categories:\n<br/>(1) English uppercase characters (A – Z)\n<br/>(2) English lowercase characters (a – z)\n<br/>(3) Base 10 digits (0 – 9)\n<br/>(4) Non-alphanumeric (For example: !, $, #, or %)\n<br/>(5) Unicode characters."
                  example: Pass!123
                postcode:
                  type: number
                  description: 'Post code, must be entirely alpha-numeric characters. Number of chars between 1-100.'
                  example: 1234.0
                address1:
                  type: string
                  description: 'Address 1, Number of chars between 1-100.'
                  example: 'Address 1'
                address2:
                  type: string
                  description: 'Address 2, Number of chars between 1-100.'
                  example: 'Address 2'
                city:
                  type: string
                  description: 'City name, Number of chars between 1-100.'
                  example: Test
                country:
                  type: string
                  description: '2 characters ISO country code, Upper case, Reference: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes.'
                  example: BE
                email:
                  type: string
                  description: 'Email, Number of chars between 5-100.'
                  example: info@domain.be
                phone:
                  type: number
                  description: 'Phone, Number of chars between 5-25.'
                  example: 123456789.0
                client_type:
                  type: string
                  description: 'Client type. <br/>Available options: "Managed Client", "Self Servicing Client".'
                  example: 'Managed Client'
                vat_number:
                  type: string
                  description: 'Vat number, must be entirely alpha-numeric characters. Number of chars between 3-100.'
                  example: '123456789'
              required:
                - firstname
                - lastname
                - password
                - postcode
                - address1
                - city
                - country
                - email
                - phone
                - client_type
  '/clients/{clientId}':
    put:
      summary: 'Update client'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Updated Client'
                  data:
                    -
                      id: 11287
                      firstname: test
                      lastname: test2
                      company: MS
                      address1: 'test add 1'
                      address2: ''
                      city: London
                      postcode: '134'
                      country: BE
                      phone: '222222'
                      email: testdomain7@test.be
                      client_type: 'Managed Client'
                      vat_number: '111'
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Updated Client'
                  data:
                    type: array
                    example:
                      -
                        id: 11287
                        firstname: test
                        lastname: test2
                        company: MS
                        address1: 'test add 1'
                        address2: ''
                        city: London
                        postcode: '134'
                        country: BE
                        phone: '222222'
                        email: testdomain7@test.be
                        client_type: 'Managed Client'
                        vat_number: '111'
                    items:
                      type: object
                  customData:
                    type: array
                    example: []
      tags:
        - Clients
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                firstname:
                  type: string
                  description: 'First name, Number of chars between 1-100.'
                  example: Joe
                lastname:
                  type: string
                  description: 'Last name, Number of chars between 1-100.'
                  example: Bin
                company:
                  type: string
                  description: 'Company name, Number of chars between 1-100.'
                  example: Google
                postcode:
                  type: number
                  description: 'Post code, must be entirely alpha-numeric characters. Number of chars between 1-100.'
                  example: 1234.0
                address1:
                  type: string
                  description: 'Address 1, Number of chars between 1-100.'
                  example: 'Address 1'
                address2:
                  type: string
                  description: 'Address 2, Number of chars between 1-100.'
                  example: 'Address 2'
                city:
                  type: string
                  description: 'City name, Number of chars between 1-100.'
                  example: Test
                country:
                  type: string
                  description: '2 characters ISO country code, Upper case, Reference: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes.'
                  example: BE
                email:
                  type: string
                  description: 'Email, Number of chars between 5-100.'
                  example: info@domain.be
                phone:
                  type: number
                  description: 'Phone, Number of chars between 5-25.'
                  example: 123456789.0
                vat_number:
                  type: string
                  description: 'Vat number, must be entirely alpha-numeric characters. Number of chars between 3-100.'
                  example: '123456789'
              required:
                - firstname
                - lastname
                - postcode
                - address1
                - city
                - country
                - email
                - phone
    delete:
      summary: 'Delete client'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Deleted Client'
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Deleted Client'
      tags:
        - Clients
    parameters:
      -
        in: path
        name: clientId
        description: 'Client ID.'
        example: '1'
        required: true
        schema:
          type: string
  /domains/register:
    post:
      summary: 'Register domain'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Registered successfully'
                  data:
                    order_id: 28883
                    domain_id: '26024'
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Registered successfully'
                  data:
                    type: object
                    example:
                      order_id: 28883
                      domain_id: '26024'
                  customData:
                    type: array
                    example: []
      tags:
        - Domain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Domain name. Number of chars between 3-100.'
                  example: testdomain.com
                period:
                  type: integer
                  description: 'Number of years, between 1-10.'
                  example: 1
                action:
                  type: string
                  description: 'Domain action: "register" or "transfer".'
                  example: register
                epp_code:
                  type: string
                  description: 'EPP transfer code. Number of chars between 3-100. Required when action=transfer.'
                  example: '123456'
                client_id:
                  type: integer
                  description: 'Client ID. You can get Client id in "<a href=''#clients-GETclients''>Get list clients</a>" API.'
                  example: 1
                ns1:
                  type: string
                  description: 'Name Server 1. Number of chars between 5-100.'
                  example: ns1.com
                ns2:
                  type: string
                  description: 'Name Server 2. Number of chars between 5-100.'
                  example: ns2.com
                ns3:
                  type: string
                  description: 'Name Server 3. Number of chars between 5-100.'
                  example: ns3.com
                ns4:
                  type: string
                  description: 'Name Server 4. Number of chars between 5-100.'
                  example: ns4.com
              required:
                - name
                - period
                - action
  /domains/check-domain:
    post:
      summary: 'Check the availability of domain'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  available: true
                  message: 'domaintest12345.com is available to register!'
                properties:
                  success:
                    type: boolean
                    example: true
                  available:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'domaintest12345.com is available to register!'
      tags:
        - Domain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Domain name. Number of chars between 3-100.'
                  example: testdomain.com
              required:
                - name
  /domains/list:
    get:
      summary: 'Get domains list'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: '123'
                      domain: testdomain.be
                      domain_name: testdomain.be
                      client_id: '123'
                      expire_date: '2020-12-08'
                      expired: true
                      days_valid: 0
                      status: Pending
                      cancelled_but_not_expired: false
                      expiring_within_60_days: false
                      expired_less_than_180_days_ago: false
                      auto_renew: true
                      registration_date: 08/12/2020
                      registered_to: 08/12/2020
                      registration_period: '1'
                      price: '123.00'
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: '123'
                        domain: testdomain.be
                        domain_name: testdomain.be
                        client_id: '123'
                        expire_date: '2020-12-08'
                        expired: true
                        days_valid: 0
                        status: Pending
                        cancelled_but_not_expired: false
                        expiring_within_60_days: false
                        expired_less_than_180_days_ago: false
                        auto_renew: true
                        registration_date: 08/12/2020
                        registered_to: 08/12/2020
                        registration_period: '1'
                        price: '123.00'
                    items:
                      type: object
      tags:
        - Domain
  '/domains/{domain}/records':
    get:
      summary: 'Get domain DNS records'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  ResultCode: 200
                  ResultMessage: 'Here is zone ''testdomain.com'''
                  Success: true
                  Result:
                    Records:
                      SOA:
                        -
                          ChangeDate: 1675390325
                          Id: 123
                          Priority: 0
                          RecordData: 'ns1.dns.be hostmaster.dns.be 2023020301 7200 7200 604800 3600'
                          RecordMetaType: 0
                          RecordMetaTypeName: Regular
                          RecordName: testdomain.be
                          RecordType: 10
                          RecordTypeName: SOA
                          TTL: 3600
                          ZoneId: 123
                      A: []
                      AAAA: []
                      CNAME: []
                      ANAME: []
                      MX: []
                      TXT: []
                      SRV: []
                      CAA: []
                      NS: []
                      DS: []
                    Zone:
                      Id: 123
                      IsMaster: true
                      IsSecure: false
                      Master: null
                      Name: testdomain.be
                      NotifiedSerial: '123'
                      NsType: MASTER
                      Nsec3Param: null
                      Subdomains: []
                    Office365HaveRecords:
                      mx:
                        mail: false
                      cname:
                        autodiscover: false
                        sip: false
                        lyncdiscover: false
                        msoid: false
                        enterpriseregistration: false
                        enterpriseenrollment: false
                      txt:
                        spf: false
                      srv:
                        sip: false
                        sipfederationtls: false
                    GoogleHaveRecords:
                      mx:
                        aspmx: false
                        alt1: false
                        alt2: false
                        alt3: false
                        alt4: false
                      txt:
                        spf: false
                properties:
                  ResultCode:
                    type: integer
                    example: 200
                  ResultMessage:
                    type: string
                    example: 'Here is zone ''testdomain.com'''
                  Success:
                    type: boolean
                    example: true
                  Result:
                    type: object
                    example:
                      Records:
                        SOA:
                          -
                            ChangeDate: 1675390325
                            Id: 123
                            Priority: 0
                            RecordData: 'ns1.dns.be hostmaster.dns.be 2023020301 7200 7200 604800 3600'
                            RecordMetaType: 0
                            RecordMetaTypeName: Regular
                            RecordName: testdomain.be
                            RecordType: 10
                            RecordTypeName: SOA
                            TTL: 3600
                            ZoneId: 123
                        A: []
                        AAAA: []
                        CNAME: []
                        ANAME: []
                        MX: []
                        TXT: []
                        SRV: []
                        CAA: []
                        NS: []
                        DS: []
                      Zone:
                        Id: 123
                        IsMaster: true
                        IsSecure: false
                        Master: null
                        Name: testdomain.be
                        NotifiedSerial: '123'
                        NsType: MASTER
                        Nsec3Param: null
                        Subdomains: []
                      Office365HaveRecords:
                        mx:
                          mail: false
                        cname:
                          autodiscover: false
                          sip: false
                          lyncdiscover: false
                          msoid: false
                          enterpriseregistration: false
                          enterpriseenrollment: false
                        txt:
                          spf: false
                        srv:
                          sip: false
                          sipfederationtls: false
                      GoogleHaveRecords:
                        mx:
                          aspmx: false
                          alt1: false
                          alt2: false
                          alt3: false
                          alt4: false
                        txt:
                          spf: false
      tags:
        - Domain
    parameters:
      -
        in: path
        name: domain
        description: 'Domain name.'
        example: testdomain.com
        required: true
        schema:
          type: string
  '/domains/{domain}/record':
    post:
      summary: 'Create domain DNS record'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'The record has been added to the zone!'
                  data:
                    record_id: 123
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The record has been added to the zone!'
                  data:
                    type: object
                    example:
                      record_id: 123
                  customData:
                    type: array
                    example: []
      tags:
        - Domain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                record_type_name:
                  type: string
                  description: 'Record type name.<br/>Avaiable options: SOA,A,AAAA,CNAME,ANAME,MX,TXT,SRV,CAA,NS,DS,LUA.'
                  example: A
                record_name:
                  type: string
                  description: 'Record name. Number of chars between 1-100.'
                  example: test
                record_data:
                  type: string
                  description: 'Record data. Number of chars between 1-100.'
                  example: 1.2.3.4
                priority:
                  type: integer
                  description: 'Priority, between 1-1000.'
                  example: 1
                fallback_ip:
                  type: string
                  description: 'Fallback IP if record_type_name=A.'
                  example: 1.2.3.4
              required:
                - record_type_name
                - record_name
                - record_data
                - priority
    put:
      summary: 'Update domain DNS record'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'The record has been updated!'
                  data: []
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The record has been updated!'
                  data:
                    type: array
                    example: []
                  customData:
                    type: array
                    example: []
      tags:
        - Domain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: 'Record ID.'
                  example: '1'
                record_type_name:
                  type: string
                  description: 'Record type name.<br/>Avaiable options: SOA,A,AAAA,CNAME,ANAME,MX,TXT,SRV,CAA,NS,DS,LUA.'
                  example: A
                record_name:
                  type: string
                  description: 'Record name. Number of chars between 1-100.'
                  example: test
                record_data:
                  type: string
                  description: 'Record data. Number of chars between 1-100.'
                  example: 1.2.3.4
                priority:
                  type: integer
                  description: 'Priority, between 1-1000.'
                  example: 1
                fallback_ip:
                  type: string
                  description: 'Fallback IP if record_type_name=A.'
                  example: 1.2.3.4
              required:
                - id
                - record_type_name
                - record_name
                - record_data
                - priority
    parameters:
      -
        in: path
        name: domain
        description: 'Domain name.'
        example: testdomain.com
        required: true
        schema:
          type: string
  '/domains/{domain}/record/{recordId}':
    delete:
      summary: 'Delete domain DNS record'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'The record has been deleted!'
                  data: []
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The record has been deleted!'
                  data:
                    type: array
                    example: []
                  customData:
                    type: array
                    example: []
      tags:
        - Domain
    parameters:
      -
        in: path
        name: domain
        description: 'Optional parameter. Domain name.'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: testdomain.com
      -
        in: path
        name: recordId
        description: 'Record id.'
        example: 1
        required: true
        schema:
          type: integer
  '/domains/{domain}/change-nameservers':
    post:
      summary: 'Change nameservers'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  ResultCode: 1
                  ResultMessage: 'Updated domain nameservers!'
                  Success: true
                properties:
                  ResultCode:
                    type: integer
                    example: 1
                  ResultMessage:
                    type: string
                    example: 'Updated domain nameservers!'
                  Success:
                    type: boolean
                    example: true
      tags:
        - Domain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ns1:
                  type: string
                  description: 'Name Server 1. Number of chars between 5-100.'
                  example: ns1.com
                ns2:
                  type: string
                  description: 'Name Server 2. Number of chars between 5-100.'
                  example: ns2.com
                ns3:
                  type: string
                  description: 'Name Server 3. Number of chars between 5-100.'
                  example: ns3.com
                ns4:
                  type: string
                  description: 'Name Server 4. Number of chars between 5-100.'
                  example: ns4.com
              required:
                - ns1
                - ns2
    parameters:
      -
        in: path
        name: domain
        description: 'Domain name. Number of chars between 5-100.'
        example: domain.com
        required: true
        schema:
          type: string
  '/admin/users/whmcs-user/{id}':
    get:
      summary: 'Show user by WHMCS user ID'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        401:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: Unauthorized.
      tags:
        - Endpoints
    post:
      summary: 'Update user by WHMCS user ID'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
    parameters:
      -
        in: path
        name: id
        description: ''
        example: excepturi
        required: true
        schema:
          type: string
  /products/services:
    get:
      summary: 'Get list of Partner''s Services'
      description: ''
      parameters:
        -
          in: query
          name: client_id
          description: 'Filter by Client ID.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter by Client ID.'
            example: 1
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: '123'
                      pid: '123'
                      client_id: '123'
                      name: 'Microsoft 365 - NCE'
                      next_due_date: '2022-07-01'
                      domain: test.onmicrosoft.com
                      status: Active
                      billing_cycle: Monthly
                      reg_date: '2022-07-01'
                      first_payment_amount: '0.00'
                      recurring_amount: '0.00'
                      days_remain: -229
                      login: ''
                      password: ''
                      reg_number: ''
                      number_of_users: ''
                      gdata_valid_until: '2023-07-01'
                      platform: ''
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: '123'
                        pid: '123'
                        client_id: '123'
                        name: 'Microsoft 365 - NCE'
                        next_due_date: '2022-07-01'
                        domain: test.onmicrosoft.com
                        status: Active
                        billing_cycle: Monthly
                        reg_date: '2022-07-01'
                        first_payment_amount: '0.00'
                        recurring_amount: '0.00'
                        days_remain: -229
                        login: ''
                        password: ''
                        reg_number: ''
                        number_of_users: ''
                        gdata_valid_until: '2023-07-01'
                        platform: ''
                    items:
                      type: object
      tags:
        - Products
  /products/licenses:
    get:
      summary: 'Get list of Partner''s Licenses'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  licenses:
                    -
                      id: '123'
                      pid: '123'
                      client_id: '123'
                      name: 'Gdata Internet Security'
                      next_due_date: '2021-09-14'
                      domain: test
                      status: Active
                      billing_cycle: 'One Time'
                      reg_date: '2021-09-14'
                      first_payment_amount: '114.97'
                      recurring_amount: '181.78'
                      days_remain: -519
                      login: ''
                      password: ''
                      reg_number: ''
                      number_of_users: ''
                      gdata_valid_until: '2022-09-14'
                      platform: ''
                  expiringWithin60days: 0
                properties:
                  licenses:
                    type: array
                    example:
                      -
                        id: '123'
                        pid: '123'
                        client_id: '123'
                        name: 'Gdata Internet Security'
                        next_due_date: '2021-09-14'
                        domain: test
                        status: Active
                        billing_cycle: 'One Time'
                        reg_date: '2021-09-14'
                        first_payment_amount: '114.97'
                        recurring_amount: '181.78'
                        days_remain: -519
                        login: ''
                        password: ''
                        reg_number: ''
                        number_of_users: ''
                        gdata_valid_until: '2022-09-14'
                        platform: ''
                    items:
                      type: object
                  expiringWithin60days:
                    type: integer
                    example: 0
      tags:
        - Products
  /products/m365/catalog:
    get:
      summary: 'Get Subscription Catalog'
      description: "Important Notes:\nThis api will return all subscription catalog, with \"Terms\". You can use this term information to use correct term duration and billing circle value when use \"<a href=\"#products-POSTproducts--serviceId--m365-subscription\">Add a new M365 subscription</a>\" API.\n<br/><br/>Example: \"Terms\": [\"P1M:P1M\",\"P1Y:P1Y\",\"P1Y:P1M\"] => List of available term duration & billing circle for this Catalog. When user choose \"P1M\" term duration, they can choose \"P1M\" billing circle only. When user choose \"P1Y\" term duration, they can choose \"P1Y\" or \"P1M\" billing circle.\n<br/><br/>Display value for user: P1M: Monthly, P1Y: Annually, P3Y: Triennially, P1X: One-Time"
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Subscription Catalog'
                  data:
                    -
                      Title: 'Azure Active Directory Premium P1'
                      Description: "Azure Active Directory Premium provides single sign-on to thousands of cloud (SaaS) apps and access to web apps you run on-premises. Built for ease of use, Azure Active Directory Premium features multi-factor authentication (MFA); access control based on device health, user location, and identity; and holistic security reports, audits, and alerts.\r\nAzure Active Directory Premium provides single sign-on to thousands of cloud (SaaS) apps and access to web apps you run on-premises. Built for ease of use, Azure Active Directory Premium features multi-factor authentication (MFA); access control based on device health, user location, and identity; and holistic security reports, audits, and alerts."
                      Terms:
                        - 'P1M:P1M'
                        - 'P1Y:P1Y'
                        - 'P1Y:P1M'
                      Id: '75'
                      ProductSKU: SKUNUMBER
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Subscription Catalog'
                  data:
                    type: array
                    example:
                      -
                        Title: 'Azure Active Directory Premium P1'
                        Description: "Azure Active Directory Premium provides single sign-on to thousands of cloud (SaaS) apps and access to web apps you run on-premises. Built for ease of use, Azure Active Directory Premium features multi-factor authentication (MFA); access control based on device health, user location, and identity; and holistic security reports, audits, and alerts.\r\nAzure Active Directory Premium provides single sign-on to thousands of cloud (SaaS) apps and access to web apps you run on-premises. Built for ease of use, Azure Active Directory Premium features multi-factor authentication (MFA); access control based on device health, user location, and identity; and holistic security reports, audits, and alerts."
                        Terms:
                          - 'P1M:P1M'
                          - 'P1Y:P1Y'
                          - 'P1Y:P1M'
                        Id: '75'
                        ProductSKU: SKUNUMBER
                    items:
                      type: object
      tags:
        - Products
  /products/m365/tenant:
    post:
      summary: 'Add Tenant'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Added Tenant'
                  data:
                    service_id: '18868'
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Added Tenant'
                  data:
                    type: object
                    example:
                      service_id: '18868'
                  customData:
                    type: array
                    example: []
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tenant_name:
                  type: string
                  description: 'Tenant name without .onmicrosoft.com. Number of chars between 1-100,  must be entirely alpha-numeric characters.'
                  example: testtenant
                client_id:
                  type: integer
                  description: 'Client ID. You can get Client id in "<a href=''#clients-GETclients''>Get list clients</a>" API.'
                  example: 1
              required:
                - tenant_name
  /products/m365/check-tenant:
    get:
      summary: 'Check the availability of the Microsoft tenant name'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  available: true
                  message: 'test.onmicrosoft.com is available to register!'
                properties:
                  success:
                    type: boolean
                    example: true
                  available:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'test.onmicrosoft.com is available to register!'
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tenant_name:
                  type: string
                  description: 'Tenant name without .onmicrosoft.com. Number of chars between 1-100,  must be entirely alpha-numeric characters.'
                  example: testtenant
              required:
                - tenant_name
  '/products/{serviceId}/m365/subscription':
    post:
      summary: 'Add a new M365 subscription'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  data:
                    TenantId: x-x-x-x-x
                    ErpOrderId: '123'
                    IsAddonOrder: false
                    Subscriptions:
                      -
                        AutoRenewEnabled: true
                        BillingCycle: P1M
                        CustomTermEndDate: null
                        ErpOrderId: null
                        FriendlyName: 'Azure Active Directory Premium P1'
                        OfferId: 'CFQ7TTC0LH16:0001'
                        OrderId: null
                        PartnerId: '123'
                        ProductId: '77'
                        Quantity: 1
                        SkuId: null
                        Status: 1
                        SubscriptionId: ''
                        TenantId: x-x-x-x-x
                        TermDuration: P1M
                        WhmcsServiceId: null
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    example:
                      TenantId: x-x-x-x-x
                      ErpOrderId: '123'
                      IsAddonOrder: false
                      Subscriptions:
                        -
                          AutoRenewEnabled: true
                          BillingCycle: P1M
                          CustomTermEndDate: null
                          ErpOrderId: null
                          FriendlyName: 'Azure Active Directory Premium P1'
                          OfferId: 'CFQ7TTC0LH16:0001'
                          OrderId: null
                          PartnerId: '123'
                          ProductId: '77'
                          Quantity: 1
                          SkuId: null
                          Status: 1
                          SubscriptionId: ''
                          TenantId: x-x-x-x-x
                          TermDuration: P1M
                          WhmcsServiceId: null
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                quantity:
                  type: integer
                  description: 'Quantity, Must between 1-100.'
                  example: 1
                term_duration:
                  type: string
                  description: "Term Duration. <br/>Available options: P1M,P1Y,P3Y,P1X.<br/>Please read this document to get value: \"<a href='#products-GETproducts-m365-catalog'>Get Subscription Catalog</a>\" A\nPI."
                  example: P1M
                billing_cycle:
                  type: string
                  description: 'Billing Duration. <br/>Available options: P1M,P1Y,P3Y,P1X.<br/>Please read this document to get value: "<a href=''#products-GETproducts-m365-catalog''>Get Subscription Catalog</a>" API.'
                  example: P1M
                catalog_id:
                  type: integer
                  description: 'Subscription Catalog Id. You can get Subscription Catalog Id in "<a href=''#products-GETproducts-m365-catalog''>Get Subscription Catalog</a>" API.'
                  example: 77
              required:
                - quantity
                - term_duration
                - billing_cycle
                - catalog_id
    parameters:
      -
        in: path
        name: serviceId
        description: 'Service ID. You can get Service id in "<a href=''#products-GETproducts-services''>Get list of Partner''s Services</a>" API.'
        example: 1
        required: true
        schema:
          type: integer
  '/products/{serviceId}/m365/subscription/{subscriptionId}/update/quantity':
    post:
      summary: 'Update M365 subscription quantity'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Subscription has been updated!'
                  data:
                    TenantId: fe1403d5-0000-0000-0000-7cded881c91d
                    ErpOrderId: '1000'
                    IsAddonOrder: false
                    Subscriptions:
                      -
                        AutoRenewEnabled: true
                        BillingCycle: Monthly
                        CustomTermEndDate: null
                        ErpOrderId: null
                        FriendlyName: 'Microsoft 365 Business Standard'
                        OfferId: 'CFQ7TTC0LDPB:0001'
                        OrderId: '000000000000'
                        PartnerId: '1000000'
                        ProductId: null
                        Quantity: 1
                        SkuId: null
                        Status: 0
                        SubscriptionId: 90f37eae-0000-0000-0000-1ee0fa9ffdb9
                        TenantId: fe1403d5-0000-0000-0000-7cded881c91d
                        TermDuration: P1Y
                        WhmcsServiceId: null
                  customData: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Subscription has been updated!'
                  data:
                    type: object
                    example:
                      TenantId: fe1403d5-0000-0000-0000-7cded881c91d
                      ErpOrderId: '1000'
                      IsAddonOrder: false
                      Subscriptions:
                        -
                          AutoRenewEnabled: true
                          BillingCycle: Monthly
                          CustomTermEndDate: null
                          ErpOrderId: null
                          FriendlyName: 'Microsoft 365 Business Standard'
                          OfferId: 'CFQ7TTC0LDPB:0001'
                          OrderId: '000000000000'
                          PartnerId: '1000000'
                          ProductId: null
                          Quantity: 1
                          SkuId: null
                          Status: 0
                          SubscriptionId: 90f37eae-0000-0000-0000-1ee0fa9ffdb9
                          TenantId: fe1403d5-0000-0000-0000-7cded881c91d
                          TermDuration: P1Y
                          WhmcsServiceId: null
                  customData:
                    type: array
                    example: []
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                quantity:
                  type: integer
                  description: 'Quantity, Must between 1-10000.'
                  example: 1
              required:
                - quantity
    parameters:
      -
        in: path
        name: serviceId
        description: 'Service ID. You can get Service id in "<a href=''#products-GETproducts-services''>Get list of Partner''s Services</a>" API.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: subscriptionId
        description: 'Subscription ID.'
        example: 9cb50556-0000-40000-0000-3fdcc63ad0fd
        required: true
        schema:
          type: string
  '/products/{serviceId}/m365/subscriptions':
    get:
      summary: 'Get list of User''s M365 subscriptions'
      description: ''
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer API_KEY'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  nce_licenses:
                    -
                      AutoRenewEnabled: false
                      ProductId: 1
                      AvailableUnits: 2
                      BillingCycle: Monthly
                      CancellationAllowedUntilDate: 29/01/2023
                      CatalogItemId: 'ABC:0001:123'
                      CommitmentEndDate: 21/02/2023
                      ConsumedUnits: 0
                      CreationDate: 22/12/2022
                      EffectiveStartDate: 22/12/2022
                      FriendlyName: 'Exchange Online (Plan 1)'
                      IsNewCommerceExperienceSubscription: true
                      MinimumQuantity: 2
                      NextTermInstructions: null
                      OfferId: 'ABC:0001'
                      OrderId: 123abc
                      ParentSubscriptionId: null
                      PartnerId: '123'
                      ProductSku: 'CFQ7TTC0LH16:0001'
                      PromotionId: null
                      SkuPartNumber: UNKNOWN
                      Status: 0
                      SubscriptionId: 378dc3d8-1234-1234-1234-eed13edbeacd
                      SubscriptionQuantity: 2
                      TenantId: 5f5e68d7-1234-1234-1234-a5ea6972ddb5
                      TermDuration: P1M
                      TotalUnits: 2
                      IsAddon: false
                      AllowCancel: false
                      MinQuantity: 2
                      RecentTransactions: []
                      microsoft_standard_end_user_price: null
                      reseller_end_user_price: null
                      actual_sale_price: null
                      user_price: null
                      user_item_price: null
                      end_dates_sort:
                        -
                          original: /Date(1708487255000)/
                          formatted: 21/02/2024
                properties:
                  nce_licenses:
                    type: array
                    example:
                      -
                        AutoRenewEnabled: false
                        ProductId: 1
                        AvailableUnits: 2
                        BillingCycle: Monthly
                        CancellationAllowedUntilDate: 29/01/2023
                        CatalogItemId: 'ABC:0001:123'
                        CommitmentEndDate: 21/02/2023
                        ConsumedUnits: 0
                        CreationDate: 22/12/2022
                        EffectiveStartDate: 22/12/2022
                        FriendlyName: 'Exchange Online (Plan 1)'
                        IsNewCommerceExperienceSubscription: true
                        MinimumQuantity: 2
                        NextTermInstructions: null
                        OfferId: 'ABC:0001'
                        OrderId: 123abc
                        ParentSubscriptionId: null
                        PartnerId: '123'
                        ProductSku: 'CFQ7TTC0LH16:0001'
                        PromotionId: null
                        SkuPartNumber: UNKNOWN
                        Status: 0
                        SubscriptionId: 378dc3d8-1234-1234-1234-eed13edbeacd
                        SubscriptionQuantity: 2
                        TenantId: 5f5e68d7-1234-1234-1234-a5ea6972ddb5
                        TermDuration: P1M
                        TotalUnits: 2
                        IsAddon: false
                        AllowCancel: false
                        MinQuantity: 2
                        RecentTransactions: []
                        microsoft_standard_end_user_price: null
                        reseller_end_user_price: null
                        actual_sale_price: null
                        user_price: null
                        user_item_price: null
                        end_dates_sort:
                          -
                            original: /Date(1708487255000)/
                            formatted: 21/02/2024
                    items:
                      type: object
      tags:
        - Products
    parameters:
      -
        in: path
        name: serviceId
        description: 'Service ID. You can get Service id in "<a href=''#products-GETproducts-services''>Get list of Partner''s Services</a>" API.'
        example: 1
        required: true
        schema:
          type: integer
tags:
  -
    name: Clients
    description: 'Clients APIs'
  -
    name: Domain
    description: 'Domain APIs'
  -
    name: Endpoints
    description: ''
  -
    name: Products
    description: 'Products APIs'
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: ''
security:
  -
    default: []
