{ "swagger": "2.0", "tags": [ { "name": "v1", "description": "" } ], "host": "api.ote-godaddy.com", "paths": { "/v1/subscriptions": { "get": { "tags": [ "v1" ], "consumes": [ "application/json", "application/xml", "text/xml" ], "produces": [ "application/json", "application/javascript", "application/xml", "text/javascript", "text/xml" ], "parameters": [ { "description": "A unique application key identifying the source of the request. This is required for request tracking", "in": "header", "name": "X-App-Key", "required": true, "type": "string" }, { "description": "Shopper ID to return subscriptions for when not using JWT", "in": "header", "name": "X-Shopper-Id", "required": false, "type": "string" }, { "default": "en-US", "description": "The market that the response should be formatted for", "in": "header", "name": "X-Market-Id", "required": false, "type": "string" }, { "description": "Only return Subscriptions with the specified product groups", "in": "query", "items": { "type": "string" }, "name": "productGroupKeys", "required": false, "type": "array" }, { "description": "Optional details to be included in the response", "enum": [ "addons", "relations", "renewOptions" ], "in": "query", "items": { "type": "string" }, "name": "includes", "required": false, "type": "array" }, { "default": 0, "description": "Number of Subscriptions to skip before starting to return paged results (must be a multiple of the limit)", "in": "query", "name": "offset", "required": false, "type": "integer" }, { "default": 25, "description": "Number of Subscriptions to retrieve in this page, starting after offset", "in": "query", "maximum": 250, "minimum": 1, "name": "limit", "required": false, "type": "integer" }, { "default": "-expiresAt", "description": "Property name that will be used to sort results. \"-\" indicates descending", "enum": [ "expiresAt", "-expiresAt" ], "in": "query", "name": "sort", "required": false, "type": "string" } ], "responses": { "200": { "description": "Request was successful", "schema": { "$ref": "#/definitions/SubscriptionList" } }, "400": { "description": "Request was malformed", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Authentication info not sent or invalid", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Authenticated user is not allowed access", "schema": { "$ref": "#/definitions/Error" } }, "422": { "description": "Invalid query parameter (custom message returned for each parameter)", "schema": { "$ref": "#/definitions/Error" } }, "429": { "description": "Too many requests received within interval", "schema": { "$ref": "#/definitions/ErrorLimit" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/Error" } } }, "operationId": "list", "summary": "Retrieve a list of Subscriptions for the specified Shopper" } }, "/v1/subscriptions/productGroups": { "get": { "tags": [ "v1" ], "consumes": [ "application/json", "application/xml", "text/xml" ], "produces": [ "application/json", "application/javascript", "application/xml", "text/javascript", "text/xml" ], "parameters": [ { "description": "A unique application key identifying the source of the request. This is required for request tracking", "in": "header", "name": "X-App-Key", "required": true, "type": "string" }, { "description": "Shopper ID to return data for when not using JWT", "in": "header", "name": "X-Shopper-Id", "required": false, "type": "string" } ], "responses": { "200": { "description": "Request was successful", "schema": { "items": { "$ref": "#/definitions/ProductGroup" }, "type": "array" } }, "400": { "description": "Request was malformed", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Authentication info not sent or invalid", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Authenticated user is not allowed access", "schema": { "$ref": "#/definitions/Error" } }, "429": { "description": "Too many requests received within interval", "schema": { "$ref": "#/definitions/ErrorLimit" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/Error" } } }, "operationId": "productGroups", "summary": "Retrieve a list of ProductGroups for the specified Shopper" } }, "/v1/subscriptions/{subscriptionId}": { "delete": { "tags": [ "v1" ], "consumes": [ "application/json", "application/xml", "text/xml" ], "produces": [ "application/json", "application/javascript", "application/xml", "text/javascript", "text/xml" ], "parameters": [ { "description": "A unique application key identifying the source of the request. This is required for request tracking", "in": "header", "name": "X-App-Key", "required": true, "type": "string" }, { "description": "Shopper ID to return data for when not using JWT", "in": "header", "name": "X-Shopper-Id", "required": false, "type": "string" }, { "description": "Unique identifier of the Subscription to cancel", "in": "path", "name": "subscriptionId", "required": true, "type": "string" } ], "responses": { "204": { "description": "Request was successful" }, "400": { "description": "Request was malformed", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Authentication info not sent or invalid", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Authenticated user is not allowed access", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Resource not found", "schema": { "$ref": "#/definitions/Error" } }, "422": { "description": "Failed to determine if the domain is protected (invalid domain ID)
Invalid Subscription Id
The Office 365 Subscription cannot be cancelled (shopper is migrating)
The Subscription cannot be cancelled
The Subscription cannot be cancelled (PFID is disabled for cancellation)
The Subscription cannot be cancelled (domain is protected)
The domain alert Subscription cannot be cancelled", "schema": { "$ref": "#/definitions/Error" } }, "429": { "description": "Too many requests received within interval", "schema": { "$ref": "#/definitions/ErrorLimit" } }, "500": { "description": "Failed to determine if the Office 365 account is migrating
Failed to determine if the domain alert is cancellable
Failed to determine if the domain is protected
Internal server error", "schema": { "$ref": "#/definitions/Error" } }, "504": { "description": "Gateway timeout", "schema": { "$ref": "#/definitions/Error" } } }, "operationId": "cancel", "summary": "Cancel the specified Subscription" }, "get": { "tags": [ "v1" ], "consumes": [ "application/json", "application/xml", "text/xml" ], "produces": [ "application/json", "application/javascript", "application/xml", "text/javascript", "text/xml" ], "parameters": [ { "description": "A unique application key identifying the source of the request. This is required for request tracking", "in": "header", "name": "X-App-Key", "required": true, "type": "string" }, { "description": "Shopper ID to be operated on, if different from JWT", "in": "header", "name": "X-Shopper-Id", "required": false, "type": "string" }, { "description": "Unique identifier of the Subscription to retrieve", "in": "path", "name": "subscriptionId", "required": true, "type": "string" } ], "responses": { "200": { "description": "Request was successful", "schema": { "$ref": "#/definitions/Subscription" } }, "400": { "description": "Request was malformed", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Authentication info not sent or invalid", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Authenticated user is not allowed access", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Resource not found", "schema": { "$ref": "#/definitions/Error" } }, "422": { "description": "Invalid Subscription Id", "schema": { "$ref": "#/definitions/Error" } }, "429": { "description": "Too many requests received within interval", "schema": { "$ref": "#/definitions/ErrorLimit" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/Error" } }, "504": { "description": "Gateway timeout", "schema": { "$ref": "#/definitions/Error" } } }, "operationId": "get", "summary": "Retrieve details for the specified Subscription" }, "patch": { "tags": [ "v1" ], "consumes": [ "application/json", "application/x-www-form-urlencoded", "application/xml", "text/xml" ], "produces": [ "application/json", "application/xml" ], "parameters": [ { "description": "A unique application key identifying the source of the request. This is required for request tracking", "in": "header", "name": "X-App-Key", "required": true, "type": "string" }, { "description": "Shopper ID to be operated on, if different from JWT", "in": "header", "name": "X-Shopper-Id", "required": false, "type": "string" }, { "description": "Unique identifier of the Subscription to update", "in": "path", "name": "subscriptionId", "required": true, "type": "string" }, { "description": "Details of the Subscription to change", "in": "body", "name": "subscription", "required": true, "schema": { "$ref": "#/definitions/SubscriptionUpdate" } } ], "responses": { "204": { "description": "Request was successful" }, "400": { "description": "Request was malformed", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Authentication info not sent or invalid", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Authenticated user is not allowed access
This method only supports JWT authentication", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Subscription not found
Payment profile not found", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/Error" } } }, "description": "Only Subscription properties that can be changed without immediate financial impact can be modified via PATCH, whereas some properties can be changed by purchasing a renewal
This endpoint only supports JWT authentication", "operationId": "update", "summary": "Update details for the specified Subscription" } } }, "definitions": { "Error": { "properties": { "code": { "description": "Short identifier for the error, suitable for indicating the specific error within client code", "format": "constant", "type": "string" }, "fields": { "description": "List of the specific fields, and the errors found with their contents", "items": { "$ref": "#/definitions/ErrorField" }, "type": "array" }, "message": { "description": "Human-readable, English description of the error", "type": "string" } }, "required": [ "code" ] }, "ErrorField": { "properties": { "code": { "description": "Short identifier for the error, suitable for indicating the specific error within client code", "format": "constant", "type": "string" }, "message": { "description": "Human-readable, English description of the problem with the contents of the field", "type": "string" }, "path": { "description": "", "format": "json-path", "type": "string" }, "pathRelated": { "description": "JSONPath referring to a field containing an error, which is referenced by `path`", "format": "json-path", "type": "string" } }, "required": [ "path", "code" ] }, "ErrorLimit": { "properties": { "code": { "description": "Short identifier for the error, suitable for indicating the specific error within client code", "format": "constant", "type": "string" }, "fields": { "description": "List of the specific fields, and the errors found with their contents", "items": { "$ref": "#/definitions/ErrorField" }, "type": "array" }, "message": { "description": "Human-readable, English description of the error", "type": "string" }, "retryAfterSec": { "description": "Number of seconds to wait before attempting a similar request", "format": "integer-positive", "type": "integer" } }, "required": [ "retryAfterSec", "code" ] }, "Pagination": { "properties": { "first": { "description": "URI to access the first page", "type": "string" }, "last": { "description": "URI to access the last page", "type": "string" }, "next": { "description": "URI to access the next page", "type": "string" }, "previous": { "description": "URI to access the previous page", "type": "string" }, "total": { "description": "Number of records available", "type": "integer" } } }, "ProductGroup": { "properties": { "productGroupKey": { "description": "Primary key of a grouping of related Subscriptions", "type": "string" }, "subscriptionCount": { "description": "The number of Subscriptions that the shopper owns in this group", "type": "integer" } }, "required": [ "productGroupKey", "subscriptionCount" ] }, "Subscription": { "properties": { "addons": { "description": "An array of additional products that have been purchased to augment this Subscription", "items": { "$ref": "#/definitions/SubscriptionAddon" }, "type": "array" }, "billing": { "$ref": "#/definitions/SubscriptionBilling" }, "cancelable": { "description": "Whether or not the Subscription is allowed to be canceled", "type": "boolean" }, "createdAt": { "description": "When the Subscription was created", "format": "iso-datetime", "type": "string" }, "expiresAt": { "description": "When the Subscription will expire", "format": "iso-datetime", "type": "string" }, "label": { "description": "A human readable description of this Subscription", "type": "string" }, "launchUrl": { "description": "The url to use or manage this Subscription's active product", "format": "url", "type": "string" }, "paymentProfileId": { "description": "Unique identifier of the payment profile that will be used to automatically renew this Subscription", "type": "integer" }, "priceLocked": { "description": "Whether the renewal price will be based from the list price or a locked-in price for this shopper", "type": "boolean" }, "product": { "$ref": "#/definitions/SubscriptionProduct" }, "relations": { "$ref": "#/definitions/SubscriptionRelations" }, "renewAuto": { "description": "Whether or not the Subscription is set to be automatically renewed via the billing agent", "type": "boolean" }, "renewable": { "description": "Whether or not the Subscription is allowed to be renewed", "type": "boolean" }, "status": { "description": "Whether the Subscription is active or the specific non-active state", "enum": [ "ACTIVE", "PENDING", "CANCELED" ], "type": "string" }, "subscriptionId": { "description": "Unique identifier of the Subscription", "type": "string" }, "upgradeable": { "description": "Whether or not the Subscription is allowed to be upgraded", "type": "boolean" } }, "required": [ "subscriptionId", "status", "product", "createdAt", "billing", "renewable", "upgradeable", "priceLocked", "renewAuto" ] }, "SubscriptionAddon": { "properties": { "commitment": { "description": "The financial commitment the customer has in the product", "enum": [ "PAID", "FREE", "TRIAL" ], "type": "string" }, "pfid": { "description": "Unique identifier of the add-in product", "type": "integer" }, "quantity": { "type": "integer" } }, "required": [ "pfid", "commitment", "quantity" ] }, "SubscriptionBilling": { "properties": { "commitment": { "description": "The financial commitment the customer has in the product", "enum": [ "PAID", "FREE", "TRIAL" ], "type": "string" }, "pastDueTypes": { "description": "The types of charges that are past due when `status` is PAST_DUE", "items": { "enum": [ "ADDON", "BURST", "SUBSCRIPTION" ], "type": "string" }, "type": "array" }, "renewAt": { "description": "The point in time after which the Subscription will bill for automatic renewal", "format": "iso-datetime", "type": "string" }, "status": { "description": "Whether payments are past due", "enum": [ "CURRENT", "PAST_DUE" ], "type": "string" } }, "required": [ "renewAt", "status", "commitment" ] }, "SubscriptionList": { "properties": { "pagination": { "$ref": "#/definitions/Pagination", "description": "Pagination information" }, "subscriptions": { "description": "A collection of subscriptions", "items": { "$ref": "#/definitions/Subscription" }, "type": "array" } }, "required": [ "subscriptions", "pagination" ] }, "SubscriptionProduct": { "properties": { "label": { "description": "A human readable description of the Product that is subscribed", "type": "string" }, "namespace": { "description": "Grouping of related Subscriptions", "type": "string" }, "pfid": { "description": "Unique identifier of the Product that is subscribed", "type": "integer" }, "productGroupKey": { "description": "Primary key of a grouping of related Subscriptions", "type": "string" }, "renewalPeriod": { "description": "The number of `renewalPeriodUnits` that will be added by the `renewalPfid`", "type": "integer" }, "renewalPeriodUnit": { "description": "The unit of time that `renewalPeriod` is measured in", "enum": [ "MONTH", "QUARTER", "SEMI_ANNUAL", "YEAR" ], "type": "string" }, "renewalPfid": { "description": "Unique identifier of the renewal Product", "type": "integer" }, "supportBillOn": { "description": "Whether the product supports the `billOn` option on the renewal endpoint", "type": "boolean" } }, "required": [ "pfid", "label", "renewalPfid", "renewalPeriod", "renewalPeriodUnit", "productGroupKey", "supportBillOn", "namespace" ] }, "SubscriptionRelations": { "properties": { "children": { "description": "A set of related Subscriptions that will be canceled automatically if this Subscription is canceled", "items": { "type": "string" }, "type": "array" }, "parent": { "description": "Unique identifier of this Subscription's parent", "type": "string" } } }, "SubscriptionUpdate": { "properties": { "paymentProfileId": { "description": "Unique identifier of the payment profile you want to be used for automatic renewal", "type": "integer" }, "renewAuto": { "description": "Whether or not you want the Subscription renew automatically", "type": "boolean" } } } } }