Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 2.14 KB

File metadata and controls

73 lines (48 loc) · 2.14 KB

BillingService

A list of all methods in the BillingService service. Click on the method name to view detailed information about that method.

Methods Description
getAccounts Gets Postman billing account details for the given team.
getAccountInvoices Gets all invoices for a Postman billing account filtered by the status of the invoice.

getAccounts

Gets Postman billing account details for the given team.

  • HTTP Method: GET
  • Endpoint: /accounts

Return Type

AccountInformation

Example Usage Code Snippet

import { PostmanApi } from '@postman/api-sdk';

(async () => {
  const postmanApi = new PostmanApi({
    apiKey: 'YOUR_API_KEY',
  });

  const data = await postmanApi.billing.getAccounts();

  console.log(data);
})();

getAccountInvoices

Gets all invoices for a Postman billing account filtered by the status of the invoice.

  • HTTP Method: GET
  • Endpoint: /accounts/{accountId}/invoices

Parameters

Name Type Required Description
accountId string The account's ID.
status BillingAccountStatus The account's status.

Return Type

GetAccountInvoices

Example Usage Code Snippet

import { BillingAccountStatus, PostmanApi } from '@postman/api-sdk';

(async () => {
  const postmanApi = new PostmanApi({
    apiKey: 'YOUR_API_KEY',
  });

  const billingAccountStatus = BillingAccountStatus.PAID;

  const data = await postmanApi.billing.getAccountInvoices('123456', {
    status: billingAccountStatus,
  });

  console.log(data);
})();