S360 Services
Home
Home
Azure DevOps Repository
  1. License
  • Component Diagram
  • S360 Providers
    • BackOffice Workspace
      • Application
        • Submit Application
        • Application Status
      • Service Provisioning
        • Service Provisioning Request
        • Service Provisioning Status
      • Payment
        • Pricing Request
        • Payment Confirmation
      • References
    • IID Authorization
      • Get Context
      • Create Child Session
      • Get Child Session
      • Refresh Child Session
      • Validate Child Session
      • Logout Child Session
      • Add messages
    • MDM
      • License
        • QueryLicenses
          POST
  • S360
    • BackOffice
      • Application
        • Application Decision
      • Service Provisioning
        • Service Provisioning
    • IID Portal
      • Read This First
      • Application Status
      • Services
        • Get My Services
        • Get My Service Details
        • Start My Application
      • Applications
        • Get My Applications
        • Get My Application Details
        • Complete My Application
        • View My Application
      • Inventory
        • Get My Inventories
        • Get My Inventory Details
      • Payment
        • CompletePayment
        • GetPaymentDetails
        • ConfirmPayment
        • GetDuePaymentDetails
        • GetPastPaymentDetails
        • GetMyDuePayments
        • GetMyPastPayments
        • GetMyPaymentDetails
        • GetMyPayments
      • Document
        • Retrieve Document
    • Application Workspace
      • Read This First
      • SSO
        • Authenticate
        • Refresh Session
      • Application
        • GetContext App
        • GetContext User
        • Submit My Application
        • Notify Application Status
      • Document
        • Upload Document
        • Retrieve Document
      • Proxy
        • Get Reference Data from Entity
      • DesignTime
        • Upload Application Schema
    • Rules Engines
      • Payment
  • Schemas
    • Common
      • CommonResponse
      • KeyValues
      • ProviderCommonResponse
      • CommonDescription
      • CommonMessage
      • InternationalizedCode
      • InternationalizedText
      • CommonPaging
    • S360
      • Status
        • status-rules-en
        • status-payment-en
        • status-consent-en
        • status-decision-en
        • status-provisioning-en
        • status-application-en
        • action-en
        • rules
        • action
        • status-service-en
        • pay-type
      • Application
        • application.identifier
        • applicationStatus
        • application.audit
        • application.workspace
        • applicationObject
        • applicationSchema
        • applicationDecision
        • applicationProvisioningStatus
        • applicationProvisioningRequest
        • application.audit.remark
        • StartMyApplicationRequest
        • application
        • application.quote
        • StartMyApplicationResponse
        • GetMyApplicationDetailResponse
        • applicationContext
        • application.audit.step
        • GetMyApplicationsResponse
      • Document
        • file
        • ocr
        • document
      • _temp
        • _application
        • applicationPrefilledInfos
        • applicationContext
        • applicationContext
      • Service
        • service-compatibility
        • lifecycle-inventory
        • GetMyServicesResponse
        • GetMyServicesRequestControl
        • GetMyServicesQuery
        • tradeLicense.application
        • tradeLicense.inventory
        • service
        • service.compatibility.segment
        • service.policy.item
        • service.situation
        • tradeLicense
        • GetMyServiceDetailsResponse
        • service.composedOf
        • service.compatibility
        • service.compatibility.segment.context
        • service.eligibility
        • service.execRule
        • service.execRule.rule
        • tradeLicense.inventory.output
        • metadata
      • Payment
        • query
        • sort
        • search
        • quotation
        • payment
        • audit
        • transaction
        • requestControl
        • quotation-payment
        • audit.v1.0
        • requestControl.v1.0
      • RuleEngine
        • TradeLicenseEligibility
      • Inventory
        • inventoryObject
        • inventory.lifecycle.enum
      • service.catalog
      • document
      • inventory
      • Catalog.Services
      • Catalog.Segment
      • Service Identifier
      • LookupData
      • MyServices
      • segmentContext
      • service.composedof
      • service.executionRule
      • service.compatibility
      • service.state.enum
    • Schemas
      • GetMyServicesRs2
      • GetMyServiceDetailRs
      • StartMyApplicationRs
      • Application
      • ServiceArray
      • Service
      • ServiceDetail
      • ServiceByState
      • NextBestAction
      • StateEnum
      • GetMyServicesRs
      • Metadata
    • JWT
      • userContext
      • iidParams
      • GetContextResponse
    • PortalData
    • CommonResponse
