AlphaOTT Middleware Integration APIs (0.8.1)

Download OpenAPI specification:Download

Middleware Subsystems

AlphaOTT Middleware consists of several subsystems communicating with each other and other external systems like Billing System using a well-defined set of APIs

The main Middleware subsystems are:

  • Service Delivery Platform
  • Content Management Platform
  • Client Applications

Service Delivery Platform

Service Delivery Platform manages end-user accounts, devices, services and provides access to the IPTV/OTV services for the client applications.

The core entities are:

  • Customer
    • Service
    • Device
    • Profile
    • Account
  • Service Specification

It provides the following integration points:

  • ICustomerManagementAPI
  • IServiceProvisioningAPI
  • IServiceManagementAPI

Service Delivery Platform Overview Diagram

Content Management Platform

Content Management Platform manages content items, groups, packages and catalogs, also defines the media access rules, encryption, recording and other content related things.

Content Managment Platform Overview Diagram

The core entities are:

  • TV Channel
  • Radio Channel
  • Movie
  • TV Show
  • Application
  • Genre
  • Content Category
  • Content Package

It provides the following integration points:

  • IContentManagementAPI

Client Applications

Client Applications provide customer UI to access to the IPTV/OTT services and content

  • Mobile UI for Apple smartphones & tablets
  • Mobile UI for Android smartphones & tablets
  • TV UI for AndroidTV devices
  • TV UI for AppleTV devices
  • TV UI for SmartTV devices

All client applications access the system using IClientAPI implemented by the Client Services component of Service Delivery Platform

Client Applications Overview Diagram

Billing System

Billing System provides available products(tariffs) and offers(plans) by customer request, process & manages the customer orders/subscriptions.

Here is an architecture overview diagram

Overview Diagram

AlphaOTT Middleware communicates with Billing System in two main aspects:

  • Product Catalog
  • Order Management & Fullfilment

In order to integrate the external Billing System with AlphaOTT Middleware the Billing Adapter component should be developed implementing the bridge between AlphaOTT APIs and Customer's Billing System APIs

Billing Adapter Overview Diagram

Product Catalog

Product Catalog is a part of Billing subsystem.

It defines how exactly the IPTV/OTT services provided by Service Delivery Platform should be bundled and proposed to the end user.

The core entities are:

  • Product Catalog
  • Product Specification
  • Product Offer

It provides the following integration points:

  • IProductManagementAPI
  • IProductCatalogAPI

Product Catalog Overview Diagram

Order Management and Fullfilment

Order Management and Fullfilment process & manages customer orders/subscriptions and provision the services to the Service Delivery Platform

The core entities are:

  • Order
  • Invoice
  • Transaction
  • Payment

It provides the folowing integration points:

  • IOrderManagementAPI

Order Management Overview Diagram

Use Cases

Customer -> Billing Use Cases Diagram

Customer orders subscription

  1. Customer ask MW to provide list of available Products (Tariffs) & Offers (Plans)
  2. MW request a list of Products & Offers for this Customer from Billing System using IProductCatalogAPI
  3. Customer choose some Offer for specific Product to order
  4. MW request IOrderManagementAPI.creatOrderHostedPage from Billing System
  5. Billing System provide the URL to the Hosted Page with payment form
  6. MW redirects customer to this Hosted Page
  7. Customer fill the payment form and submit the data on the hosted page (to the Billing System)
  8. Billing System handle the payment information from customer and process the payment
  9. After the payment succeded the Billing System activates the corresponding Services to the MW using IServiceProvisioningAPI
  10. MW provisions the Services so the customer will be able to consume the Services ordered

Core

API Version

Provides version information for API services component deployed

Responses

Response samples

Content type
application/json
{
  • "version": "1.1.8"
}

System Status

Provides status information for API services

Responses

Response samples

Content type
application/json
{
  • "status": "OK"
}

Customer Management

ICustomerManagementAPI implemented by Service Delivery Platform and provides methods to manage customers entities

ICustomerManagementAPI Diagram

Get customers

Authorizations:
JWT
query Parameters
status
Array of strings (status)
Items Enum: "ACTIVE" "INACTIVE" "AWAITING_AUTHORIZATION" "SUSPENDED_BY_CUSTOMER" "SUSPENDED_BY_BILLING" "DELETED"

Filter customers by status.

email
string
Example: email=customer@example.com

Filter customers by email.

extraFields
string
Example: extraFields=orders

Get customer orders.

