![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /home/fdshops/public_html/public/docs/ |
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <title>POS API Documentation</title> <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet"> <link rel="stylesheet" href="../docs/css/theme-default.style.css" media="screen"> <link rel="stylesheet" href="../docs/css/theme-default.print.css" media="print"> <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script> <link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css"> <script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script> <style id="language-style"> /* starts out as display none and is replaced with js later */ body .content .bash-example code { display: none; } body .content .javascript-example code { display: none; } body .content .php-example code { display: none; } </style> <script src="../docs/js/theme-default-4.14.0.js"></script> </head> <body data-languages="["bash","javascript","php"]"> <a href="#" id="nav-button"> <span> MENU <img src="../docs/images/navbar.png" alt="navbar-image"/> </span> </a> <div class="tocify-wrapper"> <div class="lang-selector"> <button type="button" class="lang-button" data-language-name="bash">bash</button> <button type="button" class="lang-button" data-language-name="javascript">javascript</button> <button type="button" class="lang-button" data-language-name="php">php</button> </div> <div class="search"> <input type="text" class="search" id="input-search" placeholder="Search"> </div> <div id="toc"> <ul id="tocify-header-introduction" class="tocify-header"> <li class="tocify-item level-1" data-unique="introduction"> <a href="#introduction">Introduction</a> </li> </ul> <ul id="tocify-header-authenticating-requests" class="tocify-header"> <li class="tocify-item level-1" data-unique="authenticating-requests"> <a href="#authenticating-requests">Authenticating requests</a> </li> </ul> <ul id="tocify-header-attendance-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="attendance-management"> <a href="#attendance-management">Attendance management</a> </li> <ul id="tocify-subheader-attendance-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="attendance-management-GETconnector-api-get-attendance--user_id-"> <a href="#attendance-management-GETconnector-api-get-attendance--user_id-">Get Attendance</a> </li> <li class="tocify-item level-2" data-unique="attendance-management-POSTconnector-api-clock-in"> <a href="#attendance-management-POSTconnector-api-clock-in">Clock In</a> </li> <li class="tocify-item level-2" data-unique="attendance-management-POSTconnector-api-clock-out"> <a href="#attendance-management-POSTconnector-api-clock-out">Clock Out</a> </li> <li class="tocify-item level-2" data-unique="attendance-management-GETconnector-api-holidays"> <a href="#attendance-management-GETconnector-api-holidays">List Holidays</a> </li> </ul> </ul> <ul id="tocify-header-brand-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="brand-management"> <a href="#brand-management">Brand management</a> </li> <ul id="tocify-subheader-brand-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="brand-management-GETconnector-api-brand"> <a href="#brand-management-GETconnector-api-brand">List brands</a> </li> <li class="tocify-item level-2" data-unique="brand-management-GETconnector-api-brand--id-"> <a href="#brand-management-GETconnector-api-brand--id-">Get the specified brand</a> </li> </ul> </ul> <ul id="tocify-header-business-location-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="business-location-management"> <a href="#business-location-management">Business Location management</a> </li> <ul id="tocify-subheader-business-location-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="business-location-management-GETconnector-api-business-location"> <a href="#business-location-management-GETconnector-api-business-location">List business locations</a> </li> <li class="tocify-item level-2" data-unique="business-location-management-GETconnector-api-business-location--id-"> <a href="#business-location-management-GETconnector-api-business-location--id-">Get the specified business location</a> </li> </ul> </ul> <ul id="tocify-header-crm" class="tocify-header"> <li class="tocify-item level-1" data-unique="crm"> <a href="#crm">CRM</a> </li> <ul id="tocify-subheader-crm" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="crm-GETconnector-api-crm-follow-ups"> <a href="#crm-GETconnector-api-crm-follow-ups">List Follow ups</a> </li> <li class="tocify-item level-2" data-unique="crm-POSTconnector-api-crm-follow-ups"> <a href="#crm-POSTconnector-api-crm-follow-ups">Add follow up</a> </li> <li class="tocify-item level-2" data-unique="crm-GETconnector-api-crm-follow-ups--id-"> <a href="#crm-GETconnector-api-crm-follow-ups--id-">Get the specified followup</a> </li> <li class="tocify-item level-2" data-unique="crm-PUTconnector-api-crm-follow-ups--id-"> <a href="#crm-PUTconnector-api-crm-follow-ups--id-">Update follow up</a> </li> <li class="tocify-item level-2" data-unique="crm-GETconnector-api-crm-follow-up-resources"> <a href="#crm-GETconnector-api-crm-follow-up-resources">Get follow up resources</a> </li> <li class="tocify-item level-2" data-unique="crm-GETconnector-api-crm-leads"> <a href="#crm-GETconnector-api-crm-leads">List lead</a> </li> <li class="tocify-item level-2" data-unique="crm-POSTconnector-api-crm-call-logs"> <a href="#crm-POSTconnector-api-crm-call-logs">Save Call Logs</a> </li> </ul> </ul> <ul id="tocify-header-cash-register-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="cash-register-management"> <a href="#cash-register-management">Cash register management</a> </li> <ul id="tocify-subheader-cash-register-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="cash-register-management-GETconnector-api-cash-register"> <a href="#cash-register-management-GETconnector-api-cash-register">List Cash Registers</a> </li> <li class="tocify-item level-2" data-unique="cash-register-management-POSTconnector-api-cash-register"> <a href="#cash-register-management-POSTconnector-api-cash-register">Create Cash Register</a> </li> <li class="tocify-item level-2" data-unique="cash-register-management-GETconnector-api-cash-register--id-"> <a href="#cash-register-management-GETconnector-api-cash-register--id-">Get the specified Register</a> </li> </ul> </ul> <ul id="tocify-header-contact-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="contact-management"> <a href="#contact-management">Contact management</a> </li> <ul id="tocify-subheader-contact-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="contact-management-GETconnector-api-contactapi"> <a href="#contact-management-GETconnector-api-contactapi">List contact</a> </li> <li class="tocify-item level-2" data-unique="contact-management-POSTconnector-api-contactapi"> <a href="#contact-management-POSTconnector-api-contactapi">Create contact</a> </li> <li class="tocify-item level-2" data-unique="contact-management-GETconnector-api-contactapi--id-"> <a href="#contact-management-GETconnector-api-contactapi--id-">Get the specified contact</a> </li> <li class="tocify-item level-2" data-unique="contact-management-PUTconnector-api-contactapi--id-"> <a href="#contact-management-PUTconnector-api-contactapi--id-">Update contact</a> </li> <li class="tocify-item level-2" data-unique="contact-management-POSTconnector-api-contactapi-payment"> <a href="#contact-management-POSTconnector-api-contactapi-payment">Contact payment</a> </li> </ul> </ul> <ul id="tocify-header-endpoints" class="tocify-header"> <li class="tocify-item level-1" data-unique="endpoints"> <a href="#endpoints">Endpoints</a> </li> <ul id="tocify-subheader-endpoints" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="endpoints-POSToauth-token"> <a href="#endpoints-POSToauth-token">Authorize a client to access the user's account.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GEToauth-authorize"> <a href="#endpoints-GEToauth-authorize">Authorize a client to access the user's account.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-POSToauth-token-refresh"> <a href="#endpoints-POSToauth-token-refresh">Get a fresh transient token cookie for the authenticated user.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-POSToauth-authorize"> <a href="#endpoints-POSToauth-authorize">Approve the authorization request.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-DELETEoauth-authorize"> <a href="#endpoints-DELETEoauth-authorize">Deny the authorization request.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GEToauth-tokens"> <a href="#endpoints-GEToauth-tokens">Get all of the authorized tokens for the authenticated user.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-DELETEoauth-tokens--token_id-"> <a href="#endpoints-DELETEoauth-tokens--token_id-">Delete the given token.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GEToauth-clients"> <a href="#endpoints-GEToauth-clients">Get all of the clients for the authenticated user.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-POSToauth-clients"> <a href="#endpoints-POSToauth-clients">Store a new client.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-PUToauth-clients--client_id-"> <a href="#endpoints-PUToauth-clients--client_id-">Update the given client.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-DELETEoauth-clients--client_id-"> <a href="#endpoints-DELETEoauth-clients--client_id-">Delete the given client.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GEToauth-scopes"> <a href="#endpoints-GEToauth-scopes">Get all of the available scopes for the application.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GEToauth-personal-access-tokens"> <a href="#endpoints-GEToauth-personal-access-tokens">Get all of the personal access tokens for the authenticated user.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-POSToauth-personal-access-tokens"> <a href="#endpoints-POSToauth-personal-access-tokens">Create a new personal access token for the user.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-DELETEoauth-personal-access-tokens--token_id-"> <a href="#endpoints-DELETEoauth-personal-access-tokens--token_id-">Delete the given token.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-api-payment-accounts"> <a href="#endpoints-GETconnector-api-payment-accounts">List payment accounts</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-api-payment-methods"> <a href="#endpoints-GETconnector-api-payment-methods">List payment methods</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-api-business-details"> <a href="#endpoints-GETconnector-api-business-details">Get business details</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-api-profit-loss-report"> <a href="#endpoints-GETconnector-api-profit-loss-report">Get profit and loss report</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-api-product-stock-report"> <a href="#endpoints-GETconnector-api-product-stock-report">Get product current stock</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-api-notifications"> <a href="#endpoints-GETconnector-api-notifications">Get notifications</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-api-get-location"> <a href="#endpoints-GETconnector-api-get-location">Get location details from coordinates</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-install"> <a href="#endpoints-GETconnector-install">Install</a> </li> <li class="tocify-item level-2" data-unique="endpoints-POSTconnector-install"> <a href="#endpoints-POSTconnector-install">Installing Connector Module</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-install-uninstall"> <a href="#endpoints-GETconnector-install-uninstall">Uninstall</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-install-update"> <a href="#endpoints-GETconnector-install-update">update module</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-api"> <a href="#endpoints-GETconnector-api">Display a listing of the resource.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-client"> <a href="#endpoints-GETconnector-client">Display a listing of the resource.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-client-create"> <a href="#endpoints-GETconnector-client-create">Show the form for creating a new resource.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-POSTconnector-client"> <a href="#endpoints-POSTconnector-client">Store a newly created resource in storage.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-client--id-"> <a href="#endpoints-GETconnector-client--id-">Show the specified resource.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-client--client--edit"> <a href="#endpoints-GETconnector-client--client--edit">Show the form for editing the specified resource.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-PUTconnector-client--id-"> <a href="#endpoints-PUTconnector-client--id-">Update the specified resource in storage.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-DELETEconnector-client--id-"> <a href="#endpoints-DELETEconnector-client--id-">Remove the specified resource from storage.</a> </li> <li class="tocify-item level-2" data-unique="endpoints-GETconnector-regenerate"> <a href="#endpoints-GETconnector-regenerate">GET connector/regenerate</a> </li> </ul> </ul> <ul id="tocify-header-expense-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="expense-management"> <a href="#expense-management">Expense management</a> </li> <ul id="tocify-subheader-expense-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="expense-management-GETconnector-api-expense"> <a href="#expense-management-GETconnector-api-expense">List expenses</a> </li> <li class="tocify-item level-2" data-unique="expense-management-POSTconnector-api-expense"> <a href="#expense-management-POSTconnector-api-expense">Create expense / expense refund</a> </li> <li class="tocify-item level-2" data-unique="expense-management-GETconnector-api-expense--id-"> <a href="#expense-management-GETconnector-api-expense--id-">Get the specified expense / expense refund</a> </li> <li class="tocify-item level-2" data-unique="expense-management-PUTconnector-api-expense--id-"> <a href="#expense-management-PUTconnector-api-expense--id-">Update expense / expense refund</a> </li> <li class="tocify-item level-2" data-unique="expense-management-GETconnector-api-expense-refund"> <a href="#expense-management-GETconnector-api-expense-refund">List expense refunds</a> </li> <li class="tocify-item level-2" data-unique="expense-management-GETconnector-api-expense-categories"> <a href="#expense-management-GETconnector-api-expense-categories">List expense categories</a> </li> </ul> </ul> <ul id="tocify-header-field-force" class="tocify-header"> <li class="tocify-item level-1" data-unique="field-force"> <a href="#field-force">Field Force</a> </li> <ul id="tocify-subheader-field-force" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="field-force-GETconnector-api-field-force"> <a href="#field-force-GETconnector-api-field-force">List visits</a> </li> <li class="tocify-item level-2" data-unique="field-force-POSTconnector-api-field-force-create"> <a href="#field-force-POSTconnector-api-field-force-create">Create Visit</a> </li> <li class="tocify-item level-2" data-unique="field-force-POSTconnector-api-field-force-update-visit-status--id-"> <a href="#field-force-POSTconnector-api-field-force-update-visit-status--id-">Update Visit status</a> </li> </ul> </ul> <ul id="tocify-header-new-end-points" class="tocify-header"> <li class="tocify-item level-1" data-unique="new-end-points"> <a href="#new-end-points">New end points</a> </li> <ul id="tocify-subheader-new-end-points" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="new-end-points-GETconnector-api-new_product"> <a href="#new-end-points-GETconnector-api-new_product">New List products</a> </li> <li class="tocify-item level-2" data-unique="new-end-points-GETconnector-api-new_sell"> <a href="#new-end-points-GETconnector-api-new_sell">New List sells</a> </li> <li class="tocify-item level-2" data-unique="new-end-points-GETconnector-api-new_contactapi"> <a href="#new-end-points-GETconnector-api-new_contactapi">New List contact</a> </li> </ul> </ul> <ul id="tocify-header-product-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="product-management"> <a href="#product-management">Product management</a> </li> <ul id="tocify-subheader-product-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="product-management-GETconnector-api-product"> <a href="#product-management-GETconnector-api-product">List products</a> </li> <li class="tocify-item level-2" data-unique="product-management-GETconnector-api-product--id-"> <a href="#product-management-GETconnector-api-product--id-">Get the specified product</a> </li> <li class="tocify-item level-2" data-unique="product-management-GETconnector-api-selling-price-group"> <a href="#product-management-GETconnector-api-selling-price-group">List Selling Price Group</a> </li> <li class="tocify-item level-2" data-unique="product-management-GETconnector-api-variation--id--"> <a href="#product-management-GETconnector-api-variation--id--">List Variations</a> </li> </ul> </ul> <ul id="tocify-header-sales-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="sales-management"> <a href="#sales-management">Sales management</a> </li> <ul id="tocify-subheader-sales-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="sales-management-GETconnector-api-sell"> <a href="#sales-management-GETconnector-api-sell">List sells</a> </li> <li class="tocify-item level-2" data-unique="sales-management-POSTconnector-api-sell"> <a href="#sales-management-POSTconnector-api-sell">Create sell</a> </li> <li class="tocify-item level-2" data-unique="sales-management-GETconnector-api-sell--id-"> <a href="#sales-management-GETconnector-api-sell--id-">Get the specified sell</a> </li> <li class="tocify-item level-2" data-unique="sales-management-PUTconnector-api-sell--id-"> <a href="#sales-management-PUTconnector-api-sell--id-">Update sell</a> </li> <li class="tocify-item level-2" data-unique="sales-management-DELETEconnector-api-sell--id-"> <a href="#sales-management-DELETEconnector-api-sell--id-">Delete Sell</a> </li> <li class="tocify-item level-2" data-unique="sales-management-POSTconnector-api-sell-return"> <a href="#sales-management-POSTconnector-api-sell-return">Add Sell Return</a> </li> <li class="tocify-item level-2" data-unique="sales-management-GETconnector-api-list-sell-return"> <a href="#sales-management-GETconnector-api-list-sell-return">List Sell Return</a> </li> <li class="tocify-item level-2" data-unique="sales-management-POSTconnector-api-update-shipping-status"> <a href="#sales-management-POSTconnector-api-update-shipping-status">Update shipping status</a> </li> </ul> </ul> <ul id="tocify-header-superadmin" class="tocify-header"> <li class="tocify-item level-1" data-unique="superadmin"> <a href="#superadmin">Superadmin</a> </li> <ul id="tocify-subheader-superadmin" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="superadmin-GETconnector-api-active-subscription"> <a href="#superadmin-GETconnector-api-active-subscription">If SaaS installed get active subscription details, else return the enabled modules details in package_details</a> </li> <li class="tocify-item level-2" data-unique="superadmin-GETconnector-api-packages"> <a href="#superadmin-GETconnector-api-packages">Get Superadmin Package List</a> </li> </ul> </ul> <ul id="tocify-header-table-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="table-management"> <a href="#table-management">Table management</a> </li> <ul id="tocify-subheader-table-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="table-management-GETconnector-api-table"> <a href="#table-management-GETconnector-api-table">List tables</a> </li> <li class="tocify-item level-2" data-unique="table-management-GETconnector-api-table--id-"> <a href="#table-management-GETconnector-api-table--id-">Show the specified table</a> </li> </ul> </ul> <ul id="tocify-header-tax-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="tax-management"> <a href="#tax-management">Tax management</a> </li> <ul id="tocify-subheader-tax-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="tax-management-GETconnector-api-tax"> <a href="#tax-management-GETconnector-api-tax">List taxes</a> </li> <li class="tocify-item level-2" data-unique="tax-management-GETconnector-api-tax--id-"> <a href="#tax-management-GETconnector-api-tax--id-">Get the specified tax</a> </li> </ul> </ul> <ul id="tocify-header-taxonomy-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="taxonomy-management"> <a href="#taxonomy-management">Taxonomy management</a> </li> <ul id="tocify-subheader-taxonomy-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="taxonomy-management-GETconnector-api-taxonomy"> <a href="#taxonomy-management-GETconnector-api-taxonomy">List taxonomy</a> </li> <li class="tocify-item level-2" data-unique="taxonomy-management-GETconnector-api-taxonomy--id-"> <a href="#taxonomy-management-GETconnector-api-taxonomy--id-">Get the specified taxonomy</a> </li> </ul> </ul> <ul id="tocify-header-types-of-service-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="types-of-service-management"> <a href="#types-of-service-management">Types of service management</a> </li> <ul id="tocify-subheader-types-of-service-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="types-of-service-management-GETconnector-api-types-of-service"> <a href="#types-of-service-management-GETconnector-api-types-of-service">List types of service</a> </li> <li class="tocify-item level-2" data-unique="types-of-service-management-GETconnector-api-types-of-service--id-"> <a href="#types-of-service-management-GETconnector-api-types-of-service--id-">Get the specified types of service</a> </li> </ul> </ul> <ul id="tocify-header-unit-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="unit-management"> <a href="#unit-management">Unit management</a> </li> <ul id="tocify-subheader-unit-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="unit-management-GETconnector-api-unit"> <a href="#unit-management-GETconnector-api-unit">List units</a> </li> <li class="tocify-item level-2" data-unique="unit-management-GETconnector-api-unit--id-"> <a href="#unit-management-GETconnector-api-unit--id-">Get the specified unit</a> </li> </ul> </ul> <ul id="tocify-header-user-management" class="tocify-header"> <li class="tocify-item level-1" data-unique="user-management"> <a href="#user-management">User management</a> </li> <ul id="tocify-subheader-user-management" class="tocify-subheader"> <li class="tocify-item level-2" data-unique="user-management-GETconnector-api-user-loggedin"> <a href="#user-management-GETconnector-api-user-loggedin">Get the loggedin user details.</a> </li> <li class="tocify-item level-2" data-unique="user-management-POSTconnector-api-user-registration"> <a href="#user-management-POSTconnector-api-user-registration">Register User</a> </li> <li class="tocify-item level-2" data-unique="user-management-GETconnector-api-user"> <a href="#user-management-GETconnector-api-user">List users</a> </li> <li class="tocify-item level-2" data-unique="user-management-GETconnector-api-user--id-"> <a href="#user-management-GETconnector-api-user--id-">Get the specified user</a> </li> <li class="tocify-item level-2" data-unique="user-management-POSTconnector-api-update-password"> <a href="#user-management-POSTconnector-api-update-password">Update user password.</a> </li> <li class="tocify-item level-2" data-unique="user-management-POSTconnector-api-forget-password"> <a href="#user-management-POSTconnector-api-forget-password">Recover forgotten password.</a> </li> </ul> </ul> </div> <ul class="toc-footer" id="toc-footer"> <li style="padding-bottom: 5px;"><a href="../docs/collection.json">View Postman collection</a></li> <li style="padding-bottom: 5px;"><a href="../docs/openapi.yaml">View OpenAPI spec</a></li> <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li> </ul> <ul class="toc-footer" id="last-updated"> <li>Last updated: March 10, 2023</li> </ul> </div> <div class="page-wrapper"> <div class="dark-box"></div> <div class="content"> <h1 id="introduction">Introduction</h1> <p>POS API Documentation</p> <aside> <strong>Base URL</strong>: <code>http://pos.test/</code> </aside> <p>This documentation aims to provide all the information you need to work with our API.</p> <aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile). You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside> <h1 id="authenticating-requests">Authenticating requests</h1> <p>This API is authenticated by sending an <strong><code>Authorization</code></strong> header with the value <strong><code>"Bearer {access_token}"</code></strong>.</p> <p>All authenticated endpoints are marked with a <code>requires authentication</code> badge in the documentation below.</p> <p><strong>Getting access_token</strong></p><ol><li><strong>Get client_id & client_secret: </strong>Login to your account. Go to Connector > Clients, click on Create Client button.</li><li><strong>Requesting Tokens: </strong>Send request with client_id, client_secret, username & password as given in <a href="https://laravel.com/docs/9.x/passport#requesting-password-grant-tokens" target="_blank">laravel documentation</a>. In response, you get access_token</li></ol> <h1 id="attendance-management">Attendance management</h1> <h2 id="attendance-management-GETconnector-api-get-attendance--user_id-">Get Attendance</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-get-attendance--user_id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/get-attendance/1" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/get-attendance/1" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/get-attendance/1', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-get-attendance--user_id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 4, "user_id": 1, "business_id": 1, "clock_in_time": "2020-09-12 13:13:00", "clock_out_time": "2020-09-12 13:15:00", "essentials_shift_id": 3, "ip_address": null, "clock_in_note": "test clock in from api", "clock_out_note": "test clock out from api", "created_at": "2020-09-12 13:14:39", "updated_at": "2020-09-12 13:15:39" } }</code> </pre> </span> <span id="execution-results-GETconnector-api-get-attendance--user_id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-get-attendance--user_id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-get-attendance--user_id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-get-attendance--user_id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-get-attendance--user_id-"></code></pre> </span> <form id="form-GETconnector-api-get-attendance--user_id-" data-method="GET" data-path="connector/api/get-attendance/{user_id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-get-attendance--user_id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/get-attendance/{user_id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-get-attendance--user_id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-get-attendance--user_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-get-attendance--user_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>string</small> <input type="text" style="display: none" name="user_id" data-endpoint="GETconnector-api-get-attendance--user_id-" value="1" data-component="url"> <br> <p>id of the user Example: <code>1</code></p> </div> </form> <h2 id="attendance-management-POSTconnector-api-clock-in">Clock In</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <p>[User must have "essentials.allow_users_for_attendance_from_api" permission to Clock in]</p> <span id="example-requests-POSTconnector-api-clock-in"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/clock-in" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"user_id\": 1, \"clock_in_time\": \"2000-06-13 13:13:00\", \"clock_in_note\": \"sequi\", \"ip_address\": \"quidem\", \"latitude\": \"explicabo\", \"longitude\": \"repudiandae\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/clock-in" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 1, "clock_in_time": "2000-06-13 13:13:00", "clock_in_note": "sequi", "ip_address": "quidem", "latitude": "explicabo", "longitude": "repudiandae" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/clock-in', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 1, 'clock_in_time' => '2000-06-13 13:13:00', 'clock_in_note' => 'sequi', 'ip_address' => 'quidem', 'latitude' => 'explicabo', 'longitude' => 'repudiandae', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-clock-in"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "success": true, "msg": "Clocked In successfully", "type": "clock_in" }</code> </pre> </span> <span id="execution-results-POSTconnector-api-clock-in" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-clock-in"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-clock-in" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-clock-in" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-clock-in"></code></pre> </span> <form id="form-POSTconnector-api-clock-in" data-method="POST" data-path="connector/api/clock-in" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-clock-in', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/clock-in</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-clock-in" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-clock-in" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-clock-in" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>integer</small> <input type="number" style="display: none" name="user_id" data-endpoint="POSTconnector-api-clock-in" value="1" data-component="body"> <br> <p>id of the user Example: <code>1</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>clock_in_time</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="clock_in_time" data-endpoint="POSTconnector-api-clock-in" value="2000-06-13 13:13:00" data-component="body"> <br> <p>Clock in time.If not given current date time will be used Fromat: Y-m-d H:i:s Example: <code>2000-06-13 13:13:00</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>clock_in_note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="clock_in_note" data-endpoint="POSTconnector-api-clock-in" value="sequi" data-component="body"> <br> <p>Clock in note. Example: <code>sequi</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>ip_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="ip_address" data-endpoint="POSTconnector-api-clock-in" value="quidem" data-component="body"> <br> <p>IP address. Example: <code>quidem</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>latitude</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="latitude" data-endpoint="POSTconnector-api-clock-in" value="explicabo" data-component="body"> <br> <p>Latitude of the clock in location. Example: <code>explicabo</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>longitude</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="longitude" data-endpoint="POSTconnector-api-clock-in" value="repudiandae" data-component="body"> <br> <p>Longitude of the clock in location. Example: <code>repudiandae</code></p> </div> </form> <h2 id="attendance-management-POSTconnector-api-clock-out">Clock Out</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <p>[User must have "essentials.allow_users_for_attendance_from_api" permission to Clock out]</p> <span id="example-requests-POSTconnector-api-clock-out"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/clock-out" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"user_id\": 1, \"clock_out_time\": \"2000-06-13 13:13:00\", \"clock_out_note\": \"cumque\", \"latitude\": \"voluptates\", \"longitude\": \"delectus\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/clock-out" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 1, "clock_out_time": "2000-06-13 13:13:00", "clock_out_note": "cumque", "latitude": "voluptates", "longitude": "delectus" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/clock-out', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 1, 'clock_out_time' => '2000-06-13 13:13:00', 'clock_out_note' => 'cumque', 'latitude' => 'voluptates', 'longitude' => 'delectus', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-clock-out"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "success": true, "msg": "Clocked Out successfully", "type": "clock_out" }</code> </pre> </span> <span id="execution-results-POSTconnector-api-clock-out" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-clock-out"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-clock-out" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-clock-out" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-clock-out"></code></pre> </span> <form id="form-POSTconnector-api-clock-out" data-method="POST" data-path="connector/api/clock-out" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-clock-out', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/clock-out</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-clock-out" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-clock-out" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-clock-out" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>integer</small> <input type="number" style="display: none" name="user_id" data-endpoint="POSTconnector-api-clock-out" value="1" data-component="body"> <br> <p>id of the user Example: <code>1</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>clock_out_time</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="clock_out_time" data-endpoint="POSTconnector-api-clock-out" value="2000-06-13 13:13:00" data-component="body"> <br> <p>Clock out time.If not given current date time will be used Fromat: Y-m-d H:i:s Example: <code>2000-06-13 13:13:00</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>clock_out_note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="clock_out_note" data-endpoint="POSTconnector-api-clock-out" value="cumque" data-component="body"> <br> <p>Clock out note. Example: <code>cumque</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>latitude</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="latitude" data-endpoint="POSTconnector-api-clock-out" value="voluptates" data-component="body"> <br> <p>Latitude of the clock out location. Example: <code>voluptates</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>longitude</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="longitude" data-endpoint="POSTconnector-api-clock-out" value="delectus" data-component="body"> <br> <p>Longitude of the clock out location. Example: <code>delectus</code></p> </div> </form> <h2 id="attendance-management-GETconnector-api-holidays">List Holidays</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-holidays"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/holidays?location_id=1&start_date=2020-06-25&end_date=2020-06-25" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/holidays" ); const params = { "location_id": "1", "start_date": "2020-06-25", "end_date": "2020-06-25", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/holidays', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'location_id' => '1', 'start_date' => '2020-06-25', 'end_date' => '2020-06-25', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-holidays"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 2, "name": "Independence Day", "start_date": "2020-08-15", "end_date": "2020-09-15", "business_id": 1, "location_id": null, "note": "test holiday", "created_at": "2020-09-15 11:25:56", "updated_at": "2020-09-15 11:25:56" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-holidays" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-holidays"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-holidays" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-holidays" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-holidays"></code></pre> </span> <form id="form-GETconnector-api-holidays" data-method="GET" data-path="connector/api/holidays" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-holidays', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/holidays</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-holidays" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-holidays" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-holidays" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-holidays" value="1" data-component="query"> <br> <p>id of the location Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-holidays" value="2020-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2020-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-holidays" value="2020-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2020-06-25</code></p> </div> </form> <h1 id="brand-management">Brand management</h1> <h2 id="brand-management-GETconnector-api-brand">List brands</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-brand"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/brand" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/brand" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/brand', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-brand"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "name": "Levis", "description": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 21:19:47", "updated_at": "2018-01-03 21:19:47" }, { "id": 2, "business_id": 1, "name": "Espirit", "description": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 21:19:58", "updated_at": "2018-01-03 21:19:58" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-brand" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-brand"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-brand" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-brand" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-brand"></code></pre> </span> <form id="form-GETconnector-api-brand" data-method="GET" data-path="connector/api/brand" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-brand', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/brand</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-brand" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-brand" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-brand" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="brand-management-GETconnector-api-brand--id-">Get the specified brand</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-brand--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/brand/modi" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/brand/modi" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/brand/modi', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-brand--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "name": "Levis", "description": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 21:19:47", "updated_at": "2018-01-03 21:19:47" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-brand--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-brand--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-brand--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-brand--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-brand--id-"></code></pre> </span> <form id="form-GETconnector-api-brand--id-" data-method="GET" data-path="connector/api/brand/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-brand--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/brand/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-brand--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-brand--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-brand--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-brand--id-" value="modi" data-component="url"> <br> <p>The ID of the brand. Example: <code>modi</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>brand</code></b> <small>string</small> <input type="text" style="display: none" name="brand" data-endpoint="GETconnector-api-brand--id-" value="1" data-component="url"> <br> <p>comma separated ids of the brands Example: <code>1</code></p> </div> </form> <h1 id="business-location-management">Business Location management</h1> <h2 id="business-location-management-GETconnector-api-business-location">List business locations</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-business-location"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/business-location" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/business-location" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/business-location', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-business-location"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "location_id": null, "name": "Awesome Shop", "landmark": "Linking Street", "country": "USA", "state": "Arizona", "city": "Phoenix", "zip_code": "85001", "invoice_scheme_id": 1, "invoice_layout_id": 1, "selling_price_group_id": null, "print_receipt_on_invoice": 1, "receipt_printer_type": "browser", "printer_id": null, "mobile": null, "alternate_number": null, "email": null, "website": null, "featured_products": [ "5", "71" ], "is_active": 1, "payment_methods": [ { "name": "cash", "label": "Cash", "account_id": "1" }, { "name": "card", "label": "Card", "account_id": null }, { "name": "cheque", "label": "Cheque", "account_id": null }, { "name": "bank_transfer", "label": "Bank Transfer", "account_id": null }, { "name": "other", "label": "Other", "account_id": null }, { "name": "custom_pay_1", "label": "Custom Payment 1", "account_id": null }, { "name": "custom_pay_2", "label": "Custom Payment 2", "account_id": null }, { "name": "custom_pay_3", "label": "Custom Payment 3", "account_id": null } ], "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2018-01-04 02:15:20", "updated_at": "2020-06-05 00:56:54" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-business-location" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-business-location"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-business-location" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-business-location" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-business-location"></code></pre> </span> <form id="form-GETconnector-api-business-location" data-method="GET" data-path="connector/api/business-location" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-business-location', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/business-location</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-business-location" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-business-location" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-business-location" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="business-location-management-GETconnector-api-business-location--id-">Get the specified business location</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-business-location--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/business-location/1" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/business-location/1" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/business-location/1', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-business-location--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "location_id": null, "name": "Awesome Shop", "landmark": "Linking Street", "country": "USA", "state": "Arizona", "city": "Phoenix", "zip_code": "85001", "invoice_scheme_id": 1, "invoice_layout_id": 1, "selling_price_group_id": null, "print_receipt_on_invoice": 1, "receipt_printer_type": "browser", "printer_id": null, "mobile": null, "alternate_number": null, "email": null, "website": null, "featured_products": [ "5", "71" ], "is_active": 1, "payment_methods": [ { "name": "cash", "label": "Cash", "account_id": "1" }, { "name": "card", "label": "Card", "account_id": null }, { "name": "cheque", "label": "Cheque", "account_id": null }, { "name": "bank_transfer", "label": "Bank Transfer", "account_id": null }, { "name": "other", "label": "Other", "account_id": null }, { "name": "custom_pay_1", "label": "Custom Payment 1", "account_id": null }, { "name": "custom_pay_2", "label": "Custom Payment 2", "account_id": null }, { "name": "custom_pay_3", "label": "Custom Payment 3", "account_id": null } ], "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2018-01-04 02:15:20", "updated_at": "2020-06-05 00:56:54" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-business-location--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-business-location--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-business-location--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-business-location--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-business-location--id-"></code></pre> </span> <form id="form-GETconnector-api-business-location--id-" data-method="GET" data-path="connector/api/business-location/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-business-location--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/business-location/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-business-location--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-business-location--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-business-location--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>integer</small> <input type="number" style="display: none" name="id" data-endpoint="GETconnector-api-business-location--id-" value="1" data-component="url"> <br> <p>The ID of the business location. Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location</code></b> <small>string</small> <input type="text" style="display: none" name="location" data-endpoint="GETconnector-api-business-location--id-" value="1" data-component="url"> <br> <p>comma separated ids of the business location Example: <code>1</code></p> </div> </form> <h1 id="crm">CRM</h1> <h2 id="crm-GETconnector-api-crm-follow-ups">List Follow ups</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-crm-follow-ups"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/crm/follow-ups?start_date=2020-12-16&end_date=2020-12-16&status=aspernatur&follow_up_type=repellat&followup_category_id=non&order_by=start_datetime&direction=desc&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/crm/follow-ups" ); const params = { "start_date": "2020-12-16", "end_date": "2020-12-16", "status": "aspernatur", "follow_up_type": "repellat", "followup_category_id": "non", "order_by": "start_datetime", "direction": "desc", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/crm/follow-ups', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'start_date' => '2020-12-16', 'end_date' => '2020-12-16', 'status' => 'aspernatur', 'follow_up_type' => 'repellat', 'followup_category_id' => 'non', 'order_by' => 'start_datetime', 'direction' => 'desc', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-crm-follow-ups"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "contact_id": 50, "title": "Test Follow up", "status": "scheduled", "start_datetime": "2020-12-16 15:15:00", "end_datetime": "2020-12-16 15:15:00", "description": "<p>tst</p>", "schedule_type": "call", "allow_notification": 0, "notify_via": { "sms": 0, "mail": 1 }, "notify_before": null, "notify_type": "minute", "created_by": 1, "followup_additional_info": null, "created_at": "2020-12-16 03:15:23", "updated_at": "2020-12-16 15:46:34", "customer": { "id": 50, "business_id": 1, "type": "lead", "supplier_business_name": null, "name": " Lead 4 ", "prefix": null, "first_name": "Lead 4", "middle_name": null, "last_name": null, "email": null, "contact_id": "CO0011", "contact_status": "active", "tax_number": null, "city": null, "state": null, "country": null, "address_line_1": null, "address_line_2": null, "zip_code": null, "dob": null, "mobile": "234567", "landline": null, "alternate_number": null, "pay_term_number": null, "pay_term_type": null, "credit_limit": null, "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 0, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": "55", "crm_life_stage": "62", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "deleted_at": null, "created_at": "2020-12-15 23:14:48", "updated_at": "2021-01-07 15:32:52", "remember_token": null, "password": null } }, { "id": 2, "business_id": 1, "contact_id": 50, "title": "Test Follow up 1", "status": "completed", "start_datetime": "2020-12-16 15:46:00", "end_datetime": "2020-12-16 15:46:00", "description": "<p>Test Follow up</p>", "schedule_type": "call", "allow_notification": 0, "notify_via": { "sms": 0, "mail": 1 }, "notify_before": null, "notify_type": "minute", "created_by": 1, "followup_additional_info": null, "created_at": "2020-12-16 15:46:57", "updated_at": "2020-12-17 10:24:11", "customer": { "id": 50, "business_id": 1, "type": "lead", "supplier_business_name": null, "name": " Lead 4 ", "prefix": null, "first_name": "Lead 4", "middle_name": null, "last_name": null, "email": null, "contact_id": "CO0011", "contact_status": "active", "tax_number": null, "city": null, "state": null, "country": null, "address_line_1": null, "address_line_2": null, "zip_code": null, "dob": null, "mobile": "234567", "landline": null, "alternate_number": null, "pay_term_number": null, "pay_term_type": null, "credit_limit": null, "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 0, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": "55", "crm_life_stage": "62", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "deleted_at": null, "created_at": "2020-12-15 23:14:48", "updated_at": "2021-01-07 15:32:52", "remember_token": null, "password": null } } ], "links": { "first": "http://local.pos.com/connector/api/crm/follow-ups?page=1", "last": "http://local.pos.com/connector/api/crm/follow-ups?page=21", "prev": null, "next": "http://local.pos.com/connector/api/crm/follow-ups?page=2" }, "meta": { "current_page": 1, "from": 1, "last_page": 21, "path": "http://local.pos.com/connector/api/crm/follow-ups", "per_page": "2", "to": 2, "total": 42 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-crm-follow-ups" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-crm-follow-ups"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-crm-follow-ups" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-crm-follow-ups" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-crm-follow-ups"></code></pre> </span> <form id="form-GETconnector-api-crm-follow-ups" data-method="GET" data-path="connector/api/crm/follow-ups" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-crm-follow-ups', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/crm/follow-ups</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-crm-follow-ups" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-crm-follow-ups" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-crm-follow-ups" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-crm-follow-ups" value="2020-12-16" data-component="query"> <br> <p>format: Y-m-d (Ex: 2020-12-16) Example: <code>2020-12-16</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-crm-follow-ups" value="2020-12-16" data-component="query"> <br> <p>format: Y-m-d (Ex: 2020-12-16) Example: <code>2020-12-16</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="GETconnector-api-crm-follow-ups" value="aspernatur" data-component="query"> <br> <p>filter the result through status, get status from getFollowUpResources->statuses Example: <code>aspernatur</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>follow_up_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="follow_up_type" data-endpoint="GETconnector-api-crm-follow-ups" value="repellat" data-component="query"> <br> <p>filter the result through follow_up_type, get follow_up_type from getFollowUpResources->follow_up_types Example: <code>repellat</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>followup_category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="followup_category_id" data-endpoint="GETconnector-api-crm-follow-ups" value="non" data-component="query"> <br> <p>filter the result through followup_category_id Example: <code>non</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_by" data-endpoint="GETconnector-api-crm-follow-ups" value="start_datetime" data-component="query"> <br> <p>Column name to sort the result, Column: start_datetime Example: <code>start_datetime</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>direction</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="direction" data-endpoint="GETconnector-api-crm-follow-ups" value="desc" data-component="query"> <br> <p>Direction to sort the result, Required if using 'order_by', direction: desc, asc Example: <code>desc</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-crm-follow-ups" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h2 id="crm-POSTconnector-api-crm-follow-ups">Add follow up</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-crm-follow-ups"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/crm/follow-ups" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"title\": \"Meeting with client\", \"contact_id\": 2, \"description\": \"Vero voluptates dolore et assumenda voluptas.\", \"schedule_type\": \"quas\", \"user_id\": [ 2, 3, 5 ], \"notify_before\": 5, \"notify_type\": \"minute\", \"status\": \"open\", \"notify_via\": [ \"ex\" ], \"start_datetime\": \"2021-01-06 13:05:00\", \"end_datetime\": \"2021-01-06 13:05:00\", \"followup_additional_info\": [ \"voluptatibus\" ], \"allow_notification\": true }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/crm/follow-ups" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "title": "Meeting with client", "contact_id": 2, "description": "Vero voluptates dolore et assumenda voluptas.", "schedule_type": "quas", "user_id": [ 2, 3, 5 ], "notify_before": 5, "notify_type": "minute", "status": "open", "notify_via": [ "ex" ], "start_datetime": "2021-01-06 13:05:00", "end_datetime": "2021-01-06 13:05:00", "followup_additional_info": [ "voluptatibus" ], "allow_notification": true }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/crm/follow-ups', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'title' => 'Meeting with client', 'contact_id' => 2, 'description' => 'Vero voluptates dolore et assumenda voluptas.', 'schedule_type' => 'quas', 'user_id' => [ 2, 3, 5, ], 'notify_before' => 5, 'notify_type' => 'minute', 'status' => 'open', 'notify_via' => [ 'ex', ], 'start_datetime' => '2021-01-06 13:05:00', 'end_datetime' => '2021-01-06 13:05:00', 'followup_additional_info' => [ 'voluptatibus', ], 'allow_notification' => true, ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-crm-follow-ups"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "title": "test", "contact_id": "1", "description": null, "schedule_type": "call", "followup_category_id": "1", "notify_before": null, "status": null, "start_datetime": "2021-01-06 15:27:00", "end_datetime": "2021-01-06 15:27:00", "allow_notification": 0, "notify_via": { "sms": 1, "mail": 1 }, "notify_type": "hour", "business_id": 1, "created_by": 1, "updated_at": "2021-01-06 17:04:54", "created_at": "2021-01-06 17:04:54", "id": 20 } }</code> </pre> </span> <span id="execution-results-POSTconnector-api-crm-follow-ups" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-crm-follow-ups"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-crm-follow-ups" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-crm-follow-ups" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-crm-follow-ups"></code></pre> </span> <form id="form-POSTconnector-api-crm-follow-ups" data-method="POST" data-path="connector/api/crm/follow-ups" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-crm-follow-ups', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/crm/follow-ups</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-crm-follow-ups" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-crm-follow-ups" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-crm-follow-ups" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>title</code></b> <small>string</small> <input type="text" style="display: none" name="title" data-endpoint="POSTconnector-api-crm-follow-ups" value="Meeting with client" data-component="body"> <br> <p>Follow up title Example: <code>Meeting with client</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>integer</small> <input type="number" style="display: none" name="contact_id" data-endpoint="POSTconnector-api-crm-follow-ups" value="2" data-component="body"> <br> <p>Contact to be followed up Example: <code>2</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>description</code></b> <small>text</small> <i>optional</i> <input type="text" style="display: none" name="description" data-endpoint="POSTconnector-api-crm-follow-ups" value="Vero voluptates dolore et assumenda voluptas." data-component="body"> <br> <p>Follow up description Example: <code>Vero voluptates dolore et assumenda voluptas.</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>schedule_type</code></b> <small>string</small> <input type="text" style="display: none" name="schedule_type" data-endpoint="POSTconnector-api-crm-follow-ups" value="quas" data-component="body"> <br> <p>Follow up type default get from getFollowUpResources->follow_up_types Example: <code>quas</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>string[]</small> <input type="text" style="display: none" name="user_id[0]" data-endpoint="POSTconnector-api-crm-follow-ups" data-component="body"> <input type="text" style="display: none" name="user_id[1]" data-endpoint="POSTconnector-api-crm-follow-ups" data-component="body"> <br> <p>Integer ID; Follow up to be assigned Ex: [2,3,8]</p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>notify_before</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="notify_before" data-endpoint="POSTconnector-api-crm-follow-ups" value="5" data-component="body"> <br> <p>Integer value will be used to send auto notification before follow up starts. Example: <code>5</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>notify_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="notify_type" data-endpoint="POSTconnector-api-crm-follow-ups" value="minute" data-component="body"> <br> <p>Notify type Ex: 'minute', 'hour', 'day'. default is hour Example: <code>minute</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="POSTconnector-api-crm-follow-ups" value="open" data-component="body"> <br> <p>Follow up status Example: <code>open</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>notify_via</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="notify_via[0]" data-endpoint="POSTconnector-api-crm-follow-ups" data-component="body"> <input type="text" style="display: none" name="notify_via[1]" data-endpoint="POSTconnector-api-crm-follow-ups" data-component="body"> <br> <p>Will be used to send notification Ex: ['sms' => 0 ,'mail' => 1]</p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_datetime</code></b> <small>datetime</small> <input type="text" style="display: none" name="start_datetime" data-endpoint="POSTconnector-api-crm-follow-ups" value="2021-01-06 13:05:00" data-component="body"> <br> <p>Follow up start datetime format: Y-m-d H:i:s Ex: 2020-12-16 03:15:23 Example: <code>2021-01-06 13:05:00</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_datetime</code></b> <small>datetime</small> <input type="text" style="display: none" name="end_datetime" data-endpoint="POSTconnector-api-crm-follow-ups" value="2021-01-06 13:05:00" data-component="body"> <br> <p>Follow up end datetime format: Y-m-d H:i:s Ex: 2020-12-16 03:15:23 Example: <code>2021-01-06 13:05:00</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>followup_additional_info</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="followup_additional_info[0]" data-endpoint="POSTconnector-api-crm-follow-ups" data-component="body"> <input type="text" style="display: none" name="followup_additional_info[1]" data-endpoint="POSTconnector-api-crm-follow-ups" data-component="body"> <br> <p>Follow up additional info Ex: ['call duration' => '1 hour']</p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>allow_notification</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="POSTconnector-api-crm-follow-ups" style="display: none"> <input type="radio" name="allow_notification" value="true" data-endpoint="POSTconnector-api-crm-follow-ups" data-component="body" > <code>true</code> </label> <label data-endpoint="POSTconnector-api-crm-follow-ups" style="display: none"> <input type="radio" name="allow_notification" value="false" data-endpoint="POSTconnector-api-crm-follow-ups" data-component="body" > <code>false</code> </label> <br> <p>0/1 : If notification will be send before follow up starts. default is 1(true) Example: <code>true</code></p> </div> </form> <h2 id="crm-GETconnector-api-crm-follow-ups--id-">Get the specified followup</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-crm-follow-ups--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/crm/follow-ups/corrupti" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/crm/follow-ups/corrupti" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/crm/follow-ups/corrupti', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-crm-follow-ups--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 20, "business_id": 1, "contact_id": 1, "title": "Meeting with client", "status": null, "start_datetime": "2021-01-06 15:27:00", "end_datetime": "2021-01-06 15:27:00", "description": null, "schedule_type": "call", "allow_notification": 0, "notify_via": { "sms": 1, "mail": 1 }, "notify_before": null, "notify_type": "hour", "created_by": 1, "created_at": "2021-01-06 17:04:54", "updated_at": "2021-01-06 17:04:54", "customer": { "id": 1, "business_id": 1, "type": "customer", "supplier_business_name": null, "name": "Walk-In Customer", "prefix": null, "first_name": "Walk-In Customer", "middle_name": null, "last_name": null, "email": null, "contact_id": "CO0005", "contact_status": "active", "tax_number": null, "city": "Phoenix", "state": "Arizona", "country": "USA", "address_line_1": "Linking Street", "address_line_2": null, "zip_code": null, "dob": null, "mobile": "(378) 400-1234", "landline": null, "alternate_number": null, "pay_term_number": null, "pay_term_type": null, "credit_limit": null, "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 1, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": null, "crm_life_stage": null, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "deleted_at": null, "created_at": "2018-01-03 20:45:20", "updated_at": "2018-06-11 22:22:05", "remember_token": null, "password": null }, "users": [ { "id": 2, "user_type": "user", "surname": "Mr", "first_name": "Demo", "last_name": "Cashier", "username": "cashier", "email": "cashier@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-01-04 02:20:58", "updated_at": "2018-01-04 02:20:58", "pivot": { "schedule_id": 20, "user_id": 2 } } ] } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-crm-follow-ups--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-crm-follow-ups--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-crm-follow-ups--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-crm-follow-ups--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-crm-follow-ups--id-"></code></pre> </span> <form id="form-GETconnector-api-crm-follow-ups--id-" data-method="GET" data-path="connector/api/crm/follow-ups/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-crm-follow-ups--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/crm/follow-ups/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-crm-follow-ups--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-crm-follow-ups--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-crm-follow-ups--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-crm-follow-ups--id-" value="corrupti" data-component="url"> <br> <p>The ID of the follow up. Example: <code>corrupti</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>follow_up</code></b> <small>string</small> <input type="text" style="display: none" name="follow_up" data-endpoint="GETconnector-api-crm-follow-ups--id-" value="1,2" data-component="url"> <br> <p>comma separated ids of the follow_ups Example: <code>1,2</code></p> </div> </form> <h2 id="crm-PUTconnector-api-crm-follow-ups--id-">Update follow up</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-PUTconnector-api-crm-follow-ups--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request PUT \ "http://pos.test/connector/api/crm/follow-ups/et" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"title\": \"Meeting with client\", \"contact_id\": 2, \"description\": \"Delectus fuga repellat qui incidunt ducimus.\", \"schedule_type\": \"cupiditate\", \"user_id\": [ 2, 3, 5 ], \"notify_before\": 5, \"notify_type\": \"minute\", \"status\": \"open\", \"notify_via\": [ \"eveniet\" ], \"followup_additional_info\": [ \"non\" ], \"start_datetime\": \"2021-01-06 13:05:00\", \"end_datetime\": \"2021-01-06 13:05:00\", \"allow_notification\": true }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/crm/follow-ups/et" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "title": "Meeting with client", "contact_id": 2, "description": "Delectus fuga repellat qui incidunt ducimus.", "schedule_type": "cupiditate", "user_id": [ 2, 3, 5 ], "notify_before": 5, "notify_type": "minute", "status": "open", "notify_via": [ "eveniet" ], "followup_additional_info": [ "non" ], "start_datetime": "2021-01-06 13:05:00", "end_datetime": "2021-01-06 13:05:00", "allow_notification": true }; fetch(url, { method: "PUT", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->put( 'http://pos.test/connector/api/crm/follow-ups/et', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'title' => 'Meeting with client', 'contact_id' => 2, 'description' => 'Delectus fuga repellat qui incidunt ducimus.', 'schedule_type' => 'cupiditate', 'user_id' => [ 2, 3, 5, ], 'notify_before' => 5, 'notify_type' => 'minute', 'status' => 'open', 'notify_via' => [ 'eveniet', ], 'followup_additional_info' => [ 'non', ], 'start_datetime' => '2021-01-06 13:05:00', 'end_datetime' => '2021-01-06 13:05:00', 'allow_notification' => true, ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-PUTconnector-api-crm-follow-ups--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 20, "business_id": 1, "contact_id": "1", "title": "Meeting with client", "status": null, "start_datetime": "2021-01-06 15:27:00", "end_datetime": "2021-01-06 15:27:00", "description": null, "schedule_type": "call", "allow_notification": 0, "notify_via": { "sms": 1, "mail": 0 }, "notify_before": null, "notify_type": "hour", "created_by": 1, "created_at": "2021-01-06 17:04:54", "updated_at": "2021-01-06 18:22:21" } }</code> </pre> </span> <span id="execution-results-PUTconnector-api-crm-follow-ups--id-" hidden> <blockquote>Received response<span id="execution-response-status-PUTconnector-api-crm-follow-ups--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-PUTconnector-api-crm-follow-ups--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-PUTconnector-api-crm-follow-ups--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-PUTconnector-api-crm-follow-ups--id-"></code></pre> </span> <form id="form-PUTconnector-api-crm-follow-ups--id-" data-method="PUT" data-path="connector/api/crm/follow-ups/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('PUTconnector-api-crm-follow-ups--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-darkblue">PUT</small> <b><code>connector/api/crm/follow-ups/{id}</code></b> </p> <p> <small class="badge badge-purple">PATCH</small> <b><code>connector/api/crm/follow-ups/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="et" data-component="url"> <br> <p>The ID of the follow up. Example: <code>et</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>follow_up</code></b> <small>string</small> <input type="text" style="display: none" name="follow_up" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="20" data-component="url"> <br> <p>id of the follow up to be updated Example: <code>20</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>title</code></b> <small>string</small> <input type="text" style="display: none" name="title" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="Meeting with client" data-component="body"> <br> <p>Follow up title Example: <code>Meeting with client</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>integer</small> <input type="number" style="display: none" name="contact_id" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="2" data-component="body"> <br> <p>Contact to be followed up Example: <code>2</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>description</code></b> <small>text</small> <i>optional</i> <input type="text" style="display: none" name="description" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="Delectus fuga repellat qui incidunt ducimus." data-component="body"> <br> <p>Follow up description Example: <code>Delectus fuga repellat qui incidunt ducimus.</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>schedule_type</code></b> <small>string</small> <input type="text" style="display: none" name="schedule_type" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="cupiditate" data-component="body"> <br> <p>Follow up type default get from getFollowUpResources->follow_up_types Example: <code>cupiditate</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>string[]</small> <input type="text" style="display: none" name="user_id[0]" data-endpoint="PUTconnector-api-crm-follow-ups--id-" data-component="body"> <input type="text" style="display: none" name="user_id[1]" data-endpoint="PUTconnector-api-crm-follow-ups--id-" data-component="body"> <br> <p>Integer ID; Follow up to be assigned Ex: [2,3,8]</p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>notify_before</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="notify_before" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="5" data-component="body"> <br> <p>Integer value will be used to send auto notification before follow up starts. Example: <code>5</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>notify_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="notify_type" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="minute" data-component="body"> <br> <p>Notify type Ex: 'minute', 'hour', 'day'. default is hour Example: <code>minute</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="open" data-component="body"> <br> <p>Follow up status Example: <code>open</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>notify_via</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="notify_via[0]" data-endpoint="PUTconnector-api-crm-follow-ups--id-" data-component="body"> <input type="text" style="display: none" name="notify_via[1]" data-endpoint="PUTconnector-api-crm-follow-ups--id-" data-component="body"> <br> <p>Will be used to send notification Ex: ['sms' => 0 ,'mail' => 1]</p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>followup_additional_info</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="followup_additional_info[0]" data-endpoint="PUTconnector-api-crm-follow-ups--id-" data-component="body"> <input type="text" style="display: none" name="followup_additional_info[1]" data-endpoint="PUTconnector-api-crm-follow-ups--id-" data-component="body"> <br> <p>Follow up additional info Ex: ['call duration' => '1 hour']</p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_datetime</code></b> <small>datetime</small> <input type="text" style="display: none" name="start_datetime" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="2021-01-06 13:05:00" data-component="body"> <br> <p>Follow up start datetime format: Y-m-d H:i:s Ex: 2020-12-16 03:15:23 Example: <code>2021-01-06 13:05:00</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_datetime</code></b> <small>datetime</small> <input type="text" style="display: none" name="end_datetime" data-endpoint="PUTconnector-api-crm-follow-ups--id-" value="2021-01-06 13:05:00" data-component="body"> <br> <p>Follow up end datetime format: Y-m-d H:i:s Ex: 2020-12-16 03:15:23 Example: <code>2021-01-06 13:05:00</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>allow_notification</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="PUTconnector-api-crm-follow-ups--id-" style="display: none"> <input type="radio" name="allow_notification" value="true" data-endpoint="PUTconnector-api-crm-follow-ups--id-" data-component="body" > <code>true</code> </label> <label data-endpoint="PUTconnector-api-crm-follow-ups--id-" style="display: none"> <input type="radio" name="allow_notification" value="false" data-endpoint="PUTconnector-api-crm-follow-ups--id-" data-component="body" > <code>false</code> </label> <br> <p>0/1 : If notification will be send before follow up starts. default is 1(true) Example: <code>true</code></p> </div> </form> <h2 id="crm-GETconnector-api-crm-follow-up-resources">Get follow up resources</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-crm-follow-up-resources"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/crm/follow-up-resources" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/crm/follow-up-resources" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/crm/follow-up-resources', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-crm-follow-up-resources"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "statuses": { "scheduled": "Scheduled", "open": "Open", "canceled": "Cancelled", "completed": "Completed" }, "follow_up_types": { "call": "Call", "sms": "Sms", "meeting": "Meeting", "email": "Email" }, "notify_type": { "minute": "Minute", "hour": "Hour", "day": "Day" }, "notify_via": { "sms": "Sms", "mail": "Email" } } }</code> </pre> </span> <span id="execution-results-GETconnector-api-crm-follow-up-resources" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-crm-follow-up-resources"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-crm-follow-up-resources" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-crm-follow-up-resources" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-crm-follow-up-resources"></code></pre> </span> <form id="form-GETconnector-api-crm-follow-up-resources" data-method="GET" data-path="connector/api/crm/follow-up-resources" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-crm-follow-up-resources', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/crm/follow-up-resources</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-crm-follow-up-resources" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-crm-follow-up-resources" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-crm-follow-up-resources" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="crm-GETconnector-api-crm-leads">List lead</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-crm-leads"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/crm/leads?assigned_to=1%2C2%2C3&name=repellendus&biz_name=aut&mobile_num=1&contact_id=et&order_by=officia&direction=desc&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/crm/leads" ); const params = { "assigned_to": "1,2,3", "name": "repellendus", "biz_name": "aut", "mobile_num": "1", "contact_id": "et", "order_by": "officia", "direction": "desc", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/crm/leads', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'assigned_to' => '1,2,3', 'name' => 'repellendus', 'biz_name' => 'aut', 'mobile_num' => '1', 'contact_id' => 'et', 'order_by' => 'officia', 'direction' => 'desc', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-crm-leads"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "contact_id": "CO0010", "name": "mr Lead 3 kr kr 2", "supplier_business_name": "POS", "email": null, "mobile": "9437638555", "tax_number": null, "created_at": "2020-12-15 23:14:30", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "alternate_number": null, "landline": null, "dob": null, "contact_status": "active", "type": "lead", "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "id": 49, "business_id": 1, "crm_source": "55", "crm_life_stage": "60", "address_line_1": null, "address_line_2": null, "city": null, "state": null, "country": null, "zip_code": null, "last_follow_up_id": 18, "upcoming_follow_up_id": null, "last_follow_up": "2021-01-07 10:26:00", "upcoming_follow_up": null, "last_follow_up_additional_info": "{\"test\":\"test done\",\"call_duration\":\"1.5 Hour\",\"rand\":1}", "upcoming_follow_up_additional_info": null, "source": { "id": 55, "name": "Facebook", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "source", "description": "Facebook", "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2020-12-15 23:07:53", "updated_at": "2020-12-15 23:07:53" }, "life_stage": { "id": 60, "name": "Open Deal", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "life_stage", "description": "Open Deal", "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2020-12-15 23:11:05", "updated_at": "2020-12-15 23:11:05" }, "lead_users": [ { "id": 10, "user_type": "user", "surname": "Mr.", "first_name": "WooCommerce", "last_name": "User", "username": "woocommerce_user", "email": "woo@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-08-02 04:05:55", "updated_at": "2018-08-02 04:05:55", "pivot": { "contact_id": 49, "user_id": 10 } } ] }, { "contact_id": "CO0011", "name": " Lead 4 ", "supplier_business_name": null, "email": null, "mobile": "234567", "tax_number": null, "created_at": "2020-12-15 23:14:48", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "alternate_number": null, "landline": null, "dob": null, "contact_status": "active", "type": "lead", "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "id": 50, "business_id": 1, "crm_source": "55", "crm_life_stage": "62", "address_line_1": null, "address_line_2": null, "city": null, "state": null, "country": null, "zip_code": null, "last_follow_up_id": 32, "upcoming_follow_up_id": null, "last_follow_up": "2021-01-08 16:06:00", "upcoming_follow_up": null, "last_follow_up_additional_info": "{\"call_durartion\":\"5 hour\"}", "upcoming_follow_up_additional_info": null, "source": { "id": 55, "name": "Facebook", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "source", "description": "Facebook", "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2020-12-15 23:07:53", "updated_at": "2020-12-15 23:07:53" }, "life_stage": { "id": 62, "name": "New", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "life_stage", "description": "New", "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2020-12-15 23:11:26", "updated_at": "2020-12-15 23:11:26" }, "lead_users": [ { "id": 11, "user_type": "user", "surname": "Mr", "first_name": "Admin Essential", "last_name": null, "username": "admin-essentials", "email": "admin_essentials@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-01-04 02:15:19", "updated_at": "2018-01-04 02:15:19", "pivot": { "contact_id": 50, "user_id": 11 } } ] }, { "contact_id": "CO0015", "name": " Lead kr ", "supplier_business_name": null, "email": null, "mobile": "9437638555", "tax_number": null, "created_at": "2021-01-07 18:31:08", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "alternate_number": null, "landline": null, "dob": "2021-01-07", "contact_status": "active", "type": "lead", "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "id": 82, "business_id": 1, "crm_source": null, "crm_life_stage": null, "address_line_1": null, "address_line_2": null, "city": null, "state": null, "country": null, "zip_code": null, "last_follow_up_id": 36, "upcoming_follow_up_id": null, "last_follow_up": "2021-01-07 18:31:08", "upcoming_follow_up": null, "last_follow_up_additional_info": "{\"call duration\":\"1 hour\",\"call descr\":\"talked to him and all okay\"}", "upcoming_follow_up_additional_info": null, "source": null, "life_stage": null, "lead_users": [ { "id": 11, "user_type": "user", "surname": "Mr", "first_name": "Admin Essential", "last_name": null, "username": "admin-essentials", "email": "admin_essentials@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-01-04 02:15:19", "updated_at": "2018-01-04 02:15:19", "pivot": { "contact_id": 82, "user_id": 11 } } ] } ], "links": { "first": "http://local.pos.com/connector/api/crm/leads?page=1", "last": "http://local.pos.com/connector/api/crm/leads?page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "last_page": 1, "path": "http://local.pos.com/connector/api/crm/leads", "per_page": "10", "to": 3, "total": 3 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-crm-leads" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-crm-leads"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-crm-leads" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-crm-leads" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-crm-leads"></code></pre> </span> <form id="form-GETconnector-api-crm-leads" data-method="GET" data-path="connector/api/crm/leads" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-crm-leads', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/crm/leads</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-crm-leads" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-crm-leads" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-crm-leads" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>assigned_to</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="assigned_to" data-endpoint="GETconnector-api-crm-leads" value="1,2,3" data-component="query"> <br> <p>comma separated ids of users to whom lead is assigned (Ex: 1,2,3) Example: <code>1,2,3</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="name" data-endpoint="GETconnector-api-crm-leads" value="repellendus" data-component="query"> <br> <p>Search term for lead name Example: <code>repellendus</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>biz_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="biz_name" data-endpoint="GETconnector-api-crm-leads" value="aut" data-component="query"> <br> <p>Search term for lead's business name Example: <code>aut</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>mobile_num</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="mobile_num" data-endpoint="GETconnector-api-crm-leads" value="1" data-component="query"> <br> <p>Search term for lead's mobile number Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_id" data-endpoint="GETconnector-api-crm-leads" value="et" data-component="query"> <br> <p>Search term for lead's contact_id. Ex(CO0005) Example: <code>et</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_by" data-endpoint="GETconnector-api-crm-leads" value="officia" data-component="query"> <br> <p>Column name to sort the result, Column: name, supplier_business_name Example: <code>officia</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>direction</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="direction" data-endpoint="GETconnector-api-crm-leads" value="desc" data-component="query"> <br> <p>Direction to sort the result, Required if using 'order_by', direction: desc, asc Example: <code>desc</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-crm-leads" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h2 id="crm-POSTconnector-api-crm-call-logs">Save Call Logs</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-crm-call-logs"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/crm/call-logs" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/crm/call-logs" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/crm/call-logs', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-crm-call-logs"> </span> <span id="execution-results-POSTconnector-api-crm-call-logs" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-crm-call-logs"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-crm-call-logs" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-crm-call-logs" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-crm-call-logs"></code></pre> </span> <form id="form-POSTconnector-api-crm-call-logs" data-method="POST" data-path="connector/api/crm/call-logs" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-crm-call-logs', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/crm/call-logs</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-crm-call-logs" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-crm-call-logs" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-crm-call-logs" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>call_logs</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style=" margin-left: 14px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>mobile_number</code></b> <small>string</small> <input type="text" style="display: none" name="call_logs.*.mobile_number" data-endpoint="POSTconnector-api-crm-call-logs" value="nulla" data-component="body"> <br> <p>Mobile number of the customer or user Example: <code>nulla</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>mobile_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="call_logs.*.mobile_name" data-endpoint="POSTconnector-api-crm-call-logs" value="facere" data-component="body"> <br> <p>Name of the contact saved in the mobile Example: <code>facere</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>call_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="call_logs.*.call_type" data-endpoint="POSTconnector-api-crm-call-logs" value="call" data-component="body"> <br> <p>Call type (call, sms) Example: <code>call</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_time</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="call_logs.*.start_time" data-endpoint="POSTconnector-api-crm-call-logs" value="magnam" data-component="body"> <br> <p>Start datetime of the call in "Y-m-d H:i:s" format Example: <code>magnam</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_time</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="call_logs.*.end_time" data-endpoint="POSTconnector-api-crm-call-logs" value="qui" data-component="body"> <br> <p>End datetime of the call in "Y-m-d H:i:s" format Example: <code>qui</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>duration</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="call_logs.*.duration" data-endpoint="POSTconnector-api-crm-call-logs" value="expedita" data-component="body"> <br> <p>Duration of the call in seconds Example: <code>expedita</code></p> </div> </details> </div> </details> </div> </form> <h1 id="cash-register-management">Cash register management</h1> <h2 id="cash-register-management-GETconnector-api-cash-register">List Cash Registers</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-cash-register"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/cash-register?status=open&user_id=10&start_date=2018-06-25&end_date=2018-06-25&location_id=1&per_page=15" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/cash-register" ); const params = { "status": "open", "user_id": "10", "start_date": "2018-06-25", "end_date": "2018-06-25", "location_id": "1", "per_page": "15", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/cash-register', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'status' => 'open', 'user_id' => '10', 'start_date' => '2018-06-25', 'end_date' => '2018-06-25', 'location_id' => '1', 'per_page' => '15', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-cash-register"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "location_id": 1, "user_id": 9, "status": "open", "closed_at": null, "closing_amount": "0.0000", "total_card_slips": 0, "total_cheques": 0, "closing_note": null, "created_at": "2020-07-02 12:03:00", "updated_at": "2020-07-02 12:03:19", "cash_register_transactions": [ { "id": 1, "cash_register_id": 1, "amount": "0.0000", "pay_method": "cash", "type": "credit", "transaction_type": "initial", "transaction_id": null, "created_at": "2018-07-13 07:39:34", "updated_at": "2018-07-13 07:39:34" }, { "id": 2, "cash_register_id": 1, "amount": "42.5000", "pay_method": "cash", "type": "credit", "transaction_type": "sell", "transaction_id": 41, "created_at": "2018-07-13 07:44:40", "updated_at": "2018-07-13 07:44:40" } ] }, { "id": 2, "business_id": 1, "location_id": 1, "user_id": 1, "status": "", "closed_at": "2020-07-02 12:03:00", "closing_amount": "0.0000", "total_card_slips": 0, "total_cheques": 0, "closing_note": null, "created_at": "2020-07-06 15:38:23", "updated_at": "2020-07-06 15:38:23", "cash_register_transactions": [ { "id": 19, "cash_register_id": 2, "amount": "10.0000", "pay_method": "cash", "type": "credit", "transaction_type": "initial", "transaction_id": null, "created_at": "2020-07-06 15:38:23", "updated_at": "2020-07-06 15:38:23" } ] } ], "links": { "first": "http://local.pos.com/connector/api/cash-register?page=1", "last": null, "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "path": "http://local.pos.com/connector/api/cash-register", "per_page": 10, "to": 2 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-cash-register" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-cash-register"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-cash-register" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-cash-register" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-cash-register"></code></pre> </span> <form id="form-GETconnector-api-cash-register" data-method="GET" data-path="connector/api/cash-register" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-cash-register', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/cash-register</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-cash-register" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-cash-register" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-cash-register" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="GETconnector-api-cash-register" value="open" data-component="query"> <br> <p>status of the register (open, close) Example: <code>open</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="user_id" data-endpoint="GETconnector-api-cash-register" value="10" data-component="query"> <br> <p>id of the user Example: <code>10</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-cash-register" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-cash-register" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-cash-register" value="1" data-component="query"> <br> <p>id of the location Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-cash-register" value="15" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>15</code></p> </div> </form> <h2 id="cash-register-management-POSTconnector-api-cash-register">Create Cash Register</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-cash-register"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/cash-register" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"location_id\": 1, \"initial_amount\": 3258584.2663, \"created_at\": \"2020-5-7 15:20:22\", \"closed_at\": \"2020-5-7 15:20:22\", \"status\": \"close\", \"closing_amount\": 3.87177252, \"total_card_slips\": 11, \"total_cheques\": 18, \"closing_note\": \"omnis\", \"transaction_ids\": \"1,2,3\\n\\nresponse {\\n\\\"data\\\": {\\n\\\"status\\\": \\\"closed\\\",\\n\\\"location_id\\\": \\\"1\\\",\\n\\\"closed_at\\\": \\\"2020-07-02 12:03:00\\\",\\n\\\"business_id\\\": 1,\\n\\\"user_id\\\": 1,\\n\\\"updated_at\\\": \\\"2020-07-06 16:28:42\\\",\\n\\\"created_at\\\": \\\"2020-07-06 16:28:42\\\",\\n\\\"id\\\": 3\\n}\\n}\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/cash-register" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "location_id": 1, "initial_amount": 3258584.2663, "created_at": "2020-5-7 15:20:22", "closed_at": "2020-5-7 15:20:22", "status": "close", "closing_amount": 3.87177252, "total_card_slips": 11, "total_cheques": 18, "closing_note": "omnis", "transaction_ids": "1,2,3\n\nresponse {\n\"data\": {\n\"status\": \"closed\",\n\"location_id\": \"1\",\n\"closed_at\": \"2020-07-02 12:03:00\",\n\"business_id\": 1,\n\"user_id\": 1,\n\"updated_at\": \"2020-07-06 16:28:42\",\n\"created_at\": \"2020-07-06 16:28:42\",\n\"id\": 3\n}\n}" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/cash-register', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'location_id' => 1, 'initial_amount' => 3258584.2663, 'created_at' => '2020-5-7 15:20:22', 'closed_at' => '2020-5-7 15:20:22', 'status' => 'close', 'closing_amount' => 3.87177252, 'total_card_slips' => 11, 'total_cheques' => 18, 'closing_note' => 'omnis', 'transaction_ids' => '1,2,3'."\n" ."\n" .'response {'."\n" .'"data": {'."\n" .'"status": "closed",'."\n" .'"location_id": "1",'."\n" .'"closed_at": "2020-07-02 12:03:00",'."\n" .'"business_id": 1,'."\n" .'"user_id": 1,'."\n" .'"updated_at": "2020-07-06 16:28:42",'."\n" .'"created_at": "2020-07-06 16:28:42",'."\n" .'"id": 3'."\n" .'}'."\n" .'}', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-cash-register"> </span> <span id="execution-results-POSTconnector-api-cash-register" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-cash-register"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-cash-register" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-cash-register" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-cash-register"></code></pre> </span> <form id="form-POSTconnector-api-cash-register" data-method="POST" data-path="connector/api/cash-register" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-cash-register', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/cash-register</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-cash-register" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-cash-register" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-cash-register" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>integer</small> <input type="number" style="display: none" name="location_id" data-endpoint="POSTconnector-api-cash-register" value="1" data-component="body"> <br> <p>id of the business location Example: <code>1</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>initial_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="initial_amount" data-endpoint="POSTconnector-api-cash-register" value="3258584.2663" data-component="body"> <br> <p>Initial amount Example: <code>3258584.2663</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>created_at</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="created_at" data-endpoint="POSTconnector-api-cash-register" value="2020-5-7 15:20:22" data-component="body"> <br> <p>Register open datetime format:Y-m-d H:i:s, Example: <code>2020-5-7 15:20:22</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>closed_at</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="closed_at" data-endpoint="POSTconnector-api-cash-register" value="2020-5-7 15:20:22" data-component="body"> <br> <p>Register closed datetime format:Y-m-d H:i:s, Example: <code>2020-5-7 15:20:22</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>register</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="POSTconnector-api-cash-register" value="close" data-component="body"> <br> <p>status (open, close) Example: <code>close</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>closing_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="closing_amount" data-endpoint="POSTconnector-api-cash-register" value="3.87177252" data-component="body"> <br> <p>Closing amount Example: <code>3.87177252</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>total_card_slips</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="total_card_slips" data-endpoint="POSTconnector-api-cash-register" value="11" data-component="body"> <br> <p>total number of card slips Example: <code>11</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>total_cheques</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="total_cheques" data-endpoint="POSTconnector-api-cash-register" value="18" data-component="body"> <br> <p>total number of checks Example: <code>18</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>closing_note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="closing_note" data-endpoint="POSTconnector-api-cash-register" value="omnis" data-component="body"> <br> <p>Closing note Example: <code>omnis</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_ids</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="transaction_ids" data-endpoint="POSTconnector-api-cash-register" value="1,2,3 response { "data": { "status": "closed", "location_id": "1", "closed_at": "2020-07-02 12:03:00", "business_id": 1, "user_id": 1, "updated_at": "2020-07-06 16:28:42", "created_at": "2020-07-06 16:28:42", "id": 3 } }" data-component="body"> <br> <p>Comma separated ids of sells associated with the register Example: `1,2,3</p> <p>response { "data": { "status": "closed", "location_id": "1", "closed_at": "2020-07-02 12:03:00", "business_id": 1, "user_id": 1, "updated_at": "2020-07-06 16:28:42", "created_at": "2020-07-06 16:28:42", "id": 3 } }`</p> </div> </form> <h2 id="cash-register-management-GETconnector-api-cash-register--id-">Get the specified Register</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-cash-register--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/cash-register/8" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/cash-register/8" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/cash-register/8', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-cash-register--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "location_id": 1, "user_id": 9, "status": "open", "closed_at": null, "closing_amount": "0.0000", "total_card_slips": 0, "total_cheques": 0, "closing_note": null, "created_at": "2020-07-02 12:03:00", "updated_at": "2020-07-02 12:03:19", "cash_register_transactions": [ { "id": 1, "cash_register_id": 1, "amount": "0.0000", "pay_method": "cash", "type": "credit", "transaction_type": "initial", "transaction_id": null, "created_at": "2018-07-13 07:39:34", "updated_at": "2018-07-13 07:39:34" }, { "id": 2, "cash_register_id": 1, "amount": "42.5000", "pay_method": "cash", "type": "credit", "transaction_type": "sell", "transaction_id": 41, "created_at": "2018-07-13 07:44:40", "updated_at": "2018-07-13 07:44:40" } ] } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-cash-register--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-cash-register--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-cash-register--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-cash-register--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-cash-register--id-"></code></pre> </span> <form id="form-GETconnector-api-cash-register--id-" data-method="GET" data-path="connector/api/cash-register/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-cash-register--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/cash-register/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-cash-register--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-cash-register--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-cash-register--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>integer</small> <input type="number" style="display: none" name="id" data-endpoint="GETconnector-api-cash-register--id-" value="8" data-component="url"> <br> <p>The ID of the cash register. Example: <code>8</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>cash_register</code></b> <small>string</small> <input type="text" style="display: none" name="cash_register" data-endpoint="GETconnector-api-cash-register--id-" value="59" data-component="url"> <br> <p>comma separated ids of the cash registers Example: <code>59</code></p> </div> </form> <h1 id="contact-management">Contact management</h1> <h2 id="contact-management-GETconnector-api-contactapi">List contact</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-contactapi"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/contactapi?type=fugiat&name=soluta&biz_name=non&mobile_num=5&contact_id=et&order_by=ut&direction=est&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/contactapi" ); const params = { "type": "fugiat", "name": "soluta", "biz_name": "non", "mobile_num": "5", "contact_id": "et", "order_by": "ut", "direction": "est", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/contactapi', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'type' => 'fugiat', 'name' => 'soluta', 'biz_name' => 'non', 'mobile_num' => '5', 'contact_id' => 'et', 'order_by' => 'ut', 'direction' => 'est', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-contactapi"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 2, "business_id": 1, "type": "supplier", "supplier_business_name": "Alpha Clothings", "name": "Michael", "prefix": null, "first_name": "Michael", "middle_name": null, "last_name": null, "email": null, "contact_id": "CO0001", "contact_status": "active", "tax_number": "4590091535", "city": "Phoenix", "state": "Arizona", "country": "USA", "address_line_1": "Linking Street", "address_line_2": null, "zip_code": null, "dob": null, "mobile": "(378) 400-1234", "landline": null, "alternate_number": null, "pay_term_number": 15, "pay_term_type": "days", "credit_limit": null, "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 0, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": null, "crm_life_stage": null, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "deleted_at": null, "created_at": "2018-01-03 20:59:38", "updated_at": "2018-06-11 22:21:03", "remember_token": null, "password": null }, { "id": 3, "business_id": 1, "type": "supplier", "supplier_business_name": "Manhattan Clothing Ltd.", "name": "Philip", "prefix": null, "first_name": "Philip", "middle_name": null, "last_name": null, "email": null, "contact_id": "CO0003", "contact_status": "active", "tax_number": "54869310093", "city": "Phoenix", "state": "Arizona", "country": "USA", "address_line_1": "Linking Street", "address_line_2": null, "zip_code": null, "dob": null, "mobile": "(378) 400-1234", "landline": null, "alternate_number": null, "pay_term_number": 15, "pay_term_type": "days", "credit_limit": null, "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 0, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": null, "crm_life_stage": null, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "deleted_at": null, "created_at": "2018-01-03 21:00:55", "updated_at": "2018-06-11 22:21:36", "remember_token": null, "password": null }, { "id": 5, "business_id": 1, "type": "supplier", "supplier_business_name": "Digital Ocean", "name": "Mike McCubbin", "prefix": null, "first_name": "Mike McCubbin", "middle_name": null, "last_name": null, "email": null, "contact_id": "CN0004", "contact_status": "active", "tax_number": "52965489001", "city": "Phoenix", "state": "Arizona", "country": "USA", "address_line_1": "Linking Street", "address_line_2": null, "zip_code": null, "dob": null, "mobile": "(378) 400-1234", "landline": null, "alternate_number": null, "pay_term_number": 30, "pay_term_type": "days", "credit_limit": null, "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 0, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": null, "crm_life_stage": null, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "deleted_at": null, "created_at": "2018-01-06 06:53:22", "updated_at": "2018-06-11 22:21:47", "remember_token": null, "password": null }, { "id": 6, "business_id": 1, "type": "supplier", "supplier_business_name": "Univer Suppliers", "name": "Jackson Hill", "prefix": null, "first_name": "Jackson Hill", "middle_name": null, "last_name": null, "email": null, "contact_id": "CO0002", "contact_status": "active", "tax_number": "5459000655", "city": "Phoenix", "state": "Arizona", "country": "USA", "address_line_1": "Linking Street", "address_line_2": null, "zip_code": null, "dob": null, "mobile": "(378) 400-1234", "landline": null, "alternate_number": null, "pay_term_number": 45, "pay_term_type": "days", "credit_limit": null, "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 0, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": null, "crm_life_stage": null, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "deleted_at": null, "created_at": "2018-01-06 06:55:09", "updated_at": "2018-06-11 22:21:18", "remember_token": null, "password": null } ], "links": { "first": "http://local.pos.com/connector/api/contactapi?page=1", "last": "http://local.pos.com/connector/api/contactapi?page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "last_page": 1, "path": "http://local.pos.com/connector/api/contactapi", "per_page": "10", "to": 4, "total": 4 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-contactapi" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-contactapi"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-contactapi" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-contactapi" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-contactapi"></code></pre> </span> <form id="form-GETconnector-api-contactapi" data-method="GET" data-path="connector/api/contactapi" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-contactapi', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/contactapi</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-contactapi" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-contactapi" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-contactapi" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>type</code></b> <small>string</small> <input type="text" style="display: none" name="type" data-endpoint="GETconnector-api-contactapi" value="fugiat" data-component="query"> <br> <p>Type of contact (supplier, customer) Example: <code>fugiat</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="name" data-endpoint="GETconnector-api-contactapi" value="soluta" data-component="query"> <br> <p>Search term for contact name Example: <code>soluta</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>biz_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="biz_name" data-endpoint="GETconnector-api-contactapi" value="non" data-component="query"> <br> <p>Search term for contact's business name Example: <code>non</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>mobile_num</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="mobile_num" data-endpoint="GETconnector-api-contactapi" value="5" data-component="query"> <br> <p>Search term for contact's mobile number Example: <code>5</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_id" data-endpoint="GETconnector-api-contactapi" value="et" data-component="query"> <br> <p>Search term for contact's contact_id. Ex(CO0005) Example: <code>et</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_by" data-endpoint="GETconnector-api-contactapi" value="ut" data-component="query"> <br> <p>Column name to sort the result, Column: name, supplier_business_name Example: <code>ut</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>direction</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="direction" data-endpoint="GETconnector-api-contactapi" value="est" data-component="query"> <br> <p>Direction to sort the result, Direction: desc, asc Example: <code>est</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-contactapi" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h2 id="contact-management-POSTconnector-api-contactapi">Create contact</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-contactapi"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/contactapi" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"type\": \"customer\", \"supplier_business_name\": \"ipsa\", \"prefix\": \"itaque\", \"first_name\": \"voluptate\", \"middle_name\": \"impedit\", \"last_name\": \"eius\", \"tax_number\": \"8787fefef\", \"pay_term_number\": 3, \"pay_term_type\": \"months\", \"mobile\": \"4578691009\", \"landline\": \"5487-8454-4145\", \"alternate_number\": \"841847541222\", \"address_line_1\": \"quas\", \"address_line_2\": \"modi\", \"city\": \"vel\", \"state\": \"corrupti\", \"country\": \"maiores\", \"zip_code\": \"laudantium\", \"customer_group_id\": \"eos\", \"contact_id\": \"consequatur\", \"dob\": \"2000-06-13\", \"custom_field1\": \"sint\", \"custom_field2\": \"vel\", \"custom_field3\": \"aut\", \"custom_field4\": \"voluptate\", \"email\": \"mstark@example.com\", \"shipping_address\": \"aut\", \"position\": \"voluptas\", \"opening_balance\": 0, \"source_id\": 19, \"life_stage_id\": 3, \"assigned_to\": [ \"voluptatem\" ] }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/contactapi" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "type": "customer", "supplier_business_name": "ipsa", "prefix": "itaque", "first_name": "voluptate", "middle_name": "impedit", "last_name": "eius", "tax_number": "8787fefef", "pay_term_number": 3, "pay_term_type": "months", "mobile": "4578691009", "landline": "5487-8454-4145", "alternate_number": "841847541222", "address_line_1": "quas", "address_line_2": "modi", "city": "vel", "state": "corrupti", "country": "maiores", "zip_code": "laudantium", "customer_group_id": "eos", "contact_id": "consequatur", "dob": "2000-06-13", "custom_field1": "sint", "custom_field2": "vel", "custom_field3": "aut", "custom_field4": "voluptate", "email": "mstark@example.com", "shipping_address": "aut", "position": "voluptas", "opening_balance": 0, "source_id": 19, "life_stage_id": 3, "assigned_to": [ "voluptatem" ] }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/contactapi', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'type' => 'customer', 'supplier_business_name' => 'ipsa', 'prefix' => 'itaque', 'first_name' => 'voluptate', 'middle_name' => 'impedit', 'last_name' => 'eius', 'tax_number' => '8787fefef', 'pay_term_number' => 3.0, 'pay_term_type' => 'months', 'mobile' => '4578691009', 'landline' => '5487-8454-4145', 'alternate_number' => '841847541222', 'address_line_1' => 'quas', 'address_line_2' => 'modi', 'city' => 'vel', 'state' => 'corrupti', 'country' => 'maiores', 'zip_code' => 'laudantium', 'customer_group_id' => 'eos', 'contact_id' => 'consequatur', 'dob' => '2000-06-13', 'custom_field1' => 'sint', 'custom_field2' => 'vel', 'custom_field3' => 'aut', 'custom_field4' => 'voluptate', 'email' => 'mstark@example.com', 'shipping_address' => 'aut', 'position' => 'voluptas', 'opening_balance' => 0.0, 'source_id' => 19, 'life_stage_id' => 3, 'assigned_to' => [ 'voluptatem', ], ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-contactapi"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "type": "customer", "name": "test customer", "tax_number": "75879BHF", "mobile": "7878825008", "business_id": 1, "created_by": 9, "credit_limit": null, "contact_id": "CO0007", "updated_at": "2020-06-04 21:59:21", "created_at": "2020-06-04 21:59:21", "id": 17 } }</code> </pre> </span> <span id="execution-results-POSTconnector-api-contactapi" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-contactapi"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-contactapi" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-contactapi" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-contactapi"></code></pre> </span> <form id="form-POSTconnector-api-contactapi" data-method="POST" data-path="connector/api/contactapi" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-contactapi', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/contactapi</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-contactapi" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-contactapi" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-contactapi" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>type</code></b> <small>string</small> <input type="text" style="display: none" name="type" data-endpoint="POSTconnector-api-contactapi" value="customer" data-component="body"> <br> <p>Type of contact (supplier, customer, both, lead) Example: <code>customer</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>supplier_business_name</code></b> <small>string</small> <input type="text" style="display: none" name="supplier_business_name" data-endpoint="POSTconnector-api-contactapi" value="ipsa" data-component="body"> <br> <p>Required if type is supplier Example: <code>ipsa</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>prefix</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="prefix" data-endpoint="POSTconnector-api-contactapi" value="itaque" data-component="body"> <br> <p>Prefix for the name of the contact Example: <code>itaque</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>first_name</code></b> <small>string</small> <input type="text" style="display: none" name="first_name" data-endpoint="POSTconnector-api-contactapi" value="voluptate" data-component="body"> <br> <p>Name of the contact Example: <code>voluptate</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>middle_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="middle_name" data-endpoint="POSTconnector-api-contactapi" value="impedit" data-component="body"> <br> <p>Example: <code>impedit</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>last_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="last_name" data-endpoint="POSTconnector-api-contactapi" value="eius" data-component="body"> <br> <p>Example: <code>eius</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="tax_number" data-endpoint="POSTconnector-api-contactapi" value="8787fefef" data-component="body"> <br> <p>Example: <code>8787fefef</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>pay_term_number</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="pay_term_number" data-endpoint="POSTconnector-api-contactapi" value="3" data-component="body"> <br> <p>Example: <code>3</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>pay_term_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="pay_term_type" data-endpoint="POSTconnector-api-contactapi" value="months" data-component="body"> <br> <p>(months ,days) Example: <code>months</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>mobile</code></b> <small>string</small> <input type="text" style="display: none" name="mobile" data-endpoint="POSTconnector-api-contactapi" value="4578691009" data-component="body"> <br> <p>Example: <code>4578691009</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>landline</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="landline" data-endpoint="POSTconnector-api-contactapi" value="5487-8454-4145" data-component="body"> <br> <p>Example: <code>5487-8454-4145</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>alternate_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="alternate_number" data-endpoint="POSTconnector-api-contactapi" value="841847541222" data-component="body"> <br> <p>Example: <code>841847541222</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>address_line_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="address_line_1" data-endpoint="POSTconnector-api-contactapi" value="quas" data-component="body"> <br> <p>Example: <code>quas</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>address_line_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="address_line_2" data-endpoint="POSTconnector-api-contactapi" value="modi" data-component="body"> <br> <p>Example: <code>modi</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>city</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="city" data-endpoint="POSTconnector-api-contactapi" value="vel" data-component="body"> <br> <p>Example: <code>vel</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>state</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="state" data-endpoint="POSTconnector-api-contactapi" value="corrupti" data-component="body"> <br> <p>Example: <code>corrupti</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>country</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="country" data-endpoint="POSTconnector-api-contactapi" value="maiores" data-component="body"> <br> <p>Example: <code>maiores</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>zip_code</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="zip_code" data-endpoint="POSTconnector-api-contactapi" value="laudantium" data-component="body"> <br> <p>Example: <code>laudantium</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>customer_group_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="customer_group_id" data-endpoint="POSTconnector-api-contactapi" value="eos" data-component="body"> <br> <p>Example: <code>eos</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_id" data-endpoint="POSTconnector-api-contactapi" value="consequatur" data-component="body"> <br> <p>Example: <code>consequatur</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>dob</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="dob" data-endpoint="POSTconnector-api-contactapi" value="2000-06-13" data-component="body"> <br> <p>Fromat: Y-m-d Example: <code>2000-06-13</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field1" data-endpoint="POSTconnector-api-contactapi" value="sint" data-component="body"> <br> <p>Example: <code>sint</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field2" data-endpoint="POSTconnector-api-contactapi" value="vel" data-component="body"> <br> <p>Example: <code>vel</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field3" data-endpoint="POSTconnector-api-contactapi" value="aut" data-component="body"> <br> <p>Example: <code>aut</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field4</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field4" data-endpoint="POSTconnector-api-contactapi" value="voluptate" data-component="body"> <br> <p>Example: <code>voluptate</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>email</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="email" data-endpoint="POSTconnector-api-contactapi" value="mstark@example.com" data-component="body"> <br> <p>Example: <code>mstark@example.com</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="shipping_address" data-endpoint="POSTconnector-api-contactapi" value="aut" data-component="body"> <br> <p>Example: <code>aut</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>position</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="position" data-endpoint="POSTconnector-api-contactapi" value="voluptas" data-component="body"> <br> <p>Example: <code>voluptas</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>opening_balance</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="opening_balance" data-endpoint="POSTconnector-api-contactapi" value="0" data-component="body"> <br> <p>Example: <code>0</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>source_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="source_id" data-endpoint="POSTconnector-api-contactapi" value="19" data-component="body"> <br> <p>Id of the source. Applicable only if the type is lead Example: <code>19</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>life_stage_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="life_stage_id" data-endpoint="POSTconnector-api-contactapi" value="3" data-component="body"> <br> <p>Id of the Life stage. Applicable only if the type is lead Example: <code>3</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>assigned_to</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="assigned_to[0]" data-endpoint="POSTconnector-api-contactapi" data-component="body"> <input type="text" style="display: none" name="assigned_to[1]" data-endpoint="POSTconnector-api-contactapi" data-component="body"> <br> <p>Ids of the users the lead is assigned to. Applicable only if the type is lead</p> </div> </form> <h2 id="contact-management-GETconnector-api-contactapi--id-">Get the specified contact</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-contactapi--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/contactapi/non" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/contactapi/non" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/contactapi/non', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-contactapi--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "type": "customer", "supplier_business_name": null, "name": " Walk-In Customer ", "prefix": null, "first_name": "Walk-In Customer", "middle_name": null, "last_name": null, "email": "walkin@test.com", "contact_id": "CO0005", "contact_status": "active", "tax_number": null, "city": "Phoenix", "state": "Arizona", "country": "USA", "address_line_1": "Linking Street", "address_line_2": null, "zip_code": "85001", "dob": null, "mobile": "(378) 400-1234", "landline": null, "alternate_number": null, "pay_term_number": null, "pay_term_type": null, "credit_limit": "0.0000", "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 1, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": null, "crm_life_stage": null, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2018-01-03 20:45:20", "updated_at": "2020-08-10 10:26:45", "remember_token": null, "password": null, "customer_group": null, "opening_balance": "0.0000", "opening_balance_paid": "0.0000", "total_purchase": "0.0000", "purchase_paid": "0.0000", "total_purchase_return": "0.0000", "purchase_return_paid": "0.0000", "total_invoice": "2050.0000", "invoice_received": "1987.5000", "total_sell_return": "0.0000", "sell_return_paid": "0.0000", "purchase_due": 0, "sell_due": 62.5, "purchase_return_due": 0, "sell_return_due": 0 } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-contactapi--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-contactapi--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-contactapi--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-contactapi--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-contactapi--id-"></code></pre> </span> <form id="form-GETconnector-api-contactapi--id-" data-method="GET" data-path="connector/api/contactapi/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-contactapi--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/contactapi/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-contactapi--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-contactapi--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-contactapi--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-contactapi--id-" value="non" data-component="url"> <br> <p>The ID of the contactapi. Example: <code>non</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact</code></b> <small>string</small> <input type="text" style="display: none" name="contact" data-endpoint="GETconnector-api-contactapi--id-" value="2" data-component="url"> <br> <p>comma separated ids of contacts Example: <code>2</code></p> </div> </form> <h2 id="contact-management-PUTconnector-api-contactapi--id-">Update contact</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-PUTconnector-api-contactapi--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request PUT \ "http://pos.test/connector/api/contactapi/tenetur" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"type\": \"customer\", \"supplier_business_name\": \"incidunt\", \"prefix\": \"tempore\", \"first_name\": \"vel\", \"middle_name\": \"libero\", \"last_name\": \"impedit\", \"tax_number\": \"488744dwd\", \"pay_term_number\": 3, \"pay_term_type\": \"months\", \"mobile\": \"8795461009\", \"landline\": \"65484-848-848\", \"alternate_number\": \"9898795220\", \"address_line_1\": \"explicabo\", \"address_line_2\": \"numquam\", \"city\": \"veritatis\", \"state\": \"velit\", \"country\": \"voluptatibus\", \"zip_code\": \"aut\", \"customer_group_id\": \"quis\", \"contact_id\": \"quidem\", \"dob\": \"2000-06-13\", \"custom_field1\": \"praesentium\", \"custom_field2\": \"odio\", \"custom_field3\": \"quisquam\", \"custom_field4\": \"unde\", \"email\": \"monique40@example.net\", \"shipping_address\": \"tempora\", \"position\": \"nisi\", \"opening_balance\": 10.3, \"source_id\": 12, \"life_stage_id\": 5, \"assigned_to\": [ \"quia\" ] }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/contactapi/tenetur" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "type": "customer", "supplier_business_name": "incidunt", "prefix": "tempore", "first_name": "vel", "middle_name": "libero", "last_name": "impedit", "tax_number": "488744dwd", "pay_term_number": 3, "pay_term_type": "months", "mobile": "8795461009", "landline": "65484-848-848", "alternate_number": "9898795220", "address_line_1": "explicabo", "address_line_2": "numquam", "city": "veritatis", "state": "velit", "country": "voluptatibus", "zip_code": "aut", "customer_group_id": "quis", "contact_id": "quidem", "dob": "2000-06-13", "custom_field1": "praesentium", "custom_field2": "odio", "custom_field3": "quisquam", "custom_field4": "unde", "email": "monique40@example.net", "shipping_address": "tempora", "position": "nisi", "opening_balance": 10.3, "source_id": 12, "life_stage_id": 5, "assigned_to": [ "quia" ] }; fetch(url, { method: "PUT", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->put( 'http://pos.test/connector/api/contactapi/tenetur', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'type' => 'customer', 'supplier_business_name' => 'incidunt', 'prefix' => 'tempore', 'first_name' => 'vel', 'middle_name' => 'libero', 'last_name' => 'impedit', 'tax_number' => '488744dwd', 'pay_term_number' => 3.0, 'pay_term_type' => 'months', 'mobile' => '8795461009', 'landline' => '65484-848-848', 'alternate_number' => '9898795220', 'address_line_1' => 'explicabo', 'address_line_2' => 'numquam', 'city' => 'veritatis', 'state' => 'velit', 'country' => 'voluptatibus', 'zip_code' => 'aut', 'customer_group_id' => 'quis', 'contact_id' => 'quidem', 'dob' => '2000-06-13', 'custom_field1' => 'praesentium', 'custom_field2' => 'odio', 'custom_field3' => 'quisquam', 'custom_field4' => 'unde', 'email' => 'monique40@example.net', 'shipping_address' => 'tempora', 'position' => 'nisi', 'opening_balance' => 10.3, 'source_id' => 12, 'life_stage_id' => 5, 'assigned_to' => [ 'quia', ], ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-PUTconnector-api-contactapi--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 21, "business_id": 1, "type": "customer", "supplier_business_name": null, "name": "created from api", "prefix": null, "first_name": "created from api", "middle_name": null, "last_name": null, "email": null, "contact_id": "CO0009", "contact_status": "active", "tax_number": null, "city": null, "state": null, "country": null, "address_line_1": "test address", "address_line_2": null, "zip_code": "54878787", "dob": "2000-06-13", "mobile": "8754154872154", "landline": null, "alternate_number": null, "pay_term_number": null, "pay_term_type": null, "credit_limit": null, "created_by": 1, "balance": "0.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "is_default": 0, "shipping_address": null, "position": null, "customer_group_id": null, "crm_source": null, "crm_life_stage": null, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2020-08-10 10:41:42", "updated_at": "2020-08-10 10:41:42", "remember_token": null, "password": null } }</code> </pre> </span> <span id="execution-results-PUTconnector-api-contactapi--id-" hidden> <blockquote>Received response<span id="execution-response-status-PUTconnector-api-contactapi--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-PUTconnector-api-contactapi--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-PUTconnector-api-contactapi--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-PUTconnector-api-contactapi--id-"></code></pre> </span> <form id="form-PUTconnector-api-contactapi--id-" data-method="PUT" data-path="connector/api/contactapi/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('PUTconnector-api-contactapi--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-darkblue">PUT</small> <b><code>connector/api/contactapi/{id}</code></b> </p> <p> <small class="badge badge-purple">PATCH</small> <b><code>connector/api/contactapi/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="PUTconnector-api-contactapi--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="PUTconnector-api-contactapi--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="PUTconnector-api-contactapi--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="PUTconnector-api-contactapi--id-" value="tenetur" data-component="url"> <br> <p>The ID of the contactapi. Example: <code>tenetur</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact</code></b> <small>string</small> <input type="text" style="display: none" name="contact" data-endpoint="PUTconnector-api-contactapi--id-" value="17" data-component="url"> <br> <p>id of the contact to be updated Example: <code>17</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="type" data-endpoint="PUTconnector-api-contactapi--id-" value="customer" data-component="body"> <br> <p>Type of contact (supplier, customer, both) Example: <code>customer</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>supplier_business_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="supplier_business_name" data-endpoint="PUTconnector-api-contactapi--id-" value="incidunt" data-component="body"> <br> <p>required* Required if type is supplier Example: <code>incidunt</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>prefix</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="prefix" data-endpoint="PUTconnector-api-contactapi--id-" value="tempore" data-component="body"> <br> <p>Prefix for the name of the contact Example: <code>tempore</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>first_name</code></b> <small>string</small> <input type="text" style="display: none" name="first_name" data-endpoint="PUTconnector-api-contactapi--id-" value="vel" data-component="body"> <br> <p>Name of the contact Example: <code>vel</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>middle_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="middle_name" data-endpoint="PUTconnector-api-contactapi--id-" value="libero" data-component="body"> <br> <p>Example: <code>libero</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>last_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="last_name" data-endpoint="PUTconnector-api-contactapi--id-" value="impedit" data-component="body"> <br> <p>Example: <code>impedit</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="tax_number" data-endpoint="PUTconnector-api-contactapi--id-" value="488744dwd" data-component="body"> <br> <p>Example: <code>488744dwd</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>pay_term_number</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="pay_term_number" data-endpoint="PUTconnector-api-contactapi--id-" value="3" data-component="body"> <br> <p>Example: <code>3</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>pay_term_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="pay_term_type" data-endpoint="PUTconnector-api-contactapi--id-" value="months" data-component="body"> <br> <p>(months ,days) Example: <code>months</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>mobile</code></b> <small>string</small> <input type="text" style="display: none" name="mobile" data-endpoint="PUTconnector-api-contactapi--id-" value="8795461009" data-component="body"> <br> <p>Example: <code>8795461009</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>landline</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="landline" data-endpoint="PUTconnector-api-contactapi--id-" value="65484-848-848" data-component="body"> <br> <p>Example: <code>65484-848-848</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>alternate_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="alternate_number" data-endpoint="PUTconnector-api-contactapi--id-" value="9898795220" data-component="body"> <br> <p>Example: <code>9898795220</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>address_line_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="address_line_1" data-endpoint="PUTconnector-api-contactapi--id-" value="explicabo" data-component="body"> <br> <p>Example: <code>explicabo</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>address_line_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="address_line_2" data-endpoint="PUTconnector-api-contactapi--id-" value="numquam" data-component="body"> <br> <p>Example: <code>numquam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>city</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="city" data-endpoint="PUTconnector-api-contactapi--id-" value="veritatis" data-component="body"> <br> <p>Example: <code>veritatis</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>state</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="state" data-endpoint="PUTconnector-api-contactapi--id-" value="velit" data-component="body"> <br> <p>Example: <code>velit</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>country</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="country" data-endpoint="PUTconnector-api-contactapi--id-" value="voluptatibus" data-component="body"> <br> <p>Example: <code>voluptatibus</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>zip_code</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="zip_code" data-endpoint="PUTconnector-api-contactapi--id-" value="aut" data-component="body"> <br> <p>Example: <code>aut</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>customer_group_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="customer_group_id" data-endpoint="PUTconnector-api-contactapi--id-" value="quis" data-component="body"> <br> <p>Example: <code>quis</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_id" data-endpoint="PUTconnector-api-contactapi--id-" value="quidem" data-component="body"> <br> <p>Example: <code>quidem</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>dob</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="dob" data-endpoint="PUTconnector-api-contactapi--id-" value="2000-06-13" data-component="body"> <br> <p>Fromat: Y-m-d Example: <code>2000-06-13</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field1" data-endpoint="PUTconnector-api-contactapi--id-" value="praesentium" data-component="body"> <br> <p>Example: <code>praesentium</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field2" data-endpoint="PUTconnector-api-contactapi--id-" value="odio" data-component="body"> <br> <p>Example: <code>odio</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field3" data-endpoint="PUTconnector-api-contactapi--id-" value="quisquam" data-component="body"> <br> <p>Example: <code>quisquam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field4</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field4" data-endpoint="PUTconnector-api-contactapi--id-" value="unde" data-component="body"> <br> <p>Example: <code>unde</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>email</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="email" data-endpoint="PUTconnector-api-contactapi--id-" value="monique40@example.net" data-component="body"> <br> <p>Example: <code>monique40@example.net</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="shipping_address" data-endpoint="PUTconnector-api-contactapi--id-" value="tempora" data-component="body"> <br> <p>Example: <code>tempora</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>position</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="position" data-endpoint="PUTconnector-api-contactapi--id-" value="nisi" data-component="body"> <br> <p>Example: <code>nisi</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>opening_balance</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="opening_balance" data-endpoint="PUTconnector-api-contactapi--id-" value="10.3" data-component="body"> <br> <p>Example: <code>10.3</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>source_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="source_id" data-endpoint="PUTconnector-api-contactapi--id-" value="12" data-component="body"> <br> <p>Id of the source. Applicable only if the type is lead Example: <code>12</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>life_stage_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="life_stage_id" data-endpoint="PUTconnector-api-contactapi--id-" value="5" data-component="body"> <br> <p>Id of the Life stage. Applicable only if the type is lead Example: <code>5</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>assigned_to</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="assigned_to[0]" data-endpoint="PUTconnector-api-contactapi--id-" data-component="body"> <input type="text" style="display: none" name="assigned_to[1]" data-endpoint="PUTconnector-api-contactapi--id-" data-component="body"> <br> <p>Ids of the users the lead is assigned to. Applicable only if the type is lead</p> </div> </form> <h2 id="contact-management-POSTconnector-api-contactapi-payment">Contact payment</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-contactapi-payment"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/contactapi-payment" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"contact_id\": 17, \"amount\": 453.13, \"method\": \"cash\", \"paid_on\": \"2020-07-22 15:48:29\", \"account_id\": 20, \"card_number\": \"ipsam\", \"card_holder_name\": \"quibusdam\", \"card_transaction_number\": \"ipsam\", \"card_type\": \"qui\", \"card_month\": \"hic\", \"card_year\": \"laudantium\", \"card_security\": \"aut\", \"transaction_no_1\": \"ea\", \"transaction_no_2\": \"eum\", \"transaction_no_3\": \"fugit\", \"cheque_number\": \"sed\", \"bank_account_number\": \"et\", \"note\": \"nisi\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/contactapi-payment" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "contact_id": 17, "amount": 453.13, "method": "cash", "paid_on": "2020-07-22 15:48:29", "account_id": 20, "card_number": "ipsam", "card_holder_name": "quibusdam", "card_transaction_number": "ipsam", "card_type": "qui", "card_month": "hic", "card_year": "laudantium", "card_security": "aut", "transaction_no_1": "ea", "transaction_no_2": "eum", "transaction_no_3": "fugit", "cheque_number": "sed", "bank_account_number": "et", "note": "nisi" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/contactapi-payment', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'contact_id' => 17, 'amount' => 453.13, 'method' => 'cash', 'paid_on' => '2020-07-22 15:48:29', 'account_id' => 20, 'card_number' => 'ipsam', 'card_holder_name' => 'quibusdam', 'card_transaction_number' => 'ipsam', 'card_type' => 'qui', 'card_month' => 'hic', 'card_year' => 'laudantium', 'card_security' => 'aut', 'transaction_no_1' => 'ea', 'transaction_no_2' => 'eum', 'transaction_no_3' => 'fugit', 'cheque_number' => 'sed', 'bank_account_number' => 'et', 'note' => 'nisi', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-contactapi-payment"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "amount": "20", "method": "cash", "paid_on": "2020-07-22 15:48:29", "created_by": 1, "payment_for": "19", "business_id": 1, "is_advance": 1, "payment_ref_no": "SP2020/0127", "document": null, "updated_at": "2020-07-22 15:48:29", "created_at": "2020-07-22 15:48:29", "id": 215 } }</code> </pre> </span> <span id="execution-results-POSTconnector-api-contactapi-payment" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-contactapi-payment"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-contactapi-payment" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-contactapi-payment" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-contactapi-payment"></code></pre> </span> <form id="form-POSTconnector-api-contactapi-payment" data-method="POST" data-path="connector/api/contactapi-payment" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-contactapi-payment', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/contactapi-payment</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-contactapi-payment" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-contactapi-payment" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-contactapi-payment" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>integer</small> <input type="number" style="display: none" name="contact_id" data-endpoint="POSTconnector-api-contactapi-payment" value="17" data-component="body"> <br> <p>id of the contact Example: <code>17</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>amount</code></b> <small>number</small> <input type="number" style="display: none" name="amount" data-endpoint="POSTconnector-api-contactapi-payment" value="453.13" data-component="body"> <br> <p>amount of the payment Example: <code>453.13</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>method</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="method" data-endpoint="POSTconnector-api-contactapi-payment" value="cash" data-component="body"> <br> <p>payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3') Example: <code>cash</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>paid_on</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="paid_on" data-endpoint="POSTconnector-api-contactapi-payment" value="2020-07-22 15:48:29" data-component="body"> <br> <p>transaction date format:Y-m-d H:i:s, Example: <code>2020-07-22 15:48:29</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>account_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="account_id" data-endpoint="POSTconnector-api-contactapi-payment" value="20" data-component="body"> <br> <p>account id Example: <code>20</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="card_number" data-endpoint="POSTconnector-api-contactapi-payment" value="ipsam" data-component="body"> <br> <p>Example: <code>ipsam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_holder_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="card_holder_name" data-endpoint="POSTconnector-api-contactapi-payment" value="quibusdam" data-component="body"> <br> <p>Example: <code>quibusdam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_transaction_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="card_transaction_number" data-endpoint="POSTconnector-api-contactapi-payment" value="ipsam" data-component="body"> <br> <p>Example: <code>ipsam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="card_type" data-endpoint="POSTconnector-api-contactapi-payment" value="qui" data-component="body"> <br> <p>Example: <code>qui</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_month</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="card_month" data-endpoint="POSTconnector-api-contactapi-payment" value="hic" data-component="body"> <br> <p>Example: <code>hic</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_year</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="card_year" data-endpoint="POSTconnector-api-contactapi-payment" value="laudantium" data-component="body"> <br> <p>Example: <code>laudantium</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_security</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="card_security" data-endpoint="POSTconnector-api-contactapi-payment" value="aut" data-component="body"> <br> <p>Example: <code>aut</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="transaction_no_1" data-endpoint="POSTconnector-api-contactapi-payment" value="ea" data-component="body"> <br> <p>Example: <code>ea</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="transaction_no_2" data-endpoint="POSTconnector-api-contactapi-payment" value="eum" data-component="body"> <br> <p>Example: <code>eum</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="transaction_no_3" data-endpoint="POSTconnector-api-contactapi-payment" value="fugit" data-component="body"> <br> <p>Example: <code>fugit</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>cheque_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="cheque_number" data-endpoint="POSTconnector-api-contactapi-payment" value="sed" data-component="body"> <br> <p>Example: <code>sed</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>bank_account_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="bank_account_number" data-endpoint="POSTconnector-api-contactapi-payment" value="et" data-component="body"> <br> <p>Example: <code>et</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="note" data-endpoint="POSTconnector-api-contactapi-payment" value="nisi" data-component="body"> <br> <p>payment note Example: <code>nisi</code></p> </div> </form> <h1 id="endpoints">Endpoints</h1> <h2 id="endpoints-POSToauth-token">Authorize a client to access the user's account.</h2> <p> </p> <span id="example-requests-POSToauth-token"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/oauth/token" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/token" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/oauth/token', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSToauth-token"> </span> <span id="execution-results-POSToauth-token" hidden> <blockquote>Received response<span id="execution-response-status-POSToauth-token"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSToauth-token" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSToauth-token" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSToauth-token"></code></pre> </span> <form id="form-POSToauth-token" data-method="POST" data-path="oauth/token" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSToauth-token', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>oauth/token</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSToauth-token" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSToauth-token" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GEToauth-authorize">Authorize a client to access the user's account.</h2> <p> </p> <span id="example-requests-GEToauth-authorize"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/oauth/authorize" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/authorize" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/oauth/authorize', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GEToauth-authorize"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route oauth/authorize could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GEToauth-authorize" hidden> <blockquote>Received response<span id="execution-response-status-GEToauth-authorize"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GEToauth-authorize" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GEToauth-authorize" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GEToauth-authorize"></code></pre> </span> <form id="form-GEToauth-authorize" data-method="GET" data-path="oauth/authorize" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GEToauth-authorize', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>oauth/authorize</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GEToauth-authorize" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GEToauth-authorize" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-POSToauth-token-refresh">Get a fresh transient token cookie for the authenticated user.</h2> <p> </p> <span id="example-requests-POSToauth-token-refresh"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/oauth/token/refresh" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/token/refresh" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/oauth/token/refresh', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSToauth-token-refresh"> </span> <span id="execution-results-POSToauth-token-refresh" hidden> <blockquote>Received response<span id="execution-response-status-POSToauth-token-refresh"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSToauth-token-refresh" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSToauth-token-refresh" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSToauth-token-refresh"></code></pre> </span> <form id="form-POSToauth-token-refresh" data-method="POST" data-path="oauth/token/refresh" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSToauth-token-refresh', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>oauth/token/refresh</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSToauth-token-refresh" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSToauth-token-refresh" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-POSToauth-authorize">Approve the authorization request.</h2> <p> </p> <span id="example-requests-POSToauth-authorize"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/oauth/authorize" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/authorize" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/oauth/authorize', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSToauth-authorize"> </span> <span id="execution-results-POSToauth-authorize" hidden> <blockquote>Received response<span id="execution-response-status-POSToauth-authorize"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSToauth-authorize" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSToauth-authorize" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSToauth-authorize"></code></pre> </span> <form id="form-POSToauth-authorize" data-method="POST" data-path="oauth/authorize" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSToauth-authorize', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>oauth/authorize</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSToauth-authorize" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSToauth-authorize" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-DELETEoauth-authorize">Deny the authorization request.</h2> <p> </p> <span id="example-requests-DELETEoauth-authorize"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request DELETE \ "http://pos.test/oauth/authorize" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/authorize" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "DELETE", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->delete( 'http://pos.test/oauth/authorize', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-DELETEoauth-authorize"> </span> <span id="execution-results-DELETEoauth-authorize" hidden> <blockquote>Received response<span id="execution-response-status-DELETEoauth-authorize"></span>: </blockquote> <pre class="json"><code id="execution-response-content-DELETEoauth-authorize" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-DELETEoauth-authorize" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-DELETEoauth-authorize"></code></pre> </span> <form id="form-DELETEoauth-authorize" data-method="DELETE" data-path="oauth/authorize" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('DELETEoauth-authorize', this);"> <h3> Request </h3> <p> <small class="badge badge-red">DELETE</small> <b><code>oauth/authorize</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="DELETEoauth-authorize" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="DELETEoauth-authorize" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GEToauth-tokens">Get all of the authorized tokens for the authenticated user.</h2> <p> </p> <span id="example-requests-GEToauth-tokens"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/oauth/tokens" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/tokens" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/oauth/tokens', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GEToauth-tokens"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route oauth/tokens could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GEToauth-tokens" hidden> <blockquote>Received response<span id="execution-response-status-GEToauth-tokens"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GEToauth-tokens" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GEToauth-tokens" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GEToauth-tokens"></code></pre> </span> <form id="form-GEToauth-tokens" data-method="GET" data-path="oauth/tokens" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GEToauth-tokens', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>oauth/tokens</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GEToauth-tokens" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GEToauth-tokens" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-DELETEoauth-tokens--token_id-">Delete the given token.</h2> <p> </p> <span id="example-requests-DELETEoauth-tokens--token_id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request DELETE \ "http://pos.test/oauth/tokens/perferendis" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/tokens/perferendis" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "DELETE", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->delete( 'http://pos.test/oauth/tokens/perferendis', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-DELETEoauth-tokens--token_id-"> </span> <span id="execution-results-DELETEoauth-tokens--token_id-" hidden> <blockquote>Received response<span id="execution-response-status-DELETEoauth-tokens--token_id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-DELETEoauth-tokens--token_id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-DELETEoauth-tokens--token_id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-DELETEoauth-tokens--token_id-"></code></pre> </span> <form id="form-DELETEoauth-tokens--token_id-" data-method="DELETE" data-path="oauth/tokens/{token_id}" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('DELETEoauth-tokens--token_id-', this);"> <h3> Request </h3> <p> <small class="badge badge-red">DELETE</small> <b><code>oauth/tokens/{token_id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="DELETEoauth-tokens--token_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="DELETEoauth-tokens--token_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>token_id</code></b> <small>string</small> <input type="text" style="display: none" name="token_id" data-endpoint="DELETEoauth-tokens--token_id-" value="perferendis" data-component="url"> <br> <p>The ID of the token. Example: <code>perferendis</code></p> </div> </form> <h2 id="endpoints-GEToauth-clients">Get all of the clients for the authenticated user.</h2> <p> </p> <span id="example-requests-GEToauth-clients"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/oauth/clients" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/clients" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/oauth/clients', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GEToauth-clients"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route oauth/clients could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GEToauth-clients" hidden> <blockquote>Received response<span id="execution-response-status-GEToauth-clients"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GEToauth-clients" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GEToauth-clients" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GEToauth-clients"></code></pre> </span> <form id="form-GEToauth-clients" data-method="GET" data-path="oauth/clients" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GEToauth-clients', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>oauth/clients</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GEToauth-clients" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GEToauth-clients" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-POSToauth-clients">Store a new client.</h2> <p> </p> <span id="example-requests-POSToauth-clients"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/oauth/clients" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/clients" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/oauth/clients', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSToauth-clients"> </span> <span id="execution-results-POSToauth-clients" hidden> <blockquote>Received response<span id="execution-response-status-POSToauth-clients"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSToauth-clients" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSToauth-clients" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSToauth-clients"></code></pre> </span> <form id="form-POSToauth-clients" data-method="POST" data-path="oauth/clients" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSToauth-clients', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>oauth/clients</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSToauth-clients" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSToauth-clients" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-PUToauth-clients--client_id-">Update the given client.</h2> <p> </p> <span id="example-requests-PUToauth-clients--client_id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request PUT \ "http://pos.test/oauth/clients/omnis" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/clients/omnis" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "PUT", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->put( 'http://pos.test/oauth/clients/omnis', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-PUToauth-clients--client_id-"> </span> <span id="execution-results-PUToauth-clients--client_id-" hidden> <blockquote>Received response<span id="execution-response-status-PUToauth-clients--client_id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-PUToauth-clients--client_id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-PUToauth-clients--client_id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-PUToauth-clients--client_id-"></code></pre> </span> <form id="form-PUToauth-clients--client_id-" data-method="PUT" data-path="oauth/clients/{client_id}" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('PUToauth-clients--client_id-', this);"> <h3> Request </h3> <p> <small class="badge badge-darkblue">PUT</small> <b><code>oauth/clients/{client_id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="PUToauth-clients--client_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="PUToauth-clients--client_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>client_id</code></b> <small>string</small> <input type="text" style="display: none" name="client_id" data-endpoint="PUToauth-clients--client_id-" value="omnis" data-component="url"> <br> <p>The ID of the client. Example: <code>omnis</code></p> </div> </form> <h2 id="endpoints-DELETEoauth-clients--client_id-">Delete the given client.</h2> <p> </p> <span id="example-requests-DELETEoauth-clients--client_id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request DELETE \ "http://pos.test/oauth/clients/quasi" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/clients/quasi" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "DELETE", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->delete( 'http://pos.test/oauth/clients/quasi', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-DELETEoauth-clients--client_id-"> </span> <span id="execution-results-DELETEoauth-clients--client_id-" hidden> <blockquote>Received response<span id="execution-response-status-DELETEoauth-clients--client_id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-DELETEoauth-clients--client_id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-DELETEoauth-clients--client_id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-DELETEoauth-clients--client_id-"></code></pre> </span> <form id="form-DELETEoauth-clients--client_id-" data-method="DELETE" data-path="oauth/clients/{client_id}" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('DELETEoauth-clients--client_id-', this);"> <h3> Request </h3> <p> <small class="badge badge-red">DELETE</small> <b><code>oauth/clients/{client_id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="DELETEoauth-clients--client_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="DELETEoauth-clients--client_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>client_id</code></b> <small>string</small> <input type="text" style="display: none" name="client_id" data-endpoint="DELETEoauth-clients--client_id-" value="quasi" data-component="url"> <br> <p>The ID of the client. Example: <code>quasi</code></p> </div> </form> <h2 id="endpoints-GEToauth-scopes">Get all of the available scopes for the application.</h2> <p> </p> <span id="example-requests-GEToauth-scopes"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/oauth/scopes" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/scopes" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/oauth/scopes', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GEToauth-scopes"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route oauth/scopes could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GEToauth-scopes" hidden> <blockquote>Received response<span id="execution-response-status-GEToauth-scopes"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GEToauth-scopes" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GEToauth-scopes" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GEToauth-scopes"></code></pre> </span> <form id="form-GEToauth-scopes" data-method="GET" data-path="oauth/scopes" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GEToauth-scopes', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>oauth/scopes</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GEToauth-scopes" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GEToauth-scopes" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GEToauth-personal-access-tokens">Get all of the personal access tokens for the authenticated user.</h2> <p> </p> <span id="example-requests-GEToauth-personal-access-tokens"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/oauth/personal-access-tokens" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/personal-access-tokens" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/oauth/personal-access-tokens', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GEToauth-personal-access-tokens"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route oauth/personal-access-tokens could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GEToauth-personal-access-tokens" hidden> <blockquote>Received response<span id="execution-response-status-GEToauth-personal-access-tokens"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GEToauth-personal-access-tokens" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GEToauth-personal-access-tokens" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GEToauth-personal-access-tokens"></code></pre> </span> <form id="form-GEToauth-personal-access-tokens" data-method="GET" data-path="oauth/personal-access-tokens" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GEToauth-personal-access-tokens', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>oauth/personal-access-tokens</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GEToauth-personal-access-tokens" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GEToauth-personal-access-tokens" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-POSToauth-personal-access-tokens">Create a new personal access token for the user.</h2> <p> </p> <span id="example-requests-POSToauth-personal-access-tokens"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/oauth/personal-access-tokens" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/personal-access-tokens" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/oauth/personal-access-tokens', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSToauth-personal-access-tokens"> </span> <span id="execution-results-POSToauth-personal-access-tokens" hidden> <blockquote>Received response<span id="execution-response-status-POSToauth-personal-access-tokens"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSToauth-personal-access-tokens" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSToauth-personal-access-tokens" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSToauth-personal-access-tokens"></code></pre> </span> <form id="form-POSToauth-personal-access-tokens" data-method="POST" data-path="oauth/personal-access-tokens" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSToauth-personal-access-tokens', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>oauth/personal-access-tokens</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSToauth-personal-access-tokens" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSToauth-personal-access-tokens" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-DELETEoauth-personal-access-tokens--token_id-">Delete the given token.</h2> <p> </p> <span id="example-requests-DELETEoauth-personal-access-tokens--token_id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request DELETE \ "http://pos.test/oauth/personal-access-tokens/iusto" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/oauth/personal-access-tokens/iusto" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "DELETE", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->delete( 'http://pos.test/oauth/personal-access-tokens/iusto', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-DELETEoauth-personal-access-tokens--token_id-"> </span> <span id="execution-results-DELETEoauth-personal-access-tokens--token_id-" hidden> <blockquote>Received response<span id="execution-response-status-DELETEoauth-personal-access-tokens--token_id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-DELETEoauth-personal-access-tokens--token_id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-DELETEoauth-personal-access-tokens--token_id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-DELETEoauth-personal-access-tokens--token_id-"></code></pre> </span> <form id="form-DELETEoauth-personal-access-tokens--token_id-" data-method="DELETE" data-path="oauth/personal-access-tokens/{token_id}" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('DELETEoauth-personal-access-tokens--token_id-', this);"> <h3> Request </h3> <p> <small class="badge badge-red">DELETE</small> <b><code>oauth/personal-access-tokens/{token_id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="DELETEoauth-personal-access-tokens--token_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="DELETEoauth-personal-access-tokens--token_id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>token_id</code></b> <small>string</small> <input type="text" style="display: none" name="token_id" data-endpoint="DELETEoauth-personal-access-tokens--token_id-" value="iusto" data-component="url"> <br> <p>The ID of the token. Example: <code>iusto</code></p> </div> </form> <h2 id="endpoints-GETconnector-api-payment-accounts">List payment accounts</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-payment-accounts"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/payment-accounts" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/payment-accounts" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/payment-accounts', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-payment-accounts"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "name": "Test Account", "account_number": "8746888847455", "account_type_id": 0, "note": null, "created_by": 9, "is_closed": 0, "deleted_at": null, "created_at": "2020-06-04 21:34:21", "updated_at": "2020-06-04 21:34:21" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-payment-accounts" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-payment-accounts"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-payment-accounts" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-payment-accounts" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-payment-accounts"></code></pre> </span> <form id="form-GETconnector-api-payment-accounts" data-method="GET" data-path="connector/api/payment-accounts" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-payment-accounts', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/payment-accounts</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-payment-accounts" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-payment-accounts" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-payment-accounts" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-api-payment-methods">List payment methods</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-payment-methods"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/payment-methods" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/payment-methods" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/payment-methods', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-payment-methods"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "cash": "Cash", "card": "Card", "cheque": "Cheque", "bank_transfer": "Bank Transfer", "other": "Other", "custom_pay_1": "Custom Payment 1", "custom_pay_2": "Custom Payment 2", "custom_pay_3": "Custom Payment 3" }</code> </pre> </span> <span id="execution-results-GETconnector-api-payment-methods" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-payment-methods"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-payment-methods" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-payment-methods" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-payment-methods"></code></pre> </span> <form id="form-GETconnector-api-payment-methods" data-method="GET" data-path="connector/api/payment-methods" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-payment-methods', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/payment-methods</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-payment-methods" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-payment-methods" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-payment-methods" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-api-business-details">Get business details</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-business-details"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/business-details" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/business-details" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/business-details', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-business-details"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 1, "name": "Awesome Shop", "currency_id": 2, "start_date": "2018-01-01", "tax_number_1": "3412569900", "tax_label_1": "GSTIN", "tax_number_2": null, "tax_label_2": null, "default_sales_tax": null, "default_profit_percent": 25, "owner_id": 1, "time_zone": "America/Phoenix", "fy_start_month": 1, "accounting_method": "fifo", "default_sales_discount": "10.00", "sell_price_tax": "includes", "logo": null, "sku_prefix": "AS", "enable_product_expiry": 0, "expiry_type": "add_expiry", "on_product_expiry": "keep_selling", "stop_selling_before": 0, "enable_tooltip": 1, "purchase_in_diff_currency": 0, "purchase_currency_id": null, "p_exchange_rate": "1.000", "transaction_edit_days": 30, "stock_expiry_alert_days": 30, "keyboard_shortcuts": { "pos": { "express_checkout": "shift+e", "pay_n_ckeckout": "shift+p", "draft": "shift+d", "cancel": "shift+c", "recent_product_quantity": "f2", "weighing_scale": null, "edit_discount": "shift+i", "edit_order_tax": "shift+t", "add_payment_row": "shift+r", "finalize_payment": "shift+f", "add_new_product": "f4" } }, "pos_settings": { "amount_rounding_method": null, "disable_pay_checkout": 0, "disable_draft": 0, "disable_express_checkout": 0, "hide_product_suggestion": 0, "hide_recent_trans": 0, "disable_discount": 0, "disable_order_tax": 0, "is_pos_subtotal_editable": 0 }, "weighing_scale_setting": { "label_prefix": null, "product_sku_length": "4", "qty_length": "3", "qty_length_decimal": "2" }, "manufacturing_settings": null, "essentials_settings": null, "ecom_settings": null, "woocommerce_wh_oc_secret": null, "woocommerce_wh_ou_secret": null, "woocommerce_wh_od_secret": null, "woocommerce_wh_or_secret": null, "enable_brand": 1, "enable_category": 1, "enable_sub_category": 1, "enable_price_tax": 1, "enable_purchase_status": 1, "enable_lot_number": 0, "default_unit": null, "enable_sub_units": 0, "enable_racks": 0, "enable_row": 0, "enable_position": 0, "enable_editing_product_from_purchase": 1, "sales_cmsn_agnt": null, "item_addition_method": 1, "enable_inline_tax": 1, "currency_symbol_placement": "before", "enabled_modules": [ "purchases", "add_sale", "pos_sale", "stock_transfers", "stock_adjustment", "expenses", "account", "tables", "modifiers", "service_staff", "booking", "kitchen", "subscription", "types_of_service" ], "date_format": "m/d/Y", "time_format": "24", "ref_no_prefixes": { "purchase": "PO", "purchase_return": null, "stock_transfer": "ST", "stock_adjustment": "SA", "sell_return": "CN", "expense": "EP", "contacts": "CO", "purchase_payment": "PP", "sell_payment": "SP", "expense_payment": null, "business_location": "BL", "username": null, "subscription": null }, "theme_color": null, "created_by": null, "enable_rp": 0, "rp_name": null, "amount_for_unit_rp": "1.0000", "min_order_total_for_rp": "1.0000", "max_rp_per_order": null, "redeem_amount_per_unit_rp": "1.0000", "min_order_total_for_redeem": "1.0000", "min_redeem_point": null, "max_redeem_point": null, "rp_expiry_period": null, "rp_expiry_type": "year", "repair_settings": null, "email_settings": { "mail_driver": "smtp", "mail_host": null, "mail_port": null, "mail_username": null, "mail_password": null, "mail_encryption": null, "mail_from_address": null, "mail_from_name": null }, "sms_settings": { "url": null, "send_to_param_name": "to", "msg_param_name": "text", "request_method": "post", "param_1": null, "param_val_1": null, "param_2": null, "param_val_2": null, "param_3": null, "param_val_3": null, "param_4": null, "param_val_4": null, "param_5": null, "param_val_5": null, "param_6": null, "param_val_6": null, "param_7": null, "param_val_7": null, "param_8": null, "param_val_8": null, "param_9": null, "param_val_9": null, "param_10": null, "param_val_10": null }, "custom_labels": { "payments": { "custom_pay_1": null, "custom_pay_2": null, "custom_pay_3": null }, "contact": { "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null }, "product": { "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null }, "location": { "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null }, "user": { "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null }, "purchase": { "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null }, "sell": { "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null }, "types_of_service": { "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null } }, "common_settings": { "default_datatable_page_entries": "25" }, "is_active": 1, "created_at": "2018-01-04 02:15:19", "updated_at": "2020-06-04 22:33:01", "locations": [ { "id": 1, "business_id": 1, "location_id": null, "name": "Awesome Shop", "landmark": "Linking Street", "country": "USA", "state": "Arizona", "city": "Phoenix", "zip_code": "85001", "invoice_scheme_id": 1, "invoice_layout_id": 1, "selling_price_group_id": null, "print_receipt_on_invoice": 1, "receipt_printer_type": "browser", "printer_id": null, "mobile": null, "alternate_number": null, "email": null, "website": null, "featured_products": [ "5", "71" ], "is_active": 1, "default_payment_accounts": { "cash": { "is_enabled": "1", "account": null }, "card": { "is_enabled": "1", "account": null }, "cheque": { "is_enabled": "1", "account": null }, "bank_transfer": { "is_enabled": "1", "account": null }, "other": { "is_enabled": "1", "account": null }, "custom_pay_1": { "is_enabled": "1", "account": null }, "custom_pay_2": { "is_enabled": "1", "account": null }, "custom_pay_3": { "is_enabled": "1", "account": null } }, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2018-01-04 02:15:20", "updated_at": "2020-06-05 00:56:54" } ], "currency": { "id": 2, "country": "America", "currency": "Dollars", "code": "USD", "symbol": "$", "thousand_separator": ",", "decimal_separator": ".", "created_at": null, "updated_at": null }, "printers": [], "currency_precision": 2, "quantity_precision": 2 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-business-details" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-business-details"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-business-details" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-business-details" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-business-details"></code></pre> </span> <form id="form-GETconnector-api-business-details" data-method="GET" data-path="connector/api/business-details" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-business-details', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/business-details</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-business-details" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-business-details" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-business-details" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-api-profit-loss-report">Get profit and loss report</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-profit-loss-report"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/profit-loss-report?location_id=1&start_date=2018-06-25&end_date=2018-06-25&user_id=1" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/profit-loss-report" ); const params = { "location_id": "1", "start_date": "2018-06-25", "end_date": "2018-06-25", "user_id": "1", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/profit-loss-report', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'location_id' => '1', 'start_date' => '2018-06-25', 'end_date' => '2018-06-25', 'user_id' => '1', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-profit-loss-report"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "total_purchase_shipping_charge": 0, "total_sell_shipping_charge": 0, "total_transfer_shipping_charges": "0.0000", "opening_stock": 0, "closing_stock": "386859.00000000", "total_purchase": 386936, "total_purchase_discount": "0.000000000000", "total_purchase_return": "0.0000", "total_sell": 9764.5, "total_sell_discount": "11.550000000000", "total_sell_return": "0.0000", "total_sell_round_off": "0.0000", "total_expense": "0.0000", "total_adjustment": "0.0000", "total_recovered": "0.0000", "total_reward_amount": "0.0000", "left_side_module_data": [ { "value": "0.0000", "label": "Total Payroll", "add_to_net_profit": true }, { "value": 0, "label": "Total Production Cost", "add_to_net_profit": true } ], "right_side_module_data": [], "net_profit": 9675.95, "gross_profit": -11.55, "total_sell_by_subtype": [] } }</code> </pre> </span> <span id="execution-results-GETconnector-api-profit-loss-report" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-profit-loss-report"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-profit-loss-report" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-profit-loss-report" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-profit-loss-report"></code></pre> </span> <form id="form-GETconnector-api-profit-loss-report" data-method="GET" data-path="connector/api/profit-loss-report" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-profit-loss-report', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/profit-loss-report</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-profit-loss-report" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-profit-loss-report" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-profit-loss-report" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-profit-loss-report" value="1" data-component="query"> <br> <p>optional id of the location Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-profit-loss-report" value="2018-06-25" data-component="query"> <br> <p>optional format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-profit-loss-report" value="2018-06-25" data-component="query"> <br> <p>optional format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="user_id" data-endpoint="GETconnector-api-profit-loss-report" value="1" data-component="query"> <br> <p>optional id of the user Example: <code>1</code></p> </div> </form> <h2 id="endpoints-GETconnector-api-product-stock-report">Get product current stock</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-product-stock-report"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/product-stock-report" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/product-stock-report" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/product-stock-report', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-product-stock-report"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "total_sold": null, "total_transfered": null, "total_adjusted": null, "stock_price": null, "stock": null, "sku": "AS0001", "product": "Men's Reverse Fleece Crew", "type": "single", "product_id": 1, "unit": "Pc(s)", "enable_stock": 1, "unit_price": "143.0000", "product_variation": "DUMMY", "variation_name": "DUMMY", "location_name": null, "location_id": null, "variation_id": 1 }, { "total_sold": "50.0000", "total_transfered": null, "total_adjusted": null, "stock_price": "3850.00000000", "stock": "50.0000", "sku": "AS0002-1", "product": "Levis Men's Slimmy Fit Jeans", "type": "variable", "product_id": 2, "unit": "Pc(s)", "enable_stock": 1, "unit_price": "77.0000", "product_variation": "Waist Size", "variation_name": "28", "location_name": "Awesome Shop", "location_id": 1, "variation_id": 2 }, { "total_sold": "60.0000", "total_transfered": null, "total_adjusted": null, "stock_price": "6930.00000000", "stock": "90.0000", "sku": "AS0002-2", "product": "Levis Men's Slimmy Fit Jeans", "type": "variable", "product_id": 2, "unit": "Pc(s)", "enable_stock": 1, "unit_price": "77.0000", "product_variation": "Waist Size", "variation_name": "30", "location_name": "Awesome Shop", "location_id": 1, "variation_id": 3 } ], "links": { "first": "http://local.pos.com/connector/api/product-stock-report?page=1", "last": "http://local.pos.com/connector/api/product-stock-report?page=22", "prev": null, "next": "http://local.pos.com/connector/api/product-stock-report?page=2" }, "meta": { "current_page": 1, "from": 1, "last_page": 22, "path": "http://local.pos.com/connector/api/product-stock-report", "per_page": 3, "to": 3, "total": 66 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-product-stock-report" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-product-stock-report"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-product-stock-report" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-product-stock-report" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-product-stock-report"></code></pre> </span> <form id="form-GETconnector-api-product-stock-report" data-method="GET" data-path="connector/api/product-stock-report" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-product-stock-report', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/product-stock-report</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-product-stock-report" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-product-stock-report" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-product-stock-report" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-api-notifications">Get notifications</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-notifications"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/notifications" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/notifications" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/notifications', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-notifications"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "msg": "Payroll for August/2020 added by Mr. Super Admin. Reference No. 2020/0002", "icon_class": "fas fa-money-bill-alt bg-green", "link": "http://local.pos.com/hrm/payroll", "read_at": null, "created_at": "3 hours ago" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-notifications" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-notifications"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-notifications" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-notifications" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-notifications"></code></pre> </span> <form id="form-GETconnector-api-notifications" data-method="GET" data-path="connector/api/notifications" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-notifications', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/notifications</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-notifications" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-notifications" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-notifications" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-api-get-location">Get location details from coordinates</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-get-location"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/get-location" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"lat\": \"41.40338\", \"lon\": \"2.17403\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/get-location" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "lat": "41.40338", "lon": "2.17403" }; fetch(url, { method: "GET", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/get-location', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'lat' => '41.40338', 'lon' => '2.17403', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-get-location"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "address": "Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India" }</code> </pre> </span> <span id="execution-results-GETconnector-api-get-location" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-get-location"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-get-location" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-get-location" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-get-location"></code></pre> </span> <form id="form-GETconnector-api-get-location" data-method="GET" data-path="connector/api/get-location" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-get-location', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/get-location</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-get-location" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-get-location" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-get-location" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>lat</code></b> <small>decimal</small> <input type="text" style="display: none" name="lat" data-endpoint="GETconnector-api-get-location" value="41.40338" data-component="body"> <br> <p>Lattitude of the location Example: <code>41.40338</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>lon</code></b> <small>decimal</small> <input type="text" style="display: none" name="lon" data-endpoint="GETconnector-api-get-location" value="2.17403" data-component="body"> <br> <p>Longitude of the location Example: <code>2.17403</code></p> </div> </form> <h2 id="endpoints-GETconnector-install">Install</h2> <p> </p> <span id="example-requests-GETconnector-install"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/install" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/install" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/install', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-install"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/install could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-install" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-install"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-install" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-install" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-install"></code></pre> </span> <form id="form-GETconnector-install" data-method="GET" data-path="connector/install" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-install', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/install</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-install" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-install" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-POSTconnector-install">Installing Connector Module</h2> <p> </p> <span id="example-requests-POSTconnector-install"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/install" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/install" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/install', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-install"> </span> <span id="execution-results-POSTconnector-install" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-install"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-install" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-install" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-install"></code></pre> </span> <form id="form-POSTconnector-install" data-method="POST" data-path="connector/install" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-install', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/install</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-install" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-install" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-install-uninstall">Uninstall</h2> <p> </p> <span id="example-requests-GETconnector-install-uninstall"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/install/uninstall" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/install/uninstall" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/install/uninstall', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-install-uninstall"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/install/uninstall could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-install-uninstall" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-install-uninstall"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-install-uninstall" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-install-uninstall" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-install-uninstall"></code></pre> </span> <form id="form-GETconnector-install-uninstall" data-method="GET" data-path="connector/install/uninstall" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-install-uninstall', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/install/uninstall</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-install-uninstall" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-install-uninstall" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-install-update">update module</h2> <p> </p> <span id="example-requests-GETconnector-install-update"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/install/update" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/install/update" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/install/update', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-install-update"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/install/update could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-install-update" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-install-update"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-install-update" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-install-update" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-install-update"></code></pre> </span> <form id="form-GETconnector-install-update" data-method="GET" data-path="connector/install/update" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-install-update', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/install/update</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-install-update" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-install-update" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-api">Display a listing of the resource.</h2> <p> </p> <span id="example-requests-GETconnector-api"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/api could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api"></code></pre> </span> <form id="form-GETconnector-api" data-method="GET" data-path="connector/api" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-client">Display a listing of the resource.</h2> <p> </p> <span id="example-requests-GETconnector-client"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/client" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/client" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/client', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-client"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/client could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-client" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-client"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-client" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-client" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-client"></code></pre> </span> <form id="form-GETconnector-client" data-method="GET" data-path="connector/client" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-client', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/client</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-client" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-client" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-client-create">Show the form for creating a new resource.</h2> <p> </p> <span id="example-requests-GETconnector-client-create"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/client/create" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/client/create" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/client/create', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-client-create"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/client/create could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-client-create" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-client-create"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-client-create" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-client-create" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-client-create"></code></pre> </span> <form id="form-GETconnector-client-create" data-method="GET" data-path="connector/client/create" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-client-create', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/client/create</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-client-create" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-client-create" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-POSTconnector-client">Store a newly created resource in storage.</h2> <p> </p> <span id="example-requests-POSTconnector-client"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/client" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/client" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/client', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-client"> </span> <span id="execution-results-POSTconnector-client" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-client"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-client" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-client" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-client"></code></pre> </span> <form id="form-POSTconnector-client" data-method="POST" data-path="connector/client" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-client', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/client</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-client" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-client" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="endpoints-GETconnector-client--id-">Show the specified resource.</h2> <p> </p> <span id="example-requests-GETconnector-client--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/client/commodi" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/client/commodi" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/client/commodi', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-client--id-"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/client/commodi could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-client--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-client--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-client--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-client--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-client--id-"></code></pre> </span> <form id="form-GETconnector-client--id-" data-method="GET" data-path="connector/client/{id}" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-client--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/client/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-client--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-client--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-client--id-" value="commodi" data-component="url"> <br> <p>The ID of the client. Example: <code>commodi</code></p> </div> </form> <h2 id="endpoints-GETconnector-client--client--edit">Show the form for editing the specified resource.</h2> <p> </p> <span id="example-requests-GETconnector-client--client--edit"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/client/ea/edit" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/client/ea/edit" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/client/ea/edit', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-client--client--edit"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/client/ea/edit could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-client--client--edit" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-client--client--edit"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-client--client--edit" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-client--client--edit" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-client--client--edit"></code></pre> </span> <form id="form-GETconnector-client--client--edit" data-method="GET" data-path="connector/client/{client}/edit" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-client--client--edit', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/client/{client}/edit</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-client--client--edit" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-client--client--edit" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>client</code></b> <small>string</small> <input type="text" style="display: none" name="client" data-endpoint="GETconnector-client--client--edit" value="ea" data-component="url"> <br> <p>The client. Example: <code>ea</code></p> </div> </form> <h2 id="endpoints-PUTconnector-client--id-">Update the specified resource in storage.</h2> <p> </p> <span id="example-requests-PUTconnector-client--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request PUT \ "http://pos.test/connector/client/voluptatem" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/client/voluptatem" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "PUT", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->put( 'http://pos.test/connector/client/voluptatem', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-PUTconnector-client--id-"> </span> <span id="execution-results-PUTconnector-client--id-" hidden> <blockquote>Received response<span id="execution-response-status-PUTconnector-client--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-PUTconnector-client--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-PUTconnector-client--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-PUTconnector-client--id-"></code></pre> </span> <form id="form-PUTconnector-client--id-" data-method="PUT" data-path="connector/client/{id}" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('PUTconnector-client--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-darkblue">PUT</small> <b><code>connector/client/{id}</code></b> </p> <p> <small class="badge badge-purple">PATCH</small> <b><code>connector/client/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="PUTconnector-client--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="PUTconnector-client--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="PUTconnector-client--id-" value="voluptatem" data-component="url"> <br> <p>The ID of the client. Example: <code>voluptatem</code></p> </div> </form> <h2 id="endpoints-DELETEconnector-client--id-">Remove the specified resource from storage.</h2> <p> </p> <span id="example-requests-DELETEconnector-client--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request DELETE \ "http://pos.test/connector/client/ut" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/client/ut" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "DELETE", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->delete( 'http://pos.test/connector/client/ut', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-DELETEconnector-client--id-"> </span> <span id="execution-results-DELETEconnector-client--id-" hidden> <blockquote>Received response<span id="execution-response-status-DELETEconnector-client--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-DELETEconnector-client--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-DELETEconnector-client--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-DELETEconnector-client--id-"></code></pre> </span> <form id="form-DELETEconnector-client--id-" data-method="DELETE" data-path="connector/client/{id}" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('DELETEconnector-client--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-red">DELETE</small> <b><code>connector/client/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="DELETEconnector-client--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="DELETEconnector-client--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="DELETEconnector-client--id-" value="ut" data-component="url"> <br> <p>The ID of the client. Example: <code>ut</code></p> </div> </form> <h2 id="endpoints-GETconnector-regenerate">GET connector/regenerate</h2> <p> </p> <span id="example-requests-GETconnector-regenerate"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/regenerate" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/regenerate" ); const headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/regenerate', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-regenerate"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/regenerate could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-regenerate" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-regenerate"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-regenerate" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-regenerate" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-regenerate"></code></pre> </span> <form id="form-GETconnector-regenerate" data-method="GET" data-path="connector/regenerate" data-authed="0" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-regenerate', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/regenerate</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-regenerate" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-regenerate" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h1 id="expense-management">Expense management</h1> <h2 id="expense-management-GETconnector-api-expense">List expenses</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-expense"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/expense?location_id=1&payment_status=paid&start_date=2018-06-25&end_date=2018-06-25&expense_for=vel&per_page=15" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/expense" ); const params = { "location_id": "1", "payment_status": "paid", "start_date": "2018-06-25", "end_date": "2018-06-25", "expense_for": "vel", "per_page": "15", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/expense', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'location_id' => '1', 'payment_status' => 'paid', 'start_date' => '2018-06-25', 'end_date' => '2018-06-25', 'expense_for' => 'vel', 'per_page' => '15', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-expense"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 59, "business_id": 1, "location_id": 1, "payment_status": "due", "ref_no": "EP2020/0001", "transaction_date": "2020-07-03 12:58:00", "total_before_tax": "50.0000", "tax_id": null, "tax_amount": "0.0000", "final_total": "50.0000", "expense_category_id": null, "document": null, "created_by": 9, "is_recurring": 0, "recur_interval": null, "recur_interval_type": null, "recur_repetitions": null, "recur_stopped_on": null, "recur_parent_id": null, "created_at": "2020-07-03 12:58:23", "updated_at": "2020-07-03 12:58:24", "transaction_for": { "id": 1, "user_type": "user", "surname": "Mr", "first_name": "Admin", "last_name": null, "username": "admin", "email": "admin@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-01-04 02:15:19", "updated_at": "2018-01-04 02:15:19" } } ], "links": { "first": "http://local.pos.com/connector/api/expense?page=1", "last": null, "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "path": "http://local.pos.com/connector/api/expense", "per_page": 10, "to": 1 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-expense" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-expense"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-expense" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-expense" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-expense"></code></pre> </span> <form id="form-GETconnector-api-expense" data-method="GET" data-path="connector/api/expense" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-expense', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/expense</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-expense" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-expense" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-expense" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-expense" value="1" data-component="query"> <br> <p>id of the location Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>payment_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment_status" data-endpoint="GETconnector-api-expense" value="paid" data-component="query"> <br> <p>payment status Example: <code>paid</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-expense" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-expense" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense_for</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="expense_for" data-endpoint="GETconnector-api-expense" value="vel" data-component="query"> <br> <p>id of the user for which expense is created Example: <code>vel</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-expense" value="15" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>15</code></p> </div> </form> <h2 id="expense-management-POSTconnector-api-expense">Create expense / expense refund</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-expense"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/expense" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"location_id\": 1, \"final_total\": 2678024.86118, \"transaction_date\": \"2020-5-7 15:20:22\", \"tax_rate_id\": 19, \"expense_for\": 9, \"contact_id\": 12, \"expense_category_id\": 10, \"expense_sub_category_id\": 10, \"additional_notes\": \"exercitationem\", \"is_refund\": 0, \"is_recurring\": 0, \"recur_interval\": 8, \"recur_interval_type\": \"months\", \"subscription_repeat_on\": 15, \"subscription_no\": \"qui\", \"recur_repetitions\": 10, \"payment\": [ \"dolor\" ] }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/expense" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "location_id": 1, "final_total": 2678024.86118, "transaction_date": "2020-5-7 15:20:22", "tax_rate_id": 19, "expense_for": 9, "contact_id": 12, "expense_category_id": 10, "expense_sub_category_id": 10, "additional_notes": "exercitationem", "is_refund": 0, "is_recurring": 0, "recur_interval": 8, "recur_interval_type": "months", "subscription_repeat_on": 15, "subscription_no": "qui", "recur_repetitions": 10, "payment": [ "dolor" ] }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/expense', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'location_id' => 1, 'final_total' => 2678024.86118, 'transaction_date' => '2020-5-7 15:20:22', 'tax_rate_id' => 19, 'expense_for' => 9, 'contact_id' => 12, 'expense_category_id' => 10, 'expense_sub_category_id' => 10, 'additional_notes' => 'exercitationem', 'is_refund' => 0, 'is_recurring' => 0, 'recur_interval' => 8, 'recur_interval_type' => 'months', 'subscription_repeat_on' => 15, 'subscription_no' => 'qui', 'recur_repetitions' => 10, 'payment' => [ 'dolor', ], ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-expense"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 75, "business_id": 1, "location_id": "1", "payment_status": "due", "ref_no": "EP2020/0013", "transaction_date": "2020-07-06T05:31:29.480975Z", "total_before_tax": "43", "tax_id": null, "tax_amount": 0, "final_total": "43", "expense_category_id": null, "document": null, "created_by": 1, "is_recurring": 0, "recur_interval": null, "recur_interval_type": null, "recur_repetitions": null, "recur_stopped_on": null, "recur_parent_id": null, "created_at": "2020-07-06 11:01:29", "updated_at": "2020-07-06 11:01:29", "expense_for": [] } }</code> </pre> </span> <span id="execution-results-POSTconnector-api-expense" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-expense"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-expense" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-expense" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-expense"></code></pre> </span> <form id="form-POSTconnector-api-expense" data-method="POST" data-path="connector/api/expense" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-expense', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/expense</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-expense" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-expense" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-expense" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>integer</small> <input type="number" style="display: none" name="location_id" data-endpoint="POSTconnector-api-expense" value="1" data-component="body"> <br> <p>id of the business location Example: <code>1</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>final_total</code></b> <small>number</small> <input type="number" style="display: none" name="final_total" data-endpoint="POSTconnector-api-expense" value="2678024.86118" data-component="body"> <br> <p>Expense amount Example: <code>2678024.86118</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="transaction_date" data-endpoint="POSTconnector-api-expense" value="2020-5-7 15:20:22" data-component="body"> <br> <p>transaction date format:Y-m-d H:i:s, Example: <code>2020-5-7 15:20:22</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax_rate_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="tax_rate_id" data-endpoint="POSTconnector-api-expense" value="19" data-component="body"> <br> <p>id of the tax rate applicable to the expense Example: <code>19</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense_for</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="expense_for" data-endpoint="POSTconnector-api-expense" value="9" data-component="body"> <br> <p>id of the user for which expense is created Example: <code>9</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="contact_id" data-endpoint="POSTconnector-api-expense" value="12" data-component="body"> <br> <p>id of the contact(customer or supplier) for which expense is created Example: <code>12</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense_category_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="expense_category_id" data-endpoint="POSTconnector-api-expense" value="10" data-component="body"> <br> <p>id of the expense category Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense_sub_category_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="expense_sub_category_id" data-endpoint="POSTconnector-api-expense" value="10" data-component="body"> <br> <p>id of the expense sub-category Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>additional_notes</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="additional_notes" data-endpoint="POSTconnector-api-expense" value="exercitationem" data-component="body"> <br> <p>Example: <code>exercitationem</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_refund</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="is_refund" data-endpoint="POSTconnector-api-expense" value="0" data-component="body"> <br> <p>whether expense refund (0, 1) Example: <code>0</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_recurring</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="is_recurring" data-endpoint="POSTconnector-api-expense" value="0" data-component="body"> <br> <p>whether expense is recurring (0, 1) Example: <code>0</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_interval</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="recur_interval" data-endpoint="POSTconnector-api-expense" value="8" data-component="body"> <br> <p>value of the interval expense will be regenerated Example: <code>8</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_interval_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="recur_interval_type" data-endpoint="POSTconnector-api-expense" value="months" data-component="body"> <br> <p>type of the recur interval ('days', 'months', 'years') Example: <code>months</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>subscription_repeat_on</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="subscription_repeat_on" data-endpoint="POSTconnector-api-expense" value="15" data-component="body"> <br> <p>day of the month on which expense will be generated if recur interval type is months (1-30) Example: <code>15</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>subscription_no</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="subscription_no" data-endpoint="POSTconnector-api-expense" value="qui" data-component="body"> <br> <p>subscription number Example: <code>qui</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_repetitions</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="recur_repetitions" data-endpoint="POSTconnector-api-expense" value="10" data-component="body"> <br> <p>total number of expense to be generated Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>payment</code></b> <small>string[]</small> <i>optional</i> <br> <p>payment lines for the expense</p> </summary> <div style=" margin-left: 14px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="payment.*.amount" data-endpoint="POSTconnector-api-expense" value="453.13" data-component="body"> <br> <p>amount of the payment Example: <code>453.13</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>method</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.method" data-endpoint="POSTconnector-api-expense" value="cash" data-component="body"> <br> <p>payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3') Example: <code>cash</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>account_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="payment.*.account_id" data-endpoint="POSTconnector-api-expense" value="11" data-component="body"> <br> <p>account id Example: <code>11</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.card_number" data-endpoint="POSTconnector-api-expense" value="enim" data-component="body"> <br> <p>Example: <code>enim</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_holder_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.card_holder_name" data-endpoint="POSTconnector-api-expense" value="pariatur" data-component="body"> <br> <p>Example: <code>pariatur</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_transaction_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.card_transaction_number" data-endpoint="POSTconnector-api-expense" value="voluptatem" data-component="body"> <br> <p>Example: <code>voluptatem</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.card_type" data-endpoint="POSTconnector-api-expense" value="beatae" data-component="body"> <br> <p>Example: <code>beatae</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_month</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.card_month" data-endpoint="POSTconnector-api-expense" value="consequuntur" data-component="body"> <br> <p>Example: <code>consequuntur</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_year</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.card_year" data-endpoint="POSTconnector-api-expense" value="numquam" data-component="body"> <br> <p>Example: <code>numquam</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_security</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.card_security" data-endpoint="POSTconnector-api-expense" value="iste" data-component="body"> <br> <p>Example: <code>iste</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.transaction_no_1" data-endpoint="POSTconnector-api-expense" value="eius" data-component="body"> <br> <p>Example: <code>eius</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.transaction_no_2" data-endpoint="POSTconnector-api-expense" value="dolor" data-component="body"> <br> <p>Example: <code>dolor</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.transaction_no_3" data-endpoint="POSTconnector-api-expense" value="expedita" data-component="body"> <br> <p>Example: <code>expedita</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.note" data-endpoint="POSTconnector-api-expense" value="aut" data-component="body"> <br> <p>payment note Example: <code>aut</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>cheque_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment.*.cheque_number" data-endpoint="POSTconnector-api-expense" value="illo" data-component="body"> <br> <p>Example: <code>illo</code></p> </div> </details> </div> </details> </div> </form> <h2 id="expense-management-GETconnector-api-expense--id-">Get the specified expense / expense refund</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-expense--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/expense/nemo" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/expense/nemo" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/expense/nemo', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-expense--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 59, "business_id": 1, "location_id": 1, "payment_status": "due", "ref_no": "EP2020/0001", "transaction_date": "2020-07-03 12:58:00", "total_before_tax": "50.0000", "tax_id": null, "tax_amount": "0.0000", "final_total": "50.0000", "expense_category_id": null, "document": null, "created_by": 9, "is_recurring": 0, "recur_interval": null, "recur_interval_type": null, "recur_repetitions": null, "recur_stopped_on": null, "recur_parent_id": null, "created_at": "2020-07-03 12:58:23", "updated_at": "2020-07-03 12:58:24", "transaction_for": { "id": 1, "user_type": "user", "surname": "Mr", "first_name": "Admin", "last_name": null, "username": "admin", "email": "admin@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-01-04 02:15:19", "updated_at": "2018-01-04 02:15:19" } } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-expense--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-expense--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-expense--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-expense--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-expense--id-"></code></pre> </span> <form id="form-GETconnector-api-expense--id-" data-method="GET" data-path="connector/api/expense/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-expense--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/expense/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-expense--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-expense--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-expense--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-expense--id-" value="nemo" data-component="url"> <br> <p>The ID of the expense. Example: <code>nemo</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense</code></b> <small>string</small> <input type="text" style="display: none" name="expense" data-endpoint="GETconnector-api-expense--id-" value="59" data-component="url"> <br> <p>comma separated ids of the expenses Example: <code>59</code></p> </div> </form> <h2 id="expense-management-PUTconnector-api-expense--id-">Update expense / expense refund</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-PUTconnector-api-expense--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request PUT \ "http://pos.test/connector/api/expense/assumenda" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"final_total\": 0, \"transaction_date\": \"2020-5-7 15:20:22\", \"tax_rate_id\": 3, \"expense_for\": 19, \"contact_id\": 5, \"expense_category_id\": 12, \"expense_sub_category_id\": 1, \"additional_notes\": \"voluptas\", \"is_recurring\": 0, \"recur_interval\": 16, \"recur_interval_type\": \"months\", \"subscription_repeat_on\": 15, \"subscription_no\": \"fuga\", \"recur_repetitions\": 15, \"payment\": [ \"voluptatem\" ] }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/expense/assumenda" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "final_total": 0, "transaction_date": "2020-5-7 15:20:22", "tax_rate_id": 3, "expense_for": 19, "contact_id": 5, "expense_category_id": 12, "expense_sub_category_id": 1, "additional_notes": "voluptas", "is_recurring": 0, "recur_interval": 16, "recur_interval_type": "months", "subscription_repeat_on": 15, "subscription_no": "fuga", "recur_repetitions": 15, "payment": [ "voluptatem" ] }; fetch(url, { method: "PUT", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->put( 'http://pos.test/connector/api/expense/assumenda', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'final_total' => 0.0, 'transaction_date' => '2020-5-7 15:20:22', 'tax_rate_id' => 3, 'expense_for' => 19, 'contact_id' => 5, 'expense_category_id' => 12, 'expense_sub_category_id' => 1, 'additional_notes' => 'voluptas', 'is_recurring' => 0, 'recur_interval' => 16, 'recur_interval_type' => 'months', 'subscription_repeat_on' => 15, 'subscription_no' => 'fuga', 'recur_repetitions' => 15, 'payment' => [ 'voluptatem', ], ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-PUTconnector-api-expense--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 75, "business_id": 1, "location_id": "1", "payment_status": "due", "ref_no": "EP2020/0013", "transaction_date": "2020-07-06T05:31:29.480975Z", "total_before_tax": "43", "tax_id": null, "tax_amount": 0, "final_total": "43", "expense_category_id": null, "document": null, "created_by": 1, "is_recurring": 0, "recur_interval": null, "recur_interval_type": null, "recur_repetitions": null, "recur_stopped_on": null, "recur_parent_id": null, "created_at": "2020-07-06 11:01:29", "updated_at": "2020-07-06 11:01:29", "expense_for": [] } }</code> </pre> </span> <span id="execution-results-PUTconnector-api-expense--id-" hidden> <blockquote>Received response<span id="execution-response-status-PUTconnector-api-expense--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-PUTconnector-api-expense--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-PUTconnector-api-expense--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-PUTconnector-api-expense--id-"></code></pre> </span> <form id="form-PUTconnector-api-expense--id-" data-method="PUT" data-path="connector/api/expense/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('PUTconnector-api-expense--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-darkblue">PUT</small> <b><code>connector/api/expense/{id}</code></b> </p> <p> <small class="badge badge-purple">PATCH</small> <b><code>connector/api/expense/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="PUTconnector-api-expense--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="PUTconnector-api-expense--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="PUTconnector-api-expense--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="PUTconnector-api-expense--id-" value="assumenda" data-component="url"> <br> <p>The ID of the expense. Example: <code>assumenda</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>final_total</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="final_total" data-endpoint="PUTconnector-api-expense--id-" value="0" data-component="body"> <br> <p>Expense amount Example: <code>0</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="transaction_date" data-endpoint="PUTconnector-api-expense--id-" value="2020-5-7 15:20:22" data-component="body"> <br> <p>transaction date format:Y-m-d H:i:s, Example: <code>2020-5-7 15:20:22</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax_rate_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="tax_rate_id" data-endpoint="PUTconnector-api-expense--id-" value="3" data-component="body"> <br> <p>id of the tax rate applicable to the expense Example: <code>3</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense_for</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="expense_for" data-endpoint="PUTconnector-api-expense--id-" value="19" data-component="body"> <br> <p>id of the user for which expense is created Example: <code>19</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="contact_id" data-endpoint="PUTconnector-api-expense--id-" value="5" data-component="body"> <br> <p>id of the contact(customer or supplier) for which expense is created Example: <code>5</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense_category_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="expense_category_id" data-endpoint="PUTconnector-api-expense--id-" value="12" data-component="body"> <br> <p>id of the expense category Example: <code>12</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense_sub_category_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="expense_sub_category_id" data-endpoint="PUTconnector-api-expense--id-" value="1" data-component="body"> <br> <p>id of the expense sub-category Example: <code>1</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>additional_notes</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="additional_notes" data-endpoint="PUTconnector-api-expense--id-" value="voluptas" data-component="body"> <br> <p>Example: <code>voluptas</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_recurring</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="is_recurring" data-endpoint="PUTconnector-api-expense--id-" value="0" data-component="body"> <br> <p>whether expense is recurring (0, 1) Example: <code>0</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_interval</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="recur_interval" data-endpoint="PUTconnector-api-expense--id-" value="16" data-component="body"> <br> <p>value of the interval expense will be regenerated Example: <code>16</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_interval_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="recur_interval_type" data-endpoint="PUTconnector-api-expense--id-" value="months" data-component="body"> <br> <p>type of the recur interval ('days', 'months', 'years') Example: <code>months</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>subscription_repeat_on</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="subscription_repeat_on" data-endpoint="PUTconnector-api-expense--id-" value="15" data-component="body"> <br> <p>day of the month on which expense will be generated if recur interval type is months (1-30) Example: <code>15</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>subscription_no</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="subscription_no" data-endpoint="PUTconnector-api-expense--id-" value="fuga" data-component="body"> <br> <p>subscription number Example: <code>fuga</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_repetitions</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="recur_repetitions" data-endpoint="PUTconnector-api-expense--id-" value="15" data-component="body"> <br> <p>total number of expense to be generated Example: <code>15</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>payment</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="payment[0]" data-endpoint="PUTconnector-api-expense--id-" data-component="body"> <input type="text" style="display: none" name="payment[1]" data-endpoint="PUTconnector-api-expense--id-" data-component="body"> <br> <p>payment lines for the expense</p> </div> </form> <h2 id="expense-management-GETconnector-api-expense-refund">List expense refunds</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-expense-refund"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/expense-refund?location_id=1&payment_status=paid&start_date=2018-06-25&end_date=2018-06-25&expense_for=qui&per_page=15" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/expense-refund" ); const params = { "location_id": "1", "payment_status": "paid", "start_date": "2018-06-25", "end_date": "2018-06-25", "expense_for": "qui", "per_page": "15", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/expense-refund', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'location_id' => '1', 'payment_status' => 'paid', 'start_date' => '2018-06-25', 'end_date' => '2018-06-25', 'expense_for' => 'qui', 'per_page' => '15', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-expense-refund"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 230, "business_id": 1, "location_id": 1, "payment_status": "partial", "ref_no": "refund", "transaction_date": "2020-12-15 11:16:00", "total_before_tax": "65.0000", "tax_id": null, "tax_amount": "0.0000", "final_total": "65.0000", "expense_category_id": null, "document": null, "created_by": 9, "created_at": "2020-12-15 11:46:56", "updated_at": "2020-12-15 12:47:30", "expense_for": [] } ], "links": { "first": "http://local.pos.com/connector/api/expense-refund?page=1", "last": null, "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "path": "http://local.pos.com/connector/api/expense-refund", "per_page": 15, "to": 1 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-expense-refund" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-expense-refund"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-expense-refund" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-expense-refund" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-expense-refund"></code></pre> </span> <form id="form-GETconnector-api-expense-refund" data-method="GET" data-path="connector/api/expense-refund" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-expense-refund', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/expense-refund</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-expense-refund" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-expense-refund" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-expense-refund" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-expense-refund" value="1" data-component="query"> <br> <p>id of the location Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>payment_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment_status" data-endpoint="GETconnector-api-expense-refund" value="paid" data-component="query"> <br> <p>payment status Example: <code>paid</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-expense-refund" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-expense-refund" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>expense_for</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="expense_for" data-endpoint="GETconnector-api-expense-refund" value="qui" data-component="query"> <br> <p>id of the user for which expense is created Example: <code>qui</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-expense-refund" value="15" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>15</code></p> </div> </form> <h2 id="expense-management-GETconnector-api-expense-categories">List expense categories</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-expense-categories"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/expense-categories" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/expense-categories" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/expense-categories', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-expense-categories"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "cat 1", "business_id": 1, "code": null, "parent_id": null, "deleted_at": null, "created_at": "2021-12-16 17:54:40", "updated_at": "2021-12-16 17:54:40", "sub_categories": [ { "id": 3, "name": "sub cat 1", "business_id": 1, "code": null, "parent_id": 1, "deleted_at": null, "created_at": "2021-12-16 18:12:07", "updated_at": "2021-12-16 18:12:07" } ] }, { "id": 7, "name": "cat 2", "business_id": 1, "code": null, "parent_id": null, "deleted_at": null, "created_at": "2021-12-17 10:36:13", "updated_at": "2021-12-17 10:36:13", "sub_categories": [ { "id": 8, "name": "sub cat 2", "business_id": 1, "code": null, "parent_id": 7, "deleted_at": null, "created_at": "2021-12-17 10:36:44", "updated_at": "2021-12-17 10:36:44" } ] } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-expense-categories" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-expense-categories"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-expense-categories" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-expense-categories" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-expense-categories"></code></pre> </span> <form id="form-GETconnector-api-expense-categories" data-method="GET" data-path="connector/api/expense-categories" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-expense-categories', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/expense-categories</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-expense-categories" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-expense-categories" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-expense-categories" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h1 id="field-force">Field Force</h1> <h2 id="field-force-GETconnector-api-field-force">List visits</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-field-force"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/field-force?contact_id=est&assigned_to=cupiditate&status=praesentium&start_date=2018-06-25&end_date=2018-06-25&per_page=15&order_by_date=0" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/field-force" ); const params = { "contact_id": "est", "assigned_to": "cupiditate", "status": "praesentium", "start_date": "2018-06-25", "end_date": "2018-06-25", "per_page": "15", "order_by_date": "0", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/field-force', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'contact_id' => 'est', 'assigned_to' => 'cupiditate', 'status' => 'praesentium', 'start_date' => '2018-06-25', 'end_date' => '2018-06-25', 'per_page' => '15', 'order_by_date' => '0', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-field-force"> <blockquote> <p>Example response (404):</p> </blockquote> <details class="annotation"> <summary style="cursor: pointer;"> <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> </summary> <pre><code class="language-http">cache-control: no-cache, private content-type: application/json </code></pre></details> <pre> <code class="language-json" style="max-height: 300px;">{ "message": "The route connector/api/field-force could not be found.", "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\AbstractRouteCollection.php", "line": 44, "trace": [ { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php", "line": 162, "function": "handleMatchedRoute", "class": "Illuminate\\Routing\\AbstractRouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 753, "function": "match", "class": "Illuminate\\Routing\\RouteCollection", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 740, "function": "findRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 729, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 190, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 141, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 59, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php", "line": 31, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php", "line": 40, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php", "line": 86, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php", "line": 49, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\HandleCors", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php", "line": 39, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 180, "function": "handle", "class": "Illuminate\\Http\\Middleware\\TrustProxies", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 116, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 165, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 134, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 299, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 287, "function": "callLaravelOrLumenRoute", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 92, "function": "makeApiCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 45, "function": "makeResponseCall", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php", "line": 35, "function": "makeResponseCallIfConditionsPass", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 209, "function": "__invoke", "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 166, "function": "iterateThroughStrategies", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php", "line": 95, "function": "fetchResponses", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 122, "function": "processRoute", "class": "Knuckles\\Scribe\\Extracting\\Extractor", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 69, "function": "extractEndpointsInfoFromLaravelApp", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php", "line": 47, "function": "extractEndpointsInfoAndWriteToDisk", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php", "line": 51, "function": "get", "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 36, "function": "handle", "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php", "line": 41, "function": "Illuminate\\Container\\{closure}", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 93, "function": "unwrapIfClosure", "class": "Illuminate\\Container\\Util", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php", "line": 37, "function": "callBoundMethod", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php", "line": 661, "function": "call", "class": "Illuminate\\Container\\BoundMethod", "type": "::" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 183, "function": "call", "class": "Illuminate\\Container\\Container", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Command\\Command.php", "line": 312, "function": "execute", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php", "line": 153, "function": "run", "class": "Symfony\\Component\\Console\\Command\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 1022, "function": "run", "class": "Illuminate\\Console\\Command", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 314, "function": "doRunCommand", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\symfony\\console\\Application.php", "line": 168, "function": "doRun", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php", "line": 102, "function": "run", "class": "Symfony\\Component\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 155, "function": "run", "class": "Illuminate\\Console\\Application", "type": "->" }, { "file": "D:\\laragon\\www\\pos\\artisan", "line": 37, "function": "handle", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-field-force" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-field-force"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-field-force" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-field-force" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-field-force"></code></pre> </span> <form id="form-GETconnector-api-field-force" data-method="GET" data-path="connector/api/field-force" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-field-force', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/field-force</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-field-force" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-field-force" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-field-force" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_id" data-endpoint="GETconnector-api-field-force" value="est" data-component="query"> <br> <p>id of the contact Example: <code>est</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>assigned_to</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="assigned_to" data-endpoint="GETconnector-api-field-force" value="cupiditate" data-component="query"> <br> <p>id of the assigned user Example: <code>cupiditate</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="GETconnector-api-field-force" value="praesentium" data-component="query"> <br> <p>status of the visit (assigned, finished) Example: <code>praesentium</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-field-force" value="2018-06-25" data-component="query"> <br> <p>Start date filter for visit on format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-field-force" value="2018-06-25" data-component="query"> <br> <p>End date filter for visit on format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-field-force" value="15" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>15</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by_date</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="order_by_date" data-endpoint="GETconnector-api-field-force" value="0" data-component="query"> <br> <p>Sort visit by visit on date ('asc', 'desc') Example: <code>0</code></p> </div> </form> <h2 id="field-force-POSTconnector-api-field-force-create">Create Visit</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-field-force-create"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/field-force/create" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"contact_id\": 2, \"visit_to\": \"id\", \"visit_address\": \"deleniti\", \"assigned_to\": 15, \"visit_on\": \"2021-12-28 17:23:00\", \"visit_for\": \"expedita\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/field-force/create" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "contact_id": 2, "visit_to": "id", "visit_address": "deleniti", "assigned_to": 15, "visit_on": "2021-12-28 17:23:00", "visit_for": "expedita" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/field-force/create', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'contact_id' => 2, 'visit_to' => 'id', 'visit_address' => 'deleniti', 'assigned_to' => 15, 'visit_on' => '2021-12-28 17:23:00', 'visit_for' => 'expedita', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-field-force-create"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "contact_id": "6", "assigned_to": "9", "visit_on": "2022-01-15 17:23:00", "visit_for": "", "meet_with": "", "meet_with2": "", "meet_with3": "", "meet_with_mobileno": "", "meet_with_mobileno2": "", "meet_with_mobileno3": "", "meet_with_designation": "", "meet_with_designation2": "", "meet_with_designation3": "", "visit_id": "2021/0031", "status": "assigned", "business_id": 1, "updated_at": "2021-12-30 11:00:47", "created_at": "2021-12-30 11:00:47", "id": 3 } }</code> </pre> </span> <span id="execution-results-POSTconnector-api-field-force-create" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-field-force-create"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-field-force-create" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-field-force-create" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-field-force-create"></code></pre> </span> <form id="form-POSTconnector-api-field-force-create" data-method="POST" data-path="connector/api/field-force/create" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-field-force-create', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/field-force/create</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-field-force-create" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-field-force-create" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-field-force-create" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="contact_id" data-endpoint="POSTconnector-api-field-force-create" value="2" data-component="body"> <br> <p>id of the contact Example: <code>2</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>visit_to</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="visit_to" data-endpoint="POSTconnector-api-field-force-create" value="id" data-component="body"> <br> <p>Name of the visiting person or company if contact_id is not given Example: <code>id</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>visit_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="visit_address" data-endpoint="POSTconnector-api-field-force-create" value="deleniti" data-component="body"> <br> <p>Address of the visiting person or company if contact_id is not given Example: <code>deleniti</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>assigned_to</code></b> <small>integer</small> <input type="number" style="display: none" name="assigned_to" data-endpoint="POSTconnector-api-field-force-create" value="15" data-component="body"> <br> <p>id of the assigned user Example: <code>15</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>visit_on</code></b> <small>format:Y-m-d</small> <i>optional</i> <input type="text" style="display: none" name="visit_on" data-endpoint="POSTconnector-api-field-force-create" value="2021-12-28 17:23:00" data-component="body"> <br> <p>H:i:s Example: <code>2021-12-28 17:23:00</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>visit_for</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="visit_for" data-endpoint="POSTconnector-api-field-force-create" value="expedita" data-component="body"> <br> <p>Purpose of visiting Example: <code>expedita</code></p> </div> </form> <h2 id="field-force-POSTconnector-api-field-force-update-visit-status--id-">Update Visit status</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-field-force-update-visit-status--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/field-force/update-visit-status/17" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: multipart/form-data" \ --header "Accept: application/json" \ --form "status=finished" \ --form "reason_to_not_meet_contact=autem" \ --form "visited_on=2021-12-28 17:23:00" \ --form "visited_address=Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India" \ --form "latitude=41.40338" \ --form "longitude=2.17403" \ --form "comments=magni" \ --form "meet_with=iure" \ --form "meet_with_mobileno=est" \ --form "photo=@C:\Users\nikhi\AppData\Local\Temp\php8A17.tmp" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/field-force/update-visit-status/17" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "multipart/form-data", "Accept": "application/json", }; const body = new FormData(); body.append('status', 'finished'); body.append('reason_to_not_meet_contact', 'autem'); body.append('visited_on', '2021-12-28 17:23:00'); body.append('visited_address', 'Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India'); body.append('latitude', '41.40338'); body.append('longitude', '2.17403'); body.append('comments', 'magni'); body.append('meet_with', 'iure'); body.append('meet_with_mobileno', 'est'); body.append('photo', document.querySelector('input[name="photo"]').files[0]); fetch(url, { method: "POST", headers, body, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/field-force/update-visit-status/17', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'multipart/form-data', 'Accept' => 'application/json', ], 'multipart' => [ [ 'name' => 'status', 'contents' => 'finished' ], [ 'name' => 'reason_to_not_meet_contact', 'contents' => 'autem' ], [ 'name' => 'visited_on', 'contents' => '2021-12-28 17:23:00' ], [ 'name' => 'visited_address', 'contents' => 'Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India' ], [ 'name' => 'latitude', 'contents' => '41.40338' ], [ 'name' => 'longitude', 'contents' => '2.17403' ], [ 'name' => 'comments', 'contents' => 'magni' ], [ 'name' => 'meet_with', 'contents' => 'iure' ], [ 'name' => 'meet_with_mobileno', 'contents' => 'est' ], [ 'name' => 'photo', 'contents' => fopen('C:\Users\nikhi\AppData\Local\Temp\php8A17.tmp', 'r') ], ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-field-force-update-visit-status--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 10, "business_id": 1, "contact_id": 6, "assigned_to": 9, "latitude": "23.6101808", "longitude": "85.2799354", "visited_address": "New address", "status": "finished", "visit_on": "2021-12-28 17:23:00", "visit_for": "assigned from api", "meet_with": "Name", "meet_with2": "Name", "meet_with3": "Name", "meet_with_mobileno": "123456789", "meet_with_mobileno2": "123456789", "meet_with_mobileno3": "123456789", "meet_with_designation": "dr", "meet_with_designation2": "dr", "meet_with_designation3": "dr", "comments": "Users comment", "created_at": "2021-12-28 17:35:13", "updated_at": "2021-12-28 18:06:03" } }</code> </pre> </span> <span id="execution-results-POSTconnector-api-field-force-update-visit-status--id-" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-field-force-update-visit-status--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-field-force-update-visit-status--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-field-force-update-visit-status--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-field-force-update-visit-status--id-"></code></pre> </span> <form id="form-POSTconnector-api-field-force-update-visit-status--id-" data-method="POST" data-path="connector/api/field-force/update-visit-status/{id}" data-authed="1" data-hasfiles="1" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-field-force-update-visit-status--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/field-force/update-visit-status/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="multipart/form-data" data-component="header"> <br> <p>Example: <code>multipart/form-data</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="17" data-component="url"> <br> <p>id of the visit to be updated Example: <code>17</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="finished" data-component="body"> <br> <p>Current status of the visit (assigned, finished, met_contact, did_not_meet_contact) Example: <code>finished</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>reason_to_not_meet_contact</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="reason_to_not_meet_contact" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="autem" data-component="body"> <br> <p>Reason if status is did_not_meet_contact Example: <code>autem</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>visited_on</code></b> <small>format:Y-m-d</small> <i>optional</i> <input type="text" style="display: none" name="visited_on" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="2021-12-28 17:23:00" data-component="body"> <br> <p>H:i:s Example: <code>2021-12-28 17:23:00</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>visited_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="visited_address" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India" data-component="body"> <br> <p>Full address of the contact Example: <code>Radhanath Mullick Ln, Tiretta Bazaar, Bow Bazaar, Kolkata, West Bengal, 700 073, India</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>latitude</code></b> <small>decimal</small> <i>optional</i> <input type="text" style="display: none" name="latitude" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="41.40338" data-component="body"> <br> <p>Lattitude of the user location if full address is not given Example: <code>41.40338</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>longitude</code></b> <small>decimal</small> <i>optional</i> <input type="text" style="display: none" name="longitude" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="2.17403" data-component="body"> <br> <p>Longitude of the user location if full address is not given Example: <code>2.17403</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>comments</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="comments" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="magni" data-component="body"> <br> <p>Extra comments Example: <code>magni</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>photo</code></b> <small>file</small> <i>optional</i> <input type="file" style="display: none" name="photo" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="" data-component="body"> <br> <p>Upload Photo as a file of the visit if any or base64 encoded image Example: <code>C:\Users\nikhi\AppData\Local\Temp\php8A17.tmp</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>meet_with</code></b> <small>required</small> <i>optional</i> <input type="text" style="display: none" name="meet_with" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="iure" data-component="body"> <br> <p>name of person field force meet with Example: <code>iure</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>meet_with_mobileno</code></b> <small>required</small> <i>optional</i> <input type="text" style="display: none" name="meet_with_mobileno" data-endpoint="POSTconnector-api-field-force-update-visit-status--id-" value="est" data-component="body"> <br> <p>mobile number of the person field force meet with Example: <code>est</code></p> </div> </form> <h1 id="new-end-points">New end points</h1> <h2 id="new-end-points-GETconnector-api-new_product">New List products</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-new_product"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/new_product?order_by=aut&order_direction=velit&location_custom_field_1=aut&category_id=dolor&sub_category_id=rem&location_id=1&not_for_sell=amet&send_lot_detail=quod&name=quia&sku=illo&product_ids=1%2C2&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/new_product" ); const params = { "order_by": "aut", "order_direction": "velit", "location_custom_field_1": "aut", "category_id": "dolor", "sub_category_id": "rem", "location_id": "1", "not_for_sell": "amet", "send_lot_detail": "quod", "name": "quia", "sku": "illo", "product_ids": "1,2", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/new_product', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'order_by' => 'aut', 'order_direction' => 'velit', 'location_custom_field_1' => 'aut', 'category_id' => 'dolor', 'sub_category_id' => 'rem', 'location_id' => '1', 'not_for_sell' => 'amet', 'send_lot_detail' => 'quod', 'name' => 'quia', 'sku' => 'illo', 'product_ids' => '1,2', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-new_product"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 2, "name": "Levis Men's Slimmy Fit Jeans", "business_id": 1, "type": "variable", "exemption_type_id": null, "enable_stock": 1, "sku": "AS0002", "product_custom_field1": null, "product_custom_field2": null, "product_custom_field3": null, "product_custom_field4": null, "woocommerce_media_id": null, "product_description": null, "is_inactive": 0, "repair_model_id": null, "not_for_selling": 0, "ecom_shipping_class_id": null, "ecom_active_in_store": 1, "woocommerce_product_id": 627, "woocommerce_disable_sync": 0, "image_url": "http://local.pos.com/uploads/img/1528727964_levis_jeans.jpg", "product_variations": [ { "id": 2, "variation_template_id": 5, "name": "Waist Size", "product_id": 2, "is_dummy": 0, "variations": [ { "id": 2, "name": "28", "product_id": 2, "sub_sku": "AS0002-1", "product_variation_id": 2, "woocommerce_variation_id": 658, "default_purchase_price": "70.0000", "dpp_inc_tax": "77.0000", "default_sell_price": "70.0000", "sell_price_inc_tax": "77.0000", "combo_variations": null, "variation_location_details": [ { "id": 1, "product_id": 2, "product_variation_id": 2, "variation_id": 2, "location_id": 1, "qty_available": "71.0000" } ], "media": [], "discounts": [] }, { "id": 3, "name": "30", "product_id": 2, "sub_sku": "AS0002-2", "product_variation_id": 2, "woocommerce_variation_id": 659, "default_purchase_price": "70.0000", "dpp_inc_tax": "77.0000", "default_sell_price": "70.0000", "sell_price_inc_tax": "77.0000", "combo_variations": null, "variation_location_details": [ { "id": 2, "product_id": 2, "product_variation_id": 2, "variation_id": 3, "location_id": 1, "qty_available": "89.0000" } ], "media": [], "discounts": [] }, { "id": 4, "name": "32", "product_id": 2, "sub_sku": "AS0002-3", "product_variation_id": 2, "woocommerce_variation_id": 660, "default_purchase_price": "70.0000", "dpp_inc_tax": "77.0000", "default_sell_price": "70.0000", "sell_price_inc_tax": "77.0000", "combo_variations": null, "variation_location_details": [ { "id": 3, "product_id": 2, "product_variation_id": 2, "variation_id": 4, "location_id": 1, "qty_available": "127.0000" }, { "id": 1371, "product_id": 2, "product_variation_id": 2, "variation_id": 4, "location_id": 7, "qty_available": "-1.0000" } ], "media": [], "discounts": [] }, { "id": 5, "name": "34", "product_id": 2, "sub_sku": "AS0002-4", "product_variation_id": 2, "woocommerce_variation_id": 661, "default_purchase_price": "72.0000", "dpp_inc_tax": "79.2000", "default_sell_price": "72.0000", "sell_price_inc_tax": "79.2000", "combo_variations": null, "variation_location_details": [ { "id": 4, "product_id": 2, "product_variation_id": 2, "variation_id": 5, "location_id": 1, "qty_available": "128.0000" } ], "media": [], "discounts": [] }, { "id": 6, "name": "36", "product_id": 2, "sub_sku": "AS0002-5", "product_variation_id": 2, "woocommerce_variation_id": 662, "default_purchase_price": "72.0000", "dpp_inc_tax": "79.2000", "default_sell_price": "72.0000", "sell_price_inc_tax": "79.2000", "combo_variations": null, "variation_location_details": [ { "id": 5, "product_id": 2, "product_variation_id": 2, "variation_id": 6, "location_id": 1, "qty_available": "99.0000" } ], "media": [], "discounts": [] } ] } ], "brand": { "id": 1, "business_id": 1, "name": "Levis", "description": null, "created_by": 1, "use_for_repair": 1, "deleted_at": null, "created_at": "2018-01-03 21:19:47", "updated_at": "2018-01-03 21:19:47" }, "unit": { "id": 1, "business_id": 1, "actual_name": "Pieces", "short_name": "Pc(s)", "allow_decimal": 0, "base_unit_id": null, "base_unit_multiplier": null }, "category": { "id": 1, "name": "Men's", "business_id": 1, "short_code": "sfefef", "parent_id": 0, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null }, "sub_category": { "id": 4, "name": "Jeans", "business_id": 1, "short_code": null, "parent_id": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null }, "product_tax": { "id": 1, "business_id": 1, "name": "VAT@10%", "amount": 10, "is_tax_group": 0, "for_tax_group": 0, "created_by": 1, "woocommerce_tax_rate_id": null, "deleted_at": null, "created_at": "2018-01-04 02:40:07", "updated_at": "2018-01-04 02:40:07" }, "product_locations": [ { "id": 1, "business_id": 1, "name": "Location 1", "custom_field1": "gdgdgd88", "custom_field2": null, "custom_field3": null, "custom_field4": null } ] } ], "links": { "first": "http://local.pos.com/connector/api/new_product?per_page=1&page=1", "last": "http://local.pos.com/connector/api/new_product?per_page=1&page=1088", "prev": null, "next": "http://local.pos.com/connector/api/new_product?per_page=1&page=2" }, "meta": { "current_page": 1, "from": 1, "last_page": 1088, "path": "http://local.pos.com/connector/api/new_product", "per_page": "1", "to": 1, "total": 1088 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-new_product" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-new_product"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-new_product" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-new_product" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-new_product"></code></pre> </span> <form id="form-GETconnector-api-new_product" data-method="GET" data-path="connector/api/new_product" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-new_product', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/new_product</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-new_product" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-new_product" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-new_product" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_by" data-endpoint="GETconnector-api-new_product" value="aut" data-component="query"> <br> <p>Values: product_name or newest Example: <code>aut</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_direction</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_direction" data-endpoint="GETconnector-api-new_product" value="velit" data-component="query"> <br> <p>Values: asc or desc Example: <code>velit</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_custom_field_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_custom_field_1" data-endpoint="GETconnector-api-new_product" value="aut" data-component="query"> <br> <p>Custom field 1 of the location Example: <code>aut</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="category_id" data-endpoint="GETconnector-api-new_product" value="dolor" data-component="query"> <br> <p>comma separated ids of one or multiple category Example: <code>dolor</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sub_category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sub_category_id" data-endpoint="GETconnector-api-new_product" value="rem" data-component="query"> <br> <p>comma separated ids of one or multiple sub-category Example: <code>rem</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-new_product" value="1" data-component="query"> <br> <p>Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>not_for_sell</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="not_for_sell" data-endpoint="GETconnector-api-new_product" value="amet" data-component="query"> <br> <p>(1, 0) Example: <code>amet</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>send_lot_detail</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="send_lot_detail" data-endpoint="GETconnector-api-new_product" value="quod" data-component="query"> <br> <p>Send lot details in each variation location details(1, 0) Example: <code>quod</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="name" data-endpoint="GETconnector-api-new_product" value="quia" data-component="query"> <br> <p>Search term for product name Example: <code>quia</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sku</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sku" data-endpoint="GETconnector-api-new_product" value="illo" data-component="query"> <br> <p>Search term for product sku Example: <code>illo</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product_ids</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="product_ids" data-endpoint="GETconnector-api-new_product" value="1,2" data-component="query"> <br> <p>comma separated ids of products Example: <code>1,2</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-new_product" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h2 id="new-end-points-GETconnector-api-new_sell">New List sells</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-new_sell"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/new_sell?location_id=1&contact_id=corrupti&payment_status=due%2Cpartial&start_date=2018-06-25&end_date=2018-06-25&user_id=vel&service_staff_id=ut&shipping_status=ordered&source=laudantium&customer_group_id=sed&product_name=enim&product_sku=esse&product_custom_field_1=ratione&location_custom_field_1=exercitationem&location_invoice_scheme_prefix=nisi&product_category_id=voluptas&product_sub_category_id=et&sell_ids=55%2C64&only_subscriptions=et&send_purchase_details=tempore&order_by_date=desc&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/new_sell" ); const params = { "location_id": "1", "contact_id": "corrupti", "payment_status": "due,partial", "start_date": "2018-06-25", "end_date": "2018-06-25", "user_id": "vel", "service_staff_id": "ut", "shipping_status": "ordered", "source": "laudantium", "customer_group_id": "sed", "product_name": "enim", "product_sku": "esse", "product_custom_field_1": "ratione", "location_custom_field_1": "exercitationem", "location_invoice_scheme_prefix": "nisi", "product_category_id": "voluptas", "product_sub_category_id": "et", "sell_ids": "55,64", "only_subscriptions": "et", "send_purchase_details": "tempore", "order_by_date": "desc", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/new_sell', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'location_id' => '1', 'contact_id' => 'corrupti', 'payment_status' => 'due,partial', 'start_date' => '2018-06-25', 'end_date' => '2018-06-25', 'user_id' => 'vel', 'service_staff_id' => 'ut', 'shipping_status' => 'ordered', 'source' => 'laudantium', 'customer_group_id' => 'sed', 'product_name' => 'enim', 'product_sku' => 'esse', 'product_custom_field_1' => 'ratione', 'location_custom_field_1' => 'exercitationem', 'location_invoice_scheme_prefix' => 'nisi', 'product_category_id' => 'voluptas', 'product_sub_category_id' => 'et', 'sell_ids' => '55,64', 'only_subscriptions' => 'et', 'send_purchase_details' => 'tempore', 'order_by_date' => 'desc', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-new_sell"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 6, "business_id": 1, "location_id": 1, "res_table_id": null, "type": "sell", "status": "final", "is_quotation": 0, "payment_status": "paid", "contact_id": 4, "customer_group_id": null, "invoice_no": "AS0001", "ref_no": "", "source": null, "unique_hash": null, "hash_control": null, "subscription_no": null, "subscription_repeat_on": null, "transaction_date": "2018-04-10 13:23:21", "total_before_tax": "770.0000", "tax_id": null, "tax_amount": "0.0000", "discount_type": "percentage", "discount_amount": "0.0000", "rp_redeemed": 0, "rp_redeemed_amount": "0.0000", "shipping_details": null, "shipping_address": null, "shipping_status": null, "delivered_to": null, "additional_notes": null, "staff_note": null, "round_off_amount": "0.0000", "final_total": "770.0000", "expense_sub_category_id": null, "is_direct_sale": 0, "is_suspend": 0, "total_amount_recovered": null, "crm_is_order_request": 0, "mfg_production_cost": "0.0000", "mfg_production_cost_type": "percentage", "mfg_is_final": 0, "is_created_from_api": 0, "essentials_duration": "0.00", "essentials_duration_unit": null, "essentials_amount_per_unit_duration": "0.0000", "essentials_allowances": null, "essentials_deductions": null, "repair_completed_on": null, "repair_warranty_id": null, "repair_brand_id": null, "repair_status_id": null, "repair_model_id": null, "repair_job_sheet_id": null, "repair_defects": null, "repair_serial_no": null, "repair_checklist": null, "repair_security_pwd": null, "repair_security_pattern": null, "repair_due_date": null, "repair_device_id": null, "repair_updates_notif": 0, "invoice_token": "00f79f7fd292225e8c303a6bf8626d06", "pjt_project_id": null, "pjt_title": null, "woocommerce_order_id": null, "selling_price_group_id": null, "created_at": "2018-01-06 07:06:11", "updated_at": "2021-10-23 11:42:13", "location_name": "Location 1", "location_custom_field1": "gdgdgd88", "location_invoice_scheme_prefix": "AS", "table_name": null, "table_description": null, "contact": "Harry", "customer_group_name": "grp 2", "sell_lines": [ { "id": 1, "transaction_id": 6, "product_id": 2, "quantity": 10, "quantity_returned": "0.0000", "unit_price_before_discount": "70.0000", "unit_price": "70.0000", "line_discount_type": null, "line_discount_amount": "0.0000", "unit_price_inc_tax": "77.0000", "item_tax": "7.0000", "tax_id": 1, "discount_id": null, "lot_no_line_id": null, "sell_line_note": null, "woocommerce_line_items_id": null, "children_type": "", "created_at": "2018-01-06 07:06:11", "updated_at": "2018-01-06 07:06:11", "product_name": "Levis Men's Slimmy Fit Jeans", "product_custom_field_1": null, "product_type": "variable", "product_sku": "AS0002", "category": { "id": 1, "name": "Men's", "business_id": 1, "short_code": "sfefef", "parent_id": 0, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null }, "sub_category": { "id": 4, "name": "Jeans", "business_id": 1, "short_code": null, "parent_id": 1, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null }, "product_variations": { "id": 3, "name": "30", "product_id": 2, "sub_sku": "AS0002-2", "product_variation_id": 2, "default_purchase_price": "70.0000", "dpp_inc_tax": "77.0000", "default_sell_price": "70.0000", "sell_price_inc_tax": "77.0000" } } ], "payment_lines": [ { "id": 1, "transaction_id": 6, "business_id": null, "is_return": 0, "amount": "770.0000", "method": "cash", "card_type": "visa", "paid_on": "2018-01-09 17:30:35", "payment_ref_no": null } ], "invoice_url": "http://local.pos.com/invoice/00f79f7fd292225e8c303a6bf8626d06", "payment_link": "" } ], "links": { "first": "http://local.pos.com/connector/api/new_sell?per_page=1&page=1", "last": "http://local.pos.com/connector/api/new_sell?per_page=1&page=213", "prev": null, "next": "http://local.pos.com/connector/api/new_sell?per_page=1&page=2" }, "meta": { "current_page": 1, "from": 1, "last_page": 213, "path": "http://local.pos.com/connector/api/new_sell", "per_page": "1", "to": 1, "total": 213 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-new_sell" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-new_sell"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-new_sell" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-new_sell" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-new_sell"></code></pre> </span> <form id="form-GETconnector-api-new_sell" data-method="GET" data-path="connector/api/new_sell" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-new_sell', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/new_sell</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-new_sell" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-new_sell" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-new_sell" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-new_sell" value="1" data-component="query"> <br> <p>id of the location Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_id" data-endpoint="GETconnector-api-new_sell" value="corrupti" data-component="query"> <br> <p>id of the customer Example: <code>corrupti</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>payment_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment_status" data-endpoint="GETconnector-api-new_sell" value="due,partial" data-component="query"> <br> <p>Comma separated values of payment statuses. Available values due, partial, paid, overdue Example: <code>due,partial</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-new_sell" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-new_sell" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="user_id" data-endpoint="GETconnector-api-new_sell" value="vel" data-component="query"> <br> <p>id of the user who created the sale Example: <code>vel</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_staff_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="service_staff_id" data-endpoint="GETconnector-api-new_sell" value="ut" data-component="query"> <br> <p>id of the service staff assigned with the sale Example: <code>ut</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="shipping_status" data-endpoint="GETconnector-api-new_sell" value="ordered" data-component="query"> <br> <p>Shipping Status of the sale ('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: <code>ordered</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>source</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="source" data-endpoint="GETconnector-api-new_sell" value="laudantium" data-component="query"> <br> <p>Source of the sale Example: <code>laudantium</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>customer_group_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="customer_group_id" data-endpoint="GETconnector-api-new_sell" value="sed" data-component="query"> <br> <p>id of the customer group Example: <code>sed</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="product_name" data-endpoint="GETconnector-api-new_sell" value="enim" data-component="query"> <br> <p>name of the product Example: <code>enim</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product_sku</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="product_sku" data-endpoint="GETconnector-api-new_sell" value="esse" data-component="query"> <br> <p>sku of the product or variation Example: <code>esse</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product_custom_field_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="product_custom_field_1" data-endpoint="GETconnector-api-new_sell" value="ratione" data-component="query"> <br> <p>custome field 1 of the product Example: <code>ratione</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_custom_field_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_custom_field_1" data-endpoint="GETconnector-api-new_sell" value="exercitationem" data-component="query"> <br> <p>custome field 1 of the location Example: <code>exercitationem</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_invoice_scheme_prefix</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_invoice_scheme_prefix" data-endpoint="GETconnector-api-new_sell" value="nisi" data-component="query"> <br> <p>Invoice scheme prefix of the location Example: <code>nisi</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product_category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="product_category_id" data-endpoint="GETconnector-api-new_sell" value="voluptas" data-component="query"> <br> <p>category id of the product Example: <code>voluptas</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product_sub_category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="product_sub_category_id" data-endpoint="GETconnector-api-new_sell" value="et" data-component="query"> <br> <p>Sub category id of the product Example: <code>et</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sell_ids</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sell_ids" data-endpoint="GETconnector-api-new_sell" value="55,64" data-component="query"> <br> <p>comma separated ids of the sells Example: <code>55,64</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>only_subscriptions</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="only_subscriptions" data-endpoint="GETconnector-api-new_sell" value="et" data-component="query"> <br> <p>Filter only subcription invoices (1, 0) Example: <code>et</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>send_purchase_details</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="send_purchase_details" data-endpoint="GETconnector-api-new_sell" value="tempore" data-component="query"> <br> <p>Get purchase details of each sell line (1, 0) Example: <code>tempore</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_by_date" data-endpoint="GETconnector-api-new_sell" value="desc" data-component="query"> <br> <p>Sort sell list by date ('asc', 'desc') Example: <code>desc</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-new_sell" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h2 id="new-end-points-GETconnector-api-new_contactapi">New List contact</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-new_contactapi"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/new_contactapi?type=doloribus&customer_group_id=dignissimos&custom_field_1=illum&contact_ids=2%2C3&name=doloribus&biz_name=harum&mobile_num=2&contact_id=nihil&order_by=nobis&direction=dolorem&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/new_contactapi" ); const params = { "type": "doloribus", "customer_group_id": "dignissimos", "custom_field_1": "illum", "contact_ids": "2,3", "name": "doloribus", "biz_name": "harum", "mobile_num": "2", "contact_id": "nihil", "order_by": "nobis", "direction": "dolorem", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/new_contactapi', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'type' => 'doloribus', 'customer_group_id' => 'dignissimos', 'custom_field_1' => 'illum', 'contact_ids' => '2,3', 'name' => 'doloribus', 'biz_name' => 'harum', 'mobile_num' => '2', 'contact_id' => 'nihil', 'order_by' => 'nobis', 'direction' => 'dolorem', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-new_contactapi"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 18, "business_id": 1, "type": "customer", "name": "Mr. Rohit Kumar Agrawalla", "prefix": "Mr.", "first_name": "Rohit", "middle_name": "Kumar", "last_name": "Agrawalla", "email": null, "contact_status": "active", "mobile": "8596859647", "credit_limit": null, "converted_by": null, "converted_on": null, "balance": "40.0000", "total_rp": 0, "total_rp_used": 0, "total_rp_expired": 0, "customer_group_id": 1, "crm_source": null, "crm_life_stage": null, "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "custom_field5": null, "custom_field6": null, "custom_field7": null, "custom_field8": null, "custom_field9": null, "custom_field10": null, "remember_token": null, "password": null } ], "links": { "first": "http://local.pos.com/connector/api/new_contactapi?customer_group_id=1&page=1", "last": "http://local.pos.com/connector/api/new_contactapi?customer_group_id=1&page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "last_page": 1, "path": "http://local.pos.com/connector/api/new_contactapi", "per_page": 10, "to": 1, "total": 1 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-new_contactapi" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-new_contactapi"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-new_contactapi" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-new_contactapi" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-new_contactapi"></code></pre> </span> <form id="form-GETconnector-api-new_contactapi" data-method="GET" data-path="connector/api/new_contactapi" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-new_contactapi', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/new_contactapi</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-new_contactapi" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-new_contactapi" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-new_contactapi" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>type</code></b> <small>string</small> <input type="text" style="display: none" name="type" data-endpoint="GETconnector-api-new_contactapi" value="doloribus" data-component="query"> <br> <p>Type of contact (supplier, customer) Example: <code>doloribus</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>customer_group_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="customer_group_id" data-endpoint="GETconnector-api-new_contactapi" value="dignissimos" data-component="query"> <br> <p>id of the customer group Example: <code>dignissimos</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field_1" data-endpoint="GETconnector-api-new_contactapi" value="illum" data-component="query"> <br> <p>Custom field 1 of the contact Example: <code>illum</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_ids</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_ids" data-endpoint="GETconnector-api-new_contactapi" value="2,3" data-component="query"> <br> <p>comma separated ids of contacts Example: <code>2,3</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="name" data-endpoint="GETconnector-api-new_contactapi" value="doloribus" data-component="query"> <br> <p>Search term for contact name Example: <code>doloribus</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>biz_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="biz_name" data-endpoint="GETconnector-api-new_contactapi" value="harum" data-component="query"> <br> <p>Search term for contact's business name Example: <code>harum</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>mobile_num</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="mobile_num" data-endpoint="GETconnector-api-new_contactapi" value="2" data-component="query"> <br> <p>Search term for contact's mobile number Example: <code>2</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_id" data-endpoint="GETconnector-api-new_contactapi" value="nihil" data-component="query"> <br> <p>Search term for contact's contact_id. Ex(CO0005) Example: <code>nihil</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_by" data-endpoint="GETconnector-api-new_contactapi" value="nobis" data-component="query"> <br> <p>Column name to sort the result, Column: name, supplier_business_name Example: <code>nobis</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>direction</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="direction" data-endpoint="GETconnector-api-new_contactapi" value="dolorem" data-component="query"> <br> <p>Direction to sort the result, Direction: desc, asc Example: <code>dolorem</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-new_contactapi" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h1 id="product-management">Product management</h1> <h2 id="product-management-GETconnector-api-product">List products</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-product"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/product?order_by=et&order_direction=molestiae&brand_id=sapiente&category_id=ad&sub_category_id=eligendi&location_id=1&selling_price_group=harum&send_lot_detail=eum&name=est&sku=autem&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/product" ); const params = { "order_by": "et", "order_direction": "molestiae", "brand_id": "sapiente", "category_id": "ad", "sub_category_id": "eligendi", "location_id": "1", "selling_price_group": "harum", "send_lot_detail": "eum", "name": "est", "sku": "autem", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/product', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'order_by' => 'et', 'order_direction' => 'molestiae', 'brand_id' => 'sapiente', 'category_id' => 'ad', 'sub_category_id' => 'eligendi', 'location_id' => '1', 'selling_price_group' => 'harum', 'send_lot_detail' => 'eum', 'name' => 'est', 'sku' => 'autem', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-product"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "Men's Reverse Fleece Crew", "business_id": 1, "type": "single", "sub_unit_ids": null, "enable_stock": 1, "alert_quantity": "5.0000", "sku": "AS0001", "barcode_type": "C128", "expiry_period": null, "expiry_period_type": null, "enable_sr_no": 0, "weight": null, "product_custom_field1": null, "product_custom_field2": null, "product_custom_field3": null, "product_custom_field4": null, "image": null, "woocommerce_media_id": null, "product_description": null, "created_by": 1, "warranty_id": null, "is_inactive": 0, "repair_model_id": null, "not_for_selling": 0, "ecom_shipping_class_id": null, "ecom_active_in_store": 1, "woocommerce_product_id": 356, "woocommerce_disable_sync": 0, "image_url": "http://local.pos.com/img/default.png", "product_variations": [ { "id": 1, "variation_template_id": null, "name": "DUMMY", "product_id": 1, "is_dummy": 1, "created_at": "2018-01-03 21:29:08", "updated_at": "2018-01-03 21:29:08", "variations": [ { "id": 1, "name": "DUMMY", "product_id": 1, "sub_sku": "AS0001", "product_variation_id": 1, "woocommerce_variation_id": null, "variation_value_id": null, "default_purchase_price": "130.0000", "dpp_inc_tax": "143.0000", "profit_percent": "0.0000", "default_sell_price": "130.0000", "sell_price_inc_tax": "143.0000", "created_at": "2018-01-03 21:29:08", "updated_at": "2020-06-09 00:23:22", "deleted_at": null, "combo_variations": null, "variation_location_details": [ { "id": 56, "product_id": 1, "product_variation_id": 1, "variation_id": 1, "location_id": 1, "qty_available": "20.0000", "created_at": "2020-06-08 23:46:40", "updated_at": "2020-06-08 23:46:40" } ], "media": [ { "id": 1, "business_id": 1, "file_name": "1591686466_978227300_nn.jpeg", "description": null, "uploaded_by": 9, "model_type": "App\\Variation", "woocommerce_media_id": null, "model_id": 1, "created_at": "2020-06-09 00:07:46", "updated_at": "2020-06-09 00:07:46", "display_name": "nn.jpeg", "display_url": "http://local.pos.com/uploads/media/1591686466_978227300_nn.jpeg" } ], "discounts": [ { "id": 2, "name": "FLAT 10%", "business_id": 1, "brand_id": null, "category_id": null, "location_id": 1, "priority": 2, "discount_type": "fixed", "discount_amount": "5.0000", "starts_at": "2021-09-01 11:45:00", "ends_at": "2021-09-30 11:45:00", "is_active": 1, "spg": null, "applicable_in_cg": 1, "created_at": "2021-09-01 11:46:00", "updated_at": "2021-09-01 12:12:55", "formated_starts_at": " 11:45", "formated_ends_at": " 11:45" } ], "selling_price_group": [ { "id": 2, "variation_id": 1, "price_group_id": 1, "price_inc_tax": "140.0000", "created_at": "2020-06-09 00:23:31", "updated_at": "2020-06-09 00:23:31" } ] } ] } ], "brand": { "id": 1, "business_id": 1, "name": "Levis", "description": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 21:19:47", "updated_at": "2018-01-03 21:19:47" }, "unit": { "id": 1, "business_id": 1, "actual_name": "Pieces", "short_name": "Pc(s)", "allow_decimal": 0, "base_unit_id": null, "base_unit_multiplier": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 15:15:20", "updated_at": "2018-01-03 15:15:20" }, "category": { "id": 1, "name": "Men's", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:06:34", "updated_at": "2018-01-03 21:06:34" }, "sub_category": { "id": 5, "name": "Shirts", "business_id": 1, "short_code": null, "parent_id": 1, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:08:18", "updated_at": "2018-01-03 21:08:18" }, "product_tax": { "id": 1, "business_id": 1, "name": "VAT@10%", "amount": 10, "is_tax_group": 0, "created_by": 1, "woocommerce_tax_rate_id": null, "deleted_at": null, "created_at": "2018-01-04 02:40:07", "updated_at": "2018-01-04 02:40:07" }, "product_locations": [ { "id": 1, "business_id": 1, "location_id": null, "name": "Awesome Shop", "landmark": "Linking Street", "country": "USA", "state": "Arizona", "city": "Phoenix", "zip_code": "85001", "invoice_scheme_id": 1, "invoice_layout_id": 1, "selling_price_group_id": null, "print_receipt_on_invoice": 1, "receipt_printer_type": "browser", "printer_id": null, "mobile": null, "alternate_number": null, "email": null, "website": null, "featured_products": [ "5", "71" ], "is_active": 1, "default_payment_accounts": "{\"cash\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"card\":{\"is_enabled\":\"1\",\"account\":\"3\"},\"cheque\":{\"is_enabled\":\"1\",\"account\":\"2\"},\"bank_transfer\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"other\":{\"is_enabled\":\"1\",\"account\":\"3\"},\"custom_pay_1\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"custom_pay_2\":{\"is_enabled\":\"1\",\"account\":\"2\"},\"custom_pay_3\":{\"is_enabled\":\"1\",\"account\":\"3\"}}", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2018-01-04 02:15:20", "updated_at": "2020-06-09 01:07:05", "pivot": { "product_id": 2, "location_id": 1 } } ] } ], "links": { "first": "http://local.pos.com/connector/api/product?page=1", "last": "http://local.pos.com/connector/api/product?page=32", "prev": null, "next": "http://local.pos.com/connector/api/product?page=2" }, "meta": { "current_page": 1, "from": 1, "path": "http://local.pos.com/connector/api/product", "per_page": 10, "to": 10 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-product" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-product"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-product" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-product" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-product"></code></pre> </span> <form id="form-GETconnector-api-product" data-method="GET" data-path="connector/api/product" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-product', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/product</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-product" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-product" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-product" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_by" data-endpoint="GETconnector-api-product" value="et" data-component="query"> <br> <p>Values: product_name or newest Example: <code>et</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_direction</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_direction" data-endpoint="GETconnector-api-product" value="molestiae" data-component="query"> <br> <p>Values: asc or desc Example: <code>molestiae</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>brand_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="brand_id" data-endpoint="GETconnector-api-product" value="sapiente" data-component="query"> <br> <p>comma separated ids of one or multiple brands Example: <code>sapiente</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="category_id" data-endpoint="GETconnector-api-product" value="ad" data-component="query"> <br> <p>comma separated ids of one or multiple category Example: <code>ad</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sub_category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sub_category_id" data-endpoint="GETconnector-api-product" value="eligendi" data-component="query"> <br> <p>comma separated ids of one or multiple sub-category Example: <code>eligendi</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-product" value="1" data-component="query"> <br> <p>Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>selling_price_group</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="selling_price_group" data-endpoint="GETconnector-api-product" value="harum" data-component="query"> <br> <p>(1, 0) Example: <code>harum</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>send_lot_detail</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="send_lot_detail" data-endpoint="GETconnector-api-product" value="eum" data-component="query"> <br> <p>Send lot details in each variation location details(1, 0) Example: <code>eum</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="name" data-endpoint="GETconnector-api-product" value="est" data-component="query"> <br> <p>Search term for product name Example: <code>est</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sku</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sku" data-endpoint="GETconnector-api-product" value="autem" data-component="query"> <br> <p>Search term for product sku Example: <code>autem</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-product" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h2 id="product-management-GETconnector-api-product--id-">Get the specified product</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-product--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/product/1?selling_price_group=laudantium&send_lot_detail=ea" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/product/1" ); const params = { "selling_price_group": "laudantium", "send_lot_detail": "ea", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/product/1', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'selling_price_group' => 'laudantium', 'send_lot_detail' => 'ea', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-product--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "Men's Reverse Fleece Crew", "business_id": 1, "type": "single", "sub_unit_ids": null, "enable_stock": 1, "alert_quantity": "5.0000", "sku": "AS0001", "barcode_type": "C128", "expiry_period": null, "expiry_period_type": null, "enable_sr_no": 0, "weight": null, "product_custom_field1": null, "product_custom_field2": null, "product_custom_field3": null, "product_custom_field4": null, "image": null, "woocommerce_media_id": null, "product_description": null, "created_by": 1, "warranty_id": null, "is_inactive": 0, "repair_model_id": null, "not_for_selling": 0, "ecom_shipping_class_id": null, "ecom_active_in_store": 1, "woocommerce_product_id": 356, "woocommerce_disable_sync": 0, "image_url": "http://local.pos.com/img/default.png", "product_variations": [ { "id": 1, "variation_template_id": null, "name": "DUMMY", "product_id": 1, "is_dummy": 1, "created_at": "2018-01-03 21:29:08", "updated_at": "2018-01-03 21:29:08", "variations": [ { "id": 1, "name": "DUMMY", "product_id": 1, "sub_sku": "AS0001", "product_variation_id": 1, "woocommerce_variation_id": null, "variation_value_id": null, "default_purchase_price": "130.0000", "dpp_inc_tax": "143.0000", "profit_percent": "0.0000", "default_sell_price": "130.0000", "sell_price_inc_tax": "143.0000", "created_at": "2018-01-03 21:29:08", "updated_at": "2020-06-09 00:23:22", "deleted_at": null, "combo_variations": null, "variation_location_details": [ { "id": 56, "product_id": 1, "product_variation_id": 1, "variation_id": 1, "location_id": 1, "qty_available": "20.0000", "created_at": "2020-06-08 23:46:40", "updated_at": "2020-06-08 23:46:40" } ], "media": [ { "id": 1, "business_id": 1, "file_name": "1591686466_978227300_nn.jpeg", "description": null, "uploaded_by": 9, "model_type": "App\\Variation", "woocommerce_media_id": null, "model_id": 1, "created_at": "2020-06-09 00:07:46", "updated_at": "2020-06-09 00:07:46", "display_name": "nn.jpeg", "display_url": "http://local.pos.com/uploads/media/1591686466_978227300_nn.jpeg" } ], "discounts": [ { "id": 2, "name": "FLAT 10%", "business_id": 1, "brand_id": null, "category_id": null, "location_id": 1, "priority": 2, "discount_type": "fixed", "discount_amount": "5.0000", "starts_at": "2021-09-01 11:45:00", "ends_at": "2021-09-30 11:45:00", "is_active": 1, "spg": null, "applicable_in_cg": 1, "created_at": "2021-09-01 11:46:00", "updated_at": "2021-09-01 12:12:55", "formated_starts_at": " 11:45", "formated_ends_at": " 11:45" } ], "selling_price_group": [ { "id": 2, "variation_id": 1, "price_group_id": 1, "price_inc_tax": "140.0000", "created_at": "2020-06-09 00:23:31", "updated_at": "2020-06-09 00:23:31" } ] } ] } ], "brand": { "id": 1, "business_id": 1, "name": "Levis", "description": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 21:19:47", "updated_at": "2018-01-03 21:19:47" }, "unit": { "id": 1, "business_id": 1, "actual_name": "Pieces", "short_name": "Pc(s)", "allow_decimal": 0, "base_unit_id": null, "base_unit_multiplier": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 15:15:20", "updated_at": "2018-01-03 15:15:20" }, "category": { "id": 1, "name": "Men's", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:06:34", "updated_at": "2018-01-03 21:06:34" }, "sub_category": { "id": 5, "name": "Shirts", "business_id": 1, "short_code": null, "parent_id": 1, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:08:18", "updated_at": "2018-01-03 21:08:18" }, "product_tax": { "id": 1, "business_id": 1, "name": "VAT@10%", "amount": 10, "is_tax_group": 0, "created_by": 1, "woocommerce_tax_rate_id": null, "deleted_at": null, "created_at": "2018-01-04 02:40:07", "updated_at": "2018-01-04 02:40:07" }, "product_locations": [ { "id": 1, "business_id": 1, "location_id": null, "name": "Awesome Shop", "landmark": "Linking Street", "country": "USA", "state": "Arizona", "city": "Phoenix", "zip_code": "85001", "invoice_scheme_id": 1, "invoice_layout_id": 1, "selling_price_group_id": null, "print_receipt_on_invoice": 1, "receipt_printer_type": "browser", "printer_id": null, "mobile": null, "alternate_number": null, "email": null, "website": null, "featured_products": [ "5", "71" ], "is_active": 1, "default_payment_accounts": "{\"cash\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"card\":{\"is_enabled\":\"1\",\"account\":\"3\"},\"cheque\":{\"is_enabled\":\"1\",\"account\":\"2\"},\"bank_transfer\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"other\":{\"is_enabled\":\"1\",\"account\":\"3\"},\"custom_pay_1\":{\"is_enabled\":\"1\",\"account\":\"1\"},\"custom_pay_2\":{\"is_enabled\":\"1\",\"account\":\"2\"},\"custom_pay_3\":{\"is_enabled\":\"1\",\"account\":\"3\"}}", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2018-01-04 02:15:20", "updated_at": "2020-06-09 01:07:05", "pivot": { "product_id": 2, "location_id": 1 } } ] } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-product--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-product--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-product--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-product--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-product--id-"></code></pre> </span> <form id="form-GETconnector-api-product--id-" data-method="GET" data-path="connector/api/product/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-product--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/product/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-product--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-product--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-product--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>integer</small> <input type="number" style="display: none" name="id" data-endpoint="GETconnector-api-product--id-" value="1" data-component="url"> <br> <p>The ID of the product. Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product</code></b> <small>string</small> <input type="text" style="display: none" name="product" data-endpoint="GETconnector-api-product--id-" value="1" data-component="url"> <br> <p>comma separated ids of products Example: <code>1</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>selling_price_group</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="selling_price_group" data-endpoint="GETconnector-api-product--id-" value="laudantium" data-component="query"> <br> <p>(1, 0) Example: <code>laudantium</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>send_lot_detail</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="send_lot_detail" data-endpoint="GETconnector-api-product--id-" value="ea" data-component="query"> <br> <p>Send lot details in each variation location details(1, 0) Example: <code>ea</code></p> </div> </form> <h2 id="product-management-GETconnector-api-selling-price-group">List Selling Price Group</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-selling-price-group"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/selling-price-group" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/selling-price-group" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/selling-price-group', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-selling-price-group"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "Retail", "description": null, "business_id": 1, "is_active": 1, "deleted_at": null, "created_at": "2020-10-21 04:30:06", "updated_at": "2020-11-16 18:23:15" }, { "id": 2, "name": "Wholesale", "description": null, "business_id": 1, "is_active": 1, "deleted_at": null, "created_at": "2020-10-21 04:30:21", "updated_at": "2020-11-16 18:23:00" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-selling-price-group" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-selling-price-group"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-selling-price-group" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-selling-price-group" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-selling-price-group"></code></pre> </span> <form id="form-GETconnector-api-selling-price-group" data-method="GET" data-path="connector/api/selling-price-group" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-selling-price-group', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/selling-price-group</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-selling-price-group" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-selling-price-group" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-selling-price-group" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="product-management-GETconnector-api-variation--id--">List Variations</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-variation--id--"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/variation/2?product_id=officiis&location_id=1&brand_id=natus&category_id=totam&sub_category_id=et&not_for_selling=omnis&name=ipsam&sku=laboriosam&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/variation/2" ); const params = { "product_id": "officiis", "location_id": "1", "brand_id": "natus", "category_id": "totam", "sub_category_id": "et", "not_for_selling": "omnis", "name": "ipsam", "sku": "laboriosam", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/variation/2', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'product_id' => 'officiis', 'location_id' => '1', 'brand_id' => 'natus', 'category_id' => 'totam', 'sub_category_id' => 'et', 'not_for_selling' => 'omnis', 'name' => 'ipsam', 'sku' => 'laboriosam', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-variation--id--"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "variation_id": 1, "variation_name": "", "sub_sku": "AS0001", "product_id": 1, "product_name": "Men's Reverse Fleece Crew", "sku": "AS0001", "type": "single", "business_id": 1, "barcode_type": "C128", "expiry_period": null, "expiry_period_type": null, "enable_sr_no": 0, "weight": null, "product_custom_field1": null, "product_custom_field2": null, "product_custom_field3": null, "product_custom_field4": null, "product_image": "1528728059_fleece_crew.jpg", "product_description": null, "warranty_id": null, "brand_id": 1, "brand_name": "Levis", "unit_id": 1, "enable_stock": 1, "not_for_selling": 0, "unit_name": "Pc(s)", "unit_allow_decimal": 0, "category_id": 1, "category": "Men's", "sub_category_id": 5, "sub_category": "Shirts", "tax_id": 1, "tax_type": "exclusive", "tax_name": "VAT@10%", "tax_amount": 10, "product_variation_id": 1, "default_purchase_price": "130.0000", "dpp_inc_tax": "143.0000", "profit_percent": "0.0000", "default_sell_price": "130.0000", "sell_price_inc_tax": "143.0000", "product_variation_name": "", "variation_location_details": [], "media": [], "selling_price_group": [], "product_image_url": "http://local.pos.com/uploads/img/1528728059_fleece_crew.jpg", "product_locations": [ { "id": 1, "business_id": 1, "location_id": null, "name": "Awesome Shop", "landmark": "Linking Street", "country": "USA", "state": "Arizona", "city": "Phoenix", "zip_code": "85001", "invoice_scheme_id": 1, "invoice_layout_id": 1, "selling_price_group_id": null, "print_receipt_on_invoice": 1, "receipt_printer_type": "browser", "printer_id": null, "mobile": null, "alternate_number": null, "email": null, "website": null, "featured_products": null, "is_active": 1, "default_payment_accounts": "", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2018-01-04 02:15:20", "updated_at": "2019-12-11 04:53:39", "pivot": { "product_id": 1, "location_id": 1 } } ] }, { "variation_id": 2, "variation_name": "28", "sub_sku": "AS0002-1", "product_id": 2, "product_name": "Levis Men's Slimmy Fit Jeans", "sku": "AS0002", "type": "variable", "business_id": 1, "barcode_type": "C128", "expiry_period": null, "expiry_period_type": null, "enable_sr_no": 0, "weight": null, "product_custom_field1": null, "product_custom_field2": null, "product_custom_field3": null, "product_custom_field4": null, "product_image": "1528727964_levis_jeans.jpg", "product_description": null, "warranty_id": null, "brand_id": 1, "brand_name": "Levis", "unit_id": 1, "enable_stock": 1, "not_for_selling": 0, "unit_name": "Pc(s)", "unit_allow_decimal": 0, "category_id": 1, "category": "Men's", "sub_category_id": 4, "sub_category": "Jeans", "tax_id": 1, "tax_type": "exclusive", "tax_name": "VAT@10%", "tax_amount": 10, "product_variation_id": 2, "default_purchase_price": "70.0000", "dpp_inc_tax": "77.0000", "profit_percent": "0.0000", "default_sell_price": "70.0000", "sell_price_inc_tax": "77.0000", "product_variation_name": "Waist Size", "variation_location_details": [ { "id": 1, "product_id": 2, "product_variation_id": 2, "variation_id": 2, "location_id": 1, "qty_available": "50.0000", "created_at": "2018-01-06 06:57:11", "updated_at": "2020-08-04 04:11:27" } ], "media": [ { "id": 1, "business_id": 1, "file_name": "1596701997_743693452_test.jpg", "description": null, "uploaded_by": 9, "model_type": "App\\Variation", "woocommerce_media_id": null, "model_id": 2, "created_at": "2020-08-06 13:49:57", "updated_at": "2020-08-06 13:49:57", "display_name": "test.jpg", "display_url": "http://local.pos.com/uploads/media/1596701997_743693452_test.jpg" } ], "selling_price_group": [], "product_image_url": "http://local.pos.com/uploads/img/1528727964_levis_jeans.jpg", "product_locations": [ { "id": 1, "business_id": 1, "location_id": null, "name": "Awesome Shop", "landmark": "Linking Street", "country": "USA", "state": "Arizona", "city": "Phoenix", "zip_code": "85001", "invoice_scheme_id": 1, "invoice_layout_id": 1, "selling_price_group_id": null, "print_receipt_on_invoice": 1, "receipt_printer_type": "browser", "printer_id": null, "mobile": null, "alternate_number": null, "email": null, "website": null, "featured_products": null, "is_active": 1, "default_payment_accounts": "", "custom_field1": null, "custom_field2": null, "custom_field3": null, "custom_field4": null, "deleted_at": null, "created_at": "2018-01-04 02:15:20", "updated_at": "2019-12-11 04:53:39", "pivot": { "product_id": 2, "location_id": 1 } } ], "discounts": [ { "id": 2, "name": "FLAT 10%", "business_id": 1, "brand_id": null, "category_id": null, "location_id": 1, "priority": 2, "discount_type": "fixed", "discount_amount": "5.0000", "starts_at": "2021-09-01 11:45:00", "ends_at": "2021-09-30 11:45:00", "is_active": 1, "spg": null, "applicable_in_cg": 1, "created_at": "2021-09-01 11:46:00", "updated_at": "2021-09-01 12:12:55", "formated_starts_at": " 11:45", "formated_ends_at": " 11:45" } ] } ], "links": { "first": "http://local.pos.com/connector/api/variation?page=1", "last": null, "prev": null, "next": "http://local.pos.com/connector/api/variation?page=2" }, "meta": { "current_page": 1, "from": 1, "path": "http://local.pos.com/connector/api/variation", "per_page": "2", "to": 2 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-variation--id--" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-variation--id--"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-variation--id--" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-variation--id--" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-variation--id--"></code></pre> </span> <form id="form-GETconnector-api-variation--id--" data-method="GET" data-path="connector/api/variation/{id?}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-variation--id--', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/variation/{id?}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-variation--id--" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-variation--id--" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-variation--id--" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-variation--id--" value="2" data-component="url"> <br> <p>comma separated ids of variations Example: <code>2</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="product_id" data-endpoint="GETconnector-api-variation--id--" value="officiis" data-component="query"> <br> <p>Filter by comma separated products ids Example: <code>officiis</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-variation--id--" value="1" data-component="query"> <br> <p>Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>brand_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="brand_id" data-endpoint="GETconnector-api-variation--id--" value="natus" data-component="query"> <br> <p>Example: <code>natus</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="category_id" data-endpoint="GETconnector-api-variation--id--" value="totam" data-component="query"> <br> <p>Example: <code>totam</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sub_category_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sub_category_id" data-endpoint="GETconnector-api-variation--id--" value="et" data-component="query"> <br> <p>Example: <code>et</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>not_for_selling</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="not_for_selling" data-endpoint="GETconnector-api-variation--id--" value="omnis" data-component="query"> <br> <p>Values: 0 or 1 Example: <code>omnis</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="name" data-endpoint="GETconnector-api-variation--id--" value="ipsam" data-component="query"> <br> <p>Search term for product name Example: <code>ipsam</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sku</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sku" data-endpoint="GETconnector-api-variation--id--" value="laboriosam" data-component="query"> <br> <p>Search term for product sku Example: <code>laboriosam</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-variation--id--" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h1 id="sales-management">Sales management</h1> <h2 id="sales-management-GETconnector-api-sell">List sells</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-sell"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/sell?location_id=1&contact_id=animi&status=final&payment_status=due%2Cpartial&start_date=2018-06-25&end_date=2018-06-25&user_id=id&service_staff_id=voluptas&shipping_status=ordered&source=vel&only_subscriptions=inventore&send_purchase_details=illo&order_by_date=desc&per_page=10" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/sell" ); const params = { "location_id": "1", "contact_id": "animi", "status": "final", "payment_status": "due,partial", "start_date": "2018-06-25", "end_date": "2018-06-25", "user_id": "id", "service_staff_id": "voluptas", "shipping_status": "ordered", "source": "vel", "only_subscriptions": "inventore", "send_purchase_details": "illo", "order_by_date": "desc", "per_page": "10", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/sell', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'location_id' => '1', 'contact_id' => 'animi', 'status' => 'final', 'payment_status' => 'due,partial', 'start_date' => '2018-06-25', 'end_date' => '2018-06-25', 'user_id' => 'id', 'service_staff_id' => 'voluptas', 'shipping_status' => 'ordered', 'source' => 'vel', 'only_subscriptions' => 'inventore', 'send_purchase_details' => 'illo', 'order_by_date' => 'desc', 'per_page' => '10', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-sell"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 6, "business_id": 1, "location_id": 1, "res_table_id": null, "res_waiter_id": null, "res_order_status": null, "type": "sell", "sub_type": null, "status": "final", "is_quotation": 0, "payment_status": "paid", "adjustment_type": null, "contact_id": 4, "customer_group_id": null, "invoice_no": "AS0001", "ref_no": "", "source": null, "subscription_no": null, "subscription_repeat_on": null, "transaction_date": "2018-04-10 13:23:21", "total_before_tax": "770.0000", "tax_id": null, "tax_amount": "0.0000", "discount_type": "percentage", "discount_amount": "0.0000", "rp_redeemed": 0, "rp_redeemed_amount": "0.0000", "shipping_details": null, "shipping_address": null, "shipping_status": null, "delivered_to": null, "shipping_charges": "0.0000", "additional_notes": null, "staff_note": null, "round_off_amount": "0.0000", "final_total": "770.0000", "expense_category_id": null, "expense_for": null, "commission_agent": null, "document": null, "is_direct_sale": 0, "is_suspend": 0, "exchange_rate": "1.000", "total_amount_recovered": null, "transfer_parent_id": null, "return_parent_id": null, "opening_stock_product_id": null, "created_by": 1, "import_batch": null, "import_time": null, "types_of_service_id": null, "packing_charge": null, "packing_charge_type": null, "service_custom_field_1": null, "service_custom_field_2": null, "service_custom_field_3": null, "service_custom_field_4": null, "mfg_parent_production_purchase_id": null, "mfg_wasted_units": null, "mfg_production_cost": "0.0000", "mfg_is_final": 0, "is_created_from_api": 0, "essentials_duration": "0.00", "essentials_duration_unit": null, "essentials_amount_per_unit_duration": "0.0000", "essentials_allowances": null, "essentials_deductions": null, "rp_earned": 0, "repair_completed_on": null, "repair_warranty_id": null, "repair_brand_id": null, "repair_status_id": null, "repair_model_id": null, "repair_defects": null, "repair_serial_no": null, "repair_updates_email": 0, "repair_updates_sms": 0, "repair_checklist": null, "repair_security_pwd": null, "repair_security_pattern": null, "repair_due_date": null, "repair_device_id": null, "order_addresses": null, "is_recurring": 0, "recur_interval": null, "recur_interval_type": null, "recur_repetitions": null, "recur_stopped_on": null, "recur_parent_id": null, "invoice_token": null, "pay_term_number": null, "pay_term_type": null, "pjt_project_id": null, "pjt_title": null, "woocommerce_order_id": null, "selling_price_group_id": null, "created_at": "2018-01-06 07:06:11", "updated_at": "2018-01-06 07:06:11", "sell_lines": [ { "id": 1, "transaction_id": 6, "product_id": 2, "variation_id": 3, "quantity": 10, "mfg_waste_percent": "0.0000", "quantity_returned": "0.0000", "unit_price_before_discount": "70.0000", "unit_price": "70.0000", "line_discount_type": null, "line_discount_amount": "0.0000", "unit_price_inc_tax": "77.0000", "item_tax": "7.0000", "tax_id": 1, "discount_id": null, "lot_no_line_id": null, "sell_line_note": null, "res_service_staff_id": null, "res_line_order_status": null, "woocommerce_line_items_id": null, "parent_sell_line_id": null, "children_type": "", "sub_unit_id": null, "created_at": "2018-01-06 07:06:11", "updated_at": "2018-01-06 07:06:11" } ], "payment_lines": [ { "id": 1, "transaction_id": 6, "business_id": null, "is_return": 0, "amount": "770.0000", "method": "cash", "transaction_no": null, "card_transaction_number": null, "card_number": null, "card_type": "visa", "card_holder_name": null, "card_month": null, "card_year": null, "card_security": null, "cheque_number": null, "bank_account_number": null, "paid_on": "2018-01-09 17:30:35", "created_by": 1, "payment_for": null, "parent_id": null, "note": null, "document": null, "payment_ref_no": null, "account_id": null, "created_at": "2018-01-06 01:36:11", "updated_at": "2018-01-06 01:36:11" } ], "invoice_url": "http://local.pos.com/invoice/6dfd77eb80f4976b456128e7f1311c9f", "payment_link": "http://local.pos.com/pay/6dfd77eb80f4976b456128e7f1311c9f" } ], "links": { "first": "http://local.pos.com/connector/api/sell?page=1", "last": "http://local.pos.com/connector/api/sell?page=6", "prev": null, "next": "http://local.pos.com/connector/api/sell?page=2" }, "meta": { "current_page": 1, "from": 1, "path": "http://local.pos.com/connector/api/sell", "per_page": 10, "to": 10 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-sell" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-sell"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-sell" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-sell" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-sell"></code></pre> </span> <form id="form-GETconnector-api-sell" data-method="GET" data-path="connector/api/sell" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-sell', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/sell</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-sell" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-sell" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-sell" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="location_id" data-endpoint="GETconnector-api-sell" value="1" data-component="query"> <br> <p>id of the location Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_id" data-endpoint="GETconnector-api-sell" value="animi" data-component="query"> <br> <p>id of the customer Example: <code>animi</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="GETconnector-api-sell" value="final" data-component="query"> <br> <p>Sell status. Available values final, draft, quotation, proforma Example: <code>final</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>payment_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payment_status" data-endpoint="GETconnector-api-sell" value="due,partial" data-component="query"> <br> <p>Comma separated values of payment statuses. Available values due, partial, paid, overdue Example: <code>due,partial</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>start_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="start_date" data-endpoint="GETconnector-api-sell" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>end_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="end_date" data-endpoint="GETconnector-api-sell" value="2018-06-25" data-component="query"> <br> <p>format:Y-m-d Example: <code>2018-06-25</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="user_id" data-endpoint="GETconnector-api-sell" value="id" data-component="query"> <br> <p>id of the user who created the sale Example: <code>id</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_staff_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="service_staff_id" data-endpoint="GETconnector-api-sell" value="voluptas" data-component="query"> <br> <p>id of the service staff assigned with the sale Example: <code>voluptas</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="shipping_status" data-endpoint="GETconnector-api-sell" value="ordered" data-component="query"> <br> <p>Shipping Status of the sale ('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: <code>ordered</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>source</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="source" data-endpoint="GETconnector-api-sell" value="vel" data-component="query"> <br> <p>Source of the sale Example: <code>vel</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>only_subscriptions</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="only_subscriptions" data-endpoint="GETconnector-api-sell" value="inventore" data-component="query"> <br> <p>Filter only subcription invoices (1, 0) Example: <code>inventore</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>send_purchase_details</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="send_purchase_details" data-endpoint="GETconnector-api-sell" value="illo" data-component="query"> <br> <p>Get purchase details of each sell line (1, 0) Example: <code>illo</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>order_by_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="order_by_date" data-endpoint="GETconnector-api-sell" value="desc" data-component="query"> <br> <p>Sort sell list by date ('asc', 'desc') Example: <code>desc</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>per_page</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="per_page" data-endpoint="GETconnector-api-sell" value="10" data-component="query"> <br> <p>Total records per page. default: 10, Set -1 for no pagination Example: <code>10</code></p> </div> </form> <h2 id="sales-management-POSTconnector-api-sell">Create sell</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-sell"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/sell" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/sell" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "POST", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/sell', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-sell"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 6, "business_id": 1, "location_id": 1, "res_table_id": null, "res_waiter_id": null, "res_order_status": null, "type": "sell", "sub_type": null, "status": "final", "is_quotation": 0, "payment_status": "paid", "adjustment_type": null, "contact_id": 4, "customer_group_id": null, "invoice_no": "AS0001", "ref_no": "", "source": null, "subscription_no": null, "subscription_repeat_on": null, "transaction_date": "2018-04-10 13:23:21", "total_before_tax": "770.0000", "tax_id": null, "tax_amount": "0.0000", "discount_type": "percentage", "discount_amount": "0.0000", "rp_redeemed": 0, "rp_redeemed_amount": "0.0000", "shipping_details": null, "shipping_address": null, "shipping_status": null, "delivered_to": null, "shipping_charges": "0.0000", "additional_notes": null, "staff_note": null, "round_off_amount": "0.0000", "final_total": "770.0000", "expense_category_id": null, "expense_for": null, "commission_agent": null, "document": null, "is_direct_sale": 0, "is_suspend": 0, "exchange_rate": "1.000", "total_amount_recovered": null, "transfer_parent_id": null, "return_parent_id": null, "opening_stock_product_id": null, "created_by": 1, "import_batch": null, "import_time": null, "types_of_service_id": null, "packing_charge": null, "packing_charge_type": null, "service_custom_field_1": null, "service_custom_field_2": null, "service_custom_field_3": null, "service_custom_field_4": null, "mfg_parent_production_purchase_id": null, "mfg_wasted_units": null, "mfg_production_cost": "0.0000", "mfg_is_final": 0, "is_created_from_api": 0, "essentials_duration": "0.00", "essentials_duration_unit": null, "essentials_amount_per_unit_duration": "0.0000", "essentials_allowances": null, "essentials_deductions": null, "rp_earned": 0, "repair_completed_on": null, "repair_warranty_id": null, "repair_brand_id": null, "repair_status_id": null, "repair_model_id": null, "repair_defects": null, "repair_serial_no": null, "repair_updates_email": 0, "repair_updates_sms": 0, "repair_checklist": null, "repair_security_pwd": null, "repair_security_pattern": null, "repair_due_date": null, "repair_device_id": null, "order_addresses": null, "is_recurring": 0, "recur_interval": null, "recur_interval_type": null, "recur_repetitions": null, "recur_stopped_on": null, "recur_parent_id": null, "invoice_token": null, "pay_term_number": null, "pay_term_type": null, "pjt_project_id": null, "pjt_title": null, "woocommerce_order_id": null, "selling_price_group_id": null, "created_at": "2018-01-06 07:06:11", "updated_at": "2018-01-06 07:06:11", "invoice_url": "http://local.pos.com/invoice/6dfd77eb80f4976b456128e7f1311c9f", "payment_link": "http://local.pos.com/pay/6dfd77eb80f4976b456128e7f1311c9f", "sell_lines": [ { "id": 1, "transaction_id": 6, "product_id": 2, "variation_id": 3, "quantity": 10, "mfg_waste_percent": "0.0000", "quantity_returned": "0.0000", "unit_price_before_discount": "70.0000", "unit_price": "70.0000", "line_discount_type": null, "line_discount_amount": "0.0000", "unit_price_inc_tax": "77.0000", "item_tax": "7.0000", "tax_id": 1, "discount_id": null, "lot_no_line_id": null, "sell_line_note": null, "res_service_staff_id": null, "res_line_order_status": null, "woocommerce_line_items_id": null, "parent_sell_line_id": null, "children_type": "", "sub_unit_id": null, "created_at": "2018-01-06 07:06:11", "updated_at": "2018-01-06 07:06:11" } ], "payment_lines": [ { "id": 1, "transaction_id": 6, "business_id": null, "is_return": 0, "amount": "770.0000", "method": "cash", "transaction_no": null, "card_transaction_number": null, "card_number": null, "card_type": "visa", "card_holder_name": null, "card_month": null, "card_year": null, "card_security": null, "cheque_number": null, "bank_account_number": null, "paid_on": "2018-01-09 17:30:35", "created_by": 1, "payment_for": null, "parent_id": null, "note": null, "document": null, "payment_ref_no": null, "account_id": null, "created_at": "2018-01-06 01:36:11", "updated_at": "2018-01-06 01:36:11" } ] } ] }</code> </pre> </span> <span id="execution-results-POSTconnector-api-sell" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-sell"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-sell" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-sell" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-sell"></code></pre> </span> <form id="form-POSTconnector-api-sell" data-method="POST" data-path="connector/api/sell" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-sell', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/sell</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-sell" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-sell" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-sell" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>sells</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style=" margin-left: 14px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>integer</small> <input type="number" style="display: none" name="sells.*.location_id" data-endpoint="POSTconnector-api-sell" value="1" data-component="body"> <br> <p>id of the business location Example: <code>1</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>integer</small> <input type="number" style="display: none" name="sells.*.contact_id" data-endpoint="POSTconnector-api-sell" value="12" data-component="body"> <br> <p>id of the customer Example: <code>12</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.transaction_date" data-endpoint="POSTconnector-api-sell" value="2020-07-22 15:48:29" data-component="body"> <br> <p>transaction date format:Y-m-d H:i:s, Example: <code>2020-07-22 15:48:29</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>invoice_no</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.invoice_no" data-endpoint="POSTconnector-api-sell" value="et" data-component="body"> <br> <p>Invoice number Example: <code>et</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>source</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.source" data-endpoint="POSTconnector-api-sell" value="api, phone, woocommerce" data-component="body"> <br> <p>Source of the invoice Example: <code>api, phone, woocommerce</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.status" data-endpoint="POSTconnector-api-sell" value="final" data-component="body"> <br> <p>sale status (final, draft) Example: <code>final</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sub_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.sub_status" data-endpoint="POSTconnector-api-sell" value="null" data-component="body"> <br> <p>sale sub status ("quotation" for quotation and "proforma" for proforma invoice) Example: <code>null</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_quotation</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="POSTconnector-api-sell" style="display: none"> <input type="radio" name="sells.*.is_quotation" value="true" data-endpoint="POSTconnector-api-sell" data-component="body" > <code>true</code> </label> <label data-endpoint="POSTconnector-api-sell" style="display: none"> <input type="radio" name="sells.*.is_quotation" value="false" data-endpoint="POSTconnector-api-sell" data-component="body" > <code>false</code> </label> <br> <p>Is sell quotation (0, 1), If 1 status should be draft Example: <code>true</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax_rate_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.tax_rate_id" data-endpoint="POSTconnector-api-sell" value="1" data-component="body"> <br> <p>id of the tax rate applicable to the sale Example: <code>1</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>discount_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.discount_amount" data-endpoint="POSTconnector-api-sell" value="10" data-component="body"> <br> <p>discount amount applicable to the sale Example: <code>10</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>discount_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.discount_type" data-endpoint="POSTconnector-api-sell" value="fixed" data-component="body"> <br> <p>type of the discount amount (fixed, percentage) Example: <code>fixed</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sale_note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.sale_note" data-endpoint="POSTconnector-api-sell" value="consequuntur" data-component="body"> <br> <p>Example: <code>consequuntur</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>staff_note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.staff_note" data-endpoint="POSTconnector-api-sell" value="quos" data-component="body"> <br> <p>Example: <code>quos</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>commission_agent</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.commission_agent" data-endpoint="POSTconnector-api-sell" value="18" data-component="body"> <br> <p>commission agent id Example: <code>18</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_details</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.shipping_details" data-endpoint="POSTconnector-api-sell" value="Express Delivery" data-component="body"> <br> <p>shipping details Example: <code>Express Delivery</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.shipping_address" data-endpoint="POSTconnector-api-sell" value="quod" data-component="body"> <br> <p>shipping address Example: <code>quod</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.shipping_status" data-endpoint="POSTconnector-api-sell" value="ordered" data-component="body"> <br> <p>('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: <code>ordered</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>delivered_to</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.delivered_to" data-endpoint="POSTconnector-api-sell" value="'Mr robin'" data-component="body"> <br> <p>Name of the person recieved the consignment Example: <code>'Mr robin'</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_charges</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.shipping_charges" data-endpoint="POSTconnector-api-sell" value="10" data-component="body"> <br> <p>shipping amount Example: <code>10</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>packing_charge</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.packing_charge" data-endpoint="POSTconnector-api-sell" value="10" data-component="body"> <br> <p>packing charge Example: <code>10</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>exchange_rate</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.exchange_rate" data-endpoint="POSTconnector-api-sell" value="1" data-component="body"> <br> <p>exchange rate for the currency used Example: <code>1</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>selling_price_group_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.selling_price_group_id" data-endpoint="POSTconnector-api-sell" value="20" data-component="body"> <br> <p>id of the selling price group Example: <code>20</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>pay_term_number</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.pay_term_number" data-endpoint="POSTconnector-api-sell" value="3" data-component="body"> <br> <p>pay term value Example: <code>3</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>pay_term_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.pay_term_type" data-endpoint="POSTconnector-api-sell" value="months" data-component="body"> <br> <p>type of the pay term value ('days', 'months') Example: <code>months</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_suspend</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="POSTconnector-api-sell" style="display: none"> <input type="radio" name="sells.*.is_suspend" value="true" data-endpoint="POSTconnector-api-sell" data-component="body" > <code>true</code> </label> <label data-endpoint="POSTconnector-api-sell" style="display: none"> <input type="radio" name="sells.*.is_suspend" value="false" data-endpoint="POSTconnector-api-sell" data-component="body" > <code>false</code> </label> <br> <p>Is suspended sale (0, 1) Example: <code>false</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_recurring</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.is_recurring" data-endpoint="POSTconnector-api-sell" value="0" data-component="body"> <br> <p>whether the invoice is recurring (0, 1) Example: <code>0</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_interval</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.recur_interval" data-endpoint="POSTconnector-api-sell" value="5" data-component="body"> <br> <p>value of the interval invoice will be regenerated Example: <code>5</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_interval_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.recur_interval_type" data-endpoint="POSTconnector-api-sell" value="months" data-component="body"> <br> <p>type of the recur interval ('days', 'months', 'years') Example: <code>months</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>subscription_repeat_on</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.subscription_repeat_on" data-endpoint="POSTconnector-api-sell" value="15" data-component="body"> <br> <p>day of the month on which invoice will be generated if recur interval type is months (1-30) Example: <code>15</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>subscription_no</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.subscription_no" data-endpoint="POSTconnector-api-sell" value="incidunt" data-component="body"> <br> <p>subscription number Example: <code>incidunt</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_repetitions</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.recur_repetitions" data-endpoint="POSTconnector-api-sell" value="15" data-component="body"> <br> <p>total number of invoices to be generated Example: <code>15</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>rp_redeemed</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.rp_redeemed" data-endpoint="POSTconnector-api-sell" value="20" data-component="body"> <br> <p>reward points redeemed Example: <code>20</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>rp_redeemed_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.rp_redeemed_amount" data-endpoint="POSTconnector-api-sell" value="13.5" data-component="body"> <br> <p>reward point redeemed amount after conversion Example: <code>13.5</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>types_of_service_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.types_of_service_id" data-endpoint="POSTconnector-api-sell" value="12" data-component="body"> <br> <p>types of service id Example: <code>12</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.service_custom_field_1" data-endpoint="POSTconnector-api-sell" value="esse" data-component="body"> <br> <p>types of service custom field 1 Example: <code>esse</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.service_custom_field_2" data-endpoint="POSTconnector-api-sell" value="voluptate" data-component="body"> <br> <p>types of service custom field 2 Example: <code>voluptate</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.service_custom_field_3" data-endpoint="POSTconnector-api-sell" value="ab" data-component="body"> <br> <p>types of service custom field 3 Example: <code>ab</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_4</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.service_custom_field_4" data-endpoint="POSTconnector-api-sell" value="voluptatem" data-component="body"> <br> <p>types of service custom field 4 Example: <code>voluptatem</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_5</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.service_custom_field_5" data-endpoint="POSTconnector-api-sell" value="earum" data-component="body"> <br> <p>types of service custom field 5 Example: <code>earum</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_6</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.service_custom_field_6" data-endpoint="POSTconnector-api-sell" value="totam" data-component="body"> <br> <p>types of service custom field 6 Example: <code>totam</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>round_off_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.round_off_amount" data-endpoint="POSTconnector-api-sell" value="50" data-component="body"> <br> <p>round off amount on total payable Example: <code>50</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>table_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.table_id" data-endpoint="POSTconnector-api-sell" value="12" data-component="body"> <br> <p>id of the table Example: <code>12</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_staff_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.service_staff_id" data-endpoint="POSTconnector-api-sell" value="11" data-component="body"> <br> <p>id of the service staff assigned to the sale Example: <code>11</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>change_return</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.change_return" data-endpoint="POSTconnector-api-sell" value="0" data-component="body"> <br> <p>Excess paid amount Example: <code>0</code></p> </div> <div style=" margin-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>products</code></b> <small>string[]</small> <br> <p>array of the products for the sale</p> </summary> <div style=" margin-left: 42px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>product_id</code></b> <small>integer</small> <input type="number" style="display: none" name="sells.*.products.*.product_id" data-endpoint="POSTconnector-api-sell" value="17" data-component="body"> <br> <p>product id Example: <code>17</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>variation_id</code></b> <small>integer</small> <input type="number" style="display: none" name="sells.*.products.*.variation_id" data-endpoint="POSTconnector-api-sell" value="58" data-component="body"> <br> <p>variation id Example: <code>58</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>quantity</code></b> <small>number</small> <input type="number" style="display: none" name="sells.*.products.*.quantity" data-endpoint="POSTconnector-api-sell" value="1" data-component="body"> <br> <p>quantity Example: <code>1</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>unit_price</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.products.*.unit_price" data-endpoint="POSTconnector-api-sell" value="437.5" data-component="body"> <br> <p>unit selling price Example: <code>437.5</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>tax_rate_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.products.*.tax_rate_id" data-endpoint="POSTconnector-api-sell" value="0" data-component="body"> <br> <p>tax rate id applicable on the product Example: <code>0</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>discount_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.products.*.discount_amount" data-endpoint="POSTconnector-api-sell" value="0" data-component="body"> <br> <p>discount amount applicable on the product Example: <code>0</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>discount_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.products.*.discount_type" data-endpoint="POSTconnector-api-sell" value="percentage" data-component="body"> <br> <p>type of discount amount ('fixed', 'percentage') Example: <code>percentage</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>sub_unit_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.products.*.sub_unit_id" data-endpoint="POSTconnector-api-sell" value="20" data-component="body"> <br> <p>sub unit id Example: <code>20</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.products.*.note" data-endpoint="POSTconnector-api-sell" value="illo" data-component="body"> <br> <p>note for the product Example: <code>illo</code></p> </div> </details> </div> </details> </div> <div style=" margin-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>payments</code></b> <small>string[]</small> <i>optional</i> <br> <p>payment lines for the sale</p> </summary> <div style=" margin-left: 42px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>amount</code></b> <small>number</small> <input type="number" style="display: none" name="sells.*.payments.*.amount" data-endpoint="POSTconnector-api-sell" value="453.13" data-component="body"> <br> <p>amount of the payment Example: <code>453.13</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>method</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.method" data-endpoint="POSTconnector-api-sell" value="cash" data-component="body"> <br> <p>payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3') Example: <code>cash</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>account_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="sells.*.payments.*.account_id" data-endpoint="POSTconnector-api-sell" value="17" data-component="body"> <br> <p>account id Example: <code>17</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>card_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.card_number" data-endpoint="POSTconnector-api-sell" value="voluptas" data-component="body"> <br> <p>Example: <code>voluptas</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>card_holder_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.card_holder_name" data-endpoint="POSTconnector-api-sell" value="rem" data-component="body"> <br> <p>Example: <code>rem</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>card_transaction_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.card_transaction_number" data-endpoint="POSTconnector-api-sell" value="ad" data-component="body"> <br> <p>Example: <code>ad</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>card_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.card_type" data-endpoint="POSTconnector-api-sell" value="enim" data-component="body"> <br> <p>Example: <code>enim</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>card_month</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.card_month" data-endpoint="POSTconnector-api-sell" value="id" data-component="body"> <br> <p>Example: <code>id</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>card_year</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.card_year" data-endpoint="POSTconnector-api-sell" value="minima" data-component="body"> <br> <p>Example: <code>minima</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>card_security</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.card_security" data-endpoint="POSTconnector-api-sell" value="esse" data-component="body"> <br> <p>Example: <code>esse</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.transaction_no_1" data-endpoint="POSTconnector-api-sell" value="qui" data-component="body"> <br> <p>Example: <code>qui</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.transaction_no_2" data-endpoint="POSTconnector-api-sell" value="deleniti" data-component="body"> <br> <p>Example: <code>deleniti</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.transaction_no_3" data-endpoint="POSTconnector-api-sell" value="sit" data-component="body"> <br> <p>Example: <code>sit</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>bank_account_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.bank_account_number" data-endpoint="POSTconnector-api-sell" value="error" data-component="body"> <br> <p>Example: <code>error</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.note" data-endpoint="POSTconnector-api-sell" value="aut" data-component="body"> <br> <p>payment note Example: <code>aut</code></p> </div> <div style="margin-left: 56px; clear: unset;"> <b style="line-height: 2;"><code>cheque_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sells.*.payments.*.cheque_number" data-endpoint="POSTconnector-api-sell" value="numquam" data-component="body"> <br> <p>Example: <code>numquam</code></p> </div> </details> </div> </details> </div> </details> </div> </details> </div> </form> <h2 id="sales-management-GETconnector-api-sell--id-">Get the specified sell</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-sell--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/sell/eveniet?send_purchase_details=dolorem" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/sell/eveniet" ); const params = { "send_purchase_details": "dolorem", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/sell/eveniet', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'send_purchase_details' => 'dolorem', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-sell--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 55, "business_id": 1, "location_id": 1, "res_table_id": 5, "res_waiter_id": null, "res_order_status": null, "type": "sell", "sub_type": null, "status": "final", "is_quotation": 0, "payment_status": "paid", "adjustment_type": null, "contact_id": 1, "customer_group_id": null, "invoice_no": "AS0007", "ref_no": "", "source": null, "subscription_no": null, "subscription_repeat_on": null, "transaction_date": "2020-06-04 23:29:36", "total_before_tax": "437.5000", "tax_id": 1, "tax_amount": "39.3750", "discount_type": "percentage", "discount_amount": "10.0000", "rp_redeemed": 0, "rp_redeemed_amount": "0.0000", "shipping_details": "Express Delivery", "shipping_address": null, "shipping_status": "ordered", "delivered_to": "Mr Robin", "shipping_charges": "10.0000", "additional_notes": null, "staff_note": null, "round_off_amount": "0.0000", "final_total": "453.1300", "expense_category_id": null, "expense_for": null, "commission_agent": null, "document": null, "is_direct_sale": 0, "is_suspend": 0, "exchange_rate": "1.000", "total_amount_recovered": null, "transfer_parent_id": null, "return_parent_id": null, "opening_stock_product_id": null, "created_by": 9, "import_batch": null, "import_time": null, "types_of_service_id": 1, "packing_charge": "10.0000", "packing_charge_type": "fixed", "service_custom_field_1": null, "service_custom_field_2": null, "service_custom_field_3": null, "service_custom_field_4": null, "mfg_parent_production_purchase_id": null, "mfg_wasted_units": null, "mfg_production_cost": "0.0000", "mfg_is_final": 0, "is_created_from_api": 0, "essentials_duration": "0.00", "essentials_duration_unit": null, "essentials_amount_per_unit_duration": "0.0000", "essentials_allowances": null, "essentials_deductions": null, "rp_earned": 0, "repair_completed_on": null, "repair_warranty_id": null, "repair_brand_id": null, "repair_status_id": null, "repair_model_id": null, "repair_defects": null, "repair_serial_no": null, "repair_updates_email": 0, "repair_updates_sms": 0, "repair_checklist": null, "repair_security_pwd": null, "repair_security_pattern": null, "repair_due_date": null, "repair_device_id": null, "order_addresses": null, "is_recurring": 0, "recur_interval": null, "recur_interval_type": "days", "recur_repetitions": 0, "recur_stopped_on": null, "recur_parent_id": null, "invoice_token": null, "pay_term_number": null, "pay_term_type": null, "pjt_project_id": null, "pjt_title": null, "woocommerce_order_id": null, "selling_price_group_id": 0, "created_at": "2020-06-04 23:29:36", "updated_at": "2020-06-04 23:29:36", "sell_lines": [ { "id": 38, "transaction_id": 55, "product_id": 17, "variation_id": 58, "quantity": 1, "mfg_waste_percent": "0.0000", "quantity_returned": "0.0000", "unit_price_before_discount": "437.5000", "unit_price": "437.5000", "line_discount_type": "fixed", "line_discount_amount": "0.0000", "unit_price_inc_tax": "437.5000", "item_tax": "0.0000", "tax_id": null, "discount_id": null, "lot_no_line_id": null, "sell_line_note": "", "res_service_staff_id": null, "res_line_order_status": null, "woocommerce_line_items_id": null, "parent_sell_line_id": null, "children_type": "", "sub_unit_id": null, "created_at": "2020-06-04 23:29:36", "updated_at": "2020-06-04 23:29:36" } ], "payment_lines": [ { "id": 37, "transaction_id": 55, "business_id": 1, "is_return": 0, "amount": "453.1300", "method": "cash", "transaction_no": null, "card_transaction_number": null, "card_number": null, "card_type": "credit", "card_holder_name": null, "card_month": null, "card_year": null, "card_security": null, "cheque_number": null, "bank_account_number": null, "paid_on": "2020-06-04 23:29:36", "created_by": 9, "payment_for": 1, "parent_id": null, "note": null, "document": null, "payment_ref_no": "SP2020/0002", "account_id": null, "created_at": "2020-06-04 23:29:36", "updated_at": "2020-06-04 23:29:36" } ], "invoice_url": "http://local.pos.com/invoice/6dfd77eb80f4976b456128e7f1311c9f", "payment_link": "http://local.pos.com/pay/6dfd77eb80f4976b456128e7f1311c9f" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-sell--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-sell--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-sell--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-sell--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-sell--id-"></code></pre> </span> <form id="form-GETconnector-api-sell--id-" data-method="GET" data-path="connector/api/sell/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-sell--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/sell/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-sell--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-sell--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-sell--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-sell--id-" value="eveniet" data-component="url"> <br> <p>The ID of the sell. Example: <code>eveniet</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sell</code></b> <small>string</small> <input type="text" style="display: none" name="sell" data-endpoint="GETconnector-api-sell--id-" value="55" data-component="url"> <br> <p>comma separated ids of the sells Example: <code>55</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>send_purchase_details</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="send_purchase_details" data-endpoint="GETconnector-api-sell--id-" value="dolorem" data-component="query"> <br> <p>Get purchase details of each sell line (1, 0) Example: <code>dolorem</code></p> </div> </form> <h2 id="sales-management-PUTconnector-api-sell--id-">Update sell</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-PUTconnector-api-sell--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request PUT \ "http://pos.test/connector/api/sell/sapiente" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"contact_id\": 10, \"transaction_date\": \"2020-5-7 15:20:22\", \"status\": \"final\", \"sub_status\": \"null\", \"is_quotation\": true, \"tax_rate_id\": 8, \"discount_amount\": 10, \"discount_type\": \"fixed\", \"sale_note\": \"beatae\", \"source\": \"ullam\", \"staff_note\": \"minima\", \"is_suspend\": false, \"commission_agent\": 15, \"shipping_details\": \"Express Delivery\", \"shipping_address\": \"molestiae\", \"shipping_status\": \"ordered\", \"delivered_to\": \"Mr Robin\", \"shipping_charges\": 10, \"packing_charge\": 10, \"exchange_rate\": 1, \"selling_price_group_id\": 11, \"pay_term_number\": 9, \"pay_term_type\": \"months\", \"is_recurring\": 0, \"recur_interval\": 11, \"recur_interval_type\": \"days\", \"subscription_repeat_on\": 7, \"subscription_no\": \"repellat\", \"recur_repetitions\": 6, \"rp_redeemed\": 16, \"rp_redeemed_amount\": 13.5, \"types_of_service_id\": 10, \"service_custom_field_1\": \"aperiam\", \"service_custom_field_2\": \"nisi\", \"service_custom_field_3\": \"ut\", \"service_custom_field_4\": \"inventore\", \"service_custom_field_5\": \"sunt\", \"service_custom_field_6\": \"qui\", \"round_off_amount\": 192.1, \"table_id\": 15, \"service_staff_id\": 5, \"change_return\": 0, \"change_return_id\": 5, \"products\": [ \"distinctio\" ], \"payments\": [ \"qui\" ] }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/sell/sapiente" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "contact_id": 10, "transaction_date": "2020-5-7 15:20:22", "status": "final", "sub_status": "null", "is_quotation": true, "tax_rate_id": 8, "discount_amount": 10, "discount_type": "fixed", "sale_note": "beatae", "source": "ullam", "staff_note": "minima", "is_suspend": false, "commission_agent": 15, "shipping_details": "Express Delivery", "shipping_address": "molestiae", "shipping_status": "ordered", "delivered_to": "Mr Robin", "shipping_charges": 10, "packing_charge": 10, "exchange_rate": 1, "selling_price_group_id": 11, "pay_term_number": 9, "pay_term_type": "months", "is_recurring": 0, "recur_interval": 11, "recur_interval_type": "days", "subscription_repeat_on": 7, "subscription_no": "repellat", "recur_repetitions": 6, "rp_redeemed": 16, "rp_redeemed_amount": 13.5, "types_of_service_id": 10, "service_custom_field_1": "aperiam", "service_custom_field_2": "nisi", "service_custom_field_3": "ut", "service_custom_field_4": "inventore", "service_custom_field_5": "sunt", "service_custom_field_6": "qui", "round_off_amount": 192.1, "table_id": 15, "service_staff_id": 5, "change_return": 0, "change_return_id": 5, "products": [ "distinctio" ], "payments": [ "qui" ] }; fetch(url, { method: "PUT", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->put( 'http://pos.test/connector/api/sell/sapiente', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'contact_id' => 10, 'transaction_date' => '2020-5-7 15:20:22', 'status' => 'final', 'sub_status' => 'null', 'is_quotation' => true, 'tax_rate_id' => 8, 'discount_amount' => 10.0, 'discount_type' => 'fixed', 'sale_note' => 'beatae', 'source' => 'ullam', 'staff_note' => 'minima', 'is_suspend' => false, 'commission_agent' => 15, 'shipping_details' => 'Express Delivery', 'shipping_address' => 'molestiae', 'shipping_status' => 'ordered', 'delivered_to' => 'Mr Robin', 'shipping_charges' => 10.0, 'packing_charge' => 10.0, 'exchange_rate' => 1.0, 'selling_price_group_id' => 11, 'pay_term_number' => 9, 'pay_term_type' => 'months', 'is_recurring' => 0, 'recur_interval' => 11, 'recur_interval_type' => 'days', 'subscription_repeat_on' => 7, 'subscription_no' => 'repellat', 'recur_repetitions' => 6, 'rp_redeemed' => 16, 'rp_redeemed_amount' => 13.5, 'types_of_service_id' => 10, 'service_custom_field_1' => 'aperiam', 'service_custom_field_2' => 'nisi', 'service_custom_field_3' => 'ut', 'service_custom_field_4' => 'inventore', 'service_custom_field_5' => 'sunt', 'service_custom_field_6' => 'qui', 'round_off_amount' => 192.1, 'table_id' => 15, 'service_staff_id' => 5, 'change_return' => 0.0, 'change_return_id' => 5, 'products' => [ 'distinctio', ], 'payments' => [ 'qui', ], ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-PUTconnector-api-sell--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "id": 91, "business_id": 1, "location_id": 1, "res_table_id": null, "res_waiter_id": null, "res_order_status": null, "type": "sell", "sub_type": null, "status": "final", "is_quotation": 0, "payment_status": "paid", "adjustment_type": null, "contact_id": 1, "customer_group_id": 1, "invoice_no": "AS0020", "ref_no": "", "source": null, "subscription_no": null, "subscription_repeat_on": null, "transaction_date": "25-09-2020 15:22", "total_before_tax": 962.5, "tax_id": null, "tax_amount": 0, "discount_type": "fixed", "discount_amount": "19.5000", "rp_redeemed": 0, "rp_redeemed_amount": "0.0000", "shipping_details": null, "shipping_address": null, "shipping_status": null, "delivered_to": null, "shipping_charges": "0.0000", "additional_notes": null, "staff_note": null, "round_off_amount": "0.0000", "final_total": 943, "expense_category_id": null, "expense_for": null, "commission_agent": null, "document": null, "is_direct_sale": 0, "is_suspend": 0, "exchange_rate": "1.000", "total_amount_recovered": null, "transfer_parent_id": null, "return_parent_id": null, "opening_stock_product_id": null, "created_by": 9, "import_batch": null, "import_time": null, "types_of_service_id": null, "packing_charge": "0.0000", "packing_charge_type": null, "service_custom_field_1": null, "service_custom_field_2": null, "service_custom_field_3": null, "service_custom_field_4": null, "mfg_parent_production_purchase_id": null, "mfg_wasted_units": null, "mfg_production_cost": "0.0000", "mfg_production_cost_type": "percentage", "mfg_is_final": 0, "is_created_from_api": 0, "essentials_duration": "0.00", "essentials_duration_unit": null, "essentials_amount_per_unit_duration": "0.0000", "essentials_allowances": null, "essentials_deductions": null, "rp_earned": 0, "repair_completed_on": null, "repair_warranty_id": null, "repair_brand_id": null, "repair_status_id": null, "repair_model_id": null, "repair_job_sheet_id": null, "repair_defects": null, "repair_serial_no": null, "repair_checklist": null, "repair_security_pwd": null, "repair_security_pattern": null, "repair_due_date": null, "repair_device_id": null, "repair_updates_notif": 0, "order_addresses": null, "is_recurring": 0, "recur_interval": 1, "recur_interval_type": "days", "recur_repetitions": 0, "recur_stopped_on": null, "recur_parent_id": null, "invoice_token": null, "pay_term_number": null, "pay_term_type": null, "pjt_project_id": null, "pjt_title": null, "woocommerce_order_id": null, "selling_price_group_id": 0, "created_at": "2020-09-23 20:16:19", "updated_at": "2020-09-25 17:57:08", "payment_lines": [ { "id": 55, "transaction_id": 91, "business_id": 1, "is_return": 0, "amount": "461.7500", "method": "cash", "transaction_no": null, "card_transaction_number": null, "card_number": null, "card_type": "credit", "card_holder_name": null, "card_month": null, "card_year": null, "card_security": null, "cheque_number": null, "bank_account_number": null, "paid_on": "2020-09-23 20:16:19", "created_by": 9, "is_advance": 0, "payment_for": 1, "parent_id": null, "note": null, "document": null, "payment_ref_no": "SP2020/0018", "account_id": null, "created_at": "2020-09-23 20:16:19", "updated_at": "2020-09-23 20:16:19" } ], "invoice_url": "http://local.pos.com/invoice/6dfd77eb80f4976b456128e7f1311c9f", "payment_link": "http://local.pos.com/pay/6dfd77eb80f4976b456128e7f1311c9f" }</code> </pre> </span> <span id="execution-results-PUTconnector-api-sell--id-" hidden> <blockquote>Received response<span id="execution-response-status-PUTconnector-api-sell--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-PUTconnector-api-sell--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-PUTconnector-api-sell--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-PUTconnector-api-sell--id-"></code></pre> </span> <form id="form-PUTconnector-api-sell--id-" data-method="PUT" data-path="connector/api/sell/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('PUTconnector-api-sell--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-darkblue">PUT</small> <b><code>connector/api/sell/{id}</code></b> </p> <p> <small class="badge badge-purple">PATCH</small> <b><code>connector/api/sell/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="PUTconnector-api-sell--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="PUTconnector-api-sell--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="PUTconnector-api-sell--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="PUTconnector-api-sell--id-" value="sapiente" data-component="url"> <br> <p>The ID of the sell. Example: <code>sapiente</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sell</code></b> <small>string</small> <input type="text" style="display: none" name="sell" data-endpoint="PUTconnector-api-sell--id-" value="6" data-component="url"> <br> <p>id of sell to update Example: <code>6</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="contact_id" data-endpoint="PUTconnector-api-sell--id-" value="10" data-component="body"> <br> <p>id of the customer Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="transaction_date" data-endpoint="PUTconnector-api-sell--id-" value="2020-5-7 15:20:22" data-component="body"> <br> <p>transaction date format:Y-m-d H:i:s, Example: <code>2020-5-7 15:20:22</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="status" data-endpoint="PUTconnector-api-sell--id-" value="final" data-component="body"> <br> <p>sale status (final, draft) Example: <code>final</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sub_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sub_status" data-endpoint="PUTconnector-api-sell--id-" value="null" data-component="body"> <br> <p>sale sub status ("quotation" for quotation and "proforma" for proforma invoice) Example: <code>null</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_quotation</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="PUTconnector-api-sell--id-" style="display: none"> <input type="radio" name="is_quotation" value="true" data-endpoint="PUTconnector-api-sell--id-" data-component="body" > <code>true</code> </label> <label data-endpoint="PUTconnector-api-sell--id-" style="display: none"> <input type="radio" name="is_quotation" value="false" data-endpoint="PUTconnector-api-sell--id-" data-component="body" > <code>false</code> </label> <br> <p>Is sell quotation (0, 1), If 1 status should be draft Example: <code>true</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax_rate_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="tax_rate_id" data-endpoint="PUTconnector-api-sell--id-" value="8" data-component="body"> <br> <p>id of the tax rate applicable to the sale Example: <code>8</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>discount_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="discount_amount" data-endpoint="PUTconnector-api-sell--id-" value="10" data-component="body"> <br> <p>discount amount applicable to the sale Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>discount_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="discount_type" data-endpoint="PUTconnector-api-sell--id-" value="fixed" data-component="body"> <br> <p>type of the discount amount (fixed, percentage) Example: <code>fixed</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sale_note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sale_note" data-endpoint="PUTconnector-api-sell--id-" value="beatae" data-component="body"> <br> <p>Example: <code>beatae</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>source</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="source" data-endpoint="PUTconnector-api-sell--id-" value="ullam" data-component="body"> <br> <p>Source of the invoice Example: <code>ullam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>staff_note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="staff_note" data-endpoint="PUTconnector-api-sell--id-" value="minima" data-component="body"> <br> <p>Example: <code>minima</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_suspend</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="PUTconnector-api-sell--id-" style="display: none"> <input type="radio" name="is_suspend" value="true" data-endpoint="PUTconnector-api-sell--id-" data-component="body" > <code>true</code> </label> <label data-endpoint="PUTconnector-api-sell--id-" style="display: none"> <input type="radio" name="is_suspend" value="false" data-endpoint="PUTconnector-api-sell--id-" data-component="body" > <code>false</code> </label> <br> <p>Is suspended sale (0, 1) Example: <code>false</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>commission_agent</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="commission_agent" data-endpoint="PUTconnector-api-sell--id-" value="15" data-component="body"> <br> <p>commission agent id Example: <code>15</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_details</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="shipping_details" data-endpoint="PUTconnector-api-sell--id-" value="Express Delivery" data-component="body"> <br> <p>shipping details Example: <code>Express Delivery</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="shipping_address" data-endpoint="PUTconnector-api-sell--id-" value="molestiae" data-component="body"> <br> <p>shipping address Example: <code>molestiae</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="shipping_status" data-endpoint="PUTconnector-api-sell--id-" value="ordered" data-component="body"> <br> <p>('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: <code>ordered</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>delivered_to</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="delivered_to" data-endpoint="PUTconnector-api-sell--id-" value="Mr Robin" data-component="body"> <br> <p>Name of the person recieved the consignment Example: <code>Mr Robin</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_charges</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="shipping_charges" data-endpoint="PUTconnector-api-sell--id-" value="10" data-component="body"> <br> <p>shipping amount Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>packing_charge</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="packing_charge" data-endpoint="PUTconnector-api-sell--id-" value="10" data-component="body"> <br> <p>packing charge Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>exchange_rate</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="exchange_rate" data-endpoint="PUTconnector-api-sell--id-" value="1" data-component="body"> <br> <p>exchange rate for the currency used Example: <code>1</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>selling_price_group_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="selling_price_group_id" data-endpoint="PUTconnector-api-sell--id-" value="11" data-component="body"> <br> <p>id of the selling price group Example: <code>11</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>pay_term_number</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="pay_term_number" data-endpoint="PUTconnector-api-sell--id-" value="9" data-component="body"> <br> <p>pay term value Example: <code>9</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>pay_term_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="pay_term_type" data-endpoint="PUTconnector-api-sell--id-" value="months" data-component="body"> <br> <p>type of the pay term value ('days', 'months') Example: <code>months</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_recurring</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="is_recurring" data-endpoint="PUTconnector-api-sell--id-" value="0" data-component="body"> <br> <p>whether the invoice is recurring (0, 1) Example: <code>0</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_interval</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="recur_interval" data-endpoint="PUTconnector-api-sell--id-" value="11" data-component="body"> <br> <p>value of the interval invoice will be regenerated Example: <code>11</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_interval_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="recur_interval_type" data-endpoint="PUTconnector-api-sell--id-" value="days" data-component="body"> <br> <p>type of the recur interval ('days', 'months', 'years') Example: <code>days</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>subscription_repeat_on</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="subscription_repeat_on" data-endpoint="PUTconnector-api-sell--id-" value="7" data-component="body"> <br> <p>day of the month on which invoice will be generated if recur interval type is months (1-30) Example: <code>7</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>subscription_no</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="subscription_no" data-endpoint="PUTconnector-api-sell--id-" value="repellat" data-component="body"> <br> <p>subscription number Example: <code>repellat</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>recur_repetitions</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="recur_repetitions" data-endpoint="PUTconnector-api-sell--id-" value="6" data-component="body"> <br> <p>total number of invoices to be generated Example: <code>6</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>rp_redeemed</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="rp_redeemed" data-endpoint="PUTconnector-api-sell--id-" value="16" data-component="body"> <br> <p>reward points redeemed Example: <code>16</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>rp_redeemed_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="rp_redeemed_amount" data-endpoint="PUTconnector-api-sell--id-" value="13.5" data-component="body"> <br> <p>reward point redeemed amount after conversion Example: <code>13.5</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>types_of_service_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="types_of_service_id" data-endpoint="PUTconnector-api-sell--id-" value="10" data-component="body"> <br> <p>types of service id Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="service_custom_field_1" data-endpoint="PUTconnector-api-sell--id-" value="aperiam" data-component="body"> <br> <p>types of service custom field 1 Example: <code>aperiam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="service_custom_field_2" data-endpoint="PUTconnector-api-sell--id-" value="nisi" data-component="body"> <br> <p>types of service custom field 2 Example: <code>nisi</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="service_custom_field_3" data-endpoint="PUTconnector-api-sell--id-" value="ut" data-component="body"> <br> <p>types of service custom field 3 Example: <code>ut</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_4</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="service_custom_field_4" data-endpoint="PUTconnector-api-sell--id-" value="inventore" data-component="body"> <br> <p>types of service custom field 4 Example: <code>inventore</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_5</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="service_custom_field_5" data-endpoint="PUTconnector-api-sell--id-" value="sunt" data-component="body"> <br> <p>types of service custom field 5 Example: <code>sunt</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_custom_field_6</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="service_custom_field_6" data-endpoint="PUTconnector-api-sell--id-" value="qui" data-component="body"> <br> <p>types of service custom field 6 Example: <code>qui</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>round_off_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="round_off_amount" data-endpoint="PUTconnector-api-sell--id-" value="192.1" data-component="body"> <br> <p>round off amount on total payable Example: <code>192.1</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>table_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="table_id" data-endpoint="PUTconnector-api-sell--id-" value="15" data-component="body"> <br> <p>id of the table Example: <code>15</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_staff_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="service_staff_id" data-endpoint="PUTconnector-api-sell--id-" value="5" data-component="body"> <br> <p>id of the service staff assigned to the sale Example: <code>5</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>change_return</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="change_return" data-endpoint="PUTconnector-api-sell--id-" value="0" data-component="body"> <br> <p>Excess paid amount Example: <code>0</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>change_return_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="change_return_id" data-endpoint="PUTconnector-api-sell--id-" value="5" data-component="body"> <br> <p>id of the change return payment if exists Example: <code>5</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>products</code></b> <small>string[]</small> <br> <p>array of the products for the sale</p> </summary> <div style=" margin-left: 14px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sell_line_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="products.*.sell_line_id" data-endpoint="PUTconnector-api-sell--id-" value="6" data-component="body"> <br> <p>sell line id for existing item only Example: <code>6</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>product_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="products.*.product_id" data-endpoint="PUTconnector-api-sell--id-" value="17" data-component="body"> <br> <p>product id Example: <code>17</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>variation_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="products.*.variation_id" data-endpoint="PUTconnector-api-sell--id-" value="58" data-component="body"> <br> <p>variation id Example: <code>58</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>quantity</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="products.*.quantity" data-endpoint="PUTconnector-api-sell--id-" value="1" data-component="body"> <br> <p>quantity Example: <code>1</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>unit_price</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="products.*.unit_price" data-endpoint="PUTconnector-api-sell--id-" value="437.5" data-component="body"> <br> <p>unit selling price Example: <code>437.5</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax_rate_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="products.*.tax_rate_id" data-endpoint="PUTconnector-api-sell--id-" value="8" data-component="body"> <br> <p>tax rate id applicable on the product Example: <code>8</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>discount_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="products.*.discount_amount" data-endpoint="PUTconnector-api-sell--id-" value="0" data-component="body"> <br> <p>discount amount applicable on the product Example: <code>0</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>discount_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="products.*.discount_type" data-endpoint="PUTconnector-api-sell--id-" value="percentage" data-component="body"> <br> <p>type of discount amount ('fixed', 'percentage') Example: <code>percentage</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sub_unit_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="products.*.sub_unit_id" data-endpoint="PUTconnector-api-sell--id-" value="12" data-component="body"> <br> <p>sub unit id Example: <code>12</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="products.*.note" data-endpoint="PUTconnector-api-sell--id-" value="quo" data-component="body"> <br> <p>note for the product Example: <code>quo</code></p> </div> </details> </div> </details> </div> <div style=" padding-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>payments</code></b> <small>string[]</small> <i>optional</i> <br> <p>payment lines for the sale</p> </summary> <div style=" margin-left: 14px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>payment_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="payments.*.payment_id" data-endpoint="PUTconnector-api-sell--id-" value="14" data-component="body"> <br> <p>payment id for existing payment line Example: <code>14</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="payments.*.amount" data-endpoint="PUTconnector-api-sell--id-" value="453.13" data-component="body"> <br> <p>amount of the payment Example: <code>453.13</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>method</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.method" data-endpoint="PUTconnector-api-sell--id-" value="cash" data-component="body"> <br> <p>payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3') Example: <code>cash</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>account_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="payments.*.account_id" data-endpoint="PUTconnector-api-sell--id-" value="13" data-component="body"> <br> <p>account id Example: <code>13</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.card_number" data-endpoint="PUTconnector-api-sell--id-" value="voluptas" data-component="body"> <br> <p>Example: <code>voluptas</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_holder_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.card_holder_name" data-endpoint="PUTconnector-api-sell--id-" value="et" data-component="body"> <br> <p>Example: <code>et</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_transaction_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.card_transaction_number" data-endpoint="PUTconnector-api-sell--id-" value="voluptatem" data-component="body"> <br> <p>Example: <code>voluptatem</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.card_type" data-endpoint="PUTconnector-api-sell--id-" value="delectus" data-component="body"> <br> <p>Example: <code>delectus</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_month</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.card_month" data-endpoint="PUTconnector-api-sell--id-" value="aperiam" data-component="body"> <br> <p>Example: <code>aperiam</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_year</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.card_year" data-endpoint="PUTconnector-api-sell--id-" value="magnam" data-component="body"> <br> <p>Example: <code>magnam</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>card_security</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.card_security" data-endpoint="PUTconnector-api-sell--id-" value="sit" data-component="body"> <br> <p>Example: <code>sit</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.transaction_no_1" data-endpoint="PUTconnector-api-sell--id-" value="magni" data-component="body"> <br> <p>Example: <code>magni</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.transaction_no_2" data-endpoint="PUTconnector-api-sell--id-" value="officia" data-component="body"> <br> <p>Example: <code>officia</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_no_3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.transaction_no_3" data-endpoint="PUTconnector-api-sell--id-" value="reprehenderit" data-component="body"> <br> <p>Example: <code>reprehenderit</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>note</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.note" data-endpoint="PUTconnector-api-sell--id-" value="necessitatibus" data-component="body"> <br> <p>payment note Example: <code>necessitatibus</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>cheque_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.cheque_number" data-endpoint="PUTconnector-api-sell--id-" value="ut" data-component="body"> <br> <p>Example: <code>ut</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>bank_account_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="payments.*.bank_account_number" data-endpoint="PUTconnector-api-sell--id-" value="nam" data-component="body"> <br> <p>Example: <code>nam</code></p> </div> </details> </div> </details> </div> </form> <h2 id="sales-management-DELETEconnector-api-sell--id-">Delete Sell</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-DELETEconnector-api-sell--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request DELETE \ "http://pos.test/connector/api/sell/voluptatibus" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/sell/voluptatibus" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "DELETE", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->delete( 'http://pos.test/connector/api/sell/voluptatibus', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-DELETEconnector-api-sell--id-"> </span> <span id="execution-results-DELETEconnector-api-sell--id-" hidden> <blockquote>Received response<span id="execution-response-status-DELETEconnector-api-sell--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-DELETEconnector-api-sell--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-DELETEconnector-api-sell--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-DELETEconnector-api-sell--id-"></code></pre> </span> <form id="form-DELETEconnector-api-sell--id-" data-method="DELETE" data-path="connector/api/sell/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('DELETEconnector-api-sell--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-red">DELETE</small> <b><code>connector/api/sell/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="DELETEconnector-api-sell--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="DELETEconnector-api-sell--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="DELETEconnector-api-sell--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="DELETEconnector-api-sell--id-" value="voluptatibus" data-component="url"> <br> <p>The ID of the sell. Example: <code>voluptatibus</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sell</code></b> <small>string</small> <input type="text" style="display: none" name="sell" data-endpoint="DELETEconnector-api-sell--id-" value="aliquam" data-component="url"> <br> <p>id of the sell to be deleted Example: <code>aliquam</code></p> </div> </form> <h2 id="sales-management-POSTconnector-api-sell-return">Add Sell Return</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-sell-return"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/sell-return" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"transaction_id\": 8, \"transaction_date\": \"2020-5-7 15:20:22\", \"invoice_no\": \"accusamus\", \"discount_amount\": 10, \"discount_type\": \"fixed\", \"products\": [ \"qui\" ] }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/sell-return" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "transaction_id": 8, "transaction_date": "2020-5-7 15:20:22", "invoice_no": "accusamus", "discount_amount": 10, "discount_type": "fixed", "products": [ "qui" ] }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/sell-return', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'transaction_id' => 8, 'transaction_date' => '2020-5-7 15:20:22', 'invoice_no' => 'accusamus', 'discount_amount' => 10.0, 'discount_type' => 'fixed', 'products' => [ 'qui', ], ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-sell-return"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "id": 159, "business_id": 1, "location_id": 1, "res_table_id": null, "res_waiter_id": null, "res_order_status": null, "type": "sell_return", "sub_type": null, "status": "final", "is_quotation": 0, "payment_status": "paid", "adjustment_type": null, "contact_id": 1, "customer_group_id": null, "invoice_no": "CN2020/0005", "ref_no": null, "subscription_no": null, "subscription_repeat_on": null, "transaction_date": "2020-11-17 00:00:00", "total_before_tax": 3, "tax_id": null, "tax_amount": 0, "discount_type": "percentage", "discount_amount": 12, "rp_redeemed": 0, "rp_redeemed_amount": "0.0000", "shipping_details": null, "shipping_address": null, "shipping_status": null, "delivered_to": null, "shipping_charges": "0.0000", "additional_notes": null, "staff_note": null, "round_off_amount": "0.0000", "final_total": 2.64, "expense_category_id": null, "expense_for": null, "commission_agent": null, "document": null, "is_direct_sale": 0, "is_suspend": 0, "exchange_rate": "1.000", "total_amount_recovered": null, "transfer_parent_id": null, "return_parent_id": 157, "opening_stock_product_id": null, "created_by": 9, "import_batch": null, "import_time": null, "types_of_service_id": null, "packing_charge": null, "packing_charge_type": null, "service_custom_field_1": null, "service_custom_field_2": null, "service_custom_field_3": null, "service_custom_field_4": null, "mfg_parent_production_purchase_id": null, "mfg_wasted_units": null, "mfg_production_cost": "0.0000", "mfg_production_cost_type": "percentage", "mfg_is_final": 0, "is_created_from_api": 0, "essentials_duration": "0.00", "essentials_duration_unit": null, "essentials_amount_per_unit_duration": "0.0000", "essentials_allowances": null, "essentials_deductions": null, "rp_earned": 0, "repair_completed_on": null, "repair_warranty_id": null, "repair_brand_id": null, "repair_status_id": null, "repair_model_id": null, "repair_job_sheet_id": null, "repair_defects": null, "repair_serial_no": null, "repair_checklist": null, "repair_security_pwd": null, "repair_security_pattern": null, "repair_due_date": null, "repair_device_id": null, "repair_updates_notif": 0, "order_addresses": null, "is_recurring": 0, "recur_interval": null, "recur_interval_type": null, "recur_repetitions": null, "recur_stopped_on": null, "recur_parent_id": null, "invoice_token": null, "pay_term_number": null, "pay_term_type": null, "pjt_project_id": null, "pjt_title": null, "woocommerce_order_id": null, "selling_price_group_id": null, "created_at": "2020-11-17 12:05:11", "updated_at": "2020-11-17 13:22:09" }</code> </pre> </span> <span id="execution-results-POSTconnector-api-sell-return" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-sell-return"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-sell-return" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-sell-return" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-sell-return"></code></pre> </span> <form id="form-POSTconnector-api-sell-return" data-method="POST" data-path="connector/api/sell-return" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-sell-return', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/sell-return</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-sell-return" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-sell-return" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-sell-return" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_id</code></b> <small>integer</small> <input type="number" style="display: none" name="transaction_id" data-endpoint="POSTconnector-api-sell-return" value="8" data-component="body"> <br> <p>Id of the sell Example: <code>8</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>transaction_date</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="transaction_date" data-endpoint="POSTconnector-api-sell-return" value="2020-5-7 15:20:22" data-component="body"> <br> <p>transaction date format:Y-m-d H:i:s, Example: <code>2020-5-7 15:20:22</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>invoice_no</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="invoice_no" data-endpoint="POSTconnector-api-sell-return" value="accusamus" data-component="body"> <br> <p>Invoice number of the return Example: <code>accusamus</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>discount_amount</code></b> <small>number</small> <i>optional</i> <input type="number" style="display: none" name="discount_amount" data-endpoint="POSTconnector-api-sell-return" value="10" data-component="body"> <br> <p>discount amount applicable to the sale Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>discount_type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="discount_type" data-endpoint="POSTconnector-api-sell-return" value="fixed" data-component="body"> <br> <p>type of the discount amount (fixed, percentage) Example: <code>fixed</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>products</code></b> <small>string[]</small> <br> <p>array of the products for the sale</p> </summary> <div style=" margin-left: 14px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sell_line_id</code></b> <small>integer</small> <input type="number" style="display: none" name="products.*.sell_line_id" data-endpoint="POSTconnector-api-sell-return" value="5" data-component="body"> <br> <p>sell line id Example: <code>5</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>quantity</code></b> <small>number</small> <input type="number" style="display: none" name="products.*.quantity" data-endpoint="POSTconnector-api-sell-return" value="1" data-component="body"> <br> <p>quantity to be returned from the sell line Example: <code>1</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>unit_price_inc_tax</code></b> <small>number</small> <input type="number" style="display: none" name="products.*.unit_price_inc_tax" data-endpoint="POSTconnector-api-sell-return" value="437.5" data-component="body"> <br> <p>unit selling price of the returning item Example: <code>437.5</code></p> </div> </details> </div> </details> </div> </form> <h2 id="sales-management-GETconnector-api-list-sell-return">List Sell Return</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-list-sell-return"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/list-sell-return" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/list-sell-return" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/list-sell-return', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-list-sell-return"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 159, "business_id": 1, "location_id": 1, "res_table_id": null, "res_waiter_id": null, "res_order_status": null, "type": "sell_return", "sub_type": null, "status": "final", "is_quotation": 0, "payment_status": "partial", "adjustment_type": null, "contact_id": 1, "customer_group_id": null, "invoice_no": "CN2020/0005", "ref_no": null, "subscription_no": null, "subscription_repeat_on": null, "transaction_date": "2020-11-17 00:00:00", "total_before_tax": "3.0000", "tax_id": null, "tax_amount": "0.0000", "discount_type": "percentage", "discount_amount": "12.0000", "rp_redeemed": 0, "rp_redeemed_amount": "0.0000", "shipping_details": null, "shipping_address": null, "shipping_status": null, "delivered_to": null, "shipping_charges": "0.0000", "additional_notes": null, "staff_note": null, "round_off_amount": "0.0000", "final_total": "2.6400", "expense_category_id": null, "expense_for": null, "commission_agent": null, "document": null, "is_direct_sale": 0, "is_suspend": 0, "exchange_rate": "1.000", "total_amount_recovered": null, "transfer_parent_id": null, "return_parent_id": 157, "opening_stock_product_id": null, "created_by": 9, "import_batch": null, "import_time": null, "types_of_service_id": null, "packing_charge": null, "packing_charge_type": null, "service_custom_field_1": null, "service_custom_field_2": null, "service_custom_field_3": null, "service_custom_field_4": null, "mfg_parent_production_purchase_id": null, "mfg_wasted_units": null, "mfg_production_cost": "0.0000", "mfg_production_cost_type": "percentage", "mfg_is_final": 0, "is_created_from_api": 0, "essentials_duration": "0.00", "essentials_duration_unit": null, "essentials_amount_per_unit_duration": "0.0000", "essentials_allowances": null, "essentials_deductions": null, "rp_earned": 0, "repair_completed_on": null, "repair_warranty_id": null, "repair_brand_id": null, "repair_status_id": null, "repair_model_id": null, "repair_job_sheet_id": null, "repair_defects": null, "repair_serial_no": null, "repair_checklist": null, "repair_security_pwd": null, "repair_security_pattern": null, "repair_due_date": null, "repair_device_id": null, "repair_updates_notif": 0, "order_addresses": null, "is_recurring": 0, "recur_interval": null, "recur_interval_type": null, "recur_repetitions": null, "recur_stopped_on": null, "recur_parent_id": null, "invoice_token": null, "pay_term_number": null, "pay_term_type": null, "pjt_project_id": null, "pjt_title": null, "woocommerce_order_id": null, "selling_price_group_id": null, "created_at": "2020-11-17 12:05:11", "updated_at": "2020-11-17 13:22:09", "payment_lines": [ { "id": 126, "transaction_id": 159, "business_id": 1, "is_return": 0, "amount": "1.8000", "method": "cash", "transaction_no": null, "card_transaction_number": null, "card_number": null, "card_type": "credit", "card_holder_name": null, "card_month": null, "card_year": null, "card_security": null, "cheque_number": null, "bank_account_number": null, "paid_on": "2020-11-17 12:05:00", "created_by": 9, "is_advance": 0, "payment_for": 1, "parent_id": null, "note": null, "document": null, "payment_ref_no": "SP2020/0078", "account_id": null, "created_at": "2020-11-17 12:05:58", "updated_at": "2020-11-17 12:05:58" } ], "return_parent_sell": { "id": 157, "business_id": 1, "location_id": 1, "res_table_id": null, "res_waiter_id": null, "res_order_status": null, "type": "sell", "sub_type": null, "status": "final", "is_quotation": 0, "payment_status": "paid", "adjustment_type": null, "contact_id": 1, "customer_group_id": null, "invoice_no": "AS0073", "ref_no": "", "subscription_no": null, "subscription_repeat_on": null, "transaction_date": "2020-11-13 12:42:17", "total_before_tax": "6.2500", "tax_id": null, "tax_amount": "0.0000", "discount_type": "percentage", "discount_amount": "10.0000", "rp_redeemed": 0, "rp_redeemed_amount": "0.0000", "shipping_details": null, "shipping_address": null, "shipping_status": null, "delivered_to": null, "shipping_charges": "0.0000", "additional_notes": null, "staff_note": null, "round_off_amount": "0.0000", "final_total": "5.6300", "expense_category_id": null, "expense_for": null, "commission_agent": null, "document": null, "is_direct_sale": 0, "is_suspend": 0, "exchange_rate": "1.000", "total_amount_recovered": null, "transfer_parent_id": null, "return_parent_id": null, "opening_stock_product_id": null, "created_by": 9, "import_batch": null, "import_time": null, "types_of_service_id": null, "packing_charge": "0.0000", "packing_charge_type": null, "service_custom_field_1": null, "service_custom_field_2": null, "service_custom_field_3": null, "service_custom_field_4": null, "mfg_parent_production_purchase_id": null, "mfg_wasted_units": null, "mfg_production_cost": "0.0000", "mfg_production_cost_type": "percentage", "mfg_is_final": 0, "is_created_from_api": 0, "essentials_duration": "0.00", "essentials_duration_unit": null, "essentials_amount_per_unit_duration": "0.0000", "essentials_allowances": null, "essentials_deductions": null, "rp_earned": 0, "repair_completed_on": null, "repair_warranty_id": null, "repair_brand_id": null, "repair_status_id": null, "repair_model_id": null, "repair_job_sheet_id": null, "repair_defects": null, "repair_serial_no": null, "repair_checklist": null, "repair_security_pwd": null, "repair_security_pattern": null, "repair_due_date": null, "repair_device_id": null, "repair_updates_notif": 0, "order_addresses": null, "is_recurring": 0, "recur_interval": 1, "recur_interval_type": "days", "recur_repetitions": 0, "recur_stopped_on": null, "recur_parent_id": null, "invoice_token": null, "pay_term_number": null, "pay_term_type": null, "pjt_project_id": null, "pjt_title": null, "woocommerce_order_id": null, "selling_price_group_id": 0, "created_at": "2020-11-13 12:42:17", "updated_at": "2020-11-13 12:42:18", "sell_lines": [ { "id": 139, "transaction_id": 157, "product_id": 157, "variation_id": 205, "quantity": 5, "mfg_waste_percent": "0.0000", "quantity_returned": "3.0000", "unit_price_before_discount": "1.2500", "unit_price": "1.2500", "line_discount_type": "fixed", "line_discount_amount": "0.0000", "unit_price_inc_tax": "1.2500", "item_tax": "0.0000", "tax_id": null, "discount_id": null, "lot_no_line_id": null, "sell_line_note": "", "res_service_staff_id": null, "res_line_order_status": null, "woocommerce_line_items_id": null, "parent_sell_line_id": null, "children_type": "", "sub_unit_id": null, "created_at": "2020-11-13 12:42:17", "updated_at": "2020-11-17 13:22:09" } ] } } ], "links": { "first": "http://local.pos.com/connector/api/list-sell-return?sell_id=157&page=1", "last": null, "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "path": "http://local.pos.com/connector/api/list-sell-return", "per_page": 10, "to": 1 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-list-sell-return" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-list-sell-return"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-list-sell-return" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-list-sell-return" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-list-sell-return"></code></pre> </span> <form id="form-GETconnector-api-list-sell-return" data-method="GET" data-path="connector/api/list-sell-return" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-list-sell-return', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/list-sell-return</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-list-sell-return" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-list-sell-return" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-list-sell-return" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>sell_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="sell_id" data-endpoint="GETconnector-api-list-sell-return" value="error" data-component="url"> <br> <p>Id of the sell for which return is added Example: <code>error</code></p> </div> </form> <h2 id="sales-management-POSTconnector-api-update-shipping-status">Update shipping status</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-update-shipping-status"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/update-shipping-status" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"id\": 9, \"shipping_status\": \"ordered\", \"delivered_to\": \"ut\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/update-shipping-status" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "id": 9, "shipping_status": "ordered", "delivered_to": "ut" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/update-shipping-status', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'id' => 9, 'shipping_status' => 'ordered', 'delivered_to' => 'ut', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-update-shipping-status"> </span> <span id="execution-results-POSTconnector-api-update-shipping-status" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-update-shipping-status"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-update-shipping-status" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-update-shipping-status" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-update-shipping-status"></code></pre> </span> <form id="form-POSTconnector-api-update-shipping-status" data-method="POST" data-path="connector/api/update-shipping-status" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-update-shipping-status', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/update-shipping-status</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-update-shipping-status" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-update-shipping-status" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-update-shipping-status" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>integer</small> <input type="number" style="display: none" name="id" data-endpoint="POSTconnector-api-update-shipping-status" value="9" data-component="body"> <br> <p>id of the sale Example: <code>9</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>shipping_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="shipping_status" data-endpoint="POSTconnector-api-update-shipping-status" value="ordered" data-component="body"> <br> <p>('ordered', 'packed', 'shipped', 'delivered', 'cancelled') Example: <code>ordered</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>delivered_to</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="delivered_to" data-endpoint="POSTconnector-api-update-shipping-status" value="ut" data-component="body"> <br> <p>Name of the consignee Example: <code>ut</code></p> </div> </form> <h1 id="superadmin">Superadmin</h1> <h2 id="superadmin-GETconnector-api-active-subscription">If SaaS installed get active subscription details, else return the enabled modules details in package_details</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-active-subscription"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/active-subscription" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/active-subscription" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/active-subscription', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-active-subscription"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 1, "business_id": 1, "package_id": 3, "start_date": "2020-09-05 00:00:00", "trial_end_date": "2020-09-15", "end_date": "2020-10-05 00:00:00", "package_price": "599.9900", "package_details": { "location_count": 0, "user_count": 0, "product_count": 0, "invoice_count": 0, "name": "Unlimited", "woocommerce_module": 1, "essentials_module": 1 }, "created_id": 1, "paid_via": "stripe", "payment_transaction_id": "ch_1CuLdQAhokBpT93LVZNg2At6", "status": "approved", "deleted_at": null, "created_at": "2018-08-01 07:49:09", "updated_at": "2018-08-01 07:49:09", "locations_created": 1, "users_created": 6, "products_created": 2, "invoices_created": 1 } }</code> </pre> </span> <span id="execution-results-GETconnector-api-active-subscription" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-active-subscription"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-active-subscription" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-active-subscription" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-active-subscription"></code></pre> </span> <form id="form-GETconnector-api-active-subscription" data-method="GET" data-path="connector/api/active-subscription" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-active-subscription', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/active-subscription</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-active-subscription" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-active-subscription" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-active-subscription" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="superadmin-GETconnector-api-packages">Get Superadmin Package List</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-packages"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/packages" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/packages" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/packages', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-packages"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "Starter - Free", "description": "Give it a test drive...", "location_count": 0, "user_count": 0, "product_count": 0, "bookings": 0, "kitchen": 0, "order_screen": 0, "tables": 0, "invoice_count": 0, "interval": "months", "interval_count": 1, "trial_days": 10, "price": "0.0000", "custom_permissions": { "assetmanagement_module": "1", "connector_module": "1", "crm_module": "1", "essentials_module": "1", "manufacturing_module": "1", "productcatalogue_module": "1", "project_module": "1", "repair_module": "1", "woocommerce_module": "1" }, "created_by": 1, "sort_order": 0, "is_active": 1, "is_private": 0, "is_one_time": 0, "enable_custom_link": 0, "custom_link": "", "custom_link_text": "", "deleted_at": null, "created_at": "2020-10-09 16:38:02", "updated_at": "2020-11-11 12:19:17" }, { "id": 2, "name": "Regular", "description": "For Small Shops", "location_count": 0, "user_count": 0, "product_count": 0, "bookings": 0, "kitchen": 0, "order_screen": 0, "tables": 0, "invoice_count": 0, "interval": "months", "interval_count": 1, "trial_days": 10, "price": "199.9900", "custom_permissions": { "repair_module": "1" }, "created_by": 1, "sort_order": 1, "is_active": 1, "is_private": 0, "is_one_time": 0, "enable_custom_link": 0, "custom_link": null, "custom_link_text": null, "deleted_at": null, "created_at": "2020-10-09 16:38:02", "updated_at": "2020-10-09 16:38:02" }, { "id": 3, "name": "Unlimited", "description": "For Large Business", "location_count": 0, "user_count": 0, "product_count": 0, "bookings": 0, "kitchen": 0, "order_screen": 0, "tables": 0, "invoice_count": 0, "interval": "months", "interval_count": 1, "trial_days": 10, "price": "599.9900", "custom_permissions": { "assetmanagement_module": "1", "connector_module": "1", "crm_module": "1", "essentials_module": "1", "manufacturing_module": "1", "productcatalogue_module": "1", "project_module": "1", "repair_module": "1", "woocommerce_module": "1" }, "created_by": 1, "sort_order": 1, "is_active": 1, "is_private": 0, "is_one_time": 0, "enable_custom_link": 0, "custom_link": "", "custom_link_text": "", "deleted_at": null, "created_at": "2020-10-09 16:38:02", "updated_at": "2020-11-02 12:09:19" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-packages" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-packages"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-packages" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-packages" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-packages"></code></pre> </span> <form id="form-GETconnector-api-packages" data-method="GET" data-path="connector/api/packages" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-packages', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/packages</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-packages" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-packages" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-packages" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h1 id="table-management">Table management</h1> <h2 id="table-management-GETconnector-api-table">List tables</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-table"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/table?location_id=1" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/table" ); const params = { "location_id": "1", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/table', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'location_id' => '1', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-table"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 5, "business_id": 1, "location_id": 1, "name": "Table 1", "description": null, "created_by": 9, "deleted_at": null, "created_at": "2020-06-04 22:36:37", "updated_at": "2020-06-04 22:36:37" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-table" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-table"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-table" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-table" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-table"></code></pre> </span> <form id="form-GETconnector-api-table" data-method="GET" data-path="connector/api/table" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-table', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/table</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-table" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-table" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-table" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="location_id" data-endpoint="GETconnector-api-table" value="1" data-component="query"> <br> <p>id of the location Example: <code>1</code></p> </div> </form> <h2 id="table-management-GETconnector-api-table--id-">Show the specified table</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-table--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/table/repellat" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/table/repellat" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/table/repellat', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-table--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 5, "business_id": 1, "location_id": 1, "name": "Table 1", "description": null, "created_by": 9, "deleted_at": null, "created_at": "2020-06-04 22:36:37", "updated_at": "2020-06-04 22:36:37" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-table--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-table--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-table--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-table--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-table--id-"></code></pre> </span> <form id="form-GETconnector-api-table--id-" data-method="GET" data-path="connector/api/table/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-table--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/table/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-table--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-table--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-table--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-table--id-" value="repellat" data-component="url"> <br> <p>The ID of the table. Example: <code>repellat</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>table</code></b> <small>string</small> <input type="text" style="display: none" name="table" data-endpoint="GETconnector-api-table--id-" value="5" data-component="url"> <br> <p>comma separated ids of required tables Example: <code>5</code></p> </div> </form> <h1 id="tax-management">Tax management</h1> <h2 id="tax-management-GETconnector-api-tax">List taxes</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-tax"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/tax" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/tax" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/tax', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-tax"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "name": "VAT@10%", "amount": 10, "is_tax_group": 0, "created_by": 1, "woocommerce_tax_rate_id": null, "deleted_at": null, "created_at": "2018-01-04 02:40:07", "updated_at": "2018-01-04 02:40:07" }, { "id": 2, "business_id": 1, "name": "CGST@10%", "amount": 10, "is_tax_group": 0, "created_by": 1, "woocommerce_tax_rate_id": null, "deleted_at": null, "created_at": "2018-01-04 02:40:55", "updated_at": "2018-01-04 02:40:55" }, { "id": 3, "business_id": 1, "name": "SGST@8%", "amount": 8, "is_tax_group": 0, "created_by": 1, "woocommerce_tax_rate_id": null, "deleted_at": null, "created_at": "2018-01-04 02:41:13", "updated_at": "2018-01-04 02:41:13" }, { "id": 4, "business_id": 1, "name": "GST@18%", "amount": 18, "is_tax_group": 1, "created_by": 1, "woocommerce_tax_rate_id": null, "deleted_at": null, "created_at": "2018-01-04 02:42:19", "updated_at": "2018-01-04 02:42:19" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-tax" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-tax"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-tax" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-tax" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-tax"></code></pre> </span> <form id="form-GETconnector-api-tax" data-method="GET" data-path="connector/api/tax" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-tax', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/tax</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-tax" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-tax" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-tax" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="tax-management-GETconnector-api-tax--id-">Get the specified tax</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-tax--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/tax/neque" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/tax/neque" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/tax/neque', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-tax--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "name": "VAT@10%", "amount": 10, "is_tax_group": 0, "created_by": 1, "woocommerce_tax_rate_id": null, "deleted_at": null, "created_at": "2018-01-04 02:40:07", "updated_at": "2018-01-04 02:40:07" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-tax--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-tax--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-tax--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-tax--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-tax--id-"></code></pre> </span> <form id="form-GETconnector-api-tax--id-" data-method="GET" data-path="connector/api/tax/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-tax--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/tax/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-tax--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-tax--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-tax--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-tax--id-" value="neque" data-component="url"> <br> <p>The ID of the tax. Example: <code>neque</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax</code></b> <small>string</small> <input type="text" style="display: none" name="tax" data-endpoint="GETconnector-api-tax--id-" value="1" data-component="url"> <br> <p>comma separated ids of required taxes Example: <code>1</code></p> </div> </form> <h1 id="taxonomy-management">Taxonomy management</h1> <h2 id="taxonomy-management-GETconnector-api-taxonomy">List taxonomy</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-taxonomy"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/taxonomy?type=eaque" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/taxonomy" ); const params = { "type": "eaque", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/taxonomy', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'type' => 'eaque', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-taxonomy"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "Men's", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:06:34", "updated_at": "2018-01-03 21:06:34", "sub_categories": [ { "id": 4, "name": "Jeans", "business_id": 1, "short_code": null, "parent_id": 1, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:07:34", "updated_at": "2018-01-03 21:07:34" }, { "id": 5, "name": "Shirts", "business_id": 1, "short_code": null, "parent_id": 1, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:08:18", "updated_at": "2018-01-03 21:08:18" } ] }, { "id": 21, "name": "Food & Grocery", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-06 05:31:35", "updated_at": "2018-01-06 05:31:35", "sub_categories": [] } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-taxonomy" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-taxonomy"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-taxonomy" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-taxonomy" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-taxonomy"></code></pre> </span> <form id="form-GETconnector-api-taxonomy" data-method="GET" data-path="connector/api/taxonomy" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-taxonomy', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/taxonomy</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-taxonomy" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-taxonomy" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-taxonomy" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>type</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="type" data-endpoint="GETconnector-api-taxonomy" value="eaque" data-component="query"> <br> <p>Type of taxonomy (product, device, hrm_department) Example: <code>eaque</code></p> </div> </form> <h2 id="taxonomy-management-GETconnector-api-taxonomy--id-">Get the specified taxonomy</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-taxonomy--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/taxonomy/omnis" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/taxonomy/omnis" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/taxonomy/omnis', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-taxonomy--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "Men's", "business_id": 1, "short_code": null, "parent_id": 0, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:06:34", "updated_at": "2018-01-03 21:06:34", "sub_categories": [ { "id": 4, "name": "Jeans", "business_id": 1, "short_code": null, "parent_id": 1, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:07:34", "updated_at": "2018-01-03 21:07:34" }, { "id": 5, "name": "Shirts", "business_id": 1, "short_code": null, "parent_id": 1, "created_by": 1, "category_type": "product", "description": null, "slug": null, "woocommerce_cat_id": null, "deleted_at": null, "created_at": "2018-01-03 21:08:18", "updated_at": "2018-01-03 21:08:18" } ] } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-taxonomy--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-taxonomy--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-taxonomy--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-taxonomy--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-taxonomy--id-"></code></pre> </span> <form id="form-GETconnector-api-taxonomy--id-" data-method="GET" data-path="connector/api/taxonomy/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-taxonomy--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/taxonomy/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-taxonomy--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-taxonomy--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-taxonomy--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>string</small> <input type="text" style="display: none" name="id" data-endpoint="GETconnector-api-taxonomy--id-" value="omnis" data-component="url"> <br> <p>The ID of the taxonomy. Example: <code>omnis</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>taxonomy</code></b> <small>string</small> <input type="text" style="display: none" name="taxonomy" data-endpoint="GETconnector-api-taxonomy--id-" value="1" data-component="url"> <br> <p>comma separated ids of product categories Example: <code>1</code></p> </div> </form> <h1 id="types-of-service-management">Types of service management</h1> <h2 id="types-of-service-management-GETconnector-api-types-of-service">List types of service</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-types-of-service"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/types-of-service" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/types-of-service" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/types-of-service', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-types-of-service"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "Home Delivery", "description": null, "business_id": 1, "location_price_group": { "1": "0" }, "packing_charge": "10.0000", "packing_charge_type": "fixed", "enable_custom_fields": 0, "created_at": "2020-06-04 22:41:13", "updated_at": "2020-06-04 22:41:13" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-types-of-service" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-types-of-service"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-types-of-service" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-types-of-service" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-types-of-service"></code></pre> </span> <form id="form-GETconnector-api-types-of-service" data-method="GET" data-path="connector/api/types-of-service" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-types-of-service', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/types-of-service</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-types-of-service" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-types-of-service" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-types-of-service" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="types-of-service-management-GETconnector-api-types-of-service--id-">Get the specified types of service</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-types-of-service--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/types-of-service/5" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/types-of-service/5" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/types-of-service/5', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-types-of-service--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "name": "Home Delivery", "description": null, "business_id": 1, "location_price_group": { "1": "0" }, "packing_charge": "10.0000", "packing_charge_type": "fixed", "enable_custom_fields": 0, "created_at": "2020-06-04 22:41:13", "updated_at": "2020-06-04 22:41:13" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-types-of-service--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-types-of-service--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-types-of-service--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-types-of-service--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-types-of-service--id-"></code></pre> </span> <form id="form-GETconnector-api-types-of-service--id-" data-method="GET" data-path="connector/api/types-of-service/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-types-of-service--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/types-of-service/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-types-of-service--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-types-of-service--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-types-of-service--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>integer</small> <input type="number" style="display: none" name="id" data-endpoint="GETconnector-api-types-of-service--id-" value="5" data-component="url"> <br> <p>The ID of the types of service. Example: <code>5</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>types_of_service</code></b> <small>string</small> <input type="text" style="display: none" name="types_of_service" data-endpoint="GETconnector-api-types-of-service--id-" value="1" data-component="url"> <br> <p>comma separated ids of required types of services Example: <code>1</code></p> </div> </form> <h1 id="unit-management">Unit management</h1> <h2 id="unit-management-GETconnector-api-unit">List units</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-unit"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/unit" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/unit" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/unit', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-unit"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "actual_name": "Pieces", "short_name": "Pc(s)", "allow_decimal": 0, "base_unit_id": null, "base_unit_multiplier": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 15:15:20", "updated_at": "2018-01-03 15:15:20", "base_unit": null }, { "id": 2, "business_id": 1, "actual_name": "Packets", "short_name": "packets", "allow_decimal": 0, "base_unit_id": null, "base_unit_multiplier": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-06 01:07:01", "updated_at": "2018-01-06 01:08:36", "base_unit": null }, { "id": 15, "business_id": 1, "actual_name": "Dozen", "short_name": "dz", "allow_decimal": 0, "base_unit_id": 1, "base_unit_multiplier": "12.0000", "created_by": 9, "deleted_at": null, "created_at": "2020-07-20 13:11:09", "updated_at": "2020-07-20 13:11:09", "base_unit": { "id": 1, "business_id": 1, "actual_name": "Pieces", "short_name": "Pc(s)", "allow_decimal": 0, "base_unit_id": null, "base_unit_multiplier": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 15:15:20", "updated_at": "2018-01-03 15:15:20" } } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-unit" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-unit"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-unit" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-unit" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-unit"></code></pre> </span> <form id="form-GETconnector-api-unit" data-method="GET" data-path="connector/api/unit" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-unit', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/unit</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-unit" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-unit" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-unit" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="unit-management-GETconnector-api-unit--id-">Get the specified unit</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-unit--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/unit/1" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/unit/1" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/unit/1', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-unit--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "business_id": 1, "actual_name": "Pieces", "short_name": "Pc(s)", "allow_decimal": 0, "base_unit_id": null, "base_unit_multiplier": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 15:15:20", "updated_at": "2018-01-03 15:15:20", "base_unit": null } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-unit--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-unit--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-unit--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-unit--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-unit--id-"></code></pre> </span> <form id="form-GETconnector-api-unit--id-" data-method="GET" data-path="connector/api/unit/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-unit--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/unit/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-unit--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-unit--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-unit--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>integer</small> <input type="number" style="display: none" name="id" data-endpoint="GETconnector-api-unit--id-" value="1" data-component="url"> <br> <p>The ID of the unit. Example: <code>1</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>unit</code></b> <small>string</small> <input type="text" style="display: none" name="unit" data-endpoint="GETconnector-api-unit--id-" value="1" data-component="url"> <br> <p>comma separated ids of the units Example: <code>1</code></p> </div> </form> <h1 id="user-management">User management</h1> <h2 id="user-management-GETconnector-api-user-loggedin">Get the loggedin user details.</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-user-loggedin"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/user/loggedin" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/user/loggedin" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/user/loggedin', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-user-loggedin"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": { "id": 1, "user_type": "user", "surname": "Mr", "first_name": "Admin", "last_name": null, "username": "admin", "email": "admin@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-01-04 02:15:19", "updated_at": "2018-01-04 02:15:19" } }</code> </pre> </span> <span id="execution-results-GETconnector-api-user-loggedin" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-user-loggedin"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-user-loggedin" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-user-loggedin" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-user-loggedin"></code></pre> </span> <form id="form-GETconnector-api-user-loggedin" data-method="GET" data-path="connector/api/user/loggedin" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-user-loggedin', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/user/loggedin</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-user-loggedin" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-user-loggedin" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-user-loggedin" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> </form> <h2 id="user-management-POSTconnector-api-user-registration">Register User</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-user-registration"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/user-registration" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"username\": \"rerum\", \"email\": \"krystal.eichmann@example.com\", \"user_type\": \"fuga\", \"surname\": \"est\", \"first_name\": \"maiores\", \"last_name\": \"eligendi\", \"is_active\": \"aut\", \"crm_contact_id\": 17, \"allow_login\": false, \"password\": \"$07m=>@3+?L\", \"role\": 10, \"access_all_locations\": true, \"location_permissions\": [ \"et\" ], \"cmmsn_percent\": \"eveniet\", \"max_sales_discount_percent\": \"rerum\", \"selected_contacts\": true, \"selected_contact_ids\": [ \"rerum\" ], \"dob\": \"non\", \"gender\": \"perspiciatis\", \"marital_status\": \"facilis\", \"blood_group\": \"quis\", \"contact_number\": \"repellendus\", \"alt_number\": \"ducimus\", \"family_number\": \"laboriosam\", \"fb_link\": \"mollitia\", \"twitter_link\": \"rerum\", \"social_media_1\": \"ut\", \"social_media_2\": \"consequuntur\", \"custom_field_1\": \"non\", \"custom_field_2\": \"illum\", \"custom_field_3\": \"officia\", \"custom_field_4\": \"facilis\", \"guardian_name\": \"impedit\", \"id_proof_name\": \"quam\", \"id_proof_number\": \"autem\", \"permanent_address\": \"aliquid\", \"current_address\": \"similique\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/user-registration" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "username": "rerum", "email": "krystal.eichmann@example.com", "user_type": "fuga", "surname": "est", "first_name": "maiores", "last_name": "eligendi", "is_active": "aut", "crm_contact_id": 17, "allow_login": false, "password": "$07m=>@3+?L", "role": 10, "access_all_locations": true, "location_permissions": [ "et" ], "cmmsn_percent": "eveniet", "max_sales_discount_percent": "rerum", "selected_contacts": true, "selected_contact_ids": [ "rerum" ], "dob": "non", "gender": "perspiciatis", "marital_status": "facilis", "blood_group": "quis", "contact_number": "repellendus", "alt_number": "ducimus", "family_number": "laboriosam", "fb_link": "mollitia", "twitter_link": "rerum", "social_media_1": "ut", "social_media_2": "consequuntur", "custom_field_1": "non", "custom_field_2": "illum", "custom_field_3": "officia", "custom_field_4": "facilis", "guardian_name": "impedit", "id_proof_name": "quam", "id_proof_number": "autem", "permanent_address": "aliquid", "current_address": "similique" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/user-registration', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'username' => 'rerum', 'email' => 'krystal.eichmann@example.com', 'user_type' => 'fuga', 'surname' => 'est', 'first_name' => 'maiores', 'last_name' => 'eligendi', 'is_active' => 'aut', 'crm_contact_id' => 17, 'allow_login' => false, 'password' => '$07m=>@3+?L', 'role' => 10, 'access_all_locations' => true, 'location_permissions' => [ 'et', ], 'cmmsn_percent' => 'eveniet', 'max_sales_discount_percent' => 'rerum', 'selected_contacts' => true, 'selected_contact_ids' => [ 'rerum', ], 'dob' => 'non', 'gender' => 'perspiciatis', 'marital_status' => 'facilis', 'blood_group' => 'quis', 'contact_number' => 'repellendus', 'alt_number' => 'ducimus', 'family_number' => 'laboriosam', 'fb_link' => 'mollitia', 'twitter_link' => 'rerum', 'social_media_1' => 'ut', 'social_media_2' => 'consequuntur', 'custom_field_1' => 'non', 'custom_field_2' => 'illum', 'custom_field_3' => 'officia', 'custom_field_4' => 'facilis', 'guardian_name' => 'impedit', 'id_proof_name' => 'quam', 'id_proof_number' => 'autem', 'permanent_address' => 'aliquid', 'current_address' => 'similique', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-user-registration"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "success": 1, "msg": "User added successfully", "user": { "surname": "Mr", "first_name": "Test", "last_name": "kumar", "email": "test@example.com", "user_type": "user_customer", "crm_contact_id": "2", "allow_login": 1, "username": "0017", "cmmsn_percent": "25", "max_sales_discount_percent": "52", "dob": "1997-10-12", "gender": "male", "marital_status": "unmarried", "blood_group": "0+", "contact_number": "4578451245", "alt_number": "7474747474", "family_number": "7474147414", "fb_link": "fb.com/username", "twitter_link": "twitter.com/username", "social_media_1": "test", "social_media_2": "test", "custom_field_1": "test", "custom_field_2": "test", "custom_field_3": "test", "custom_field_4": "test", "guardian_name": "test", "id_proof_name": "uid", "id_proof_number": "747845120124", "permanent_address": "test permanent adrress", "current_address": "test current address", "bank_details": "{\"account_holder_name\":\"test\",\"account_number\":\"test\",\"bank_name\":\"test\",\"bank_code\":\"test\",\"branch\":\"test\",\"tax_payer_id\":\"test\"}", "selected_contacts": "1", "status": "active", "business_id": 1, "updated_at": "2021-08-12 18:03:58", "created_at": "2021-08-12 18:03:58", "id": 140 } }</code> </pre> </span> <span id="execution-results-POSTconnector-api-user-registration" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-user-registration"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-user-registration" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-user-registration" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-user-registration"></code></pre> </span> <form id="form-POSTconnector-api-user-registration" data-method="POST" data-path="connector/api/user-registration" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-user-registration', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/user-registration</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-user-registration" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-user-registration" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-user-registration" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>username</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="username" data-endpoint="POSTconnector-api-user-registration" value="rerum" data-component="body"> <br> <p>minimum 5 characters Example: <code>rerum</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>email</code></b> <small>string</small> <input type="text" style="display: none" name="email" data-endpoint="POSTconnector-api-user-registration" value="krystal.eichmann@example.com" data-component="body"> <br> <p>Example: <code>krystal.eichmann@example.com</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user_type</code></b> <small>string</small> <input type="text" style="display: none" name="user_type" data-endpoint="POSTconnector-api-user-registration" value="fuga" data-component="body"> <br> <p>'user_customer' for contact/customer login & 'user' for general user Example: <code>fuga</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>surname</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="surname" data-endpoint="POSTconnector-api-user-registration" value="est" data-component="body"> <br> <p>prefix like Mr, Mrs,Dr Example: <code>est</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>first_name</code></b> <small>string</small> <input type="text" style="display: none" name="first_name" data-endpoint="POSTconnector-api-user-registration" value="maiores" data-component="body"> <br> <p>Example: <code>maiores</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>last_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="last_name" data-endpoint="POSTconnector-api-user-registration" value="eligendi" data-component="body"> <br> <p>Example: <code>eligendi</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>is_active</code></b> <small>string</small> <input type="text" style="display: none" name="is_active" data-endpoint="POSTconnector-api-user-registration" value="aut" data-component="body"> <br> <p>'active', 'inactive', 'terminated' Example: <code>aut</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>crm_contact_id</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="crm_contact_id" data-endpoint="POSTconnector-api-user-registration" value="17" data-component="body"> <br> <p>if user_type is 'user_customer' then required Example: <code>17</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>allow_login</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="POSTconnector-api-user-registration" style="display: none"> <input type="radio" name="allow_login" value="true" data-endpoint="POSTconnector-api-user-registration" data-component="body" > <code>true</code> </label> <label data-endpoint="POSTconnector-api-user-registration" style="display: none"> <input type="radio" name="allow_login" value="false" data-endpoint="POSTconnector-api-user-registration" data-component="body" > <code>false</code> </label> <br> <p>1 to allow login & 0 to disable login Example: <code>false</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>password</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="password" data-endpoint="POSTconnector-api-user-registration" value="$07m=>@3+?L" data-component="body"> <br> <p>minimum 6 characters & required if 'allow_login' is 1 Example: <code>$07m=>@3+?L</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>role</code></b> <small>integer</small> <i>optional</i> <input type="number" style="display: none" name="role" data-endpoint="POSTconnector-api-user-registration" value="10" data-component="body"> <br> <p>id of role to be assigned to user & required if user_type is 'user' Example: <code>10</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>access_all_locations</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="POSTconnector-api-user-registration" style="display: none"> <input type="radio" name="access_all_locations" value="true" data-endpoint="POSTconnector-api-user-registration" data-component="body" > <code>true</code> </label> <label data-endpoint="POSTconnector-api-user-registration" style="display: none"> <input type="radio" name="access_all_locations" value="false" data-endpoint="POSTconnector-api-user-registration" data-component="body" > <code>false</code> </label> <br> <p>1 if user has access all location else 0 & required if user_type is 'user' Example: <code>true</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>location_permissions</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="location_permissions[0]" data-endpoint="POSTconnector-api-user-registration" data-component="body"> <input type="text" style="display: none" name="location_permissions[1]" data-endpoint="POSTconnector-api-user-registration" data-component="body"> <br> <p>array of location ids to be assigned to user & required if user_type is 'user' and 'access_all_locations' is 0</p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>cmmsn_percent</code></b> <small>decimal</small> <i>optional</i> <input type="text" style="display: none" name="cmmsn_percent" data-endpoint="POSTconnector-api-user-registration" value="eveniet" data-component="body"> <br> <p>Example: <code>eveniet</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>max_sales_discount_percent</code></b> <small>decimal</small> <i>optional</i> <input type="text" style="display: none" name="max_sales_discount_percent" data-endpoint="POSTconnector-api-user-registration" value="rerum" data-component="body"> <br> <p>Example: <code>rerum</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>selected_contacts</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="POSTconnector-api-user-registration" style="display: none"> <input type="radio" name="selected_contacts" value="true" data-endpoint="POSTconnector-api-user-registration" data-component="body" > <code>true</code> </label> <label data-endpoint="POSTconnector-api-user-registration" style="display: none"> <input type="radio" name="selected_contacts" value="false" data-endpoint="POSTconnector-api-user-registration" data-component="body" > <code>false</code> </label> <br> <p>1 or 0 Example: <code>true</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>selected_contact_ids</code></b> <small>string[]</small> <i>optional</i> <input type="text" style="display: none" name="selected_contact_ids[0]" data-endpoint="POSTconnector-api-user-registration" data-component="body"> <input type="text" style="display: none" name="selected_contact_ids[1]" data-endpoint="POSTconnector-api-user-registration" data-component="body"> <br> <p>array of contact ids & required if 'selected_contacts' is 1</p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>dob</code></b> <small>date</small> <i>optional</i> <input type="text" style="display: none" name="dob" data-endpoint="POSTconnector-api-user-registration" value="non" data-component="body"> <br> <p>dob of user in "Y-m-d" format Ex: 1997-10-29 Example: <code>non</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>gender</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="gender" data-endpoint="POSTconnector-api-user-registration" value="perspiciatis" data-component="body"> <br> <p>if user is 'male', 'female', 'others' Example: <code>perspiciatis</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>marital_status</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="marital_status" data-endpoint="POSTconnector-api-user-registration" value="facilis" data-component="body"> <br> <p>if user is 'married', 'unmarried', 'divorced' Example: <code>facilis</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>blood_group</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="blood_group" data-endpoint="POSTconnector-api-user-registration" value="quis" data-component="body"> <br> <p>Example: <code>quis</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>contact_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="contact_number" data-endpoint="POSTconnector-api-user-registration" value="repellendus" data-component="body"> <br> <p>Example: <code>repellendus</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>alt_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="alt_number" data-endpoint="POSTconnector-api-user-registration" value="ducimus" data-component="body"> <br> <p>Example: <code>ducimus</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>family_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="family_number" data-endpoint="POSTconnector-api-user-registration" value="laboriosam" data-component="body"> <br> <p>Example: <code>laboriosam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>fb_link</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="fb_link" data-endpoint="POSTconnector-api-user-registration" value="mollitia" data-component="body"> <br> <p>Example: <code>mollitia</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>twitter_link</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="twitter_link" data-endpoint="POSTconnector-api-user-registration" value="rerum" data-component="body"> <br> <p>Example: <code>rerum</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>social_media_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="social_media_1" data-endpoint="POSTconnector-api-user-registration" value="ut" data-component="body"> <br> <p>Example: <code>ut</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>social_media_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="social_media_2" data-endpoint="POSTconnector-api-user-registration" value="consequuntur" data-component="body"> <br> <p>Example: <code>consequuntur</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field_1</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field_1" data-endpoint="POSTconnector-api-user-registration" value="non" data-component="body"> <br> <p>Example: <code>non</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field_2</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field_2" data-endpoint="POSTconnector-api-user-registration" value="illum" data-component="body"> <br> <p>Example: <code>illum</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field_3</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field_3" data-endpoint="POSTconnector-api-user-registration" value="officia" data-component="body"> <br> <p>Example: <code>officia</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>custom_field_4</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="custom_field_4" data-endpoint="POSTconnector-api-user-registration" value="facilis" data-component="body"> <br> <p>Example: <code>facilis</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>guardian_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="guardian_name" data-endpoint="POSTconnector-api-user-registration" value="impedit" data-component="body"> <br> <p>Example: <code>impedit</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id_proof_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="id_proof_name" data-endpoint="POSTconnector-api-user-registration" value="quam" data-component="body"> <br> <p>ID proof of user like Adhar No. Example: <code>quam</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id_proof_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="id_proof_number" data-endpoint="POSTconnector-api-user-registration" value="autem" data-component="body"> <br> <p>Id Number like adhar number Example: <code>autem</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>permanent_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="permanent_address" data-endpoint="POSTconnector-api-user-registration" value="aliquid" data-component="body"> <br> <p>Example: <code>aliquid</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>current_address</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="current_address" data-endpoint="POSTconnector-api-user-registration" value="similique" data-component="body"> <br> <p>Example: <code>similique</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>bank_details</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style=" margin-left: 14px; clear: unset;"> <details> <summary style="padding-bottom: 10px;"> <b style="line-height: 2;"><code>*</code></b> <small>object</small> <i>optional</i> <br> </summary> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>account_holder_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="bank_details.*.account_holder_name" data-endpoint="POSTconnector-api-user-registration" value="inventore" data-component="body"> <br> <p>Example: <code>inventore</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>account_number</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="bank_details.*.account_number" data-endpoint="POSTconnector-api-user-registration" value="mollitia" data-component="body"> <br> <p>Example: <code>mollitia</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>bank_name</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="bank_details.*.bank_name" data-endpoint="POSTconnector-api-user-registration" value="exercitationem" data-component="body"> <br> <p>Example: <code>exercitationem</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>bank_code</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="bank_details.*.bank_code" data-endpoint="POSTconnector-api-user-registration" value="odio" data-component="body"> <br> <p>Example: <code>odio</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>branch</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="bank_details.*.branch" data-endpoint="POSTconnector-api-user-registration" value="quas" data-component="body"> <br> <p>Example: <code>quas</code></p> </div> <div style="margin-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>tax_payer_id</code></b> <small>string</small> <i>optional</i> <input type="text" style="display: none" name="bank_details.*.tax_payer_id" data-endpoint="POSTconnector-api-user-registration" value="sint" data-component="body"> <br> <p>Example: <code>sint</code></p> </div> </details> </div> </details> </div> </form> <h2 id="user-management-GETconnector-api-user">List users</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-user"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/user?service_staff=" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/user" ); const params = { "service_staff": "0", }; Object.keys(params) .forEach(key => url.searchParams.append(key, params[key])); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/user', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'service_staff' => '0', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-user"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "user_type": "user", "surname": "Mr", "first_name": "Admin", "last_name": null, "username": "admin", "email": "admin@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-01-04 02:15:19", "updated_at": "2018-01-04 02:15:19" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-user" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-user"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-user" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-user" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-user"></code></pre> </span> <form id="form-GETconnector-api-user" data-method="GET" data-path="connector/api/user" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-user', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/user</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-user" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-user" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-user" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Query Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>service_staff</code></b> <small>boolean</small> <i>optional</i> <label data-endpoint="GETconnector-api-user" style="display: none"> <input type="radio" name="service_staff" value="1" data-endpoint="GETconnector-api-user" data-component="query" > <code>true</code> </label> <label data-endpoint="GETconnector-api-user" style="display: none"> <input type="radio" name="service_staff" value="0" data-endpoint="GETconnector-api-user" data-component="query" > <code>false</code> </label> <br> <p>Filter service staffs from users list (0, 1) Example: <code>false</code></p> </div> </form> <h2 id="user-management-GETconnector-api-user--id-">Get the specified user</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-GETconnector-api-user--id-"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request GET \ --get "http://pos.test/connector/api/user/2" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json"</code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/user/2" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->get( 'http://pos.test/connector/api/user/2', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-GETconnector-api-user--id-"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "data": [ { "id": 1, "user_type": "user", "surname": "Mr", "first_name": "Admin", "last_name": null, "username": "admin", "email": "admin@example.com", "language": "en", "contact_no": null, "address": null, "business_id": 1, "max_sales_discount_percent": null, "allow_login": 1, "essentials_department_id": null, "essentials_designation_id": null, "status": "active", "crm_contact_id": null, "is_cmmsn_agnt": 0, "cmmsn_percent": "0.00", "selected_contacts": 0, "dob": null, "gender": null, "marital_status": null, "blood_group": null, "contact_number": null, "fb_link": null, "twitter_link": null, "social_media_1": null, "social_media_2": null, "permanent_address": null, "current_address": null, "guardian_name": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "bank_details": null, "id_proof_name": null, "id_proof_number": null, "deleted_at": null, "created_at": "2018-01-04 02:15:19", "updated_at": "2018-01-04 02:15:19" } ] }</code> </pre> </span> <span id="execution-results-GETconnector-api-user--id-" hidden> <blockquote>Received response<span id="execution-response-status-GETconnector-api-user--id-"></span>: </blockquote> <pre class="json"><code id="execution-response-content-GETconnector-api-user--id-" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-GETconnector-api-user--id-" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-GETconnector-api-user--id-"></code></pre> </span> <form id="form-GETconnector-api-user--id-" data-method="GET" data-path="connector/api/user/{id}" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('GETconnector-api-user--id-', this);"> <h3> Request </h3> <p> <small class="badge badge-green">GET</small> <b><code>connector/api/user/{id}</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="GETconnector-api-user--id-" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="GETconnector-api-user--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="GETconnector-api-user--id-" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>id</code></b> <small>integer</small> <input type="number" style="display: none" name="id" data-endpoint="GETconnector-api-user--id-" value="2" data-component="url"> <br> <p>The ID of the user. Example: <code>2</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>user</code></b> <small>string</small> <input type="text" style="display: none" name="user" data-endpoint="GETconnector-api-user--id-" value="1" data-component="url"> <br> <p>comma separated ids of the required users Example: <code>1</code></p> </div> </form> <h2 id="user-management-POSTconnector-api-update-password">Update user password.</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-update-password"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/update-password" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"current_password\": \"fuga\", \"new_password\": \"eius\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/update-password" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "current_password": "fuga", "new_password": "eius" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/update-password', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'current_password' => 'fuga', 'new_password' => 'eius', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-update-password"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "success": 1, "msg": "Password updated successfully" }</code> </pre> </span> <span id="execution-results-POSTconnector-api-update-password" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-update-password"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-update-password" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-update-password" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-update-password"></code></pre> </span> <form id="form-POSTconnector-api-update-password" data-method="POST" data-path="connector/api/update-password" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-update-password', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/update-password</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-update-password" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-update-password" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-update-password" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>current_password</code></b> <small>string</small> <input type="text" style="display: none" name="current_password" data-endpoint="POSTconnector-api-update-password" value="fuga" data-component="body"> <br> <p>Current password of the user Example: <code>fuga</code></p> </div> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>new_password</code></b> <small>string</small> <input type="text" style="display: none" name="new_password" data-endpoint="POSTconnector-api-update-password" value="eius" data-component="body"> <br> <p>New password of the user Example: <code>eius</code></p> </div> </form> <h2 id="user-management-POSTconnector-api-forget-password">Recover forgotten password.</h2> <p> <small class="badge badge-darkred">requires authentication</small> </p> <span id="example-requests-POSTconnector-api-forget-password"> <blockquote>Example request:</blockquote> <div class="bash-example"> <pre><code class="language-bash">curl --request POST \ "http://pos.test/connector/api/forget-password" \ --header "Authorization: Bearer {access_token}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"email\": \"schuppe.cornelius@example.com\" }" </code></pre></div> <div class="javascript-example"> <pre><code class="language-javascript">const url = new URL( "http://pos.test/connector/api/forget-password" ); const headers = { "Authorization": "Bearer {access_token}", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "email": "schuppe.cornelius@example.com" }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }).then(response => response.json());</code></pre></div> <div class="php-example"> <pre><code class="language-php">$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://pos.test/connector/api/forget-password', [ 'headers' => [ 'Authorization' => 'Bearer {access_token}', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'email' => 'schuppe.cornelius@example.com', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));</code></pre></div> </span> <span id="example-responses-POSTconnector-api-forget-password"> <blockquote> <p>Example response (200):</p> </blockquote> <pre> <code class="language-json" style="max-height: 300px;">{ "success": 1, "msg": "New password sent to user@example.com successfully" }</code> </pre> </span> <span id="execution-results-POSTconnector-api-forget-password" hidden> <blockquote>Received response<span id="execution-response-status-POSTconnector-api-forget-password"></span>: </blockquote> <pre class="json"><code id="execution-response-content-POSTconnector-api-forget-password" style="max-height: 400px;"></code></pre> </span> <span id="execution-error-POSTconnector-api-forget-password" hidden> <blockquote>Request failed with error:</blockquote> <pre><code id="execution-error-message-POSTconnector-api-forget-password"></code></pre> </span> <form id="form-POSTconnector-api-forget-password" data-method="POST" data-path="connector/api/forget-password" data-authed="1" data-hasfiles="0" data-isarraybody="0" autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTconnector-api-forget-password', this);"> <h3> Request </h3> <p> <small class="badge badge-black">POST</small> <b><code>connector/api/forget-password</code></b> </p> <h4 class="fancy-heading-panel"><b>Headers</b></h4> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Authorization</code></b> <input type="text" style="display: none" name="Authorization" class="auth-value" data-endpoint="POSTconnector-api-forget-password" value="Bearer {access_token}" data-component="header"> <br> <p>Example: <code>Bearer {access_token}</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Content-Type</code></b> <input type="text" style="display: none" name="Content-Type" data-endpoint="POSTconnector-api-forget-password" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <div style="padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>Accept</code></b> <input type="text" style="display: none" name="Accept" data-endpoint="POSTconnector-api-forget-password" value="application/json" data-component="header"> <br> <p>Example: <code>application/json</code></p> </div> <h4 class="fancy-heading-panel"><b>Body Parameters</b></h4> <div style=" padding-left: 28px; clear: unset;"> <b style="line-height: 2;"><code>email</code></b> <small>string</small> <input type="text" style="display: none" name="email" data-endpoint="POSTconnector-api-forget-password" value="schuppe.cornelius@example.com" data-component="body"> <br> <p>Users email id Example: <code>schuppe.cornelius@example.com</code></p> </div> </form> </div> <div class="dark-box"> <div class="lang-selector"> <button type="button" class="lang-button" data-language-name="bash">bash</button> <button type="button" class="lang-button" data-language-name="javascript">javascript</button> <button type="button" class="lang-button" data-language-name="php">php</button> </div> </div> </div> </body> </html>