Home
Home
Azure DevOps Repository
  1. License

QueryLicenses

Integrating
POST
/references/v1/licenses
Last modified:2024-10-01 10:28:20
OperationId:QueryLicenses

Overview#

This component provides references to license profile by querying mdm database replica

Sequence Diagram#

mermaid-s360-API GetLicenses

DUL Query#

Query to get License Field#

SELECT l.DBN as dulNumber, l.IssueAuthority_ as issueAuthority ,l.IsMainLicence as isMainLicense,l.Category_ as category,l.ActivityType_ as activityType,stLi.EnglishName as status
FROM (SELECT * FROM tibco_ebx.dbo.EBX_REPLICA_Licence WHERE DBN in (?)) as l
LEFT JOIN tibco_ebx.dbo.EBX_REPLICAREF_LicenceStatus stLi (nolock) on stLi.ID = l.Status_;

Mapping#

DB OutputMap to ContextRemarks
issueAuthorityDUL.TradeLicense.IssueAuthorityAs is
isMainLicenseDUL.TradeLicense.IsMainLicenseConvert to "true" / "false"
categoryDUL.TradeLicense.CategoryAs is
activityTypeDUL.TradeLicense.ActivityTypeAs is
statusDUL.TradeLicense.StatusAs is

Query to get License Company Activities#

SELECT li.DBN as dulNumber,COALESCE(ca.ActivityIssueAuthority__ActivityCode,'') as activity 
FROM (SELECT DBN,Company_ FROM tibco_ebx.dbo.EBX_REPLICA_Licence WHERE DBN in (?)) as li
left join tibco_ebx.dbo.EBX_REPLICA_CompanyActivity ca (nolock) on ca.Company_ = li.Company_;

Mapping#

DB OutputMap to ContextRemarks
activityDUL.TradeLicense.ActivityGroup by dulNumber and map as array of values
Note
Replace query parameter in "WHERE DBN in (?)" with dulNumbers coming in the request

API Specification#

Request

Authorization
Add parameter in header
X-API-Key
Example:
X-API-Key: ********************
Header Params

Body Params application/json

Example
{
    "query": {
        "dulNumbers": [
            "string"
        ]
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/references/v1/licenses' \
--header 'X-Request-Id: {% faker datatype.uuid %}' \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query": {
        "dulNumbers": [
            "string"
        ]
    }
}'

Responses

🟢200Success
application/json
Body

Example
{
    "status": 200,
    "externalId": "4917a9ac-9f30-4262-83b4-eeee261259f7",
    "esbUUID": "34f7da02-afab-4f55-ac90-f4633b41a8f3",
    "desc": {
        "code": "47547",
        "en": "Success",
        "ar": "نجاح"
    },
    "licenses": [
        {
            "dulNumber": "DUL0001",
            "profiles": [
                {
                    "context": "DUL.TradeLicense.IssueAuthority",
                    "values": [
                        "1"
                    ]
                },
                {
                    "context": "DUL.TradeLicense.IsMainLicense",
                    "values": [
                        "true"
                    ]
                },
                {
                    "context": "DUL.TradeLicense.Category",
                    "values": [
                        "83"
                    ]
                },
                {
                    "context": "DUL.TradeLicense.ActivityType",
                    "values": [
                        "2"
                    ]
                },
                {
                    "context": "DUL.TradeLicense.Status",
                    "values": [
                        "Active"
                    ]
                },
                {
                    "context": "DUL.TradeLicense.Activity",
                    "values": [
                        "4771919",
                        "4773204",
                        "4771110",
                        "4751001",
                        "4771201",
                        "4764001",
                        "4772007",
                        "4773106",
                        "4741001"
                    ]
                }
            ]
        }
    ]
}
Modified at 2024-10-01 10:28:20
Previous
Add messages
Next
Application Decision
Built with