limit
integer [ 1 .. 100 ]
Default: 50

The numbers of items to return

offset
integer >= 0
Default: 0

The number of items to skip before starting to collect the result set

Responses

Response samples

Content type
application/json
{
  • "title": "",
  • "firstName": "Oliver",
  • "lastName": "Queen",
  • "middleName": "",
  • "prefix": "Mr",
  • "suffix": "Sr",
  • "activated": "2017-05-12T14:16:27.134Z",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE",
  • "email": "oliver@queen.com",
  • "serviceProvider": "alphaott",
  • "location": {
    },
  • "billingAddress": {
    },
  • "address": {
    },
  • "phones": [
    ]
}

Create customer

Authorizations:
JWT
Request Body schema: application/json
title
string
firstName
string
lastName
string
middleName
string
prefix
string
suffix
string
activated
string <date-time>
created
string <date-time>
status
string
Enum: "ACTIVE" "INACTIVE" "AWAITING_AUTHORIZATION" "SUSPENDED_BY_CUSTOMER" "SUSPENDED_BY_BILLING" "DELETED"
email
string
serviceProvider
string
object
object (Address)
object (Address)
phones
Array of strings

Responses

Request samples

Content type
application/json
{
  • "title": "",
  • "firstName": "Oliver",
  • "lastName": "Queen",
  • "middleName": "",
  • "prefix": "Mr",
  • "suffix": "Sr",
  • "activated": "2017-05-12T14:16:27.134Z",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE",
  • "email": "oliver@queen.com",
  • "serviceProvider": "alphaott",
  • "location": {
    },
  • "billingAddress": {
    },
  • "address": {
    },
  • "phones": [
    ]
}

Response samples

Content type
application/json
{
  • "title": "",
  • "firstName": "Oliver",
  • "lastName": "Queen",
  • "middleName": "",
  • "prefix": "Mr",
  • "suffix": "Sr",
  • "activated": "2017-05-12T14:16:27.134Z",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE",
  • "email": "oliver@queen.com",
  • "serviceProvider": "alphaott",
  • "location": {
    },
  • "billingAddress": {
    },
  • "address": {
    },
  • "phones": [
    ]
}

Get customer by Id

Authorizations:
JWT
query Parameters
extraFields
string
Example: extraFields=orders

Get customer orders.

Responses

Response samples

Content type
application/json
{
  • "title": "",
  • "firstName": "Oliver",
  • "lastName": "Queen",
  • "middleName": "",
  • "prefix": "Mr",
  • "suffix": "Sr",
  • "activated": "2017-05-12T14:16:27.134Z",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE",
  • "email": "oliver@queen.com",
  • "serviceProvider": "alphaott",
  • "location": {
    },
  • "billingAddress": {
    },
  • "address": {
    },
  • "phones": [
    ]
}

Update customer

Authorizations:
JWT
Request Body schema: application/json
required
title
string
firstName
string
lastName
string
middleName
string
prefix
string
suffix
string
activated
string <date-time>
created
string <date-time>
status
string
Enum: "ACTIVE" "INACTIVE" "AWAITING_AUTHORIZATION" "SUSPENDED_BY_CUSTOMER" "SUSPENDED_BY_BILLING" "DELETED"
email
string
serviceProvider
string
object
object (Address)
object (Address)
phones
Array of strings

Responses

Request samples

Content type
application/json
{
  • "title": "",
  • "firstName": "Oliver",
  • "lastName": "Queen",
  • "middleName": "",
  • "prefix": "Mr",
  • "suffix": "Sr",
  • "activated": "2017-05-12T14:16:27.134Z",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE",
  • "email": "oliver@queen.com",
  • "serviceProvider": "alphaott",
  • "location": {
    },
  • "billingAddress": {
    },
  • "address": {
    },
  • "phones": [
    ]
}

Response samples

Content type
application/json
{
  • "title": "",
  • "firstName": "Oliver",
  • "lastName": "Queen",
  • "middleName": "",
  • "prefix": "Mr",
  • "suffix": "Sr",
  • "activated": "2017-05-12T14:16:27.134Z",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE",
  • "email": "oliver@queen.com",
  • "serviceProvider": "alphaott",
  • "location": {
    },
  • "billingAddress": {
    },
  • "address": {
    },
  • "phones": [
    ]
}

Remove customer

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "code": "UnauthorizedError",
  • "message": "Authorization required"
}

Change customer password

Authorizations:
JWT
Request Body schema: application/json
password
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "new-password"
}

