request.post('https://api.bigcommerce.com/stores/store_hash/v3/checkouts', { "line_items": [ { "sku": "item1" }, { "sku": "item2" } ], "customer_id": 123, "shipping_address": { "first_name": "John", "last_name": "Doe", "address1": "123 Main St", "city": "Somewhere", "state_or_province": "CA", "country_code": "US", "zip": "12345" } });
request.get('https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/123', function(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } });
request.get('https://api.bigcommerce.com/stores/store_hash/v3/customers', { 'auth': { 'bearer': 'OAuthToken' }, 'headers': { 'Accept': 'application/json', 'Content-Type': 'application/json', 'X-Auth-Client': 'ClientId', 'X-Auth-Token': 'OAuthToken' } }, function(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } });