### Purchase Orders Queue - Shell Example Source: https://developers.peakaccount.com/reference/get_api-v1-purchaseorders-queue Example of how to interact with the Purchase Orders Queue API using a shell command. ```Shell curl "https://api.peakaccount.com/api/v1/PurchaseOrders/queue" ``` -------------------------------- ### Product Edit API Example Source: https://developers.peakaccount.com/reference/post_api-v1-products-edit Provides example code snippets for interacting with the Product Edit API endpoint in various programming languages. ```Shell curl -X POST https://api.peakaccount.com/api/v1/Products/edit -H "Content-Type: application/json" -d '{"productId": "123", "name": "Updated Product Name", "price": 25.50}' ``` ```Node const axios = require('axios'); async function editProduct(productId, updates) { try { const response = await axios.post('https://api.peakaccount.com/api/v1/Products/edit', { productId: productId, ...updates }); console.log('Product updated:', response.data); return response.data; } catch (error) { console.error('Error updating product:', error); throw error; } } // Example usage: // editProduct('123', { name: 'Updated Product Name', price: 25.50 }); ``` ```Ruby require 'httparty' url = 'https://api.peakaccount.com/api/v1/Products/edit' options = { body: { productId: '123', name: 'Updated Product Name', price: 25.50 }.to_json, headers: { 'Content-Type' => 'application/json' } } response = HTTParty.post(url, options) puts response.body ``` ```PHP '123', 'name' => 'Updated Product Name', 'price' => 25.50 ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json' ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Curl error: ' . curl_error($ch); } else { echo $response; } curl_close($ch); ?> ``` ```Python import requests import json url = 'https://api.peakaccount.com/api/v1/Products/edit' headers = {'Content-Type': 'application/json'} data = { 'productId': '123', 'name': 'Updated Product Name', 'price': 25.50 } response = requests.post(url, headers=headers, data=json.dumps(data)) print(response.json()) ``` -------------------------------- ### Purchase Orders Queue - Ruby Example Source: https://developers.peakaccount.com/reference/get_api-v1-purchaseorders-queue Example of how to interact with the Purchase Orders Queue API using Ruby with the 'net/http' library. ```Ruby require 'net/http' require 'uri' uri = URI.parse('https://api.peakaccount.com/api/v1/PurchaseOrders/queue') response = Net::HTTP.get_response(uri) puts response.body ``` -------------------------------- ### API Connection and URL Guide Source: https://developers.peakaccount.com/reference/get_api-v1-products-list Provides essential information on connecting to the API and using specific URLs for UAT and Production environments. This guide is crucial for developers integrating with the Peak platform. ```APIDOC API Connection Steps: - Detailed steps for establishing a connection to the Peak API. - May include authentication methods and initial setup. Link URL Usage for UAT and Production: - Specifies the correct URLs for testing (UAT) and live (Production) environments. - Essential for directing API requests to the appropriate server. ``` -------------------------------- ### Purchase Orders Queue - Python Example Source: https://developers.peakaccount.com/reference/get_api-v1-purchaseorders-queue Example of how to interact with the Purchase Orders Queue API using Python with the 'requests' library. ```Python import requests url = 'https://api.peakaccount.com/api/v1/PurchaseOrders/queue' try: response = requests.get(url) response.raise_for_status() # Raise an exception for bad status codes print(response.json()) except requests.exceptions.RequestException as e: print(f'Error fetching purchase orders queue: {e}') ``` -------------------------------- ### Receipts Queue - Multi-Language Examples Source: https://developers.peakaccount.com/reference/get_api-v1-receipts-queue Provides examples for accessing the Receipts Queue API endpoint in various programming languages. ```Shell curl -X GET "https://api.peakaccount.com/api/v1/Receipts/queue" ``` ```Node const axios = require('axios'); axios.get('https://api.peakaccount.com/api/v1/Receipts/queue') .then(response => { console.log(response.data); }) .catch(error => { console.error('Error fetching receipts queue:', error); }); ``` ```Ruby require 'net/http' require 'uri' uri = URI.parse('https://api.peakaccount.com/api/v1/Receipts/queue') response = Net::HTTP.get_response(uri) puts response.body ``` ```PHP ``` ```Python import requests url = 'https://api.peakaccount.com/api/v1/Receipts/queue' response = requests.get(url) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") ``` -------------------------------- ### API Connection and URL Guide (Thai) Source: https://developers.peakaccount.com/reference/get_api-v1-receipts-createbyinvoicequeue This guide, written in Thai, explains the steps for connecting to the API and provides information on using Link URLs for UAT (User Acceptance Testing) and Production environments. ```APIDOC Section Title: การเชื่อมต่อ API และ URL (API Connection and URL) Sub-sections: 1. ขั้นตอนการเชื่อมต่อ API (Steps for API Connection) 2. การใช้งาน Link URL สำหรับ UAT และ Production (Using Link URLs for UAT and Production) Content: (Detailed API connection steps and URL usage instructions are described in Thai, but not provided as code or specific technical specifications in the source text.) ``` -------------------------------- ### API Connection and URL Guide (Thai) Source: https://developers.peakaccount.com/reference/post_api-v1-receipts-createbyinvoicequeue This guide, written in Thai, explains the steps for connecting to the API and provides information on using Link URLs for UAT (User Acceptance Testing) and Production environments. ```APIDOC Section Title: การเชื่อมต่อ API และ URL (API Connection and URL) Sub-sections: 1. ขั้นตอนการเชื่อมต่อ API (Steps for API Connection) 2. การใช้งาน Link URL สำหรับ UAT และ Production (Using Link URLs for UAT and Production) Content: (Detailed API connection steps and URL usage instructions are described in Thai, but not provided as code or specific technical specifications in the source text.) ``` -------------------------------- ### Product JSON Schema Example Source: https://developers.peakaccount.com/reference/receipt-copy An example JSON structure representing product data, including fields for identification, pricing, accounts, and balances. ```json { "PeakProducts": { "products": [ { "id": "", "name": "", "code": "", "type": 1, "purchaseValue": 0.0, "purchaseVatType": 0, "purchaseAccount": "", "sellValue": 0.0, "sellVatType": 0, "sellAccount": "", "description": "", "carryingBalanceValue": 0.0, "carryingBalanceAmount": 0.0, "remainingBalanceAmount": 0.0, "resCode": "200", "resDesc": "Success" } ], "totalProduct": 0, "resDesc": "PeakProducts have Completed", "resCode": "200" }, "eventType": "Create", "apiType": "ApiProduct" } ``` -------------------------------- ### Get Quotations API Example Source: https://developers.peakaccount.com/reference/get_api-v1-quotations Demonstrates how to retrieve quotations using the PeakAccount API. Examples are provided for Shell, Node.js, Ruby, PHP, and Python. ```Shell curl -X GET https://api.peakaccount.com/api/v1/Quotations ``` ```Node const axios = require('axios'); axios.get('https://api.peakaccount.com/api/v1/Quotations') .then(response => { console.log(response.data); }) .catch(error => { console.error('Error fetching quotations:', error); }); ``` ```Ruby require 'net/http' require 'uri' uri = URI.parse('https://api.peakaccount.com/api/v1/Quotations') response = Net::HTTP.get_response(uri) puts response.body ``` ```PHP ``` ```Python import requests url = 'https://api.peakaccount.com/api/v1/Quotations' response = requests.get(url) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") ``` -------------------------------- ### Purchase Orders Queue - Node.js Example Source: https://developers.peakaccount.com/reference/get_api-v1-purchaseorders-queue Example of how to interact with the Purchase Orders Queue API using Node.js with the 'axios' library. ```Node const axios = require('axios'); axios.get('https://api.peakaccount.com/api/v1/PurchaseOrders/queue') .then(response => { console.log(response.data); }) .catch(error => { console.error('Error fetching purchase orders queue:', error); }); ``` -------------------------------- ### Purchase Orders Queue - PHP Example Source: https://developers.peakaccount.com/reference/get_api-v1-purchaseorders-queue Example of how to interact with the Purchase Orders Queue API using PHP with cURL. ```PHP ``` -------------------------------- ### API Connection and URL Guide (Thai) Source: https://developers.peakaccount.com/reference/post_api-v1-creditnotes-void Information in Thai regarding API connection steps and the usage of Link URLs for UAT and Production environments. ```th หัวข้อ: การเชื่อมต่อ API และ URL 1. ขั้นตอนการเชื่อมต่อ API: - อธิบายขั้นตอนที่จำเป็นในการเชื่อมต่อกับ Peak API. - อาจรวมถึงการขอ API key, การตั้งค่าการยืนยันตัวตน (authentication). 2. การใช้งาน Link URL สำหรับ UAT และ Production: - ระบุ URL ที่แตกต่างกันสำหรับสภาพแวดล้อม UAT (User Acceptance Testing) และ Production. - ให้คำแนะนำเกี่ยวกับวิธีการเลือกใช้ URL ที่ถูกต้องตามสภาพแวดล้อมที่กำลังพัฒนาหรือใช้งานจริง. ``` -------------------------------- ### API Connection and URL Usage Guide Source: https://developers.peakaccount.com/reference/get_api-v1-creditnotesexpenses-list This section outlines the steps for connecting to the API and explains how to use the provided links for UAT (User Acceptance Testing) and Production environments. It is crucial for developers integrating with the PEAK API. ```APIDOC API Connection Guide: - Overview of API connection steps. - Details on authentication and authorization. Link URL Usage for UAT and Production: - Explanation of UAT environment links. - Explanation of Production environment links. - Best practices for switching between environments. ``` -------------------------------- ### API Connection and URL Usage Guide Source: https://developers.peakaccount.com/reference/post_api-v1-purchaseorders-void Provides guidance on connecting to the API and using specific URLs for different environments. This section includes steps for API connection and information on UAT and Production link URLs. ```APIDOC API Connection Steps: - Details the process for establishing a connection to the Peak API. - May include information on obtaining API keys, authentication methods (e.g., OAuth, API tokens). Link URL Usage for UAT and Production: - Specifies the base URLs for testing (UAT) and live (Production) environments. - Crucial for directing API requests to the correct server. ``` -------------------------------- ### PEAK API Core Reference Sections Source: https://developers.peakaccount.com/reference/quotation Overview of the main sections available in the PEAK API CORE documentation. This includes guides for Contacts, Products, Expenses, and general API connection procedures. ```APIDOC API Reference: ## Guide * Overview (/reference/peak-open-api) * Contacts (/reference/contact-01) * Products (/reference/products-1) * Expenses (/reference/expense-1) ## การเชื่อมต่อ API และ URL * ขั้นตอนการเชื่อมต่อ API (/reference/overview-copy) * การใช้งาน Link URL สำหรับ UAT และ Production (/reference/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-link-url-%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A-uat-%E0%B9%81%E0%B8%A5%E0%B8%B0-production) ``` -------------------------------- ### Create Expense by Purchase Order (Shell) Source: https://developers.peakaccount.com/reference/post_api-v1-expenses-createbypurchaseorderallinone Example of how to create an expense by purchase order using a shell command. ```Shell curl -X POST https://api.peakaccount.com/api/v1/Expenses/createbypurchaseorderallinone \ -H "Content-Type: application/json" \ -d '{ "purchaseOrderId": "PO12345", "expenseDetails": { ... } }' ``` -------------------------------- ### API Connection and URL Usage Guide Source: https://developers.peakaccount.com/reference/post_api-v1-receipts-allinone Information regarding the process of connecting to the API and how to use specific URLs for User Acceptance Testing (UAT) and Production environments. ```APIDOC Section: การเชื่อมต่อ API และ URL (API Connection and URL) Sub-sections: 1. ขั้นตอนการเชื่อมต่อ API (API Connection Steps): - Provides a step-by-step guide on how to establish a connection with the Peak API. - Expected content includes authentication methods, required credentials, and initial setup procedures. 2. การใช้งาน Link URL สำหรับ UAT และ Production (Using Link URL for UAT and Production): - Details the specific URLs to be used for interacting with the API during UAT and when deployed to the Production environment. - Crucial for developers to target the correct environment for testing and live operations. ``` -------------------------------- ### Create Expense by Purchase Order (Ruby) Source: https://developers.peakaccount.com/reference/post_api-v1-expenses-createbypurchaseorderallinone Example of how to create an expense by purchase order using Ruby with the 'net/http' library. ```Ruby require 'net/http' require 'uri' require 'json' uri = URI.parse('https://api.peakaccount.com/api/v1/Expenses/createbypurchaseorderallinone') request = Net::HTTP::Post.new(uri.request_uri) request['Content-Type'] = 'application/json' request.body = { purchaseOrderId: 'PO12345', expenseDetails: { /* ... */ } }.to_json response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http| http.request(request) end puts "Response: #{response.body}" ``` -------------------------------- ### Products API Source: https://developers.peakaccount.com/reference/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-link-url-%E0%B8%AA%E0%B9%8D%E0%B8%B2%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A-uat-%E0%B9%81%E0%B8%A5%E0%B8%B0-production Endpoints for managing product information, including creation, retrieval, listing, editing, and unit adjustments. ```APIDOC POST /api/v1/Products Description: Create a new product. Parameters: (Request Body) - Product details. Returns: (JSON) - Details of the created product. ``` ```APIDOC GET /api/v1/Products Description: Retrieve a specific product by ID. Parameters: id: Product identifier (e.g., query parameter). Returns: (JSON) - Details of the requested product. ``` ```APIDOC GET /api/v1/Products/list Description: Retrieve a list of all products. Parameters: (Optional Query Parameters) - For filtering or pagination. Returns: (JSON) - An array of product objects. ``` ```APIDOC POST /api/v1/Products/edit Description: Update an existing product. Parameters: id: Product identifier to update. (Request Body) - Updated product details. Returns: (JSON) - Details of the updated product. ``` ```APIDOC POST /api/v1/Products/adjust Description: Adjust the stock or quantity of a product. Parameters: id: Product identifier. (Request Body) - Adjustment details (e.g., quantity change). Returns: (JSON) - Updated product details. ``` ```APIDOC GET /api/v1/Products/unit Description: Retrieve unit information for products. Parameters: (Optional Query Parameters) - To filter by product or unit type. Returns: (JSON) - Unit details for products. ``` -------------------------------- ### PeakAccount API: Daily Journals Source: https://developers.peakaccount.com/reference/get_api-v1-dailyjournals Documentation for the Daily Journals API endpoint, including GET and POST methods. Provides examples for various programming languages. ```APIDOC API Endpoint: /api/v1/DailyJournals Base URL: https://api.peakaccount.com Methods: GET /api/v1/DailyJournals Description: Retrieves a list of daily journals. Parameters: (No specific parameters mentioned in the provided text, assuming standard query parameters for filtering/pagination might apply) Returns: A list of daily journal objects. Example Usage: Shell: curl -X GET https://api.peakaccount.com/api/v1/DailyJournals Node: fetch('https://api.peakaccount.com/api/v1/DailyJournals') Ruby: Net::HTTP.get(URI('https://api.peakaccount.com/api/v1/DailyJournals')) PHP: file_get_contents('https://api.peakaccount.com/api/v1/DailyJournals') Python: import requests; response = requests.get('https://api.peakaccount.com/api/v1/DailyJournals') POST /api/v1/DailyJournals Description: Creates a new daily journal entry. Parameters: (Request body structure not specified, typically includes journal details) Returns: The created daily journal object or a success confirmation. Example Usage: Shell: curl -X POST -H "Content-Type: application/json" -d '{"date": "2023-10-27", "description": "Daily operations"}' https://api.peakaccount.com/api/v1/DailyJournals Node: fetch('https://api.peakaccount.com/api/v1/DailyJournals', { method: 'POST', body: JSON.stringify({ date: '2023-10-27', description: 'Daily operations' }), headers: {'Content-Type': 'application/json'} }) Ruby: uri = URI('https://api.peakaccount.com/api/v1/DailyJournals'); Net::HTTP.post_form(uri, {'date' => '2023-10-27', 'description' => 'Daily operations'}) PHP: $data = array('date' => '2023-10-27', 'description' => 'Daily operations'); $options = array('http' => array('header' => "Content-type: application/json", 'method' => 'POST', 'content' => json_encode($data))); $context = stream_context_create($options); file_get_contents('https://api.peakaccount.com/api/v1/DailyJournals', false, $context) Python: import requests; data = {'date': '2023-10-27', 'description': 'Daily operations'}; requests.post('https://api.peakaccount.com/api/v1/DailyJournals', json=data) Related Endpoints: - POST /api/v1/DailyJournals/queuepost: Queues a daily journal entry. - GET /api/v1/DailyJournals/accountcodeget: Retrieves account codes for daily journals. - POST /api/v1/DailyJournals/voidpost: Voids a daily journal entry. ``` -------------------------------- ### Expenses API Endpoint Source: https://developers.peakaccount.com/reference/get_api-v1-expenses This section details the GET endpoint for retrieving expenses. It provides example requests in multiple programming languages, demonstrating how to interact with the API to fetch expense data. ```APIDOC Expenses: GET https://api.peakaccount.com/api/v1/Expenses Description: Retrieves a list of expenses. Parameters: None Returns: A JSON array of expense objects. ``` ```Shell curl -X GET https://api.peakaccount.com/api/v1/Expenses ``` ```Node const axios = require('axios'); axios.get('https://api.peakaccount.com/api/v1/Expenses') .then(response => { console.log(response.data); }) .catch(error => { console.error(error); }); ``` ```Ruby require 'net/http' require 'uri' uri = URI.parse('https://api.peakaccount.com/api/v1/Expenses') response = Net::HTTP.get_response(uri) puts response.body ``` ```PHP ``` ```Python import requests url = 'https://api.peakaccount.com/api/v1/Expenses' response = requests.get(url) print(response.json()) ``` -------------------------------- ### GET /api/v1/DailyJournals Source: https://developers.peakaccount.com/reference/post_api-v1-tags Endpoint to retrieve daily journal entries. This is a GET request. ```APIDOC GET /api/v1/DailyJournalsget - Description: Retrieves daily journal entries. - Related Endpoints: post, queuepost, accountcodeget, voidpost ``` -------------------------------- ### GET /api/v1/DailyJournals/accountcodeget Source: https://developers.peakaccount.com/reference/post_api-v1-tags Endpoint to retrieve daily journal entries by account code. This is a GET request. ```APIDOC GET /api/v1/DailyJournals/accountcodeget - Description: Retrieves daily journal entries filtered by account code. - Related Endpoints: post, get, queuepost, voidpost ``` -------------------------------- ### API: Daily Journals - Get Source: https://developers.peakaccount.com/reference/post_api-v1-receipts-createbybillingnoteallinone Endpoint for retrieving daily journal entries. This is a GET request. ```APIDOC GET /api/v1/DailyJournalsget Description: Retrieves a list or specific details of daily journal entries from the system. Related Endpoints: - POST /api/v1/DailyJournalspost - POST /api/v1/DailyJournals/queuepost - POST /api/v1/DailyJournals/voidpost ``` -------------------------------- ### Get Products API Source: https://developers.peakaccount.com/reference/get_api-v1-products Retrieves a list of products from the API. This endpoint is available via GET request. ```APIDOC GET https://api.peakaccount.com/api/v1/Products Description: Retrieves a list of all products. Supported Languages: Shell, Node, Ruby, PHP, Python ``` -------------------------------- ### Services API Source: https://developers.peakaccount.com/reference/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-link-url-%E0%B8%AA%E0%B9%8D%E0%B8%B2%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A-uat-%E0%B9%81%E0%B8%A5%E0%B8%B0-production Endpoints for managing service offerings, including creation, retrieval, listing, editing, and unit information. ```APIDOC POST /api/v1/Services Description: Create a new service. Parameters: (Request Body) - Service details. Returns: (JSON) - Details of the created service. ``` ```APIDOC GET /api/v1/Services Description: Retrieve a specific service by ID. Parameters: id: Service identifier (e.g., query parameter). Returns: (JSON) - Details of the requested service. ``` ```APIDOC GET /api/v1/Services/list Description: Retrieve a list of all services. Parameters: (Optional Query Parameters) - For filtering or pagination. Returns: (JSON) - An array of service objects. ``` ```APIDOC POST /api/v1/Services/edit Description: Update an existing service. Parameters: id: Service identifier to update. (Request Body) - Updated service details. Returns: (JSON) - Details of the updated service. ``` ```APIDOC GET /api/v1/Services/unit Description: Retrieve unit information for services. Parameters: (Optional Query Parameters) - To filter by service or unit type. Returns: (JSON) - Unit details for services. ``` -------------------------------- ### PeakAccount API Endpoints Overview Source: https://developers.peakaccount.com/reference/post_api-v1-clienttoken Lists key API endpoints for managing billing, notes, expenses, tags, daily journals, and invitations. Each entry points to specific documentation for POST or GET operations. ```APIDOC BillingNotesExpenses: - POST /api/v1/BillingNotesExpenses/paidpaymentallinone - POST /api/v1/BillingNotesExpenses/voidpayment - POST /api/v1/BillingNotesExpenses/void Tags: - POST /api/v1/Tags - POST /api/v1/Tags/remove DailyJournals: - POST /api/v1/DailyJournals - GET /api/v1/DailyJournals - POST /api/v1/DailyJournals/queue - GET /api/v1/DailyJournals/accountcode - POST /api/v1/DailyJournals/void Invitation: - POST /api/v1/Invitation ``` -------------------------------- ### Get Invoices API Source: https://developers.peakaccount.com/reference/get_api-v1-invoices Retrieves a list of invoices from the PeakAccount system. This endpoint is available via a GET request. ```Shell curl -X GET "https://api.peakaccount.com/api/v1/Invoices" ``` ```Node const axios = require('axios'); axios.get('https://api.peakaccount.com/api/v1/Invoices') .then(response => { console.log(response.data); }) .catch(error => { console.error(error); }); ``` ```Ruby require 'net/http' require 'uri' uri = URI.parse('https://api.peakaccount.com/api/v1/Invoices') response = Net::HTTP.get_response(uri) puts response.body ``` ```PHP ``` ```Python import requests response = requests.get('https://api.peakaccount.com/api/v1/Invoices') print(response.json()) ``` -------------------------------- ### Environment URLs Source: https://developers.peakaccount.com/reference/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-link-url-%E0%B8%AA%E0%B9%8D%E0%B8%B2%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A-uat-%E0%B9%81%E0%B8%A5%E0%B8%B0-production Specifies the base URLs for accessing the API in different environments, crucial for development and production deployments. ```APIDOC UAT Environment URL: http://peakengineapidev.azurewebsites.net/api/v1 Purpose: For user acceptance testing and feature validation before production deployment. Production Environment URL: https://api.peakaccount.com/api/v1 Purpose: For live system access, supporting real users and business operations. ``` -------------------------------- ### Products API Source: https://developers.peakaccount.com/reference/post_api-v1-invitation Endpoints for managing product information, including creation, retrieval, listing, editing, and unit adjustments. ```APIDOC POST /api/v1/Products Description: Create a new product. Parameters: (Request Body) - Product details. Returns: (JSON) - Details of the created product. ``` ```APIDOC GET /api/v1/Products Description: Retrieve a specific product by ID. Parameters: id: Product identifier (e.g., query parameter). Returns: (JSON) - Details of the requested product. ``` ```APIDOC GET /api/v1/Products/list Description: Retrieve a list of all products. Parameters: (Optional Query Parameters) - For filtering or pagination. Returns: (JSON) - An array of product objects. ``` ```APIDOC POST /api/v1/Products/edit Description: Update an existing product. Parameters: id: Product identifier to update. (Request Body) - Updated product details. Returns: (JSON) - Details of the updated product. ``` ```APIDOC POST /api/v1/Products/adjust Description: Adjust the stock or quantity of a product. Parameters: id: Product identifier. (Request Body) - Adjustment details (e.g., quantity change). Returns: (JSON) - Updated product details. ``` ```APIDOC GET /api/v1/Products/unit Description: Retrieve unit information for products. Parameters: (Optional Query Parameters) - To filter by product or unit type. Returns: (JSON) - Unit details for products. ``` -------------------------------- ### API: Daily Journals - Get Account Code Source: https://developers.peakaccount.com/reference/post_api-v1-receipts-createbybillingnoteallinone Endpoint to retrieve account code information related to daily journals. This is a GET request. ```APIDOC GET /api/v1/DailyJournals/accountcodeget Description: Fetches account code details associated with daily journal entries, useful for financial reporting or reconciliation. Related Endpoints: - POST /api/v1/DailyJournalspost - GET /api/v1/DailyJournalsget ``` -------------------------------- ### Quotations API Source: https://developers.peakaccount.com/reference/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-link-url-%E0%B8%AA%E0%B9%8D%E0%B8%B2%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A-uat-%E0%B9%81%E0%B8%A5%E0%B8%B0-production Endpoints for managing quotations, including creation, retrieval, listing, editing, voiding, approving, and queue management. ```APIDOC POST /api/v1/Quotations Description: Create a new quotation. Parameters: (Request Body) - Quotation details. Returns: (JSON) - Details of the created quotation. ``` ```APIDOC GET /api/v1/Quotations Description: Retrieve a specific quotation by ID. Parameters: id: Quotation identifier (e.g., query parameter). Returns: (JSON) - Details of the requested quotation. ``` ```APIDOC POST /api/v1/Quotations/allinone Description: Create a quotation and perform related actions in a single call. Parameters: (Request Body) - Comprehensive quotation and related data. Returns: (JSON) - Result of the all-in-one operation. ``` ```APIDOC POST /api/v1/Quotations/queue Description: Add a quotation to a processing queue. Parameters: (Request Body) - Quotation data for queuing. Returns: (JSON) - Confirmation of queuing. ``` ```APIDOC GET /api/v1/Quotations/queue Description: Retrieve items from the quotation processing queue. Parameters: (Optional Query Parameters) - For filtering or status. Returns: (JSON) - List of queued quotation items. ``` ```APIDOC GET /api/v1/Quotations/list Description: Retrieve a list of all quotations. Parameters: (Optional Query Parameters) - For filtering or pagination. Returns: (JSON) - An array of quotation objects. ``` ```APIDOC POST /api/v1/Quotations/edit Description: Update an existing quotation. Parameters: id: Quotation identifier to update. (Request Body) - Updated quotation details. Returns: (JSON) - Details of the updated quotation. ``` ```APIDOC POST /api/v1/Quotations/void Description: Mark a quotation as void. Parameters: id: Quotation identifier to void. (Request Body) - Voiding reason (optional). Returns: (JSON) - Status of the void operation. ``` ```APIDOC POST /api/v1/Quotations/approve Description: Approve a quotation. Parameters: id: Quotation identifier to approve. Returns: (JSON) - Status of the approval operation. ``` -------------------------------- ### Products API Source: https://developers.peakaccount.com/reference/peak-open-api Endpoints for managing product information, including creation, retrieval, listing, editing, and unit adjustments. ```APIDOC POST /api/v1/Products Description: Create a new product. Parameters: (Request Body) - Product details. Returns: (JSON) - Details of the created product. ``` ```APIDOC GET /api/v1/Products Description: Retrieve a specific product by ID. Parameters: id: Product identifier (e.g., query parameter). Returns: (JSON) - Details of the requested product. ``` ```APIDOC GET /api/v1/Products/list Description: Retrieve a list of all products. Parameters: (Optional Query Parameters) - For filtering or pagination. Returns: (JSON) - An array of product objects. ``` ```APIDOC POST /api/v1/Products/edit Description: Update an existing product. Parameters: id: Product identifier to update. (Request Body) - Updated product details. Returns: (JSON) - Details of the updated product. ``` ```APIDOC POST /api/v1/Products/adjust Description: Adjust the stock or quantity of a product. Parameters: id: Product identifier. (Request Body) - Adjustment details (e.g., quantity change). Returns: (JSON) - Updated product details. ``` ```APIDOC GET /api/v1/Products/unit Description: Retrieve unit information for products. Parameters: (Optional Query Parameters) - To filter by product or unit type. Returns: (JSON) - Unit details for products. ``` -------------------------------- ### Edit Purchase Order API Example Source: https://developers.peakaccount.com/reference/post_api-v1-purchaseorders-edit Demonstrates how to edit a purchase order using the PeakAccount API. Examples are provided for Shell, Node.js, Ruby, PHP, and Python. ```Shell curl -X POST https://api.peakaccount.com/api/v1/PurchaseOrders/edit \ -H "Content-Type: application/json" \ -d '{ "orderId": "PO12345", "status": "Updated" }' ``` ```Node const axios = require('axios'); axios.post('https://api.peakaccount.com/api/v1/PurchaseOrders/edit', { orderId: 'PO12345', status: 'Updated' }) .then(response => { console.log('Success:', response.data); }) .catch(error => { console.error('Error:', error); }); ``` ```Ruby require 'net/http' require 'uri' require 'json' uri = URI.parse('https://api.peakaccount.com/api/v1/PurchaseOrders/edit') request = Net::HTTP::Post.new(uri) request['Content-Type'] = 'application/json' request.body = { orderId: 'PO12345', status: 'Updated' }.to_json response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request) end puts response.body ``` ```PHP 'PO12345', 'status' => 'Updated' ]); $ch = curl_init('https://api.peakaccount.com/api/v1/PurchaseOrders/edit'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json' ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } else { echo $response; } curl_close($ch); ?> ``` ```Python import requests import json url = 'https://api.peakaccount.com/api/v1/PurchaseOrders/edit' headers = {'Content-Type': 'application/json'} payload = { 'orderId': 'PO12345', 'status': 'Updated' } response = requests.post(url, headers=headers, data=json.dumps(payload)) if response.status_code == 200: print('Success:', response.json()) else: print('Error:', response.text) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.