From 7e631da3d3b1c572c0d7b76c89855d7a8e72fa92 Mon Sep 17 00:00:00 2001 From: Braden Watkins Date: Tue, 22 Sep 2020 23:24:35 -0700 Subject: [PATCH] Add documentation for downloading invoices through Microsoft.Billing API (#10585) - 2019-10-01-preview - POST Multiple Modern Invoice Download - 2019-10-01-preview - POST Multiple EA Invoice Download - 2019-10-01-preview - POST Multiple Legacy Invoice Download - 2019-10-01-preview - Changed ErrorResponse and ErrorDetails - 2020-05-01 - POST Multiple Invoice Download (Modern & EA) - 2020-05-01 - POST Multiple Legacy Invoice Download - 2020-05-01 - Changed ErrorResponse and ErrorDetails Co-authored-by: Braden Watkins --- .../preview/2018-03-01-preview/billingV2.json | 28 +++ .../preview/2019-10-01-preview/billing.json | 235 ++++++++++++++++++ ...pleBillingSubscriptionInvoiceDownload.json | 24 ++ .../examples/MultipleInvoiceDownload.json | 24 ++ .../MultipleModernInvoiceDownload.json | 25 ++ .../stable/2020-05-01/billing.json | 166 ++++++++++++- .../BillingSubscriptionInvoiceDownload.json | 2 +- ...wnload.json => ModernInvoiceDownload.json} | 2 +- ...pleBillingSubscriptionInvoiceDownload.json | 24 ++ .../MultipleModernInvoiceDownload.json | 24 ++ 10 files changed, 551 insertions(+), 3 deletions(-) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleBillingSubscriptionInvoiceDownload.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleInvoiceDownload.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleModernInvoiceDownload.json rename specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/{InvoiceDownload.json => ModernInvoiceDownload.json} (83%) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleBillingSubscriptionInvoiceDownload.json create mode 100644 specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleModernInvoiceDownload.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingV2.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingV2.json index e9b752a24fda..a4b03809ce4f 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingV2.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billingV2.json @@ -322,6 +322,11 @@ "description": "The target of the particular error.", "type": "string", "readOnly": true + }, + "details": { + "description": "The sub details of the error.", + "readOnly": true, + "$ref": "#/definitions/ErrorSubDetails" } } }, @@ -335,6 +340,29 @@ } } }, + "ErrorSubDetails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + } + }, "Resource": { "description": "The Resource model definition.", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 680b35022642..2f6b7a0b47ad 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -1685,6 +1685,74 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments": { + "post": { + "tags": [ + "Invoices" + ], + "x-ms-examples": { + "InvoiceDownload": { + "$ref": "./examples/MultipleInvoiceDownload.json" + } + }, + "operationId": "Invoices_DownloadMultipleEAInvoice", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Gets a URL to download an multiple invoices documents (invoice pdf, tax receipts, credit notes) as a zip file.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "downloadUrls", + "in": "body", + "required": true, + "description": "An array of download urls for individual documents. The download url paths in the request body should match the path of the original request.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "202": { + "description": "Accepted.", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "string" + } + } + }, + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DownloadUrl" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}": { "get": { "tags": [ @@ -1724,6 +1792,74 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments": { + "post": { + "tags": [ + "Invoices" + ], + "x-ms-examples": { + "BillingSubscriptionInvoiceDownload": { + "$ref": "./examples/MultipleBillingSubscriptionInvoiceDownload.json" + } + }, + "operationId": "Invoices_DownloadMultipleBillingSubscriptionInvoice", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Gets a URL to download multiple invoices documents (invoice pdf, tax receipts, credit notes) as a zip file.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "downloadUrls", + "in": "body", + "required": true, + "description": "An array of download urls for individual documents. The download url paths in the request body should match the path of the original request.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "202": { + "description": "Accepted.", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "string" + } + } + }, + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DownloadUrl" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/pricesheet/default/download": { "post": { "tags": [ @@ -1900,6 +2036,77 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/downloadDocuments": { + "post": { + "tags": [ + "Invoices" + ], + "x-ms-examples": { + "ModernInvoiceDownload": { + "$ref": "./examples/MultipleModernInvoiceDownload.json" + } + }, + "operationId": "Invoices_DownloadMultipleModernInvoice", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Gets a URL to download multiple invoices documents (invoice pdf, tax receipts, credit notes) as a zip file.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "name": "downloadUrls", + "in": "body", + "required": true, + "description": "An array of download urls for individual documents. The download url paths in the request body should match the path of the original request.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "202": { + "description": "Accepted.", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "string" + } + } + }, + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DownloadUrl" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}": { "get": { "tags": [ @@ -7004,6 +7211,11 @@ "description": "The target of the particular error.", "type": "string", "readOnly": true + }, + "details": { + "description": "The sub details of the error.", + "readOnly": true, + "$ref": "#/definitions/ErrorSubDetails" } } }, @@ -7017,6 +7229,29 @@ } } }, + "ErrorSubDetails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + } + }, "Reseller": { "description": "Details of the reseller.", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleBillingSubscriptionInvoiceDownload.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleBillingSubscriptionInvoiceDownload.json new file mode 100644 index 000000000000..a810e1a7775d --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleBillingSubscriptionInvoiceDownload.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "subscriptionId": "{subscriptionId}", + "downloadUrls": [ + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview" + ] + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/operationResults/invoiceDownload_{operationId}?api-version=2019-10-01-preview", + "Retry-After": "10" + } + }, + "200": { + "body": { + "url": "https://myaccount.blob.core.windows.net/invoices/1383724.pdf?sv=2019-02-02&sr=b&sig=sp=r" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleInvoiceDownload.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleInvoiceDownload.json new file mode 100644 index 000000000000..bd9e7f59f578 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleInvoiceDownload.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "downloadUrls": [ + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview" + ] + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/invoiceDownload_{operationId}?api-version=2019-10-01-preview", + "Retry-After": "10" + } + }, + "200": { + "body": { + "url": "https://myaccount.blob.core.windows.net/invoices/1383724.pdf?sv=2019-02-02&sr=b&sp=r" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleModernInvoiceDownload.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleModernInvoiceDownload.json new file mode 100644 index 000000000000..cafb3e2cbaa7 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/MultipleModernInvoiceDownload.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2019-10-01-preview", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}", + "downloadUrls": [ + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}billingProfiles/{billingProfileName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}billingProfiles/{billingProfileName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}billingProfiles/{billingProfileName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2019-10-01-preview" + ] + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}billingProfiles/{billingProfileName}/invoices/{invoiceName}/operationResults/invoiceDownload_{operationId}?api-version=2019-10-01-preview", + "Retry-After": "10" + } + }, + "200": { + "body": { + "url": "https://myaccount.blob.core.windows.net/invoices/1383724.pdf?sv=2019-02-02&sr=b&sp=r" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index fecbec2a08c9..65048a244a9f 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -1274,7 +1274,7 @@ ], "x-ms-examples": { "InvoiceDownload": { - "$ref": "./examples/InvoiceDownload.json" + "$ref": "./examples/ModernInvoiceDownload.json" } }, "operationId": "Invoices_DownloadInvoice", @@ -1333,6 +1333,74 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments": { + "post": { + "tags": [ + "Invoices" + ], + "x-ms-examples": { + "InvoiceDownload": { + "$ref": "./examples/MultipleModernInvoiceDownload.json" + } + }, + "operationId": "Invoices_DownloadMultipleModernInvoice", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Gets a URL to download an multiple invoices documents (invoice pdf, tax receipts, credit notes) as a zip file. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "downloadUrls", + "in": "body", + "required": true, + "description": "An array of download urls for individual documents", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "202": { + "description": "Accepted.", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "string" + } + } + }, + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DownloadUrl" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions": { "get": { "tags": [ @@ -1539,6 +1607,74 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments": { + "post": { + "tags": [ + "Invoices" + ], + "x-ms-examples": { + "BillingSubscriptionInvoiceDownload": { + "$ref": "./examples/MultipleBillingSubscriptionInvoiceDownload.json" + } + }, + "operationId": "Invoices_DownloadMultipleBillingSubscriptionInvoice", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Gets a URL to download multiple invoices documents (invoice pdf, tax receipts, credit notes) as a zip file.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/billing/" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "downloadUrls", + "in": "body", + "required": true, + "description": "An array of download urls for individual documents", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "202": { + "description": "Accepted.", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "string" + } + } + }, + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DownloadUrl" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions": { "get": { "tags": [ @@ -4615,6 +4751,11 @@ "description": "The target of the particular error.", "type": "string", "readOnly": true + }, + "details": { + "description": "The sub details of the error.", + "readOnly": true, + "$ref": "#/definitions/ErrorSubDetails" } } }, @@ -4628,6 +4769,29 @@ } } }, + "ErrorSubDetails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + } + }, "Reseller": { "description": "Details of the reseller.", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionInvoiceDownload.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionInvoiceDownload.json index 226bfa9ef63e..1d2f434b068d 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionInvoiceDownload.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionInvoiceDownload.json @@ -8,7 +8,7 @@ "responses": { "202": { "headers": { - "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/11000000-0000-0000-0000-000000000000/operationResults/invoiceDownload_11000000-0000-0000-0000-000000000000?api-version=2020-05-01", + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/operationResults/invoiceDownload_{operationId}?api-version=2020-05-01", "Retry-After": "10" } }, diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceDownload.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ModernInvoiceDownload.json similarity index 83% rename from specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceDownload.json rename to specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ModernInvoiceDownload.json index 9bf994a947cb..38774eb60736 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceDownload.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ModernInvoiceDownload.json @@ -8,7 +8,7 @@ "responses": { "202": { "headers": { - "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/operationResults/invoiceDownload_11000000-0000-0000-0000-000000000000?api-version=2020-05-01", + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/operationResults/invoiceDownload_{operationId}?api-version=2020-05-01", "Retry-After": "10" } }, diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleBillingSubscriptionInvoiceDownload.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleBillingSubscriptionInvoiceDownload.json new file mode 100644 index 000000000000..00c11b106f6a --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleBillingSubscriptionInvoiceDownload.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "subscriptionId": "{subscriptionId}", + "downloadUrls": [ + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01" + ] + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/operationResults/invoiceDownload_{operationId}?api-version=2020-05-01", + "Retry-After": "10" + } + }, + "200": { + "body": { + "url": "https://myaccount.blob.core.windows.net/invoices/1383724.pdf?sv=2019-02-02&sr=b&sp=r" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleModernInvoiceDownload.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleModernInvoiceDownload.json new file mode 100644 index 000000000000..209820727664 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleModernInvoiceDownload.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "downloadUrls": [ + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01", + "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01" + ] + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/invoiceDownload_{operationId}?api-version=2020-05-01", + "Retry-After": "10" + } + }, + "200": { + "body": { + "url": "https://myaccount.blob.core.windows.net/invoices/1383724.pdf?sv=2019-02-02&sr=b&sp=r" + } + } + } +}