User Tools

Site Tools


api:customer:list

API : Customer List

Introduction

This request will return the list of customers that you may access as a reseller or admin.

Request

URL https://api.telecomx.dk/customer
Method GET
Access level RESELLER - customers that belongs to the reseller
RESELLER_ADMIN or ADMIN
Query offset [optional] Index of the first customer to return, default 0.
limit [optional] The number of customers to return, default 100, min 1, max 500.
includeDeleted [optional] If true, also deleted customers are returned.
filter [optional] To filter the customers, this can be used. Common fields of the customer will be searched.
full [optional] If true, complete customer object will be returned instead of the condensed version.
all [optional] If true, all customers for all resellers will be returned (ADMIN only).
includeSubresellers [optional] If true, when a reseller lists her customers, then customers of subresellers will also be included.
iptvproviders [optional] If true, return only resellers and businesses that provides IPTV (ADMIN only).
iptvprivate [optional] If true, return only resellers or customers that has the IPTV-private flag (ADMIN only).
parentReseller [optional] Id of parent reseller that the customers must belong to (ADMIN only).
iptvdevices [optional] If true IPTV device usage data is also returned.
flexcare [optional] If true only customers with feature “FLEXCARE” is returned.
resellers [optional] If true only resellers are returned.
customerIds [optional] List of specific customers to return.

Query examples

https://api.telecomx.dk/customer
https://api.telecomx.dk/customer?filter=abc&offset=10&limit=25&full=true
https://api.telecomx.dk/customer?filter=abc&parentReseller=12345678901234567890ABCD

Response

