GetBsnBySn

Updated at:
Copy as MD

Call the GetBsnBySn operation to query the account and the product instance to which a service identification number is attached.

Request parameters

Name Type Required Example value Description
Action String Yes GetBsnBySn The name of the API operation. Set the value to GetBsnBySn.
sn String Yes 1131-*******-233 Service Identification Number

Response parameters

Name Type Example value Description
status Integer 4

The status of the service identification number. Valid values:

  • 0: Unbound. The service identification number is not attached to a product instance.
  • 1: Attached. The service identification number is attached to a product instance. You can go to the ICP filing platform to submit an ICP filing. An attached service identification number cannot be detached.
  • 2: Filed. The ICP filing submitted using the service identification number is complete.
  • 3: Invalid. The service identification number is invalid for administrative reasons.
  • 4: Filing. An ICP filing request was submitted using the service identification number and is under review.
beianNum String -

The ICP filing number issued by the Ministry of Industry and Information Technology (MIIT) after the ICP filing is successful. This parameter is empty if the ICP filing is not successful.

aliUid String 165*******846 The ID of the Alibaba Cloud account that owns the cloud product instance.
resourceType Integer 1

The type of the cloud product to which the service identification number is attached. Valid values:

  • 1: ECS
  • 2: SLB
  • 3: ACE
  • 4: Alibaba Cloud Marketplace
  • 5: WEBAPP
  • 6: NAT
  • 7: NAT64
  • 8: ENS
  • 9: Cloud Web Hosting
resourceId String i-947zl2pl14 The ID of the cloud product instance to which the service identification number is attached.

Request example

https://bsn.aliyuncs.com/?Action=GetBsnBySn
&sn=1131-*******-233
&<CommonParameters>

Response examples

XML format

<?xml version='1.0' encoding='utf-8'?>
<GetBsnBySnResponse>
  <resourceId>i-947zl2pl14</resourceId>
  <status>4</status>
  <beianNum></beianNum>
  <aliUid>165*******846</aliUid>
  <resourceType>1</resourceType>
</GetBsnBySnResponse>

JSON format

{
   "resourceId":
   "i-947zl2pl41", "status": 4,
   "beianNum":"",
   "aliUid":
   "165*******846",
   "resourceType": 1
}

Error codes

HttpCode Error code Error message
400 406 The service identification number does not exist.
400 507 API error.
400 602 A required parameter cannot be empty.
400 616 The service identification number does not belong to the account specified in the request.