{
  "opencollection": "1.0.0",
  "info": {
    "name": "Upsun.com Rest Add-ons Invoices API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://auth.api.platform.sh/oauth2/authorize",
      "accessTokenUrl": "https://auth.api.platform.sh/oauth2/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Invoices",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List invoices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/invoices",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization.<br>\nPrefix with name= to retrieve the organization by name instead.\n"
              },
              {
                "name": "filter[status]",
                "value": "",
                "type": "query",
                "description": "The status of the invoice."
              },
              {
                "name": "filter[type]",
                "value": "",
                "type": "query",
                "description": "The invoice type. Use invoice for standard invoices, credit_memo for refund/credit invoices."
              },
              {
                "name": "filter[order_id]",
                "value": "",
                "type": "query",
                "description": "The order id of Invoice."
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Page to be displayed. Defaults to 1."
              }
            ]
          },
          "docs": "Retrieves a list of invoices for the specified organization."
        },
        {
          "info": {
            "name": "Get invoice",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/invoices/:invoice_id",
            "params": [
              {
                "name": "invoice_id",
                "value": "",
                "type": "path",
                "description": "The ID of the invoice."
              },
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization.<br>\nPrefix with name= to retrieve the organization by name instead.\n"
              }
            ]
          },
          "docs": "Retrieves an invoice for the specified organization."
        }
      ]
    }
  ],
  "bundled": true
}