{
  "opencollection": "1.0.0",
  "info": {
    "name": "Vantage AccessGrants Invoices API",
    "version": "2.0.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "client_credentials",
      "accessTokenUrl": "https://console.vantage.sh/account/profile",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Invoices",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get all invoices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.vantage.sh/v2/invoices",
            "params": [
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "The page of results to return."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "The amount of results to return. The maximum is 1000."
              },
              {
                "name": "managed_account_token",
                "value": "",
                "type": "query",
                "description": "Filter invoices by managed account token (MSP accounts only)"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://console.vantage.sh/account/profile",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns a list of invoices (MSP invoicing required)."
        },
        {
          "info": {
            "name": "Create invoice",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.vantage.sh/v2/invoices",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://console.vantage.sh/account/profile",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create an invoice (MSP accounts only)."
        },
        {
          "info": {
            "name": "Get invoice by token",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.vantage.sh/v2/invoices/:invoice_token",
            "params": [
              {
                "name": "invoice_token",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://console.vantage.sh/account/profile",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Return an invoice."
        },
        {
          "info": {
            "name": "Get invoice file",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.vantage.sh/v2/invoices/:invoice_token/download",
            "params": [
              {
                "name": "invoice_token",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://console.vantage.sh/account/profile",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download invoice file (PDF or CSV)."
        },
        {
          "info": {
            "name": "Send invoice",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.vantage.sh/v2/invoices/:invoice_token/send",
            "params": [
              {
                "name": "invoice_token",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://console.vantage.sh/account/profile",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Send invoice via email."
        },
        {
          "info": {
            "name": "Send and approve invoice",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.vantage.sh/v2/invoices/:invoice_token/send_and_approve",
            "params": [
              {
                "name": "invoice_token",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://console.vantage.sh/account/profile",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Send and approve invoice via email (MSP accounts only)."
        },
        {
          "info": {
            "name": "Get cost report URL",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.vantage.sh/v2/invoices/:invoice_token/cost_report",
            "params": [
              {
                "name": "invoice_token",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://console.vantage.sh/account/profile",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get cost report URL for invoice period."
        },
        {
          "info": {
            "name": "Regenerate invoice",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.vantage.sh/v2/invoices/:invoice_token/regenerate",
            "params": [
              {
                "name": "invoice_token",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://console.vantage.sh/account/profile",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Regenerate an existing invoice (MSP accounts only)."
        }
      ]
    }
  ],
  "bundled": true
}