{
  "opencollection": "1.0.0",
  "info": {
    "name": "Bud API Services: Documentation Aggregation Buckets API",
    "version": "2.10.10"
  },
  "items": [
    {
      "info": {
        "name": "Aggregation Buckets",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Retrieve All Buckets",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api-sandbox.thisisbud.com/aggregations/v2/buckets",
            "headers": [
              {
                "name": "X-Client-Id",
                "value": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieve the top-level definitions of buckets you have created.\n\nUse this to retrieve the IDs of buckets to then retrieve their individual\ndefinitions and totals for customer transactions.\n"
        },
        {
          "info": {
            "name": "Create Buckets",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api-sandbox.thisisbud.com/aggregations/v2/buckets",
            "headers": [
              {
                "name": "X-Client-Id",
                "value": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a new bucket, which can be used to group transactions for totals.\n"
        },
        {
          "info": {
            "name": "Retrieve Bucket",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api-sandbox.thisisbud.com/aggregations/v2/buckets/:bucket_id",
            "headers": [
              {
                "name": "X-Client-Id",
                "value": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
              }
            ],
            "params": [
              {
                "name": "bucket_id",
                "value": "",
                "type": "path",
                "description": "ID of the bucket (whose criteria can be used to calculate totals).\n"
              },
              {
                "name": "category_lookup",
                "value": "",
                "type": "query",
                "description": "Include to ensure that `category_lookup` is present in the `metadata` of the response.\n"
              },
              {
                "name": "bucket_lookup",
                "value": "",
                "type": "query",
                "description": "Include to ensure that `bucket_lookup` is present in the `metadata` of the response.\n"
              },
              {
                "name": "unbucketed_categories",
                "value": "",
                "type": "query",
                "description": "Include to ensure that `unbucketed_categories` is present in the `metadata` of the response.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieve the definition of a bucket, and retrieve helper metadata which can be used\nfor presenting options to customers.\n\nFor example, the `metadata.category_lookup` property can be used to show a dialog box\nto customers for the customers to be able to correct their transactions (using the\n[Correct Transaction Categories V2](https://docs.thisisbud.com/reference/corrections_v2_categories_post)),\nand using the correct `category_l1/category_l2` pair.\n"
        },
        {
          "info": {
            "name": "Update Bucket",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api-sandbox.thisisbud.com/aggregations/v2/buckets/:bucket_id",
            "headers": [
              {
                "name": "X-Client-Id",
                "value": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
              }
            ],
            "params": [
              {
                "name": "bucket_id",
                "value": "",
                "type": "path",
                "description": "ID of the bucket (whose criteria can be used to calculate totals).\n"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update an existing bucket (overwrites all content).\n"
        },
        {
          "info": {
            "name": "Delete Buckets",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api-sandbox.thisisbud.com/aggregations/v2/buckets/:bucket_id",
            "headers": [
              {
                "name": "X-Client-Id",
                "value": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
              }
            ],
            "params": [
              {
                "name": "bucket_id",
                "value": "",
                "type": "path",
                "description": "ID of the bucket (whose criteria can be used to calculate totals).\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Delete Buckets"
        },
        {
          "info": {
            "name": "Retrieve Bucket Totals",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api-sandbox.thisisbud.com/aggregations/v2/buckets/:bucket_id/totals",
            "headers": [
              {
                "name": "X-Client-Id",
                "value": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
              },
              {
                "name": "X-Customer-Id",
                "value": "c3339af9-2426-44d4-9c4d-ddb8fd281e23"
              },
              {
                "name": "X-Customer-Idempotent-Identifier",
                "value": ""
              },
              {
                "name": "X-Customer-Secret",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "bucket_id",
                "value": "",
                "type": "path",
                "description": "ID of the bucket (whose criteria can be used to calculate totals).\n"
              },
              {
                "name": "date_from",
                "value": "",
                "type": "query"
              },
              {
                "name": "date_to",
                "value": "",
                "type": "query"
              },
              {
                "name": "currency",
                "value": "GBP",
                "type": "query",
                "description": "Use this parameter to filter the results returned on the `currency` associated with each result. Multiple values are accepted. If this parameter is not provided then results of any `currency` will be returned."
              },
              {
                "name": "timezone",
                "value": "",
                "type": "query"
              },
              {
                "name": "group_by",
                "value": "",
                "type": "query",
                "description": "Defines hierarchy of groupings for the resulting totals. For example:\n\n```\ngroup_by=bucket_l1,bucket_l2\n```\n\nWill result in getting groups by L1 buckets, then within those, their respective L2 buckets.\n"
              },
              {
                "name": "month_from",
                "value": "",
                "type": "query",
                "description": "Use `date_from` instead.\n"
              },
              {
                "name": "month_to",
                "value": "",
                "type": "query",
                "description": "Use `date_to` instead.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieve the totals of a defined bucket for a particular customer.\n\nUse the `group_by` property to configure how the totals are grouped together\n(e.g. by `bucket_l1`, by `month`, etc...)\n"
        }
      ]
    }
  ],
  "bundled": true
}