JSON object
offset Index of the first customer returned.
limit Number of customers to return. Note that the actual number of customers returned may be lower.
total Number of customers that can be returned when offset and limit is not considered. This is to be used for paging through the data.
customers Array of customers, see definition below
Customer object (JSON)
_id Id Unique customer id.
state Enum State of the customer: ACTIVE, BLOCKED (all services disabled), DELETED.
name String Customer name.
address String address (ex: <street>, <zip> <city>, <country>).
phoneNumber String Primary phone number for the customer.
faxNumber String Primary phone number for the customer (used when faxing e.g. porting documents).
emailAddress String Primary e-mail for the customer.
isReseller Boolean True if customer is a reseller.
parentReseller Id Id of the reseller the customer belongs to.
customerGroup Id Id of the group the customer belongs to, null if not used.
isOrganization Boolean True if the customer is an organization.
iptv Object IPTV device usage (only if iptvdevices is true).
iptv.stbs Number Number of settop boxes.
iptv.stbsOffline Number of settop boxes that are offline.
iptv.ios Number Number of iOS/Appletv based devices.
iptv.android Number Number of Android/AndroidTV based devices.
iptv.web Number Number of web based devices.
iptv.apps Number Total number of app based devices (IOS, ANDROID, ANDROIDTV, APPLETV, WEB).
Customer object if full=true (JSON)
_id Id Unique customer id.
name String Name of the customer.
phoneNumber String Primary customer phone number.
faxNumber String primary customer fax number.
state Enum State of the customer: ACTIVE, BLOCKED (all services disabled), DELETED.
parentReseller Id Id of the reseller the customer belongs to (only top level resellers does not have a parent reseller).
emailAddress String Primary e-mail address.
website String Primary website address.
notes String Notes about the customer (only visible for reseller/admin).
addresses
addresses[]._id Id Id of address.
addresses[].primary Boolean True if this is the primary address.
addresses[].alternativeName String Alternative name for this address.
addresses[].address String Street, number etc.
addresses[].zip String Zip code.
addresses[].city String City.
addresses[].state String State.
addresses[].country String Country (blank if Denmark because it is default).
addresses[].fixedNumber String Fixed phone number on this address, if it differs from the primary.
addresses[].faxNumber String Fax number on this address, if it differs from the primary.
addresses[].municipalityCode Integer Municipality code, automatically set by the system.
Financial settings
finance.vatNumber String VAT number.
finance.accountingSystemId String Id for linking the customer to the accounting system that does the invoicing.
finance.accountingSystemRef String Saved customer contact in the accounting system that does the invoicing
finance.invoiceMethod String How the customer wishes to be invoiced: MAIL, EMAIL, ELECTRONIC.
finance.emailAddress String If invoiceMethod is EMAIL, this is the e-mail address to send it to.
finance.electronicAddress String If invoiceMethod is ELECTRONIC, this is the address to send it to.
finance.paymentTerms String Payment terms: DAYS_5, DAYS_7, DAYS_14, DAYS_30, DAYS_60, DAYS_90, CURRENT_MONTH_PLUS_DAYS_7, CURRENT_MONTH_PLUS_DAYS_14, CURRENT_MONTH_PLUS_DAYS_30.
finance.sipUsageLimit Integer Combined maximum monthly usage in DKK for all SIP accounts.
finance.mvnoUsageLimit Integer Maximum monthly usage in DKK for a MVNO account.
finance.channelLimit Integer Maximum number of concurrent calls the customer may conduct on SIP accounts.
finance.numberRentProduct Id Id of the product used to invoice number rent.
finance.numberRentUntil Date Date that number rent has been invoiced until.
finance.numberRentCount.singles Integer Number of single phone numbers counted during last invoicing.
finance.numberRentCount.hundreds Integer Number of 100-number-series counted during last invoicing.
finance.numberRentLastProduct Id Id of the product used at the last number rent invoicing.
finance.durationMethod Number 0 for standard, >0 for custom (ADMIN only).
isReseller Boolean True if customer is a reseller who can create and manage other customers.
resellerPortal String If customer is a reseller and have a customized management portal, this is the URL for the login page.
resellerInvoice Boolean True if the platform sends out invoices to the customers (e-mail and electronic), false if reseller sends out invoices from their financial system.
resellerNextInvoiceNumber Integer Invoice number to use on the next invoice that is generated. auto-incremented when an invoice is created. Only used if resellerInvoice is true.
resellerSkin String Name of the skin to apply on UI for this resellers customers: EARTH, TEAL, DARK.
resellerCustomerGroups Array List of customer groups the reseller wish to use.
resellerCustomerGroups[]._id Id Id of group.
resellerCustomerGroups[].name String Name of group.
Misc settings
features Array List of features in the TelecomX platform that the customer has access to. Can only be set by ADMIN or RESELLER users. A reseller can only assign features that the reseller has to the resellers customers.
The available features are:
CUSTOMER - Basics, addresses, financial, usage limits, employees
SIP - SIP trunks
MVNO - Mobile phones
PBX - Hosted PBX, SIP phones, music on hold, Webhooks (auto-enables SIP, MVNO, CUSTOMER)
TCE - Telecom Call Enhancer
DNS - Domain management
INTERNET - Fiber & xDSL
TV - TV
IPTVPRIVATE - Private IPTV customer
IPTVBUSINESS - Business IPTV customer
FLEXCARE - FlexCare HealthTech
ZEROTIER - ZeroTier networking
EXTERNAL_LICENSES - external licenses
NETWORK_MANAGEMENT - allows managing network devices
CHANGELOG - logging to short term changelog enabled
ORGANIZATION - customer has organizational rights.
authenticationSecurity String The required security level for all users when performing login:
NONE - only username/password
SMS - 2FA using SMS required
AUTHENTICATOR - 2FA using authenticator app.
organizationResellers Array List of ids of resellers that this organization can manage (only if customer has ORGANIZATION feature.
custom Object Optional custom data that 3rd parties may append to a customer, max. 4Kb
integrations Object Settings for 3rd party integrations
integrations.billing Object Contains billing integrations
integrations.billing.economic Object Integration for visma e-conomic (only relevant for resellers)
integrations.billing.economic.enabled Boolean True if the integration is enabled, default false.
integrations.billing.economic.agreementGrantToken String Agreement grant token. It's set when allowing the “Telecom X Billing Integration” e-conomic app to access the reseller's e-conomic account.
integrations.billing.economic.accrual Boolean Determines whether the reseller wants to use the accrual-module in e-conomic. Requires the module to be bought in e-conomic.
integrations.billing.rackbeat Object Integration for Rackbeat, defaults false
integrations.billing.rackbeat.enabled Boolean True if the integration is enabled
integrations.billing.rackbeat.bearerToken String Bearer token created from rackbeat, used to verify against their API
integrations.billing.uniconta Object Integration for Uniconta
integrations.billing.uniconta.enabled Boolean True if the integration is enabled, defaults false
integrations.billing.uniconta.username String Username for logging into Uniconta
integrations.billing.uniconta.password String Password for logging into Uniconta
integrations.billing.uniconta.companyId String Company Id the user is connected to, in Uniconta
integrations.licenses Object Licenses from 3rd parties, e.g ALSO.
integrations.licenses.also Object ALSO licenses integration
integrations.licenses.also.enabled Boolean Whether this customer/reseller should have their licenses synchronized from ALSO, etc.
integrations.licenses.also.username String ALSO username
integrations.licenses.also.password String ALSO password
integrations.licenses.also.customerId String The customer's ID from ALSO.
integrations.licenses.also.tenantId String The Microsoft tenant ID of the customer, synchronized from ALSO.
integrations.criipto Object Settings for integration with Criipto
integrations.criipto.enabled Boolean True if the integration is enabled, defaults false
integrations.criipto.clientId String UUID for creating signature orders with criipto
integrations.criipto.clientSecret String Client secret for creating signature orders with criipto
integrations.criipto.domain String Domain for redirection login
integrations.criipto.clientIdRealm String Client Id for domain
integrations.ms365 Object Settings for integration with Microsoft 365
integrations.ms365.enabled Boolean Whether this integration is enabled for this customer.
integrations.ms365.tenantId String Id of customers tenant in MS 365
integrations.ms365.verified Boolean True if connection to tenant has been verified
integrations.ms365.calendarSync Boolean True to integrate users calendars
integrations.ms365.contactsSync Boolean True to integrate users contacts
integrations.ms365.orgContactsSync Boolean True to integrate the organisation contacts
integrations.ms365.presenceSync Boolean True to sync presence and/or Trams InAMeeting/InACall status
integrations.ms365.calendarShowAsMappings Object Calendar mappings
integrations.ms365.calendarShowAsMappings.free String Presence state to map free to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing.
integrations.ms365.calendarShowAsMappings.tentative String Presence state to map tentaive to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing.
integrations.ms365.calendarShowAsMappings.busy String Presence state to map busy to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing.
integrations.ms365.calendarShowAsMappings.oof String Presence state to map oof to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing.
integrations.ms365.calendarShowAsMappings.workingElsewhere String Presence state to map workingElsewhere to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing.
integrations.ms365.calendarCategoryMappings Array List of calendar category mappings
integrations.ms365.calendarCategoryMappings[].category String Category label to map to presence state.
integrations.ms365.calendarCategoryMappings[].presence String Presence state tp map the category to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK or HOLIDAY.
Service-level Agreements (Can only be viewed by RESELLER, RESELLER_ADMIN or ADMIN)
serviceLevelAgreements Object Contains information about service-level agreements between the customer and their reseller. Only used currently for specific customers, and is not available to everyone. Only visible to resellers.
serviceLevelAgreements.remote Object Contains information about remote service-level agreement
serviceLevelAgreements.remote.responseTime Number Response-time in hours. Valid values are 1, 3, 8, 24.
serviceLevelAgreements.remote.days String Which days of the week this service-level agreement covers. Valid values are “WEEK_DAYS”, “WEEK_DAYS_AND_SATURDAY”, “ALL”
serviceLevelAgreements.remote.period String Which period/hours in the day this service-level-agreement covers. Valid values are “07:45-16:00”, “08:00-22:00”, “00:00-23:59”
serviceLevelAgreements.onsite Object Contains information about on-site service-level agreement
serviceLevelAgreements.onsite.responseTime Number Response-time in hours. Valid values are 1, 3, 8, 24.
serviceLevelAgreements.onsite.days String Which days of the week this service-level agreement covers. Valid values are “WEEK_DAYS”, “WEEK_DAYS_AND_SATURDAY”, “ALL”
serviceLevelAgreements.onsite.period String Which period/hours in the day this service-level-agreement covers. Valid values are “07:45-16:00”, “08:00-22:00”, “00:00-23:59”
serviceLevelAgreements.services Object Which services are covered as a part of this service-level agreement.
serviceLevelAgreements.services.phoneSupportErrors Boolean Phone support - troubleshooting/bug fixing included
serviceLevelAgreements.services.phoneSupportChanges Boolean Phone support - functional changes included
serviceLevelAgreements.services.onsiteInclusive Boolean On-site assistance included
serviceLevelAgreements.services.hardwareInclusive Boolean Hardware-parts included
serviceLevelAgreements.services.mitelSwas Boolean Mitel software assurance included
serviceLevelAgreements.services.prescriptionStatus Boolean Prescription status included, used when integrating with medical systems.
simTag String Optional name of the eSIM pool to assign sims from.
bindingDate Date A date field that can be used by resellers to document when a customer's contract with their reseller expires.
customerGroup Id Id of the group the customer belongs to, null if not used.

Note that properties holding no value may be omitted from the object.

Example - normal

{
  offset: 10,
  limit: 25,
  total: 243,
  customers:
  [
    {
      _id: '1234567890ABCDEF12345678',
      state: 'ENABLED',
      name: 'Northwind Industries',
      address: 'Ahlgade 223, 4000 Roskilde',
      phoneNumber: '12345678',
      faxNumber: '12341234',
      emailAddress: 'info@northwindindustries.com',
      isReseller: false,
      isOrganization: false,
      parentReseller: '10234567890123457890DDEF'
    },
    {
      _id: '1234567890ABCDEF12345679',
      state: 'ENABLED',
      name: 'A.nother Company',
      address: 'Boulevarden 48, 123 København C',
      phoneNumber: '+45-12121212',
      faxNumber: '+45 45 45 45 45',
      emailAddress: 'info@a-nother.com',
      isReseller: false,
      parentReseller: '10234567890123457890DDEF'
    }
  ]
}

Example - full=true

{
  offset: 10,
  limit: 25,
  total: 243,
  customers:
  [
    {
      _id: '52f4fd7734697b28ccaf77ec',
      name: 'Anders And & Co',
      phoneNumber: '88888888',
      faxNumber: '99999999',
      state: 'ACTIVE',
      parentReseller: '52f4fd7734697b28ccaf77ec',
      emailAddress: 'anders@andeby.dk',
      website: 'www.andeby.duck',
      notes: 'Pas på Joakim, han er en hård pris forhandler.',
      authenticationSecurity: 'AUTHENTICATOR',
      addresses: [
        {
          _id: '52f4fd7734697b2800000001',
          primary: true,
          address: 'Paradis Æblevej 23',
          zip: '123',
          city: 'Andeby',
          country: 'Cartoonistan',
          municipalityCode: 101
        },
        {
          _id: '52f4fd7734697b2800000002',
          primary: false,
          alternativeName: 'Joakim Von And\'s pengetank',
          address: 'Guldvej 1',
          zip: '123',
          city: 'Andeby',
          country: 'Cartoonistan',
          fixedNumber: '7913',
          municipalityCode: 102
        }
      ],
      finance: {
        vatNumber: '35240136',
        accountingSystemId: '12345',
        accountingSystemRef: "Mikkel Test",
        invoiceMethod: 'EMAIL',
        emailAddress: 'bogholderi@andeby.dk',
        paymentTerms: '14DAYS',
        sipUsageLimit: 10000,
        mvnoUsageLimit: 3000,
        channelLimit: 25,
        numberRentProduct: '1234567890123457890ABCDEF',
        numberRentUntil: '2014-01-01T12:34:56.789Z',
        numberRentCount.singles: 23, hundreds: 1 },
        numberRentLastProduct: '1234567890123457890ABCDEF',
        skipInvoicing: false
      },
      isReseller: true,
      resellerPortal: 'https://admin.andeby.dk',
      resellerInvoice: true,
      resellerNextInvoiceNumber: 10000,
      resellerSkin: 'TEAL',
      resellerEmailAsSender: false,
      organizationResellers: null,
      features: ['CUSTOMER','SIP','MVNO'],
      mvno: {
        dataTopUpSms: false
      },
      storage: {
        used: 5120,
        total: 1073741824
      },
      integrations: {
        billing: {
          economic: {
            enabled: true,
            agreementGrantToken: '123971249ahsdaksdhi612',
            accrual: false
          },
          rackbeat: {
            enabled: true,
            bearerToken: '123456789abcdefg'
          },
          uniconta: {
            enabled: true,
            username: 'apitestbruger',
            password: 'apitestpassword123!',
            companyId: '10203040'
         },
        },
        licenses: {
          also: {
            enabled: true,
            username: 'bob@tele-it.com',
            password: '127351273basdjg7137bdc',
            customerId: '6055321'
          }
        },
        ms365: {
          enabled: true,
          tenantId: '12397jhdsd-128378ydjas-fhjgg78128',
          verified: true,
          calendarSync: true,
          contactsSync: true,
          orgContactsSync: true,
          presenceSync: true,
          calendarShowAsMappings: {
            free: null,
            tentative: null,
            busy: 'BUSY',
            oof: 'HOLIDAY',
            workingElsewhere: 'OUT_OF_OFFICE'
          },
          calendarCategoryMappings: [
            {
              category: 'Ferie',
              presence: 'HOLIDAY'
            }
          ]
        },
        mvnoPrivate: {
          enabled: true,
          portal: 'https://telefoni.andeby.dk'
        }
      }
      simTag: 'providerx',
      bindingDate: null,
      customerGroup: '123457890123457890DDEE'
    },
    ...
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/customer/list.txt · Last modified: 2025/11/10 15:11 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki