{
  "opencollection": "1.0.0",
  "info": {
    "name": "Bud API Services: Documentation Aggregation Buckets Custom Insights API",
    "version": "2.10.10"
  },
  "items": [
    {
      "info": {
        "name": "Custom Insights",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List existing custom insights",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api-sandbox.thisisbud.com/insights/v1/custom/manage",
            "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 a list of created custom insights, if they are currently active, and when they were created\n"
        },
        {
          "info": {
            "name": "Create new custom insight",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api-sandbox.thisisbud.com/insights/v1/custom/manage",
            "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 custom insight to be applied to all customers upon ingestion or refresh of transactions\n"
        },
        {
          "info": {
            "name": "Detail the transactions used to generate a custom insight",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api-sandbox.thisisbud.com/insights/v1/custom/detail/:custom_insight_id",
            "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": "custom_insight_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "This endpoint will return some transactions used to determine the custom insight.\n\nMore specifically it will return transactions filtered for in the WHERE expression of the custom insight query.\n"
        },
        {
          "info": {
            "name": "Update existing custom insight",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api-sandbox.thisisbud.com/insights/v1/custom/manage/:custom_insight_id",
            "headers": [
              {
                "name": "X-Client-Id",
                "value": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
              }
            ],
            "params": [
              {
                "name": "custom_insight_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Patches a custom insight, updating the query, or setting it to active/inactive\n"
        },
        {
          "info": {
            "name": "Delete existing custom insight",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api-sandbox.thisisbud.com/insights/v1/custom/manage/:custom_insight_id",
            "headers": [
              {
                "name": "X-Client-Id",
                "value": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
              }
            ],
            "params": [
              {
                "name": "custom_insight_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Permanently deletes a custom insight query\n"
        },
        {
          "info": {
            "name": "Delete all existing custom insights",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api-sandbox.thisisbud.com/insights/v1/custom/manage/all",
            "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": "Permanently deletes all custom insight queries\n"
        },
        {
          "info": {
            "name": "Retrieve custom insights profile",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api-sandbox.thisisbud.com/insights/v1/custom/profile",
            "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": ""
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Lists the insights which applied to a customer at \\'created_at\\'.\nTo recompute make a call to Build custom insights profile.\n"
        },
        {
          "info": {
            "name": "Build custom insights profile",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api-sandbox.thisisbud.com/insights/v1/custom/profile",
            "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": ""
              },
              {
                "name": "X-Now",
                "value": ""
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "/v1/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Manually builds a custom insight profile for a customer, is automatically called after successful ingestion and enrichment.\n"
        }
      ]
    }
  ],
  "bundled": true
}