Subscription API

Updated: May 13, 2021
Contents

Overview

The Subscription module from the Connect graphical user interface represents Assets Management Module on the Connect API. Subscriptions from the graphical user interface are displayed as Assets as well as Subscriptions. Furthermore, note that Fulfillment Requests are presented as Requests and Asset Request. Refer to Connect REST API for more information about the Connect API.

Recommended Polling Period

In general, the automation script periodically polls for changed data. Thus, it is recommended to process fulfillment queue every 2~5 minutes. Namely, less frequent than 2 minutes (to reduce load on the API queue) and not longer than 5 minutes (to limit order completion time). The polling frequency depends on business requirements for how quickly requests queue changes should be reflected in your systems and it also depends on the Service-level Agreements defined by Providers.

The following provides detailed description of the Subscription (Assets) Management Module API.

Get Requests List

Resource
/requests
Method
GET
Header
Authorization:  ApiKey <key_id>:<key_secret>
Filter(s)
status, created, asset_id, product_id, type, asset.connection.hub.id, asset.connection.provider.id, asset.tiers.customer.id, asset.connection.type
Default Filter(s)
status=’pending’
Ordering

Default Ordering
created (ascending)
Limit

Default limit
1000

Response body: 

Content-Type: application/json
[ request_obj1,
  request_obj2,
  request_obj3
]

Get Request Details

Resource 
/requests/{id}
Method 
GET
Header 
Authorization: ApiKey  <key_id>:<key_secret>
Filter(s)
– 
Default Filter(s)
– 
Ordering
– 
Default Ordering
– 
Limit
– 
Default limit
– 

Response body:

Content-Type: application/json
{
"id": "PR-9861-7949-8492",
"type": "purchase",
"created": "2018-06-04T13:19:10.102670+00:00",
"updated": "2018-06-04T13:19:10.102670+00:00",
"status": "pending",
"asset": {
"id": "AS-9861-7949-8492",
"external_id": "12435 #OSA Subscription Id",
"product": {
"id": "CN-9861-7949-8492",
"name": "Fallball Awesone"
},
"connection": {
"id": "CT-9861-7949-8492",
"type": "production",
"provider": {
"name": "Ingram Micro Prod DA",
"id": "PA-9861-7949-849"
},
"vendor": {
"name": "Large Largo and Co",
"id": "VA-9861-7949-849"
}
},
"items": [{
"global_id": "PR-9861-7949-8492-001",
"id": "SKU-9861-7949-8492-0001",
"mpn": "TEAM-ST3L2TAC1M",
"quantity": "3",
"old_quantity": ""
},
{
"global_id": "PR-9861-7949-8492-002",
"id": "SKU-9861-7949-8492-0002",
"mpn": "USR-FFFAC1M",
"quantity": "1",
"old_quantity": ""
}
],
"params": [{
"id": "PM-9861-7949-8492-0001 #AUTOGEN #PRODUCT",
"name": "Secondary email",
"description": "This is a backup email for emergency",
"value": "daniel.lark@gmail.com",
"value_error": "This address is already used. Try another.",
"value_choices": ""
}],
"tiers": {
"customer": {
"id": "CS-9861-7949-8492",
"external_id": "12435 #OSA Account Id",
"account_name": "string",
"contact_info": {
"address_line1": "Yalı Mahallesi",
"address_line2": "",
"city": "Erdek",
"state": "string",
"postal_code": "10500",
"country": "tr",
"contact": {
"first_name": "Quickstart",
"last_name": "Long Running Operation",
"email": "qlro@softcom.com",
"phone_number": {
"country_code": "+90",
"area_code": "546",
"phone_number": "6317546",
"extension": ""
}
}
},
"tier1": {
"id": "RS-9861-7949-8492",
"external_id": "12435 #OSA Account Id",
"account_name": "string",
"contact_info": { ...
}
},
"tier2": {
"id": "RS-9861-7949-8492",
"external_id": "12435 #OSA Account Id",
"account_name": "string",
"contact_info": { ...
}
},
"marketplace": {
"id": "MP-9861-7949-8492",
"name": "Ingram Micro Cloud United",
"external_id": "12435 #OSA Account Id",
"account_name": "string",
"contact_info": { ...
}
}
}
}

Modify Request Data

Resource 
/requests/{id}
Method 
PUT (Partial Update)
Header 
Authorization: ApiKey  <key_id>:<key_secret>
Filter(s) 

Default Filter(s) 

Ordering 

Default Ordering 

Limit 

Default limit 

Request body:

Content-Type: application/json
{
    "asset": {
       "params": [
            {
                "id": "PM-9861-7949-8492-0001",
                "name": "Secondary email",
                "description": "This is a backup email for emergency",
                "value": "daniel.lark@example.com", // MODIFICATION ALLOWED
                "value_error": "Invalid address. Try another.", // MODIFICATION ALLOWED
                "value_choices": []
            },
           {
                "id": "PM-9861-7949-8492-0002",
                "name": "Secondary email",
                "description": "This is a backup email for emergency",
                "value": "daniel.lark@example.com", // MODIFICATION ALLOWED
                "value_error": "Invalid address. Try another.", // MODIFICATION ALLOWED
                "value_choices": []
            }
        ]
    }
}

Response body: 

Content-Type: application/json
[ request_obj1,
  request_obj2,
  request_obj3
]

Change Request Status

Resource 
/requests/{id}/{new_status}
Method 
POST
Header 
Authorization: ApiKey  <key_id>:<key_secret>
Filter(s) 

Default Filter(s) 

Ordering 

Default Ordering 

Limit 

Default limit 

Status change to Approve

Resource 
/requests/{id}/approve
Method 
POST
Header 
Authorization: ApiKey  <key_id>:<key_secret>

Request body with the Activation Template ID:

Content-Type: application/json
{
   "template_id": "{activation_template_id}"
}

Request body with the Raw Markdown:

Content-Type: application/json
{
   "activation_tile": "markdown text up to 4096 symbols"
}

Status change to Fail

Resource 
/requests/{id}/fail
Method 
POST
Header 
Authorization: ApiKey  <key_id>:<key_secret>

Request body:

Content-Type: application/json
{
   "reason": "markdown string up to 4096 symbols"
}

Status change to Inquire

Resource 
/requests/{id}/inquire
Method 
POST
Header 
Authorization: ApiKey  <key_id>:<key_secret>

Request body:

Content-Type: application/json
{}

Response body:

Content-Type: application/json
{ request_obj }

Status change to Pend

Resource  
/requests/{id}/pend
Method  
POST
Header  
Authorization: ApiKey  <key_id>:<key_secret>

Request body:

Content-Type: application/json
{}

Response body:

Content-Type: application/json
Response Code: 204 No Content
{}

REST API Methods

Connect Swagger
Specs URL:https://apispec.connect.cloudblue.com/connect-openapi30.yml
Version:
Download:
Open:
Description:
Tags:
Playground
Disabled
Models
Hidden
Path prefixes:
/assets*
/requests*
Is this page helpful?
Translate with Google
Copied to clipboard