Skip to main content

Documentation Index

Fetch the complete documentation index at: https://bancofcalifornia-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Node
const https = require('https');
const querystring = require('querystring');

const security_key = '{security_key}';
const hostName = 'gateway.bancedge.com';
const path = '/api/query.php';
const actionType = 'sale'; // Can be any valid Query API action.

// Create the post data body to pass into request
const postData = querystring.stringify({
  'security_key': security_key,
  'action_type': actionType,
});

const options = {
  hostname: hostName,
  path: path,
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Content-Length': Buffer.byteLength(postData)
  }
};

// Make request to Query API
const req = https.request(options, (response) => {
  console.log(`STATUS: ${response.statusCode}`);
  console.log(`HEADERS: ${JSON.stringify(response.headers)}`);

  response.on('data', (chunk) => {
    console.log(`BODY: ${chunk}`);
  });
  response.on('end', () => {
    console.log('No more data in response.');
  });
});

req.on('error', (e) => {
  console.error(`Problem with request: ${e.message}`);
});

// Write post data to request body
req.write(postData);
req.end();