Response samples

Content type
application/json
{
  • "message": "Password has been successfully changed"
}

Reset customer password

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "message": "Password has been successfully changed"
}

Customer Device Management

ICustomerDeviceManagementAPI implemented by Service Delivery Platform and provides methods to manage customer devices

ICustomerDeviceManagementAPI Diagram

Get customer device list

Authorizations:
JWT
query Parameters
status
Array of strings (properties-status)
Items Enum: "ACTIVE" "INACTIVE" "BROKEN" "STOCK" "RETIRED"
Example: status=ACTIVE

Filter devices by status`.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add customer device

Authorizations:
JWT
Request Body schema: application/json
_id
string
type
string
Enum: "UNKNOWN" "STB" "PC" "TV" "MOBILE" "TABLET"
model
string
platform
string
brand
string
serial
string
mac
string
created
string <date-time>
status
string
Enum: "ACTIVE" "INACTIVE" "BROKEN" "STOCK" "RETIRED"

Responses

Request samples

Content type
application/json
{
  • "_id": "4e8e8494-ef9f-4bc1-9c65-31ef1e372f05",
  • "type": "UNKNOWN",
  • "model": "Gecko",
  • "platform": "BROWSER",
  • "brand": "Google Inc.",
  • "serial": "DA094B950608D8BA",
  • "mac": "82:90:A8:59:D2:B1:C0:76",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE"
}

Response samples

Content type
application/json
[
  • {
    }
]

Get customer device by id

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "_id": "4e8e8494-ef9f-4bc1-9c65-31ef1e372f05",
  • "type": "UNKNOWN",
  • "model": "Gecko",
  • "platform": "BROWSER",
  • "brand": "Google Inc.",
  • "serial": "DA094B950608D8BA",
  • "mac": "82:90:A8:59:D2:B1:C0:76",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE"
}

Update customer device

Authorizations:
JWT
Request Body schema: application/json
status
string (properties-status)
Enum: "ACTIVE" "INACTIVE" "BROKEN" "STOCK" "RETIRED"

Responses

Request samples

Content type
application/json
{
  • "status": "ACTIVE"
}

Response samples

Content type
application/json
{
  • "_id": "4e8e8494-ef9f-4bc1-9c65-31ef1e372f05",
  • "type": "UNKNOWN",
  • "model": "Gecko",
  • "platform": "BROWSER",
  • "brand": "Google Inc.",
  • "serial": "DA094B950608D8BA",
  • "mac": "82:90:A8:59:D2:B1:C0:76",
  • "created": "2017-05-12T14:16:27.134Z",
  • "status": "ACTIVE"
}

Remove customer device

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "code": "UnauthorizedError",
  • "message": "Authorization required"
}

Customer Service Provisioning

IServiceProvisioningAPI implemented by Service Delivery Platform and provides methods to provision services to the specific customer

IServiceProvisioningAPI Diagram

Get customer services list

Authorizations:
JWT
query Parameters
status
Array of strings (Service-properties-status)
Items Enum: "ACTIVE" "INACTIVE" "EXPIRED" "FROZEN" "DELETED"

Filter services by status`.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add customer service

Authorizations:
JWT
Request Body schema: application/json
status
string (Service-properties-status)
Enum: "ACTIVE" "INACTIVE" "EXPIRED" "FROZEN" "DELETED"
expires
string <date-time> (expires)
serviceSpec
any (ServiceSpecId)

Service specification id

Responses

Request samples

Content type
application/json
{
  • "status": "ACTIVE",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "serviceSpec": "4e8e8494-ef9f-4bc1-9c65-31ef1e372f05"
}

Response samples

Content type
application/json
[
  • {
    }
]

Get customer service by id

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "_id": "5915c3bacc8e1e13969de081",
  • "activated": "2017-05-12T14:16:27.134Z",
  • "created": "2017-05-12T14:16:27.134Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "serviceType": "LIVE_TV",
  • "status": "ACTIVE",
  • "contentType": "TV",
  • "scope": "ONE_ITEM",
  • "externalRefs": [
    ],
  • "serviceSpec": "5915c39c1d6d2f134d69afb1"
}

Remove customer service

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "code": "UnauthorizedError",
  • "message": "Authorization required"
}

Service Management

IServiceManagementAPI implemented by Service Delivery Platform and provides methods to manage Service Specifications

IServiceManagementAPI Diagram

Get service specifications

