{
  "opencollection": "1.0.0",
  "info": {
    "name": "Cube Agents ERP API",
    "version": "1.0.0 (1.0)"
  },
  "items": [
    {
      "info": {
        "name": "ERP",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List transaction events",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.cubesoftware.com/data-tables/:data_table_id/transaction-events",
            "headers": [
              {
                "name": "X-Company-ID",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "data_table_id",
                "value": "",
                "type": "path",
                "description": "Data table UUID"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Number of items per page (default: 25)"
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Page number (default: 1)"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/",
              "accessTokenUrl": "https://api.cubesoftware.com/o/token/",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "List all transaction events for a given data table"
        },
        {
          "info": {
            "name": "Queue transaction download",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.cubesoftware.com/data-tables/:data_table_id/transactions/uploads/:upload_id/download",
            "headers": [
              {
                "name": "X-Company-ID",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "data_table_id",
                "value": "",
                "type": "path",
                "description": "Data table UUID"
              },
              {
                "name": "upload_id",
                "value": "",
                "type": "path",
                "description": "Upload UUID to download"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/",
              "accessTokenUrl": "https://api.cubesoftware.com/o/token/",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Queue an export of transaction data. User receives email with download link when complete."
        },
        {
          "info": {
            "name": "Complete transaction file upload and trigger import workflow",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cubesoftware.com/data-tables/:data_table_id/transactions/uploads/complete",
            "headers": [
              {
                "name": "X-Company-ID",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "data_table_id",
                "value": "",
                "type": "path",
                "description": "Data table UUID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/",
              "accessTokenUrl": "https://api.cubesoftware.com/o/token/",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Verifies file exists in S3 and triggers NetSuite import workflow. Only supports NetSuite connections."
        },
        {
          "info": {
            "name": "Generate presigned S3 URL for transaction file upload",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cubesoftware.com/data-tables/:data_table_id/transactions/uploads/presign",
            "headers": [
              {
                "name": "X-Company-ID",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "data_table_id",
                "value": "",
                "type": "path",
                "description": "Data table UUID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/",
              "accessTokenUrl": "https://api.cubesoftware.com/o/token/",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Creates a presigned S3 URL that allows direct client-side file upload to S3. Only supports NetSuite connections. Use the returned file_path in complete_upload."
        }
      ]
    }
  ],
  "bundled": true
}