Skip to content

Commit

Permalink
Add documentation for downloading invoices through Microsoft.Billing …
Browse files Browse the repository at this point in the history
…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 <brwatkin@microsoft.com>
  • Loading branch information
bradenwatkins and Braden Watkins authored Sep 23, 2020
1 parent 88e86e7 commit 7e631da
Show file tree
Hide file tree
Showing 10 changed files with 551 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand All @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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"
}
}
},
Expand All @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
Loading

0 comments on commit 7e631da

Please sign in to comment.