{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "title": "Marketplace RP Service",
    "version": "2020-01-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/Marketplace.json",
        "version": "2.0"
      }
    ],
    "x-preferred": true,
    "x-providerName": "azure.com",
    "x-serviceName": "marketplace-Marketplace",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "parameters": {
    "ApiVersionParameter": {
      "description": "The API version to use for the request.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "OfferIdPathParameter": {
      "description": "The offer ID to update or delete",
      "in": "path",
      "name": "OfferId",
      "required": true,
      "type": "string"
    },
    "PrivateStoreIdParameter": {
      "description": "The store ID - must use the tenant ID",
      "in": "path",
      "name": "PrivateStoreId",
      "required": true,
      "type": "string"
    },
    "offerObjectParameter": {
      "in": "body",
      "name": "offerObject",
      "schema": {
        "$ref": "#/definitions/offerSkuObject"
      }
    }
  },
  "paths": {
    "/providers/Microsoft.Marketplace/operations": {
      "get": {
        "description": "Lists all of the available Microsoft.Marketplace REST API operations.",
        "operationId": "Operations_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/OperationListResult"
            }
          },
          "default": {
            "description": "Microsoft.Marketplace error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Operations"
        ]
      }
    },
    "/providers/Microsoft.Marketplace/privateStores": {
      "get": {
        "description": "Gets the list of available private stores",
        "operationId": "PrivateStore_List",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/PrivateStoreList"
            }
          }
        },
        "tags": [
          "PrivateStores"
        ],
        "x-ms-examples": {
          "GetPrivateStores": {
            "parameters": {
              "api-version": "2020-01-01"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "",
                  "value": [
                    {
                      "availability": "enabled",
                      "name": "MyFirstPrivateStore"
                    },
                    {
                      "availability": "disabled",
                      "name": "MySecondPrivateStore"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/ApiVersionParameter"
        }
      ]
    },
    "/providers/Microsoft.Marketplace/privateStores/{PrivateStoreId}": {
      "delete": {
        "description": "Deletes the private store. All that is not saved will be lost.",
        "operationId": "PrivateStore_Delete",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Private store was deleted successfully ."
          },
          "default": {
            "description": "Microsoft.Marketplace error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PrivateStores"
        ],
        "x-ms-examples": {
          "DeletePrivateStores": {
            "parameters": {
              "PrivateStoreId": "MyFirstPrivateStore",
              "api-version": "2020-01-01"
            },
            "responses": {
              "200": {}
            }
          }
        }
      },
      "get": {
        "description": "Get information about the private store",
        "operationId": "PrivateStore_Get",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/PrivateStoreProperties"
            }
          },
          "default": {
            "description": "Microsoft.Marketplace error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PrivateStores"
        ],
        "x-ms-examples": {
          "GetPrivateStoreByName": {
            "parameters": {
              "PrivateStoreId": "MyFirstPrivateStore",
              "api-version": "2020-01-01"
            },
            "responses": {
              "200": {
                "body": {
                  "availability": "enabled",
                  "name": "MyFirstPrivateStore"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/PrivateStoreIdParameter"
        },
        {
          "$ref": "#/parameters/ApiVersionParameter"
        }
      ],
      "put": {
        "consumes": [
          "application/json"
        ],
        "description": "Changes private store properties",
        "operationId": "PrivateStore_CreateOrUpdate",
        "parameters": [
          {
            "in": "body",
            "name": "payload",
            "schema": {
              "$ref": "#/definitions/PrivateStoreProperties"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Change successful",
            "schema": {
              "$ref": "#/definitions/PrivateStoreProperties"
            }
          },
          "default": {
            "description": "Microsoft.Marketplace error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PrivateStores"
        ],
        "x-ms-examples": {
          "UpdatePrivateStores": {
            "parameters": {
              "PrivateStoreId": "MyFirstPrivateStore",
              "api-version": "2020-01-01",
              "parameters": {
                "properties": {
                  "availability": "disabled",
                  "name": "MyNewFirstPrivateStore"
                }
              }
            },
            "responses": {
              "200": {
                "body": {
                  "availability": "disabled",
                  "name": "MyNewFirstPrivateStore"
                }
              }
            }
          }
        }
      }
    },
    "/providers/Microsoft.Marketplace/privateStores/{PrivateStoreId}/offers": {
      "get": {
        "description": "Get a list of all private offers in the given private store",
        "operationId": "PrivateStoreOffers_List",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OfferListResponse"
            }
          },
          "default": {
            "description": "Microsoft.Marketplace error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PrivateStores"
        ],
        "x-ms-examples": {
          "GetPrivateStoreOffers": {
            "parameters": {
              "PrivateStoreId": "myPrivateStore",
              "api-version": "2020-01-01"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "",
                  "value": [
                    {
                      "description": "description-longSummry-md-test-third-party-2",
                      "displayName": "md-test-third-party-2",
                      "eTag": "\"9301f4fd-0000-0100-0000-5e248b350000\"",
                      "id": "marketplacetestthirdparty.md-test-third-party-2",
                      "longSummary": "longSummry-md-test-third-party-2",
                      "plans": [
                        {
                          "displayName": "Text IQ Deep Concept Analysis",
                          "planId": "0001"
                        },
                        {
                          "displayName": "new-md-sku-4",
                          "planId": "0002"
                        }
                      ],
                      "publisherDisplayName": "Marketplace Test Third Party",
                      "summary": "summary-md-test-third-party-2"
                    },
                    {
                      "description": "description-longSummry-md-test-third-party-3",
                      "displayName": "md-test-third-party-3",
                      "eTag": "\"9301f4fd-0000-0100-0304-5e248b350043\"",
                      "id": "marketplacetestthirdparty.md-test-third-party-3",
                      "longSummary": "longSummry-md-test-third-party-3",
                      "plans": [
                        {
                          "displayName": "test-planId",
                          "planId": "0001"
                        },
                        {
                          "displayName": "new-md-sku-6",
                          "planId": "0002"
                        }
                      ],
                      "publisherDisplayName": "Marketplace Test Third Party",
                      "summary": "summary-md-test-third-party-3"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/PrivateStoreIdParameter"
        },
        {
          "$ref": "#/parameters/ApiVersionParameter"
        }
      ]
    },
    "/providers/Microsoft.Marketplace/privateStores/{PrivateStoreId}/offers/{OfferId}": {
      "delete": {
        "description": "Deletes an offer from the given private store.",
        "operationId": "PrivateStoreOffer_Delete",
        "responses": {
          "200": {
            "description": "Offer was deleted successfully"
          },
          "default": {
            "description": "Microsoft.Marketplace error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PrivateStores"
        ],
        "x-ms-examples": {
          "DeletePrivateStoreOffer": {
            "parameters": {
              "OfferId": "marketplacetestthirdparty.md-test-third-party-2",
              "PrivateStoreId": "myPrivateStore",
              "api-version": "2020-01-01"
            },
            "responses": {
              "200": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets information about a specific offer.",
        "operationId": "PrivateStoreOffer_Get",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Offer information retrieved",
            "schema": {
              "$ref": "#/definitions/Offer"
            }
          },
          "default": {
            "description": "Microsoft.Marketplace error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PrivateStores"
        ],
        "x-ms-examples": {
          "GetPrivateStoreOffer": {
            "parameters": {
              "OfferId": "marketplacetestthirdparty.md-test-third-party-2",
              "PrivateStoreId": "myPrivateStore",
              "api-version": "2020-01-01"
            },
            "responses": {
              "200": {
                "body": {
                  "description": "description-longSummry-md-test-third-party-2",
                  "displayName": "md-test-third-party-2",
                  "eTag": "\"9301f4fd-0000-0100-0000-5e248b350000\"",
                  "id": "marketplacetestthirdparty.md-test-third-party-2",
                  "longSummary": "longSummry-md-test-third-party-2",
                  "plans": [
                    {
                      "displayName": "Text IQ Deep Concept Analysis",
                      "planId": "0001"
                    },
                    {
                      "displayName": "new-md-sku-4",
                      "planId": "0002"
                    }
                  ],
                  "publisherDisplayName": "Marketplace Test Third Party",
                  "summary": "summary-md-test-third-party-2"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/OfferIdPathParameter"
        },
        {
          "$ref": "#/parameters/PrivateStoreIdParameter"
        },
        {
          "$ref": "#/parameters/ApiVersionParameter"
        }
      ],
      "put": {
        "consumes": [
          "application/json"
        ],
        "description": "Update or add an offer to the default collection of the private store.",
        "operationId": "PrivateStoreOffer_CreateOrUpdate",
        "parameters": [
          {
            "in": "body",
            "name": "payload",
            "schema": {
              "$ref": "#/definitions/Offer"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Offer"
            }
          },
          "default": {
            "description": "Microsoft.Marketplace error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "PrivateStores"
        ],
        "x-ms-examples": {
          "UpdatePrivateStoreOffer": {
            "parameters": {
              "OfferId": "marketplacetestthirdparty.md-test-third-party-2",
              "PrivateStoreId": "myPrivateStore",
              "api-version": "2020-01-01",
              "parameters": {
                "properties": {
                  "eTag": "\"9301f4fd-0000-0100-0000-5e248b350666\""
                }
              }
            },
            "responses": {
              "200": {
                "body": {
                  "description": "description-longSummry-md-test-third-party-2",
                  "displayName": "md-test-third-party-2",
                  "eTag": "\"9301f4fd-0000-0100-0000-5e248b350666\"",
                  "id": "marketplacetestthirdparty.md-test-third-party-2",
                  "longSummary": "longSummry-md-test-third-party-2",
                  "plans": [
                    {
                      "displayName": "Text IQ Deep Concept Analysis",
                      "planId": "0001"
                    },
                    {
                      "displayName": "new-md-sku-4",
                      "planId": "0002"
                    }
                  ],
                  "publisherDisplayName": "Marketplace Test Third Party",
                  "summary": "summary-md-test-third-party-2"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "ErrorResponse": {
      "description": "Error response indicates Microsoft.Marketplace service is not able to process the incoming request. The reason is provided in the error message.",
      "properties": {
        "error": {
          "description": "The details of the error.",
          "properties": {
            "code": {
              "description": "Error code.",
              "readOnly": true,
              "type": "string"
            },
            "message": {
              "description": "Error message indicating why the operation failed.",
              "readOnly": true,
              "type": "string"
            }
          }
        }
      },
      "type": "object"
    },
    "Offer": {
      "properties": {
        "description": {
          "description": "Description of offer",
          "readOnly": true,
          "type": "string"
        },
        "displayName": {
          "description": "It will be displayed prominently in the marketplace",
          "readOnly": true,
          "type": "string"
        },
        "eTag": {
          "description": "Identifier for purposes of race condition",
          "type": "string"
        },
        "id": {
          "description": "Offers unique id",
          "readOnly": true,
          "type": "string"
        },
        "longSummary": {
          "description": "Purpose or function of offer",
          "readOnly": true,
          "type": "string"
        },
        "plans": {
          "items": {
            "$ref": "#/definitions/Plan"
          },
          "readOnly": true,
          "type": "array"
        },
        "publisherDisplayName": {
          "description": "Publisher name that will be displayed prominently in the marketplace",
          "readOnly": true,
          "type": "string"
        },
        "summary": {
          "description": "Brief purpose or function of offer",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "OfferListResponse": {
      "properties": {
        "nextLink": {
          "description": "URL to get the next set of offer list results if there are any.",
          "type": "string"
        },
        "value": {
          "items": {
            "$ref": "#/definitions/Offer"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Operation": {
      "description": "Microsoft.Marketplace REST API operation",
      "properties": {
        "display": {
          "description": "The object that represents the operation.",
          "properties": {
            "operation": {
              "description": "Operation type: Get Amendments etc.",
              "type": "string"
            },
            "provider": {
              "description": "Service provider: Microsoft.Marketplace",
              "type": "string"
            },
            "resource": {
              "description": "Resource on which the operation is performed: Amendments",
              "type": "string"
            }
          }
        },
        "name": {
          "description": "Operation name: {provider}/{resource}/{operation}",
          "type": "string"
        }
      },
      "type": "object"
    },
    "OperationListResult": {
      "description": "Result of the request to list Marketplace operations. It contains a list of operations and a URL link to get the next set of results.",
      "properties": {
        "nextLink": {
          "description": "URL to get the next set of operation list results if there are any.",
          "readOnly": true,
          "type": "string"
        },
        "value": {
          "description": "List of Microsoft.Marketplace operations supported by the Microsoft.Marketplace resource provider.",
          "items": {
            "$ref": "#/definitions/Operation"
          },
          "type": "array"
        }
      }
    },
    "Plan": {
      "properties": {
        "displayName": {
          "description": "Friendly name for the plan for display in the marketplace",
          "readOnly": true,
          "type": "string"
        },
        "planId": {
          "description": "Identifier for this plan",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "PrivateStoreList": {
      "description": "Describes the json payload for the list of available private stores (between zero and one, inclusive)",
      "properties": {
        "nextLink": {
          "description": "URL to get the next set of PrivateStore list results if there are any.",
          "type": "string"
        },
        "value": {
          "items": {
            "$ref": "#/definitions/PrivateStoreProperties"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "PrivateStoreProperties": {
      "description": "Describes the json payload on whether or not the private store is enabled for a given tenant",
      "properties": {
        "availability": {
          "description": "Indicates private store availability",
          "enum": [
            "enabled",
            "disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "Availability"
          }
        },
        "name": {
          "description": "Private Store name",
          "type": "string"
        }
      },
      "type": "object"
    },
    "offerObject": {
      "properties": {
        "isAvailable": {
          "type": "boolean"
        }
      },
      "required": [
        "isAvailable"
      ],
      "type": "object"
    },
    "offerSkuObject": {
      "properties": {
        "isAvailable": {
          "type": "boolean"
        }
      },
      "required": [
        "isAvailable"
      ],
      "type": "object"
    }
  }
}