swagger: '2.0' info: version: 2017-02-27-preview title: Microsoft Azure BillingClient description: >- Billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API. host: management.azure.com schemes: - https consumes: - application/json produces: - application/json security: - azure_auth: - user_impersonation securityDefinitions: azure_auth: type: oauth2 authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize flow: implicit description: Azure Active Directory OAuth2 Flow. scopes: user_impersonation: impersonate your user account paths: /subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices: get: tags: - Invoices operationId: microsoftAzureInvoicesList description: >- Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later externalDocs: url: https://go.microsoft.com/fwlink/?linkid=842057 x-ms-examples: InvoicesList: $ref: ./examples/InvoicesList.json InvoicesExpand: $ref: ./examples/InvoicesExpand.json parameters: - $ref: '#/parameters/subscriptionIdParameter' - name: $expand description: >- May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. in: query required: false type: string - name: $filter description: >- May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not' in: query required: false type: string - name: $skiptoken description: >- Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. in: query required: false type: string - name: $top description: >- May be used to limit the number of results to the most recent N invoices. in: query required: false type: integer format: int32 minimum: 1 maximum: 100 - $ref: '#/parameters/apiVersionParameter' responses: '200': description: OK. The request has succeeded. schema: $ref: '#/definitions/InvoicesListResult' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' x-ms-pageable: nextLinkName: nextLink summary: Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Billing Invoices /subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}: get: tags: - Invoices operationId: microsoftAzureInvoicesGet description: >- Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. x-ms-examples: InvoicesGet: $ref: ./examples/InvoicesGet.json parameters: - $ref: '#/parameters/subscriptionIdParameter' - name: invoiceName description: The name of an invoice resource. in: path required: true type: string - $ref: '#/parameters/apiVersionParameter' responses: '200': description: OK. The request has succeeded. schema: $ref: '#/definitions/Invoice' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' summary: >- Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Billing Invoices Invoicename /subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest: get: tags: - Invoices operationId: microsoftAzureInvoicesGetlatest description: >- Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically. x-ms-examples: InvoicesGetLatest: $ref: ./examples/InvoicesGetLatest.json parameters: - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/apiVersionParameter' responses: '200': description: OK. The request has succeeded. schema: $ref: '#/definitions/Invoice' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' summary: >- Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Billing Invoices Latest /providers/Microsoft.Billing/operations: get: tags: - Operations operationId: microsoftAzureOperationsList description: Lists all of the available billing REST API operations. parameters: - $ref: '#/parameters/apiVersionParameter' responses: '200': description: OK. The request has succeeded. schema: $ref: '#/definitions/OperationListResult' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' x-ms-pageable: nextLinkName: nextLink summary: Microsoft Azure Get Providers Microsoft Billing Operations definitions: DownloadUrl: description: >- A secure URL that can be used to download a PDF invoice until the URL expires. properties: expiryTime: description: The time in UTC at which this download URL will expire. type: string format: date-time readOnly: true url: description: The URL to the PDF file. type: string readOnly: true ErrorDetails: description: The details of the error. 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 ErrorResponse: description: >- Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. type: object properties: error: $ref: '#/definitions/ErrorDetails' Invoice: description: An invoice resource can be used download a PDF version of an invoice. type: object properties: properties: x-ms-client-flatten: true $ref: '#/definitions/InvoiceProperties' allOf: - $ref: '#/definitions/Resource' InvoicesListResult: description: >- Result of the request to list invoices. It contains a list of available invoices in reverse chronological order. properties: value: description: The list of invoices. type: array readOnly: true items: $ref: '#/definitions/Invoice' nextLink: description: the link (url) to the next page of results. type: string readOnly: true InvoiceProperties: description: The properties of the invoice. properties: invoicePeriodStartDate: description: The start of the date range covered by the invoice. type: string format: date readOnly: true invoicePeriodEndDate: description: The end of the date range covered by the invoice. type: string format: date readOnly: true downloadUrl: description: >- A secure link to download the PDF version of an invoice. The link will cease to work after its expiry time is reached. $ref: '#/definitions/DownloadUrl' Operation: description: A Billing REST API operation type: object properties: name: description: 'Operation name: {provider}/{resource}/{operation}' type: string readOnly: true display: description: The object that represents the operation. properties: provider: description: 'Service provider: Microsoft.Billing' type: string readOnly: true resource: description: 'Resource on which the operation is performed: Invoice, etc.' type: string readOnly: true operation: description: 'Operation type: Read, write, delete, etc.' type: string readOnly: true OperationListResult: description: >- Result of the request to list billing operations. It contains a list of operations and a URL link to get the next set of results. properties: value: description: >- List of billing operations supported by the Microsoft.Billing resource provider. type: array readOnly: true items: $ref: '#/definitions/Operation' nextLink: description: URL to get the next set of operation list results if there are any. type: string readOnly: true Resource: description: The Resource model definition. properties: id: readOnly: true type: string description: Resource Id name: readOnly: true type: string description: Resource name type: readOnly: true type: string description: Resource type x-ms-azure-resource: true parameters: apiVersionParameter: name: api-version in: query required: true type: string description: >- Version of the API to be used with the client request. The current version is 2017-02-27-preview. subscriptionIdParameter: name: subscriptionId in: path description: Azure Subscription ID. required: true type: string tags: - name: Invoices - name: Operations