Authorizations:
JWT
query Parameters
status
Array of strings (ServiceSpec-properties-status)
Items Enum: "ACTIVE" "INACTIVE" "EXPIRED" "FROZEN" "DELETED"

Filter service specifications by status

serviceType
Array of strings (serviceType)
Items Enum: "LIVE_TV" "CATCHUP_TV" "RADIO" "VOD" "APPS"

Filter service specifications by type

contentType
Array of strings (contentType)
Items Enum: "TV" "RADIO" "MOVIE" "APP" "TV_SHOW"

Filter service specifications by content type

limit
integer [ 1 .. 100 ]
Default: 50

The numbers of items to return

offset
integer >= 0
Default: 0

The number of items to skip before starting to collect the result set

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get service specification by id

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "_id": "5915c3bacc8e1e13969de081",
  • "activated": "2017-05-12T14:16:27.134Z",
  • "created": "2017-05-12T14:16:27.134Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "serviceType": "LIVE_TV",
  • "status": "ACTIVE",
  • "contentType": "TV",
  • "scope": "ONE_ITEM",
  • "externalRefs": [
    ]
}

Product Catalog

IProductCatalogAPI should be implemented by external Billing System to get Products and Offers for the specific Customer to order

IProductCatalogAPI Diagram

Get products specifications available for customer

Authorizations:
JWT
query Parameters
status
Array of strings (ProductSpec-properties-status)
Items Enum: "ACTTIVE" "INACTIVE" "EXPIRED" "DRAFT"

Filter product specifications by status`.

limit
integer [ 1 .. 100 ]
Default: 50

The numbers of items to return

offset
integer >= 0
Default: 0

The number of items to skip before starting to collect the result set

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get product offers available for customer

Authorizations:
JWT
query Parameters
status
string
Enum: "ACTIVE" "INACTIVE"

Filter offers by status`.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Product Management

IProductManagementAPI should be implemented by external Billing System to manage Product Specifications(Tarifs) and Product Offers(Plans)

IProductManagementAPI Diagram

Get product specifications

Authorizations:
JWT
query Parameters
status
Array of strings (ProductSpec-properties-status)
Items Enum: "ACTTIVE" "INACTIVE" "EXPIRED" "DRAFT"

Filter product specifications by status`.

limit
integer [ 1 .. 100 ]
Default: 50

The numbers of items to return

offset
integer >= 0
Default: 0

The number of items to skip before starting to collect the result set

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get product specification

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "_id": "5915c3bacc8e1e13969de081",
  • "title": "string",
  • "description": "string",
  • "scope": "ONE_ITEM",
  • "status": "ACTTIVE",
  • "serviceSpecs": [
    ],
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "posters": [],
  • "externalRefs": [
    ]
}

Update product specification

Authorizations:
JWT
Request Body schema: application/json
_id
string

Product specification ID

title
string
description
string
scope
string
Enum: "ONE_ITEM" "ALL_ITEMS"
status
string
Enum: "ACTTIVE" "INACTIVE" "EXPIRED" "DRAFT"
serviceSpecs
Array of strings
created
string <date-time>
updated
string <date-time>
expires
string <date-time>
Array of objects
Array of objects

Responses

Request samples

Content type
application/json
{
  • "_id": "5915c3bacc8e1e13969de081",
  • "title": "string",
  • "description": "string",
  • "scope": "ONE_ITEM",
  • "status": "ACTTIVE",
  • "serviceSpecs": [
    ],
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "posters": [],
  • "externalRefs": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": "5915c3bacc8e1e13969de081",
  • "title": "string",
  • "description": "string",
  • "scope": "ONE_ITEM",
  • "status": "ACTTIVE",
  • "serviceSpecs": [
    ],
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "posters": [],
  • "externalRefs": [
    ]
}

Remove product specification

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "code": "UnauthorizedError",
  • "message": "Authorization required"
}

Get product offers

Authorizations:
JWT
query Parameters
status
string
Enum: "ACTIVE" "INACTIVE"

Filter offers by status`.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create product offer

Authorizations:
JWT
Request Body schema: application/json
_id
string

Product offer ID

productSpec
string

Product specification ID

title
string
description
string
duration
number
period
string
Enum: "DAY" "MONTH" "QUARTER" "YEAR"
numberOfBillingCycles
number
type
string
Enum: "ONE_TIME" "RECURRING"
status
string
Enum: "ACTTIVE" "INACTIVE"
Array of objects
created
string <date-time>
updated
string <date-time>
expires
string <date-time>
Array of objects

