UNPKG

whalecloud-dxp-api-react-native

Version:

This section explains how to use the SDK and illustrates it with an example: - This chapter is essential to learn - For specific business development, see [Bussiness Scenario](https://www.digchan.info/en-US/dxp/user-sso/sign-up) - The Business Scenario pr

1,185 lines (1,184 loc) 419 kB
{ "openapi": "3.0.3", "info": { "title": "DXP API", "description": "", "version": "", "license": { "name": "Whale Cloud Technology Co., Ltd.", "url": "https:\/\/online.iwhalecloud.com" } }, "tags": [ { "name": "Agreement Management" }, { "name": "Common Management" }, { "name": "Content Management" }, { "name": "Customer Balance Management" }, { "name": "Customer Bill Management" }, { "name": "Customer Management" }, { "name": "Package Advantage" }, { "name": "Product Catalog Management" }, { "name": "Product Ordering" }, { "name": "Promotion Management" }, { "name": "Subscriber Management" }, { "name": "User Management" }, { "name": "User Management\/Link" } ], "paths": { "\/dxp\/agreement-management\/v1\/agreement-inst\/list": { "get": { "summary": "Query Agreement Instant List", "description": "Query the list of subscriber agreement instances based on subscriber ID and service number.\r\nNote: "subsId", "serviceNumber" cannot both be empty.", "tags": [ "Agreement Management" ], "parameters": [ { "in": "query", "name": "subsId", "description": "The unique identifier for the subscriber.", "schema": { "type": "number", "example": 10100257 } }, { "in": "query", "name": "prefix", "description": "The prefix associated with the subscriber's service number.", "schema": { "type": "string", "example": "86" } }, { "in": "query", "name": "serviceNumber", "description": "The service number associated with the subscriber.", "schema": { "type": "string", "example": "1821112691" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryAgreementInstantResp" } } } } } } }, "\/dxp\/agreement-management\/v1\/agreement-inst\/{agreementInstId}\/installments": { "get": { "summary": "Query Agreement Instant Installment Plan", "description": "Query installment\/rebate information of agreement instance based on agreement instance ID.", "tags": [ "Agreement Management" ], "parameters": [ { "in": "path", "name": "agreementInstId", "description": "Identifier for the agreement instance.", "required": true, "schema": { "type": "number", "example": 10001 } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryAgreementInstInstallmentResp" } } } } } } }, "\/dxp\/common-management\/v1\/otp": { "get": { "summary": "Obtain SMS OTP", "description": "Obtain SMS OTP.", "tags": [ "Common Management" ], "parameters": [ { "in": "query", "name": "prefix", "description": "The prefix associated with the subscriber's service number.", "schema": { "type": "string", "example": "86" } }, { "in": "query", "name": "serviceNumber", "description": "The service number associated with the subscriber.", "required": true, "schema": { "type": "string", "example": "1821112691" } }, { "in": "query", "name": "businessType", "description": "Type of business scenario. Possible values are: \/ register-Register; \/ login-Login; \/ resetPassword-Reset Password; \/ modAcct-Modify Account; \/ changePlan-Change Plan; \/ qryCdrUsage-Query CDR Usage; \/ newConnection-New Connection; \/ transfer-Transfer; \/ createCase-Create Case; \/ qrySimCard-Query SIM Card; \/ qryOrder-Query Order; \/ recharge-Recharge; \/ pointExchange-Point Exchange; \/ loan-Loan; \/ setVas-Set Value-Added Service; \/ cancelVas-Cancel Value-Added Service; \/ suspension-Suspension; \/ reactivation-Reactivation; \/ switchSubs-Switch Subscription", "required": true, "schema": { "type": "string", "enum": [ "register", "login", "resetPassword", "modAcct", "changePlan", "qryCdrUsage", "newConnection", "transfer", "createCase", "qrySimCard", "qryOrder", "recharge", "loan", "setVas", "suspension", "reactivation", "logOff" ], "default": "register", "example": "register" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/ObtainSMSOTPResp" } } } } } } }, "\/dxp\/common-management\/v1\/remote-configs": { "get": { "summary": "Query Remote Configs", "description": "Query Remote Configs", "tags": [ "Common Management" ], "parameters": [ { "in": "query", "name": "configCodes", "description": "List of remote config codes, separated by commas.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/DxpSingleResponseFinal" } } } } } } }, "\/dxp\/content-management\/v1\/contents\/{contentCode}": { "get": { "summary": "Query Content Detail", "description": "Query content detail by content code.", "tags": [ "Content Management" ], "parameters": [ { "in": "query", "name": "lang", "description": "The language used for the response data.", "schema": { "type": "string", "example": "en-US" } }, { "in": "path", "name": "contentCode", "description": "The code of the content", "required": true, "schema": { "type": "string", "example": "APP_TERMS" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryContentDetailResp" } } } } } } }, "\/dxp\/customer-balance\/v1\/balances\/list": { "get": { "summary": "Query Balance List", "description": "Query the list of balance books.\r\nNote: "subsId", "serviceNumber", "acctNbr" cannot all be empty.", "tags": [ "Customer Balance Management" ], "parameters": [ { "in": "query", "name": "subsId", "description": "The unique identifier for the subscriber.", "schema": { "type": "number", "example": 10100257 } }, { "in": "query", "name": "prefix", "description": "The prefix associated with the subscriber's service number.", "schema": { "type": "string", "example": "86" } }, { "in": "query", "name": "serviceNumber", "description": "The service number associated with the subscriber.", "schema": { "type": "string", "example": "1821112691" } }, { "in": "query", "name": "acctNbr", "description": "The unique number associated with the account.", "schema": { "type": "string", "example": "10000212" } }, { "in": "query", "name": "acctResCode", "description": "The unique code representing the balance type.", "schema": { "type": "string", "example": "bonus" } }, { "in": "query", "name": "acctResId", "description": "The identifier for the balance type.", "schema": { "type": "number", "example": 123 } }, { "in": "query", "name": "includeInvalid", "description": "Indicates whether to include invalid balances.", "schema": { "type": "boolean", "example": "true" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryBalanceListResp" } } } } } } }, "\/dxp\/customer-balance\/v1\/balances\/summaries": { "get": { "summary": "Query Balance Summary List", "description": "Query the summary information of balance books based on cash, data, voice, and SMS.\r\nNote: "subsId", "serviceNumber", "acctNbr" cannot all be empty.", "tags": [ "Customer Balance Management" ], "parameters": [ { "in": "query", "name": "acctNbr", "description": "The unique number associated with the account.", "schema": { "type": "string", "example": "10000212" } }, { "in": "query", "name": "subsId", "description": "The unique identifier for the subscriber.", "schema": { "type": "number", "example": 10100257 } }, { "in": "query", "name": "prefix", "description": "The prefix associated with the subscriber's service number.", "schema": { "type": "string", "example": "86" } }, { "in": "query", "name": "serviceNumber", "description": "The service number associated with the subscriber.", "schema": { "type": "string", "example": "1821112691" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryBalanceSummaryListResp" } } } } } } }, "\/dxp\/customer-bill\/v1\/bills\/list": { "get": { "summary": "Query Bill List", "description": "Query the list of bills based on account or subscriber.\r\nNote: "acctNbr", "serviceNumber" cannot both be empty.", "tags": [ "Customer Bill Management" ], "parameters": [ { "in": "query", "name": "acctNbr", "description": "The unique number associated with the account.", "schema": { "type": "string", "example": "10000212" } }, { "in": "query", "name": "count", "description": "The total number or quantity.", "schema": { "type": "number", "example": 4 } }, { "in": "query", "name": "prefix", "description": "The prefix associated with the subscriber's service number.", "schema": { "type": "string", "example": "86" } }, { "in": "query", "name": "serviceNumber", "description": "The service number associated with the subscriber.", "schema": { "type": "string", "example": "1821112691" } }, { "in": "query", "name": "includeCurrentCycle", "description": "Indicates whether the current billing cycle is included.", "schema": { "type": "boolean", "example": "true" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/QueryBillListResp" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "cycleBeginDate": { "type": "string", "description": "The start date of the billing cycle.", "example": "45292" }, "cycleEndDate": { "type": "string", "description": "The end date of the billing cycle. ", "example": "45292" } } }, "description": "A container for the main data payload in a response. This can be any data type and typically includes the core information returned by the API." } } } ] } } } } } } }, "\/dxp\/customer-bill\/v1\/bills\/detail": { "get": { "summary": "Query Bill Detail", "description": "View bill details based on conditions.\r\nNote: Must provide "acctNbr" + "billingCycleId" or "billNbr".", "tags": [ "Customer Bill Management" ], "parameters": [ { "in": "query", "name": "acctNbr", "description": "The unique number associated with the account.", "schema": { "type": "string", "example": "10000212" } }, { "in": "query", "name": "billingCycleId", "description": "The identifier representing the billing cycle.", "schema": { "type": "number", "example": 1 } }, { "in": "query", "name": "billNbr", "description": "The unique identifier for a bill.", "schema": { "type": "string", "example": "10000011" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryBillDetailResp" } } } } } } }, "\/dxp\/customer-bill\/v1\/bills\/download": { "get": { "summary": "Download Bill", "description": "Download the specified bill based on conditions.\r\nNote: Must provide "acctNbr" + "billingCycleId" or "billNbr".", "tags": [ "Customer Bill Management" ], "parameters": [ { "in": "query", "name": "acctNbr", "description": "The unique number associated with the account.", "schema": { "type": "string", "example": "10000212" } }, { "in": "query", "name": "billingCycleId", "description": "The identifier representing the billing cycle.", "schema": { "type": "number", "example": 1 } }, { "in": "query", "name": "billNbr", "description": "The unique identifier for a bill.", "schema": { "type": "string", "example": "10000011" } } ], "responses": { "200": { "description": "OK" } } } }, "\/dxp\/customer-bill\/v1\/billing-cycles": { "get": { "summary": "Query Billing Cycle List", "description": "Query the list of billing cycles based on account or billing cycle type or billing cycle.", "tags": [ "Customer Bill Management" ], "parameters": [ { "in": "query", "name": "acctNbr", "description": "The unique number associated with the account.", "schema": { "type": "string", "example": "10000212" } }, { "in": "query", "name": "count", "description": "The total number or quantity.", "schema": { "type": "number", "example": 4 } }, { "in": "query", "name": "billingCycleTypeId", "description": "The identifier for the billing cycle type.", "schema": { "type": "number", "example": 6 } }, { "in": "query", "name": "billingCycleId", "description": "The identifier representing the billing cycle.", "schema": { "type": "number", "example": 1 } }, { "in": "query", "name": "includeCurrentCycle", "description": "Indicates whether the current billing cycle is included.", "schema": { "type": "boolean", "example": "true" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryBillingCycleListResp" } } } } } } }, "\/dxp\/customer-bill\/v1\/bills\/owe-Info": { "get": { "summary": "Query Owe Info", "description": "Query arrears information based on account.", "tags": [ "Customer Bill Management" ], "parameters": [ { "in": "query", "name": "acctNbr", "description": "The unique number associated with the account.", "required": true, "schema": { "type": "string", "example": "10000212" } }, { "in": "query", "name": "includeUnbilledAmount", "description": "Indicates whether unbilled amounts are included.", "schema": { "type": "boolean", "example": "true" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryOweInfoResp" } } } } } } }, "\/dxp\/customer-management\/v1\/customers\/{custNbr}": { "get": { "summary": "Query Customer Detail", "description": "Query customer details based on customer number.\r\nNote: Returns basic customer details, only one customer address is retained. For a list of customer addresses, call the query customer addresses API separately. For customer attachments, customer contacts, and customer certifications, call their respective APIs separately.", "tags": [ "Customer Management" ], "parameters": [ { "in": "path", "name": "custNbr", "description": "The unique customer code, used for uniquely identifying the customer in business operations.", "required": true, "schema": { "type": "string", "example": "11016302" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryCustomerDetailResp" } } } } } } }, "\/dxp\/customer-management\/v1\/customers\/identification-types": { "get": { "summary": "Query Identification Types", "description": "Query the list of certification types.", "tags": [ "Customer Management" ], "parameters": [ { "in": "query", "name": "custType", "description": "The type of customer, which can indicate whether the customer is an individual or a corporate customer. Possible values are: \/ A: Individual Customer\/ B: Corporate Customer", "schema": { "type": "string", "example": "A" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryIdentificationTypesResp" } } } } } } }, "\/dxp\/customer-management\/v1\/customers\/{custNbr}\/attachments": { "get": { "summary": "Query Customer Attachments", "description": "Query customer attachment list based on customer number", "tags": [ "Customer Management" ], "parameters": [ { "in": "path", "name": "custNbr", "description": "The unique customer code, used for uniquely identifying the customer in business operations.", "required": true, "schema": { "type": "string", "example": "11016302" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryCustomerAttachmentsResp" } } } } } } }, "\/dxp\/customer-management\/v1\/customers\/{custNbr}\/contacts": { "get": { "summary": "Query Customer Contacts", "description": "Query customer contact list based on customer number.", "tags": [ "Customer Management" ], "parameters": [ { "in": "path", "name": "custNbr", "description": "The unique customer code, used for uniquely identifying the customer in business operations.", "required": true, "schema": { "type": "string", "example": "11016302" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryCustomerContactsResp" } } } } } } }, "\/dxp\/customer-management\/v1\/customers\/{custNbr}\/attributes": { "get": { "summary": "Query Customer Attributes", "description": "Query customer attribute list based on customer number.", "tags": [ "Customer Management" ], "parameters": [ { "in": "path", "name": "custNbr", "description": "The unique customer code, used for uniquely identifying the customer in business operations.", "required": true, "schema": { "type": "string", "example": "11016302" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryCustomerAttributesResp" } } } } } } }, "\/dxp\/customer-management\/v1\/customers\/{custNbr}\/addresses": { "get": { "summary": "Query Customer Addresses", "description": "Query customer address list based on customer number.", "tags": [ "Customer Management" ], "parameters": [ { "in": "path", "name": "custNbr", "description": "The unique customer code, used for uniquely identifying the customer in business operations.", "required": true, "schema": { "type": "string", "example": "11016302" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryCustomerAddressesResp" } } } } } } }, "\/dxp\/proj\/package-advantage\/v1\/advantages": { "get": { "summary": "Query Package Advantage List", "description": "Query the list of package advantages based on customer number.", "tags": [ "Package Advantage" ], "parameters": [ { "in": "query", "name": "custNbr", "description": "The unique customer code, used for uniquely identifying the customer in business operations.", "required": true, "schema": { "type": "string", "example": "11016302" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/QueryPackageAdvantageListResp" }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "subsList": { "type": "array", "items": { "type": "object", "required": [ "advantageFlag" ], "properties": { "advantageFlag": { "type": "string", "enum": [ "1", "2", "3", "4", "5", "" ], "default": "1", "description": "A flag indicating whether the offer has special advantages or benefits. Possible values are: \/ 1-not allow package; \/ 2-turned off; \/ 3-turned on; \/ 4-turned off, prohibit turn on; \/ 5-turned on, prohibit turn off", "example": "2" } } }, "description": "A list of subscriptions associated with the customer." } }, "description": "Result Data" } } } ] } } } } } } }, "\/dxp\/proj\/package-advantage\/v1\/activate": { "post": { "summary": "Activate Package Advantage", "description": "Activate package advantage.\r\nNote: "subsId","serviceNumber" cannot both be empty.", "tags": [ "Package Advantage" ], "requestBody": { "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/ActivatePackageAdvantageReq" } } } }, "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/ActivatePackageAdvantageResp" } } } } } } }, "\/dxp\/proj\/package-advantage\/v1\/deactivate": { "post": { "summary": "Deactivate Package Advantage", "description": "Deactivate package advantage.\r\nNote: "subsId","serviceNumber" cannot both be empty.", "tags": [ "Package Advantage" ], "requestBody": { "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/DeactivatePackageAdvantageReq" } } } }, "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/DeactivatePackageAdvantageResp" } } } } } } }, "\/dxp\/product-catalog\/v1\/sales-catalogs": { "get": { "summary": "Query Sales Catalog List", "description": "Query sales catalog list based on parent sales catalog code.", "tags": [ "Product Catalog Management" ], "parameters": [ { "in": "query", "name": "parentCatgCode", "description": "The code of the parent catalog.", "schema": { "type": "string", "example": "CLP_VAS" } }, { "in": "query", "name": "includeChildren", "description": "A flag indicating whether to recursively query children categories in the response.", "schema": { "type": "boolean", "example": "false" } }, { "in": "query", "name": "lang", "description": "The language used for the response data.", "schema": { "type": "string", "example": "en-US" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QuerySalesCatalogResp" } } } } } } }, "\/dxp\/product-catalog\/v1\/offers\/{offerNbr}": { "get": { "summary": "Query Offer Detail", "description": "Query offer details based on offer number.\r\nNote: If scopes are not provided, only basic information is returned.", "tags": [ "Product Catalog Management" ], "parameters": [ { "in": "query", "name": "channel", "description": "Unique identifier for the channel.", "schema": { "type": "string", "example": "APP" } }, { "in": "query", "name": "lang", "description": "The language used for the response data.", "schema": { "type": "string", "example": "en-US" } }, { "in": "query", "name": "scopes", "description": "Scopes associated with the offer. Possible value: imageList\uff0cdescriptionList", "schema": { "type": "string", "example": "imageList,descriptionList" } }, { "in": "path", "name": "offerNbr", "description": "A unique identifier for an offer.", "required": true, "schema": { "type": "string", "example": "515094465305387016" } } ], "responses": { "200": { "description": "OK", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/QueryOfferDetailResp" } } } } } } }, "\/dxp\/product-catalog\/v1\/offers\/{offerNbr}\/offer-groups": { "get": { "summary": "Query Offer Group List", "description": "Query the list of offer groups based on the main plan's offer Number.", "tags": [ "Product Catalog Management" ], "parameters": [ { "in": "path", "name": "offerNbr", "description": "A unique identifier for an offer.", "required": true, "schema": { "type": "string", "example": "515094465305387016" } }