### Setup a Webhook Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/00-START-HERE.md Example of how to set up a webhook for event notifications. ```bash curl -u LOGIN:AUTHTOKEN -X POST -H "Content-Type: application/json" \ -d '{"hook": {"url": "https://yourapp.com/webhook", "event": "product.created"}}' \ https://api.jumpseller.com/v1/hooks.json ``` -------------------------------- ### PHP Authentication Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md Example of how to authenticate and make a request using PHP. ```PHP ``` -------------------------------- ### Ruby Authentication Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md Example of how to authenticate and make a request using Ruby. ```Ruby require 'net/http' require 'json' class JumpsellerClient BASE_URL = 'https://api.jumpseller.com/v1' def initialize(login, authtoken) @login = login @authtoken = authtoken end def get(path) uri = URI("#{BASE_URL}#{path}") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request.basic_auth(@login, @authtoken) request['Content-Type'] = 'application/json' response = http.request(request) JSON.parse(response.body) end end client = JumpsellerClient.new('your_login', 'your_authtoken') products = client.get('/products.json') ``` -------------------------------- ### Python Authentication Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md Example of how to authenticate and make a request using Python. ```Python import requests from requests.auth import HTTPBasicAuth LOGIN = 'your_login' AUTHTOKEN = 'your_auth_token' BASE_URL = 'https://api.jumpseller.com/v1' auth = HTTPBasicAuth(LOGIN, AUTHTOKEN) # Example request response = requests.get(f'{BASE_URL}/products.json', auth=auth) print(response.json()) ``` -------------------------------- ### Quick Start cURL Example Source: https://github.com/jumpseller/api-docs/blob/main/README.md Example of how to make a request to the Jumpseller API using cURL for products. ```bash curl -u YOUR_LOGIN:YOUR_AUTHTOKEN https://api.jumpseller.com/v1/products.json ``` -------------------------------- ### JavaScript/Node.js Authentication Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md Example of how to authenticate and make a request using JavaScript/Node.js. ```JavaScript const BASE_URL = 'https://api.jumpseller.com/v1'; const LOGIN = 'your_login'; const AUTHTOKEN = 'your_auth_token'; // Create Basic Auth header const credentials = btoa(`${LOGIN}:${AUTHTOKEN}`); const headers = { 'Authorization': `Basic ${credentials}`, 'Content-Type': 'application/json' }; // Example request const response = await fetch(`${BASE_URL}/products.json`, { headers }); const data = await response.json(); console.log(data); ``` -------------------------------- ### Create a Product Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/00-START-HERE.md Example of how to create a new product. ```bash curl -u LOGIN:AUTHTOKEN -X POST -H "Content-Type: application/json" \ -d '{"product": {"name": "My Product", "price": 99.99}}' \ https://api.jumpseller.com/v1/products.json ``` -------------------------------- ### Retrieve all Products Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-detailed.md This example shows how to retrieve all products using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products.json" ``` -------------------------------- ### Count all Products Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-detailed.md This example demonstrates how to get the total count of all products. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/count.json" ``` -------------------------------- ### Example Response for Data Format Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Example JSON response for a created product. ```json { "product": { "id": 123, "name": "My Product", "price": 99.99, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z" } } ``` -------------------------------- ### GET /products_locations Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-locations.md Example of how to retrieve product locations by product and location. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products_locations" ``` -------------------------------- ### Example Request for Data Format Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Example cURL command to create a product using JSON format. ```bash curl -u LOGIN:AUTHTOKEN \ -X POST \ -H "Content-Type: application/json" \ -d '{ "product": { "name": "My Product", "price": 99.99 } }' \ https://api.jumpseller.com/v1/products.json ``` -------------------------------- ### Retrieve all Taxes Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/taxes.md Example of how to retrieve all taxes using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/taxes.json" ``` -------------------------------- ### List Products with Pagination in Python Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md Example of how to list products with pagination in Python, fetching up to 100 products per page. ```Python import requests from requests.auth import HTTPBasicAuth auth = HTTPBasicAuth('LOGIN', 'AUTHTOKEN') base_url = 'https://api.jumpseller.com/v1' page = 1 all_products = [] while True: url = f'{base_url}/products.json?page={page}&limit=100' response = requests.get(url, auth=auth) products = response.json() if not products: break all_products.extend(products) page += 1 print(f"Downloaded {len(all_products)} products") ``` -------------------------------- ### List Products with Pagination in JavaScript Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md Example of how to list products with pagination in JavaScript, fetching up to 100 products per page. ```JavaScript const BASE_URL = 'https://api.jumpseller.com/v1'; const credentials = btoa('LOGIN:AUTHTOKEN'); const headers = { 'Authorization': `Basic ${credentials}`, 'Content-Type': 'application/json' }; async function getAllProducts() { let page = 1; let allProducts = []; let hasMore = true; while (hasMore) { const url = `${BASE_URL}/products.json?page=${page}&limit=100`; const response = await fetch(url, { headers }); const products = await response.json(); if (!products || products.length === 0) { hasMore = false; } else { allProducts = allProducts.concat(products); page++; } } return allProducts; } getAllProducts().then(products => { console.log(`Downloaded ${products.length} products`); }); ``` -------------------------------- ### Search Products Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-detailed.md Example of searching for products using a GET request with a search query. ```bash curl -u LOGIN:AUTHTOKEN \ "https://api.jumpseller.com/v1/products.json?search=laptop&limit=100" ``` -------------------------------- ### JavaScript Example for Basic Authentication Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Example of how to authenticate using Basic Authentication with JavaScript's fetch API. ```javascript const credentials = btoa('YOUR_LOGIN:YOUR_AUTHTOKEN'); const response = await fetch('https://api.jumpseller.com/v1/products.json', { headers: { 'Authorization': 'Basic ' + credentials, 'Content-Type': 'application/json' } }); const data = await response.json(); ``` -------------------------------- ### Create a Product with Error Handling in Python Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md Example of how to create a product in Python, including handling for successful creation (201), validation errors (422), and other HTTP errors. ```Python import requests from requests.auth import HTTPBasicAuth auth = HTTPBasicAuth('LOGIN', 'AUTHTOKEN') base_url = 'https://api.jumpseller.com/v1' product_data = { 'product': { 'name': 'My New Product', 'price': 99.99, 'description': 'Product description', 'sku': 'SKU123', 'weight': 1.5 } } try: response = requests.post( f'{base_url}/products.json', json=product_data, auth=auth ) if response.status_code == 201: product = response.json() print(f"Product created: {product['id']}") elif response.status_code == 422: errors = response.json().get('details', {}) print(f"Validation errors: {errors}") else: print(f"Error: {response.status_code} - {response.text}") except requests.exceptions.RequestException as e: print(f"Network error: {e}") ``` -------------------------------- ### PHP Example for Basic Authentication Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Example of how to authenticate using Basic Authentication with PHP's cURL. ```php $login = 'YOUR_LOGIN'; $authtoken = 'YOUR_AUTHTOKEN'; $url = 'https://api.jumpseller.com/v1/products.json'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, $login . ':' . $authtoken); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); $response = curl_exec($ch); curl_close($ch); echo $response; ``` -------------------------------- ### List Products with Pagination Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-detailed.md Examples for retrieving lists of products with pagination, including getting the first page and subsequent pages. ```bash # Get first page of 50 products curl -u LOGIN:AUTHTOKEN \ https://api.jumpseller.com/v1/products.json?limit=50&page=1 # Get next page curl -u LOGIN:AUTHTOKEN \ https://api.jumpseller.com/v1/products.json?limit=50&page=2 ``` -------------------------------- ### Example Request for Pagination Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Example cURL command to retrieve page 3 with 100 items per page. ```bash curl -u LOGIN:AUTHTOKEN "https://api.jumpseller.com/v1/products.json?page=3&limit=100" ``` -------------------------------- ### GET /apps/{code}/install_status.json Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/paid-apps.md Retrieve an OauthApplication installation status. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/apps/my-app/install_status.json" ``` -------------------------------- ### Example JSON Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/00-START-HERE.md This is an example of the JSON response you will receive when making a request to the Jumpseller API, showing product data. ```json [ { "product": { "id": 123, "name": "Product Name", "price": 99.99, "created_at": "2024-01-15T10:30:00Z" } } ] ``` -------------------------------- ### Python Example for Basic Authentication Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Example of how to authenticate using Basic Authentication with Python's requests library. ```python import requests response = requests.get( 'https://api.jumpseller.com/v1/products.json', auth=('YOUR_LOGIN', 'YOUR_AUTHTOKEN') ) print(response.json()) ``` -------------------------------- ### Retrieve all Product Attachments Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-attachments.md This example shows how to retrieve all attachments for a given product using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/attachments.json" ``` -------------------------------- ### Retrieve all Product Option Values Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-option-values.md Example of how to retrieve all product option values using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/options/101/values.json" ``` -------------------------------- ### Create a new store Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/stores.md Example of how to create a new store. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/store/setup.json" -H "Content-Type: application/json" -d '{"store": {"name": "My New Store", "country": "CL"}}' ``` -------------------------------- ### Retrieve all Fulfillments Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/fulfillments.md This example shows how to retrieve all fulfillments using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/fulfillments.json" ``` -------------------------------- ### Pagination Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/README.md Example demonstrating how to use pagination parameters to retrieve specific pages of results. ```bash # Get page 2 with 100 items per page curl -u LOGIN:AUTHTOKEN "https://api.jumpseller.com/v1/products.json?page=2&limit=100" ``` -------------------------------- ### Retry Logic Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Ruby example demonstrating exponential backoff and retry logic for handling rate limit errors. ```ruby tries = 0 limit = 3 begin response = HTTParty.send(method, uri) tries += 1 rescue => error if error.response.code == 429 && tries < limit sleep 1.0 retry else raise error end end ``` -------------------------------- ### Count all Product Attachments Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-attachments.md This example shows how to count all attachments for a given product using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/attachments/count.json" ``` -------------------------------- ### Count all Product Option Values Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-option-values.md Example of how to count all product option values using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/options/101/values/count.json" ``` -------------------------------- ### Retrieve all Documents Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/documents.md This example shows how to retrieve all documents from a store using the GET /documents.json endpoint. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/documents.json" ``` -------------------------------- ### Get Customer Details Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/README.md Example of how to retrieve details for a specific customer by ID. ```bash curl -u LOGIN:AUTHTOKEN "https://api.jumpseller.com/v1/customers/{id}.json" ``` -------------------------------- ### GET /apps/{code}/install_status_by_store_id.json Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/paid-apps.md Retrieve an OauthApplication installation status for a specific Store. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/apps/my-app/install_status_by_store_id.json" ``` -------------------------------- ### Rates for fulfillment Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/fulfillments.md This example demonstrates how to get fulfillment rates using a POST request with a JSON body. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/fulfillments/rates.json" \ -H "Content-Type: application/json" \ -d '{"rates": {"location_id": "example", "order_id": "example", "shipping_address": {}}}' ``` -------------------------------- ### Retrieve all Promotions Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/promotions.md Example of how to retrieve all promotions using curl. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/promotions.json" ``` -------------------------------- ### cURL Example for Deprecated Query Parameters Authentication Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Example of how to authenticate using deprecated query parameters. ```bash curl -X GET "https://api.jumpseller.com/v1/products.json?login=YOUR_LOGIN&authtoken=YOUR_AUTHTOKEN" ``` -------------------------------- ### Product Object Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/QUICK-REFERENCE.md Example JSON structure for a Product object. ```json { "id": 1, "name": "Product Name", "price": 99.99, "sku": "SKU123", "description": "Description", "weight": 1.5, "visibility": 1, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ``` -------------------------------- ### OAuth 2.0 Authorization Flow Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md Demonstrates the steps to obtain an access token using OAuth 2.0, including getting the authorization URL, exchanging the code for a token, and using the token to fetch products. ```python from requests_oauthlib import OAuth2Session import requests # Assume CLIENT_ID, REDIRECT_URI, AUTH_URL, TOKEN_URL are defined # CLIENT_ID = 'YOUR_CLIENT_ID' # REDIRECT_URI = 'YOUR_REDIRECT_URI' # AUTH_URL = 'https://auth.jumpseller.com/oauth/authorize' # TOKEN_URL = 'https://auth.jumpseller.com/oauth/token' oauth = OAuth2Session(CLIENT_ID, redirect_uri=REDIRECT_URI) authorization_url, state = oauth.authorization_url(AUTH_URL) print(f"Go to this URL: {authorization_url}") # Step 2: User grants permission, receives code authorization_code = input("Enter authorization code: ") # Step 3: Exchange code for token token = oauth.fetch_token( TOKEN_URL, client_id=CLIENT_ID, client_secret=CLIENT_SECRET, authorization_response=authorization_code ) print(f"Access token: {token['access_token']}") print(f"Refresh token: {token['refresh_token']}") # Step 4: Use access token headers = {'Authorization': f"Bearer {token['access_token']}"} response = requests.get( 'https://api.jumpseller.com/v1/products.json', headers=headers ) products = response.json() print(f"Retrieved {len(products)} products") ``` -------------------------------- ### Retrieve Store Balance Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/stores.md Example of how to retrieve the store balance. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/transaction_ledger/balance.json" ``` -------------------------------- ### OpenAPI Specification Installation Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/README.md Command to install the OpenAPI spec via OpenMCP. ```bash # Install via OpenMCP npx openmcp install https://api.jumpseller.com/swagger.json --client cursor ``` -------------------------------- ### Retrieve a single Tax information Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/taxes.md Example of how to retrieve a single tax's information using a GET request with an ID. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/taxes/123.json" ``` -------------------------------- ### Retrieve Store Languages Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/stores.md Example of how to retrieve store languages. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/store/languages.json" ``` -------------------------------- ### Retrieve Store Information Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/stores.md Example of how to retrieve store information. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/store/info.json" ``` -------------------------------- ### PUT /products_locations Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-locations.md Example of how to update stock by product and location. ```bash curl -u XXXXX:YYYYY -X PUT "https://api.jumpseller.com/v1/products_locations" \ -H "Content-Type: application/json" \ -d '{"location_id": 123, "product_id": 123, "variant_id": 123, "stock_unlimited": true, "stock": 1}' ``` -------------------------------- ### Create a Category Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/README.md Example of how to create a new product category. ```bash curl -u LOGIN:AUTHTOKEN \ -X POST \ -H "Content-Type: application/json" \ -d '{ "category": { "name": "My Category" } }' \ https://api.jumpseller.com/v1/categories.json ``` -------------------------------- ### Create a new Promotion Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/promotions.md Example of how to create a new promotion using curl. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/promotions.json" \ -H "Content-Type: application/json" \ -d '{"promotion": {"name": "My Example", "enabled": true, "discount_target": "example", "buys_at_least": "example", "condition_price": 99.99}}' ``` -------------------------------- ### Retrieve a single Product Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-detailed.md This example demonstrates how to retrieve details for a specific product by its ID. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123.json" ``` -------------------------------- ### List Orders Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/README.md Example of how to list orders with pagination parameters. ```bash curl -u LOGIN:AUTHTOKEN "https://api.jumpseller.com/v1/orders.json?limit=50&page=1" ``` -------------------------------- ### Retrieve all Customers Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/customers.md Example of how to retrieve all customers using curl. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/customers.json" ``` -------------------------------- ### Customer Object Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/QUICK-REFERENCE.md Example JSON structure for a Customer object. ```json { "id": 1, "first_name": "John", "last_name": "Doe", "email": "john@example.com", "phone": "+1-555-0123", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ``` -------------------------------- ### Create Resource Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/QUICK-REFERENCE.md Example of how to create a resource using a POST request with cURL. ```bash curl -u LOGIN:AUTHTOKEN -X POST -H "Content-Type: application/json" \ -d '{"product": {"name": "New", "price": 99.99}}' \ https://api.jumpseller.com/v1/products.json ``` -------------------------------- ### Retrieve all Hooks Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/hooks.md Example of how to retrieve all hooks using curl. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/hooks.json" ``` -------------------------------- ### Create a new Product Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-detailed.md This example demonstrates how to create a new product with specified details. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/products.json" \ -H "Content-Type: application/json" \ -d '{"product": {"name": "My Example", "price": 99.99, "description": "example", "page_title": "example"}}' ``` -------------------------------- ### Count all Customers Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/customers.md Example of how to count all customers using curl. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/customers/count.json" ``` -------------------------------- ### Order Object Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/QUICK-REFERENCE.md Example JSON structure for an Order object. ```json { "id": 1, "number": "ORD-2024-001", "status": "paid", "total": 150.00, "customer_id": 123, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ``` -------------------------------- ### Count all Fulfillments Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/fulfillments.md This example shows how to count all fulfillments using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/fulfillments/count.json" ``` -------------------------------- ### Retrieve all Customer Categories Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/customer-categories.md Example of how to retrieve all customer categories. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/customer_categories.json" ``` -------------------------------- ### Retrieve all Countries Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/countries.md This example shows how to retrieve all countries using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/countries.json" ``` -------------------------------- ### Retrieve all Product Options Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-options.md Example of how to retrieve all product options for a given product. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/options.json" ``` -------------------------------- ### Update an Order Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/00-START-HERE.md Example of how to update an existing order's status. ```bash curl -u LOGIN:AUTHTOKEN -X PUT -H "Content-Type: application/json" \ -d '{"order": {"status": "shipped"}}' \ https://api.jumpseller.com/v1/orders/123.json ``` -------------------------------- ### Search Products Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/INTEGRATION-GUIDE.md This Python script shows how to search for products by a keyword and display their names and prices. ```Python import requests from requests.auth import HTTPBasicAuth auth = HTTPBasicAuth('LOGIN', 'AUTHTOKEN') base_url = 'https://api.jumpseller.com/v1' # Search for products search_query = 'laptop' response = requests.get( f'{base_url}/products.json', params={'search': search_query, 'limit': 100}, auth=auth ) products = response.json() print(f"Found {len(products)} products matching '{search_query}'") for product in products: print(f" - {product['name']} (${product['price']})") ``` -------------------------------- ### Retrieve a single Fulfillment Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/fulfillments.md This example shows how to retrieve a single fulfillment by its ID using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/fulfillments/123.json" ``` -------------------------------- ### Retrieve a Product List from a query Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/products-detailed.md This example shows how to search for products using a query string and specific fields. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/search.json" ``` -------------------------------- ### Create a Product Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/README.md Example of how to create a new product using the Jumpseller API. ```bash curl -u LOGIN:AUTHTOKEN \ -X POST \ -H "Content-Type: application/json" \ -d '{ "product": { "name": "My Product", "price": 99.99, "description": "Product description" } }' \ https://api.jumpseller.com/v1/products.json ``` -------------------------------- ### GET /apps/{code}/billing_cycle_dates.json Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/paid-apps.md Retrieve billing cycle start and billing cycle end for an OauthApplication. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/apps/my-app/billing_cycle_dates.json" ``` -------------------------------- ### List with Pagination Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/QUICK-REFERENCE.md Example of how to list resources with pagination parameters using cURL. ```bash curl -u LOGIN:AUTHTOKEN "https://api.jumpseller.com/v1/products.json?limit=50&page=1" ``` -------------------------------- ### Authenticate with Basic Auth Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/QUICK-REFERENCE.md Example of how to authenticate with Basic Auth using cURL. ```bash curl -u LOGIN:AUTHTOKEN https://api.jumpseller.com/v1/products.json ``` -------------------------------- ### Count all Product Options Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-options.md Example of how to count all product options for a given product. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/options/count.json" ``` -------------------------------- ### Create a new Product Option Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-options.md Example of how to create a new product option for a given product. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/products/123/options.json" \ -H "Content-Type: application/json" \ -d '{"option": {"name": "My Example", "position": 1, "option_type": "option"}}' ``` -------------------------------- ### Retrieve the Fulfillments associated with the Order Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/fulfillments.md This example demonstrates how to retrieve all fulfillments associated with a specific order using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/order/123/fulfillments.json" ``` -------------------------------- ### Retrieve a single CheckoutCustomField Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/checkout-custom-fields.md This example shows how to retrieve a specific CheckoutCustomField by its ID using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/checkout_custom_fields/123.json" ``` -------------------------------- ### MCP Server Quick Setup Configuration Source: https://github.com/jumpseller/api-docs/blob/main/README.md Configuration snippet for setting up MCP servers for AI agents like Claude, Cursor, and Windsurf. ```json { "mcpServers": { "jumpseller": { "command": "npx", "args": [ "-y", "mcp-remote", "https://mcp.jumpseller.com/", "--header", "X-LOGIN-KEY:YOUR_LOGIN_KEY", "--header", "X-AUTH-TOKEN:YOUR_AUTH_TOKEN" ] } } } ``` -------------------------------- ### Example cURL for Creating a Webhook Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/WEBHOOKS-GUIDE.md Demonstrates how to create a webhook using cURL. ```bash curl -u LOGIN:AUTHTOKEN \ -X POST \ -H "Content-Type: application/json" \ -d '{ "hook": { "url": "https://yourapp.com/webhook", "event": "product.created", "active": true } }' \ https://api.jumpseller.com/v1/hooks.json ``` -------------------------------- ### Retrieve a single Product Attachment Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-attachments.md This example shows how to retrieve a specific product attachment by its ID using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/attachments/103.json" ``` -------------------------------- ### Retrieve all Checkout Custom Fields Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/checkout-custom-fields.md This example shows how to retrieve all Checkout Custom Fields using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/checkout_custom_fields.json" ``` -------------------------------- ### Make Your First Request Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/00-START-HERE.md This code snippet shows how to make your first request to the Jumpseller API using cURL to fetch products. ```bash curl -u YOUR_LOGIN:YOUR_AUTHTOKEN \ https://api.jumpseller.com/v1/products.json ``` -------------------------------- ### Retrieve a single Product Option Value Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-option-values.md Example of how to retrieve a single product option value using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/options/101/values/{value_id}.json" ``` -------------------------------- ### Retrieve a presigned URL for the Fulfillment label Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/fulfillments.md This example shows how to retrieve a presigned URL for a fulfillment's shipping label using a GET request. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/fulfillments/123/label.json" ``` -------------------------------- ### 404 Not Found Example Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md Example response for a 404 Not Found error. ```json { "error": "Not Found", "message": "Resource not found" } ``` -------------------------------- ### 403 Forbidden Example Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md Example response for a 403 Forbidden error. ```json { "error": "Forbidden", "message": "You do not have permission to access this resource" } ``` -------------------------------- ### 401 Unauthorized Example Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md Example response for a 401 Unauthorized error. ```json { "error": "Unauthorized", "message": "Invalid or missing authentication" } ``` -------------------------------- ### 429 Too Many Requests Example Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md Example response for a 429 Too Many Requests error. ```json { "error": "Too many requests", "message": "Rate limit exceeded" } ``` -------------------------------- ### 422 Unprocessable Entity Example Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md Example response for a 422 Unprocessable Entity error. ```json { "error": "Validation failed", "details": { "name": ["can't be blank"], "price": ["must be greater than 0"], "email": ["is invalid"] } } ``` -------------------------------- ### 400 Bad Request Example Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md Example response for a 400 Bad Request error. ```json { "error": "Invalid parameters", "message": "The request could not be processed" } ``` -------------------------------- ### Example cURL for Listing Webhooks Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/WEBHOOKS-GUIDE.md Demonstrates how to list webhooks using cURL with pagination parameters. ```bash curl -u LOGIN:AUTHTOKEN \ "https://api.jumpseller.com/v1/hooks.json?limit=50&page=1" ``` -------------------------------- ### 503 Service Unavailable Example Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md An example JSON response for a 503 Service Unavailable error. ```json { "error": "Service unavailable", "message": "Please try again later" } ``` -------------------------------- ### Validation Error Details Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md An example JSON response detailing validation errors for specific fields. ```json { "error": "Validation failed", "details": { "name": ["can't be blank"], "email": ["is invalid", "has already been taken"], "age": ["must be greater than 0"] } } ``` -------------------------------- ### Create a new Product Image Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-images.md Example of how to create a new product image, including specifying the image URL and position. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/products/123/images.json" \ -H "Content-Type: application/json" \ -d '{"image": {"url": "https://example.com", "position": 1}}' ``` -------------------------------- ### OAuth 2.0 Authorization Code Flow - Step 3: Use Access Token Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/configuration.md Example of using the obtained access token in an API request. ```bash curl -H "Authorization: Bearer ACCESS_TOKEN" \ https://api.jumpseller.com/v1/products.json ``` -------------------------------- ### 500 Internal Server Error Example Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md An example JSON response for a 500 Internal Server Error. ```json { "error": "Internal server error", "message": "An unexpected error occurred" } ``` -------------------------------- ### Retrieve all Product Reviews Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-reviews.md This example shows how to retrieve all product reviews using a curl command. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/reviews.json" ``` -------------------------------- ### Create a new Product Variant Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-variants.md This example demonstrates how to create a new product variant with specified details. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/products/123/variants.json" \ -H "Content-Type: application/json" \ -d '{"variant": {"price": 99.99, "sku": "example", "barcode": "ABC123", "stock": 1, "stock_unlimited": true}}' ``` -------------------------------- ### Retrieve all Product Images Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/product-images.md Example of how to retrieve all product images for a given product ID. ```bash curl -u XXXXX:YYYYY -X GET "https://api.jumpseller.com/v1/products/123/images.json" ``` -------------------------------- ### Update Resource Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/QUICK-REFERENCE.md Example of how to update a resource using a PUT request with cURL. ```bash curl -u LOGIN:AUTHTOKEN -X PUT -H "Content-Type: application/json" \ -d '{"product": {"name": "Updated"}}' \ https://api.jumpseller.com/v1/products/123.json ``` -------------------------------- ### 429 Too Many Requests Example retry logic (Python) Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/errors.md Example retry logic using exponential backoff in Python. ```python import time import requests def call_with_retry(url, auth, max_retries=3): for attempt in range(max_retries): response = requests.get(url, auth=auth) if response.status_code == 429: if attempt < max_retries - 1: wait_time = 2 ** attempt # exponential backoff time.sleep(wait_time) continue return response raise Exception("Max retries exceeded") ``` -------------------------------- ### Create a new Customer Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/customers.md Example of how to create a new customer using curl with a JSON request body. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/customers.json" \ -H "Content-Type: application/json" \ -d '{"customer": {"email": "customer@example.com", "phone": "+1234567890", "password": "secret123", "status": "approved", "shipping_address": {}}}' ``` -------------------------------- ### Python Example for Quick 2xx Response Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/WEBHOOKS-GUIDE.md Demonstrates returning a 200 OK status quickly and processing the event asynchronously. ```python @app.route('/webhook', methods=['POST']) def handle_webhook(): event = request.json queue_task(process_event, event) return {'status': 'ok'}, 200 ``` -------------------------------- ### Rate Limit Headers Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/README.md Example of rate limit information headers returned in API responses. ```text Jumpseller-PerMinuteRateLimit-Limit: 800 Jumpseller-PerMinuteRateLimit-Remaining: 799 Jumpseller-PerSecondRateLimit-Limit: 20 Jumpseller-PerSecondRateLimit-Remaining: 19 ``` -------------------------------- ### Create a Store JsApp Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/api-reference/apps.md This example demonstrates how to create a new JsApp for a store. The request body should be a JSON object containing the resource data. ```bash curl -u XXXXX:YYYYY -X POST "https://api.jumpseller.com/v1/jsapps.json" \ -H "Content-Type: application/json" \ -d '{"app": {"url": "https://example.com", "template": "layout", "element": "body"}}' ``` -------------------------------- ### Error Handling Example Source: https://github.com/jumpseller/api-docs/blob/main/_autodocs/README.md An example of a JSON response for error handling, including status codes and error details. ```json { "error": "Validation failed", "details": { "name": ["can't be blank"] } } ```