Responses

Request samples

Content type
application/json
{
  • "_id": "string",
  • "productSpec": "string",
  • "title": "string",
  • "description": "string",
  • "duration": 0,
  • "period": "DAY",
  • "numberOfBillingCycles": 0,
  • "type": "ONE_TIME",
  • "status": "ACTTIVE",
  • "charges": [
    ],
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "externalRefs": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "UnauthorizedError",
  • "message": "Authorization required"
}

Get product offer by id

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "productSpec": "string",
  • "title": "string",
  • "description": "string",
  • "duration": 0,
  • "period": "DAY",
  • "numberOfBillingCycles": 0,
  • "type": "ONE_TIME",
  • "status": "ACTTIVE",
  • "charges": [
    ],
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "externalRefs": [
    ]
}

Update product offer

Authorizations:
JWT
Request Body schema: application/json
_id
string

Product offer ID

productSpec
string

Product specification ID

title
string
description
string
duration
number
period
string
Enum: "DAY" "MONTH" "QUARTER" "YEAR"
numberOfBillingCycles
number
type
string
Enum: "ONE_TIME" "RECURRING"
status
string
Enum: "ACTTIVE" "INACTIVE"
Array of objects
created
string <date-time>
updated
string <date-time>
expires
string <date-time>
Array of objects

Responses

Request samples

Content type
application/json
{
  • "_id": "string",
  • "productSpec": "string",
  • "title": "string",
  • "description": "string",
  • "duration": 0,
  • "period": "DAY",
  • "numberOfBillingCycles": 0,
  • "type": "ONE_TIME",
  • "status": "ACTTIVE",
  • "charges": [
    ],
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "externalRefs": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "productSpec": "string",
  • "title": "string",
  • "description": "string",
  • "duration": 0,
  • "period": "DAY",
  • "numberOfBillingCycles": 0,
  • "type": "ONE_TIME",
  • "status": "ACTTIVE",
  • "charges": [
    ],
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "externalRefs": [
    ]
}

Remove product offer

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "code": "UnauthorizedError",
  • "message": "Authorization required"
}

Order Management

IOrderManagementAPI should be implemented by external Billing System to manage Orders(Subscriptions) for the specific Customer

IOrderManagementAPI Diagram

Get customer orders

Authorizations:
JWT
query Parameters
status
Array of strings (Order-properties-status)
Items Enum: "ACTTIVE" "INACTIVE" "EXPIRED" "CANCELED" "DELETED"

Filter orders by status`.

limit
integer [ 1 .. 100 ]
Default: 50

The numbers of items to return

offset
integer >= 0
Default: 0

The number of items to skip before starting to collect the result set

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create customer order

Order will be created without customer services in case createCustomerServices not true as default value for this flag is false

Authorizations:
JWT
Request Body schema: application/json
createCustomerServices
booelan
Default: false

Flag to enable adding services to customer

_id
string

Order ID

duration
number
period
string
Enum: "DAY" "MONTH" "QUARTER" "YEAR"
numberOfBillingCycles
integer
type
string
Enum: "ONE_TIME" "RECURRING"
status
string
Enum: "ACTTIVE" "INACTIVE" "EXPIRED" "CANCELED" "DELETED"
offer
string

Product offer id

customer
string

Customer id

nextBillingCycle
string <date-time>
created
string <date-time>
updated
string <date-time>
expires
string <date-time>
Array of objects

Responses

Request samples

Content type
application/json
{
  • "createCustomerServices": false,
  • "_id": "5915c3bacc8e1e13969de081",
  • "duration": 0,
  • "period": "DAY",
  • "numberOfBillingCycles": 0,
  • "type": "ONE_TIME",
  • "status": "ACTTIVE",
  • "offer": "string",
  • "customer": "string",
  • "nextBillingCycle": "2017-12-29T04:27:16.275Z",
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "externalRefs": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "UnauthorizedError",
  • "message": "Authorization required"
}

Get customer order

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "_id": "5915c3bacc8e1e13969de081",
  • "duration": 0,
  • "period": "DAY",
  • "numberOfBillingCycles": 0,
  • "type": "ONE_TIME",
  • "status": "ACTTIVE",
  • "offer": "string",
  • "customer": "string",
  • "nextBillingCycle": "2017-12-29T04:27:16.275Z",
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "externalRefs": [
    ]
}

Update customer order

Authorizations:
JWT
Request Body schema: application/json
required
status
string (Order-properties-status)
Enum: "ACTTIVE" "INACTIVE" "EXPIRED" "CANCELED" "DELETED"
expires
string <date-time> (expires)
nextBillingCycle
string <date-time> (nextBillingCycle)
numberOfBillingCycles
integer (numberOfBillingCycles)

Responses

Request samples

Content type
application/json
{
  • "status": "ACTTIVE",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "nextBillingCycle": "2017-12-29T04:27:16.275Z",
  • "numberOfBillingCycles": 0
}

Response samples

Content type
application/json
{
  • "_id": "5915c3bacc8e1e13969de081",
  • "duration": 0,
  • "period": "DAY",
  • "numberOfBillingCycles": 0,
  • "type": "ONE_TIME",
  • "status": "ACTTIVE",
  • "offer": "string",
  • "customer": "string",
  • "nextBillingCycle": "2017-12-29T04:27:16.275Z",
  • "created": "2017-12-29T04:27:16.275Z",
  • "updated": "2017-12-29T04:27:16.275Z",
  • "expires": "2018-01-29T04:27:16.275Z",
  • "externalRefs": [
    ]
}

Remove customer order

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "code": "UnauthorizedError",
  • "message": "Authorization required"
}

Get customer transactions

Authorizations:
JWT
query Parameters
type
string
Enum: "PAYMENT" "REFUND"

Filter transactions by type`.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get customer account balance

Authorizations:
JWT

Responses

Response samples

Content type
application/json
{
  • "amount": 102.5,
  • "currency": "USD"
}

Create customer order hosted page

Authorizations:
JWT
Request Body schema: application/json
offerId
string

Product Offer ID

returnUrl
string

Return URL. After customer finished the payment process billing should redirect him back to the MW Client UI

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Redirect URL after payment done

query Parameters
type
required
string
Example: type=chargebee-01

Billing System Identifier in as configured in MW

id
required
string
Example: id=4qiN5QfYP

Hosted page Id

orderId
string
Example: orderId=4qiN5QfYPN8U48nSMRX3FMgJJbJ28HFH

Order Id

status
required
string
Enum: "succeded" "processing" "failed"
Example: status=success

Payment status

Graphql

AlphaOTT Graphql system provides convinient access to internal API system

Graphql Authentication

JWT:


Authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaXAiOiI6OjEiLCJncmFudF90eXBlIjoiYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjYzNzQwMzg4LCJleHAiOjE3MjY4NTU1ODgsImF1ZCI6InNlcnZpY2VQcm92aWRlcklkIiwiaXNzIjoibG9jYWwtYWRtaW4tYWxwaGFvdHQiLCJzdWIiOiI1Yzg1ZTIxYjEyZTY5ODAwMDExODY4M2UiLCJqdGkiOiI5OTE4NGJmMS0xOWQyLTQ2NmUtYTA0YS00YmYzNjI2MDhjZTkifQ.GugZzF9AoZVxqCns_7a_ALa3I_G8inGDI6O-0KhAZ28
Security Scheme Type API Key
Header parameter name: Authorization

Graphql CustomerActivity Query

Full Operation:

query CustomerActivityPagination($page: Int, $perPage: Int, $filter: FilterFindManyCustomerActivityInput, $sort: [SortFindManyCustomerActivityInput!]) {
  customerActivityPagination(page: $page, perPage: $perPage, filter: $filter, sort: $sort) {
    count
    pageInfo {
      currentPage
      perPage
      pageCount
      itemCount
      hasNextPage
      hasPreviousPage
    }
    items {
      _id
      customer
      device
      ip
      date
      action
      details
    }
  }
}

Variables:

{
  "page": null,
  "perPage": null,
  "filter": {
    "customer": null,
    "device": null,
    "ip": null,
    "date": null,
    "action": null,
    "details": null,
    "_id": null
  },
  "sort": null
}

Example

Operation: Get 100 customer activity items filtered by the customer

query CustomerActivityPagination($perPage: Int, $filter: FilterFindManyCustomerActivityInput, $sort: [SortFindManyCustomerActivityInput!]) {
  customerActivityPagination(perPage: $perPage, filter: $filter, sort: $sort) {
    count
    items {
      customer
      device
      ip
      date
    }
  }
}

Variables:

{
  "perPage": 100,
  "filter": {
    "customer": "5b9774e8fbd891004f485ca2"
  },
  "sort": "DATE_ASC"
}