",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},n,{cN:"meta",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}}),e.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"symbol",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link",e:"$"}}]}]}}),e.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},n={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[t]},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:n}],r:0}],i:"[^\\s\\}]"}}),e.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"(AV|CA|CF|CG|CI|MK|MP|NS|UI|XC)\\w+"},n={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,i="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:n,l:r,i:""}]}]},{cN:"class",b:"("+i.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:i,l:r,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}}),e.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",n={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},r={b:"->{",e:"}"},i={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},o=[e.BE,n,i],s=[i,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),r,{cN:"string",c:o,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return n.c=s,r.c=s,{aliases:["pl"],k:t,c:s}}),e.registerLanguage("php",function(e){var t={b:"\\$+[a-zA-Z_-每][a-zA-Z0-9_-每]*"},n={cN:"meta",b:/<\?(php)?|\?>/},r={cN:"string",c:[e.BE,n],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},i={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"},n]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},n,t,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBCM,r,i]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},r,i]}}),e.registerLanguage("python",function(e){var t={cN:"meta",b:/^(>>>|\.\.\.) /},n={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[t],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[t],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},r={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},i={cN:"params",b:/\(/,e:/\)/,c:["self",t,r,n]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[t,r,n,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,i,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}}),e.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",n="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",r={cN:"doctag",b:"@[A-Za-z]+"},i={b:"#<",e:">"},o=[e.C("#","$",{c:[r]}),e.C("^\\=begin","^\\=end",{c:[r],r:10}),e.C("^__END__","\\n$")],s={cN:"subst",b:"#\\{",e:"}",k:n},a={cN:"string",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},c={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:n},l=[a,i,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(o)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:t}),c].concat(o)},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[a,{b:t}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[i,{cN:"regexp",c:[e.BE,s],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(o),r:0}].concat(o);s.c=l,c.c=l;var u="[>?]>",d="[\\w#]+\\(\\w+\\):\\d+:\\d+>",f="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{b:/^\s*=>/,starts:{e:"$",c:l}},{cN:"meta",b:"^("+u+"|"+d+"|"+f+")",starts:{e:"$",c:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:n,i:/\/\*/,c:o.concat(p).concat(l)}}),e.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",e:/;/,eW:!0,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek", literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}}),e}),jQuery.extend({highlight:function(e,t,n,r){if(3===e.nodeType){var i=e.data.match(t);if(i){var o=document.createElement(n||"span");o.className=r||"highlight";var s=e.splitText(i.index);s.splitText(i[0].length);var a=s.cloneNode(!0);return o.appendChild(a),s.parentNode.replaceChild(o,s),1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&(e.tagName!==n.toUpperCase()||e.className!==r))for(var c=0;cs;s++)for(r in o[s])i=o[s][r],o[s].hasOwnProperty(r)&&void 0!==i&&(e.isPlainObject(i)?t[r]=e.isPlainObject(t[r])?e.widget.extend({},t[r],i):e.widget.extend({},i):t[r]=i);return t},e.widget.bridge=function(t,r){var i=r.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=n.call(arguments,1),c=this;return s?this.each(function(){var n,r=e.data(this,i);return"instance"===o?(c=r,!1):r?e.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,a),n!==r&&void 0!==n?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}):(a.length&&(o=e.widget.extend.apply(null,[o].concat(a))),this.each(function(){var t=e.data(this,i);t?(t.option(o||{}),t._init&&t._init()):e.data(this,i,new r(o,this))})),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(n,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var r,i,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},r=t.split("."),t=r.shift(),r.length){for(i=s[t]=e.widget.extend({},this.options[t]),o=0;o",{id:c+t,"class":c}).append(r._nestElements(e(this),t)),r.element.append(n),e(this).nextUntil(this.nodeName.toLowerCase()).each(function(){0===e(this).find(r.options.selectors).length?e(this).filter(r.options.selectors).each(function(){e(this).is(o)||r._appendSubheaders.call(this,r,n)}):e(this).find(r.options.selectors).each(function(){e(this).is(o)||r._appendSubheaders.call(this,r,n)})}))})):void r.element.addClass(a)},_setActiveElement:function(e){var n=this,r=t.location.hash.substring(1),i=n.element.find("li[data-unique='"+r+"']");return r.length?(n.element.find("."+n.focusClass).removeClass(n.focusClass),i.addClass(n.focusClass),n.options.showAndHide&&i.click()):(n.element.find("."+n.focusClass).removeClass(n.focusClass),!r.length&&e&&n.options.highlightDefault&&n.element.find(p).first().addClass(n.focusClass)),n},_nestElements:function(t,n){var r,i,o;return r=e.grep(this.items,function(e){return e===t.text()}),r.length?this.items.push(t.text()+n):this.items.push(t.text()),o=this._generateHashValue(r,t,n),i=e("
  • ",{"class":f,"data-unique":o}).append(e("",{text:t.text()})),t.before(e("
    ",{name:o,"data-unique":o})),i},_generateHashValue:function(e,t,n){var r="",i=this.options.hashGenerator;if("pretty"===i){for(r=t.text().toLowerCase().replace(/\s/g,"-"),r=r.replace(/[^\x00-\x7F]/g,"");r.indexOf("--")>-1;)r=r.replace(/--/g,"-");for(;r.indexOf(":-")>-1;)r=r.replace(/:-/g,"-")}else r="function"==typeof i?i(t.text(),t):t.text().replace(/\s/g,"");return e.length&&(r+=""+n),r},_appendSubheaders:function(t,n){var r=e(this).index(t.options.selectors),i=e(t.options.selectors).eq(r-1),o=+e(this).prop("tagName").charAt(1),s=+i.prop("tagName").charAt(1);s>o?t.element.find(d+"[data-tag="+o+"]").last().append(t._nestElements(e(this),r)):o===s?n.find(p).last().after(t._nestElements(e(this),r)):n.find(p).last().after(e("
      ",{"class":u,"data-tag":o})).next(d).append(t._nestElements(e(this),r))},_setEventHandlers:function(){var i=this;this.element.on("click.tocify","li",function(n){if(i.options.history&&(t.location.hash=e(this).attr("data-unique")),i.element.find("."+i.focusClass).removeClass(i.focusClass),e(this).addClass(i.focusClass),i.options.showAndHide){var r=e('li[data-unique="'+e(this).attr("data-unique")+'"]');i._triggerShow(r)}i._scrollTo(e(this))}),this.element.find("li").on({"mouseenter.tocify":function(){e(this).addClass(i.hoverClass),e(this).css("cursor","pointer")},"mouseleave.tocify":function(){"bootstrap"!==i.options.theme&&e(this).removeClass(i.hoverClass)}}),e(t).on("resize",function(){i.calculateHeights()}),e(t).on("scroll.tocify",function(){e("html, body").promise().done(function(){var o,s,a,c,l=e(t).scrollTop(),u=e(t).height(),d=e(n).height(),f=e("body")[0].scrollHeight;if(i.options.extendPage&&(i.webkit&&l>=f-u-i.options.extendPageOffset||!i.webkit&&u+l>d-i.options.extendPageOffset)&&!e(g).length){if(s=e('div[data-unique="'+e(p).last().attr("data-unique")+'"]'),!s.length)return;a=s.offset().top,e(i.options.context).append(e("
      ",{"class":h,height:Math.abs(a-l)+"px","data-unique":h})),i.extendPageScroll&&(c=i.element.find("li.active"),i._scrollTo(e("div[data-unique="+c.attr("data-unique")+"]")))}setTimeout(function(){var s,a=null;0==i.cachedHeights.length&&i.calculateHeights();var c=e(t).scrollTop();if(i.cachedAnchors.each(function(e){return i.cachedHeights[e]-c<0?void(a=e):!1}),s=e(i.cachedAnchors[a]).attr("data-unique"),o=e('li[data-unique="'+s+'"]'),i.options.highlightOnScroll&&o.length&&!o.hasClass(i.focusClass)){i.element.find("."+i.focusClass).removeClass(i.focusClass),o.addClass(i.focusClass);var l=i.tocifyWrapper,u=e(o).closest(".tocify-header"),d=u.offset().top,f=l.offset().top,p=d-f;if(p>=e(t).height()){var h=p+l.scrollTop();l.scrollTop(h)}else 0>p&&l.scrollTop(0)}i.options.scrollHistory&&t.location.hash!=="#"+s&&s!==r&&(history.replaceState?history.replaceState({},"","#"+s):(scrollV=n.body.scrollTop,scrollH=n.body.scrollLeft,location.hash="#"+s,n.body.scrollTop=scrollV,n.body.scrollLeft=scrollH)),i.options.showAndHideOnScroll&&i.options.showAndHide&&i._triggerShow(o,!0)},0)})})},calculateHeights:function(){var t=this;t.cachedHeights=[],t.cachedAnchors=[];var n=e(t.options.context).find("div[data-unique]");n.each(function(n){var r=(e(this).next().length?e(this).next():e(this)).offset().top-t.options.highlightOffset;t.cachedHeights[n]=r}),t.cachedAnchors=n},show:function(t,n){var r=this;if(!t.is(":visible"))switch(t.find(d).length||t.parent().is(l)||t.parent().is(":visible")?t.children(d).length||t.parent().is(l)||(t=t.closest(d)):t=t.parents(d).add(t),r.options.showEffect){case"none":t.show();break;case"show":t.show(r.options.showEffectSpeed);break;case"slideDown":t.slideDown(r.options.showEffectSpeed);break;case"fadeIn":t.fadeIn(r.options.showEffectSpeed);break;default:t.show()}return t.parent().is(l)?r.hide(e(d).not(t)):r.hide(e(d).not(t.closest(l).find(d).not(t.siblings()))),r},hide:function(e){var t=this;switch(t.options.hideEffect){case"none":e.hide();break;case"hide":e.hide(t.options.hideEffectSpeed);break;case"slideUp":e.slideUp(t.options.hideEffectSpeed);break;case"fadeOut":e.fadeOut(t.options.hideEffectSpeed);break;default:e.hide()}return t},_triggerShow:function(e,t){var n=this;return e.parent().is(l)||e.next().is(d)?n.show(e.next(d),t):e.parent().is(d)&&n.show(e.parent(),t),n},_addCSSClasses:function(){return"jqueryui"===this.options.theme?(this.focusClass="ui-state-default",this.hoverClass="ui-state-hover",this.element.addClass("ui-widget").find(".toc-title").addClass("ui-widget-header").end().find("li").addClass("ui-widget-content")):"bootstrap"===this.options.theme?(this.element.find(l+","+d).addClass("nav nav-list"),this.focusClass="active"):(this.focusClass=o,this.hoverClass=s),this},setOption:function(){e.Widget.prototype._setOption.apply(this,arguments)},setOptions:function(){e.Widget.prototype._setOptions.apply(this,arguments)},_scrollTo:function(t){var n=this,r=n.options.smoothScroll||0,i=n.options.scrollTo;return e("html, body").promise().done(function(){e("html, body").animate({scrollTop:e('div[data-unique="'+t.attr("data-unique")+'"]').next().offset().top-(e.isFunction(i)?i.call():i)+"px"},{duration:r})}),n}})}),function(){var e=function(t){var n=new e.Index;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),t&&t.call(n,n),n};e.version="0.5.7",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn}}(this),e.EventEmitter=function(){this.events={}},e.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},e.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);this.events[e].splice(n,1),this.events[e].length||delete this.events[e]}},e.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)})}},e.EventEmitter.prototype.hasHandler=function(e){return e in this.events},e.tokenizer=function(e){if(!arguments.length||null==e||void 0==e)return[];if(Array.isArray(e))return e.map(function(e){return e.toLowerCase()});for(var t=e.toString().replace(/^\s+/,""),n=t.length-1;n>=0;n--)if(/\S/.test(t.charAt(n))){t=t.substring(0,n+1);break}return t.split(/(?:\s+|\-)/).filter(function(e){return!!e}).map(function(e){return e.toLowerCase()})},e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions={},e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(t){var r=e.Pipeline.registeredFunctions[t];if(!r)throw new Error("Cannot load un-registered function: "+t);n.add(r)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t)+1;this._stack.splice(r,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);this._stack.splice(r,0,n)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,r=this._stack.length,i=0;n>i;i++){for(var o=e[i],s=0;r>s&&(o=this._stack[s](o,i,e),void 0!==o);s++);void 0!==o&&t.push(o)}return t},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},e.Vector.Node=function(e,t,n){this.idx=e,this.val=t,this.next=n},e.Vector.prototype.insert=function(t,n){var r=this.list;if(!r)return this.list=new e.Vector.Node(t,n,r),this.length++;for(var i=r,o=r.next;void 0!=o;){if(tn.idx?n=n.next:(r+=t.val*n.val,t=t.next,n=n.next);return r},e.Vector.prototype.similarity=function(e){return this.dot(e)/(this.magnitude()*e.magnitude())},e.SortedSet=function(){this.length=0,this.elements=[]},e.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},e.SortedSet.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){~this.indexOf(e)||this.elements.splice(this.locationFor(e),0,e)},this),this.length=this.elements.length},e.SortedSet.prototype.toArray=function(){return this.elements.slice()},e.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},e.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},e.SortedSet.prototype.indexOf=function(e,t,n){var t=t||0,n=n||this.elements.length,r=n-t,i=t+Math.floor(r/2),o=this.elements[i];return 1>=r?o===e?i:-1:e>o?this.indexOf(e,i,n):o>e?this.indexOf(e,t,i):o===e?i:void 0},e.SortedSet.prototype.locationFor=function(e,t,n){var t=t||0,n=n||this.elements.length,r=n-t,i=t+Math.floor(r/2),o=this.elements[i];if(1>=r){if(o>e)return i;if(e>o)return i+1}return e>o?this.locationFor(e,i,n):o>e?this.locationFor(e,t,i):void 0},e.SortedSet.prototype.intersect=function(t){for(var n=new e.SortedSet,r=0,i=0,o=this.length,s=t.length,a=this.elements,c=t.elements;;){if(r>o-1||i>s-1)break;a[r]!==c[i]?a[r]c[i]&&i++:(n.add(a[r]),r++,i++)}return n},e.SortedSet.prototype.clone=function(){var t=new e.SortedSet;return t.elements=this.toArray(),t.length=t.elements.length,t},e.SortedSet.prototype.union=function(e){var t,n,r;return this.length>=e.length?(t=this,n=e):(t=e,n=this),r=t.clone(),r.add.apply(r,n.toArray()),r},e.SortedSet.prototype.toJSON=function(){return this.toArray()},e.Index=function(){this._fields=[],this._ref="id",this.pipeline=new e.Pipeline,this.documentStore=new e.Store,this.tokenStore=new e.TokenStore,this.corpusTokens=new e.SortedSet,this.eventEmitter=new e.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},e.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},e.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},e.Index.load=function(t){t.version!==e.version&&e.utils.warn("version mismatch: current "+e.version+" importing "+t.version);var n=new this;return n._fields=t.fields,n._ref=t.ref,n.documentStore=e.Store.load(t.documentStore),n.tokenStore=e.TokenStore.load(t.tokenStore),n.corpusTokens=e.SortedSet.load(t.corpusTokens),n.pipeline=e.Pipeline.load(t.pipeline),n},e.Index.prototype.field=function(e,t){var t=t||{},n={name:e,boost:t.boost||1};return this._fields.push(n),this},e.Index.prototype.ref=function(e){return this._ref=e,this},e.Index.prototype.add=function(t,n){var r={},i=new e.SortedSet,o=t[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var o=this.pipeline.run(e.tokenizer(t[n.name]));r[n.name]=o,e.SortedSet.prototype.add.apply(i,o)},this),this.documentStore.set(o,i),e.SortedSet.prototype.add.apply(this.corpusTokens,i.toArray());for(var s=0;s0&&(r=1+Math.log(this.tokenStore.length/n)),this._idfCache[t]=r},e.Index.prototype.search=function(t){var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduce(function(e,t){return e+t.boost},0),s=n.some(function(e){return this.tokenStore.has(e)},this);if(!s)return[];n.forEach(function(t,n,s){var a=1/s.length*this._fields.length*o,c=this,l=this.tokenStore.expand(t).reduce(function(n,i){var o=c.corpusTokens.indexOf(i),s=c.idf(i),l=1,u=new e.SortedSet;if(i!==t){var d=Math.max(3,i.length-t.length);l=1/Math.log(d)}return o>-1&&r.insert(o,a*s*l),Object.keys(c.tokenStore.get(i)).forEach(function(e){u.add(e)}),n.union(u)},new e.SortedSet);i.push(l)},this);var a=i.reduce(function(e,t){return e.intersect(t)});return a.map(function(e){return{ref:e,score:r.similarity(this.documentVector(e))}},this).sort(function(e,t){return t.score-e.score})},e.Index.prototype.documentVector=function(t){for(var n=this.documentStore.get(t),r=n.length,i=new e.Vector,o=0;r>o;o++){var s=n.elements[o],a=this.tokenStore.get(s)[t].tf,c=this.idf(s);i.insert(this.corpusTokens.indexOf(s),a*c)}return i},e.Index.prototype.toJSON=function(){return{version:e.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},e.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},e.Store=function(){this.store={},this.length=0},e.Store.load=function(t){var n=new this;return n.length=t.length,n.store=Object.keys(t.store).reduce(function(n,r){return n[r]=e.SortedSet.load(t.store[r]),n},{}),n},e.Store.prototype.set=function(e,t){this.has(e)||this.length++,this.store[e]=t},e.Store.prototype.get=function(e){return this.store[e]},e.Store.prototype.has=function(e){return e in this.store},e.Store.prototype.remove=function(e){this.has(e)&&(delete this.store[e],this.length--)},e.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},e.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",r="[aeiouy]",i=n+"[^aeiouy]*",o=r+"[aeiou]*",s="^("+i+")?"+o+i,a="^("+i+")?"+o+i+"("+o+")?$",c="^("+i+")?"+o+i+o+i,l="^("+i+")?"+r,u=new RegExp(s),d=new RegExp(c),f=new RegExp(a),p=new RegExp(l),h=/^(.+?)(ss|i)es$/,g=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,v=/^(.+?)(ed|ing)$/,y=/.$/,b=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+i+r+"[^aeiouwxy]$"),_=/^(.+?[^aeiou])y$/,k=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,C=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,N=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,E=/^(.+?)(s|t)(ion)$/,S=/^(.+?)e$/,T=/ll$/,A=new RegExp("^"+i+r+"[^aeiouwxy]$"),L=function(n){var r,i,o,s,a,c,l;if(n.length<3)return n;if(o=n.substr(0,1),"y"==o&&(n=o.toUpperCase()+n.substr(1)),s=h,a=g,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=m,a=v,s.test(n)){var L=s.exec(n);s=u,s.test(L[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var L=a.exec(n);r=L[1],a=p,a.test(r)&&(n=r,a=b,c=w,l=x,a.test(n)?n+="e":c.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=_,s.test(n)){var L=s.exec(n);r=L[1],n=r+"i"}if(s=k,s.test(n)){var L=s.exec(n);r=L[1],i=L[2],s=u,s.test(r)&&(n=r+e[i])}if(s=C,s.test(n)){var L=s.exec(n);r=L[1],i=L[2],s=u,s.test(r)&&(n=r+t[i])}if(s=N,a=E,s.test(n)){var L=s.exec(n);r=L[1],s=d,s.test(r)&&(n=r)}else if(a.test(n)){var L=a.exec(n);r=L[1]+L[2],a=d,a.test(r)&&(n=r)}if(s=S,s.test(n)){var L=s.exec(n);r=L[1],s=d,a=f,c=A,(s.test(r)||a.test(r)&&!c.test(r))&&(n=r)}return s=T,a=d,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==o&&(n=o.toLowerCase()+n.substr(1)),n};return L}(),e.Pipeline.registerFunction(e.stemmer,"stemmer"),e.stopWordFilter=function(t){return-1===e.stopWordFilter.stopWords.indexOf(t)?t:void 0},e.stopWordFilter.stopWords=new e.SortedSet,e.stopWordFilter.stopWords.length=119,e.stopWordFilter.stopWords.elements=["","a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"],e.Pipeline.registerFunction(e.stopWordFilter,"stopWordFilter"),e.trimmer=function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")},e.Pipeline.registerFunction(e.trimmer,"trimmer"),e.TokenStore=function(){this.root={docs:{}},this.length=0},e.TokenStore.load=function(e){var t=new this;return t.root=e.root,t.length=e.length,t},e.TokenStore.prototype.add=function(e,t,n){var n=n||this.root,r=e[0],i=e.slice(1);return r in n||(n[r]={docs:{}}),0===i.length?(n[r].docs[t.ref]=t,void(this.length+=1)):this.add(i,t,n[r])},e.TokenStore.prototype.has=function(e){if(!e)return!1;for(var t=this.root,n=0;n=1){var e=n(location.search).language;if(e)return e;if(-1!=jQuery.inArray(location.search.substr(1),u))return location.search.substr(1)}return!1}function o(e){var t=n(location.search);return t.language?(t.language=e,r(t)):e}function s(e){if(history){var t=window.location.hash;t&&(t=t.replace(/^#+/,"")),history.pushState({},"","?"+o(e)+"#"+t),localStorage.setItem("language",e)}}function a(e){var n=localStorage.getItem("language");u=e;var r=i();r?(t(r),localStorage.setItem("language",r)):t(null!==n&&-1!=jQuery.inArray(n,u)?n:u[0])}function c(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,""); }function l(){setTimeout(function(){toc.setOption("showEffectSpeed",180)},50)}hljs.initHighlightingOnLoad();var u=[];e.setupLanguages=a,e.activateLanguage=t,$(function(){$("h1, h2").each(function(){$(this).prop("id",c($(this).text()))}),$(".lang-selector a").on("click",function(){var e=$(this).data("language-name");return s(e),t(e),!1}),window.onpopstate=function(){t(i())}});var d=function(){$(".tocify-wrapper").removeClass("open"),$("#nav-button").removeClass("open")},f=function(){e.toc=$("#toc").tocify({selectors:"h1, h2",extendPage:!1,theme:"none",smoothScroll:!1,showEffectSpeed:0,hideEffectSpeed:180,ignoreSelector:".toc-ignore",highlightOffset:60,scrollTo:-1,scrollHistory:!0,hashGenerator:function(e,t){return t.prop("id")}}).data("toc-tocify"),$("#nav-button").click(function(){return $(".tocify-wrapper").toggleClass("open"),$("#nav-button").toggleClass("open"),!1}),$(".page-wrapper").click(d),$(".tocify-item").click(d)};$(function(){f(),l(),$(".content").imagesLoaded(function(){e.toc.calculateHeights()})})}(window),function(){"use strict";function e(){$("h1, h2").each(function(){var e=$(this),t=e.nextUntil("h1, h2");c.add({id:e.prop("id"),title:e.text(),body:t.text()})})}function t(){o=$(".content"),s=$(".search-results"),$("#input-search").on("keyup",n)}function n(e){if(i(),s.addClass("visible"),27===e.keyCode&&(this.value=""),this.value){var t=c.search(this.value).filter(function(e){return e.score>1e-4});t.length?(s.empty(),$.each(t,function(e,t){var n=document.getElementById(t.ref);s.append("
    • "+$(n).text()+"
    • ")}),r.call(this)):(s.html("
    • "),$(".search-results li").text('No Results Found for "'+this.value+'"'))}else i(),s.removeClass("visible")}function r(){this.value&&o.highlight(this.value,a)}function i(){o.unhighlight(a)}var o,s,a={element:"span",className:"search-highlight"},c=new lunr.Index;c.ref("id"),c.field("title",{boost:10}),c.field("body"),c.pipeline.add(lunr.trimmer,lunr.stopWordFilter),$(e),$(t)}(); NAV

      Info

      Welcome to the generated API reference. Get Postman Collection

      Authentication

      • Login to the application and navigate to /connector/client
      • Create new client and generate Client ID and Client secret
      • Once you have created the client, you may request an access token by issuing a POST request to the /oauth/token route
        $http = new GuzzleHttp\Client;
        $response = $http->post('http://your-app.com/oauth/token',
        [
        'form_params' => [
        'grant_type' => 'password',
        'client_id' => 'client-id',
        'client_secret' => 'client-secret',
        'username' => 'taylor@laravel.com',
        'password' => 'my-password',
        'scope' => '',
        ], ]);

      Attendance management

      Get Attendance


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/get-attendance/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/get-attendance/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
          }
      }

      HTTP Request

      GET connector/api/get-attendance/{user_id}

      URL Parameters

      Parameter Status Description
      user_id required id of the user

      Clock In


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/clock-in" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"user_id":1,"clock_in_time":"2000-06-13 13:13:00","clock_in_note":"impedit","ip_address":"eos"}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/clock-in"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "user_id": 1,
          "clock_in_time": "2000-06-13 13:13:00",
          "clock_in_note": "impedit",
          "ip_address": "eos"
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "success": true,
          "msg": "Clocked In successfully",
          "type": "clock_in"
      }

      HTTP Request

      POST connector/api/clock-in

      Body Parameters

      Parameter Type Status Description
      user_id integer required id of the user
      clock_in_time string optional Clock in time.If not given current date time will be used Fromat: Y-m-d H:i:s
      clock_in_note string optional Clock in note.
      ip_address string optional IP address.

      Clock Out


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/clock-out" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"user_id":1,"clock_out_time":"2000-06-13 13:13:00","clock_out_note":"voluptatem"}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/clock-out"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "user_id": 1,
          "clock_out_time": "2000-06-13 13:13:00",
          "clock_out_note": "voluptatem"
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "success": true,
          "msg": "Clocked Out successfully",
          "type": "clock_out"
      }

      HTTP Request

      POST connector/api/clock-out

      Body Parameters

      Parameter Type Status Description
      user_id integer required id of the user
      clock_out_time string optional Clock out time.If not given current date time will be used Fromat: Y-m-d H:i:s
      clock_out_note string optional Clock out note.

      List Holidays


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/holidays?location_id=voluptatem&start_date=2020-06-25&end_date=2020-06-25" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/holidays"
      );
      
      let params = {
          "location_id": "voluptatem",
          "start_date": "2020-06-25",
          "end_date": "2020-06-25",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/holidays

      Query Parameters

      Parameter Status Description
      location_id optional id of the location
      start_date optional format:Y-m-d
      end_date optional format:Y-m-d

      Brand management

      List brands


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/brand" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/brand"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/brand

      Get the specified brand


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/brand/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/brand/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/brand/{brand}

      URL Parameters

      Parameter Status Description
      brand required comma separated ids of the brands

      Business Location management

      List business locations


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/business-location" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/business-location"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/business-location

      Get the specified business location


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/business-location/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/business-location/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/business-location/{business_location}

      URL Parameters

      Parameter Status Description
      location required comma separated ids of the business location

      Cash register management

      List Cash Registers


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/cash-register?status=open&user_id=10&start_date=2018-06-25&end_date=2018-06-25&location_id=qui&per_page=15" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/cash-register"
      );
      
      let params = {
          "status": "open",
          "user_id": "10",
          "start_date": "2018-06-25",
          "end_date": "2018-06-25",
          "location_id": "qui",
          "per_page": "15",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      GET connector/api/cash-register

      Query Parameters

      Parameter Status Description
      status optional status of the register (open, close)
      user_id optional id of the user
      start_date optional format:Y-m-d
      end_date optional format:Y-m-d
      location_id optional id of the location
      per_page optional Total records per page. default: 10, Set -1 for no pagination

      Create Cash Register


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/cash-register" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"location_id":19,"initial_amount":147905884.875259,"created_at":"2020-5-7 15:20:22","closed_at":"2020-5-7 15:20:22","status":"close","closing_amount":0,"total_card_slips":5,"total_cheques":5,"closing_note":"voluptas","transaction_ids":"1,2,3"}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/cash-register"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "location_id": 19,
          "initial_amount": 147905884.875259,
          "created_at": "2020-5-7 15:20:22",
          "closed_at": "2020-5-7 15:20:22",
          "status": "close",
          "closing_amount": 0,
          "total_card_slips": 5,
          "total_cheques": 5,
          "closing_note": "voluptas",
          "transaction_ids": "1,2,3"
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      HTTP Request

      POST connector/api/cash-register

      Body Parameters

      Parameter Type Status Description
      location_id integer required id of the business location
      initial_amount float optional Initial amount
      created_at string optional Register open datetime format:Y-m-d H:i:s,
      closed_at string optional Register closed datetime format:Y-m-d H:i:s,
      status register optional status (open, close)
      closing_amount float optional Closing amount
      total_card_slips integer optional total number of card slips
      total_cheques integer optional total number of checks
      closing_note string optional Closing note
      transaction_ids string optional Comma separated ids of sells associated with the register

      Get the specified Register


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/cash-register/59" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/cash-register/59"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
                      }
                  ]
              }
          ]
      }

      HTTP Request

      GET connector/api/cash-register/{cash_register}

      URL Parameters

      Parameter Status Description
      cash_register required comma separated ids of the cash registers

      Contact management

      List contact


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/contactapi?type=natus" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/contactapi"
      );
      
      let params = {
          "type": "natus",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
              },
              {
                  "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,
                  "deleted_at": null,
                  "created_at": "2018-01-03 20:59:38",
                  "updated_at": "2018-06-11 22:21:03",
                  "remember_token": null,
                  "password": null
              }
          ]
      }

      HTTP Request

      GET connector/api/contactapi

      Query Parameters

      Parameter Status Description
      type required Type of contact (supplier, customer, lead)

      Create contact


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/contactapi" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"type":"customer","supplier_business_name":"est","prefix":"odio","first_name":"occaecati","middle_name":"ut","last_name":"quo","tax_number":"8787fefef","pay_term_number":3,"pay_term_type":"months","mobile":"4578691009","landline":"5487-8454-4145","alternate_number":"841847541222","address_line_1":"distinctio","address_line_2":"corrupti","city":"est","state":"blanditiis","country":"atque","zip_code":"occaecati","customer_group_id":"fuga","contact_id":"reprehenderit","dob":"2000-06-13","custom_field1":"doloremque","custom_field2":"rerum","custom_field3":"dolorum","custom_field4":"sint","email":"quibusdam","shipping_address":"enim","position":"et","opening_balance":0,"source_id":10,"life_stage_id":19,"assigned_to":[]}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/contactapi"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "type": "customer",
          "supplier_business_name": "est",
          "prefix": "odio",
          "first_name": "occaecati",
          "middle_name": "ut",
          "last_name": "quo",
          "tax_number": "8787fefef",
          "pay_term_number": 3,
          "pay_term_type": "months",
          "mobile": "4578691009",
          "landline": "5487-8454-4145",
          "alternate_number": "841847541222",
          "address_line_1": "distinctio",
          "address_line_2": "corrupti",
          "city": "est",
          "state": "blanditiis",
          "country": "atque",
          "zip_code": "occaecati",
          "customer_group_id": "fuga",
          "contact_id": "reprehenderit",
          "dob": "2000-06-13",
          "custom_field1": "doloremque",
          "custom_field2": "rerum",
          "custom_field3": "dolorum",
          "custom_field4": "sint",
          "email": "quibusdam",
          "shipping_address": "enim",
          "position": "et",
          "opening_balance": 0,
          "source_id": 10,
          "life_stage_id": 19,
          "assigned_to": []
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      POST connector/api/contactapi

      Body Parameters

      Parameter Type Status Description
      type string required Type of contact (supplier, customer, both, lead)
      supplier_business_name string required Required if type is supplier
      prefix string optional Prefix for the name of the contact
      first_name string required Name of the contact
      middle_name string optional
      last_name string optional
      tax_number string optional
      pay_term_number float optional
      pay_term_type string optional (months ,days)
      mobile string required
      landline string optional
      alternate_number string optional
      address_line_1 string optional
      address_line_2 string optional
      city string optional
      state string optional
      country string optional
      zip_code string optional
      customer_group_id string optional
      contact_id string optional
      dob string optional Fromat: Y-m-d
      custom_field1 string optional
      custom_field2 string optional
      custom_field3 string optional
      custom_field4 string optional
      email string optional
      shipping_address string optional
      position string optional
      opening_balance float optional
      source_id integer optional Id of the source. Applicable only if the type is lead
      life_stage_id integer optional Id of the Life stage. Applicable only if the type is lead
      assigned_to array optional Ids of the users the lead is assigned to. Applicable only if the type is lead

      Get the specified contact


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/contactapi/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/contactapi/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
              }
          ]
      }

      HTTP Request

      GET connector/api/contactapi/{contactapi}

      URL Parameters

      Parameter Status Description
      contact required comma separated ids of contacts

      Update contact


      Requires authentication

      Example request:

      curl -X PUT \
          "https://pos.ultimatefosters.com/connector/api/contactapi/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"type":"customer","supplier_business_name":"distinctio","prefix":"perspiciatis","first_name":"voluptatibus","middle_name":"dignissimos","last_name":"hic","tax_number":"488744dwd","pay_term_number":3,"pay_term_type":"months","mobile":"8795461009","landline":"65484-848-848","alternate_number":"9898795220","address_line_1":"velit","address_line_2":"similique","city":"aut","state":"libero","country":"reiciendis","zip_code":"soluta","customer_group_id":"iure","contact_id":"sed","dob":"2000-06-13","custom_field1":"veritatis","custom_field2":"dolorem","custom_field3":"occaecati","custom_field4":"commodi","email":"unde","shipping_address":"fugiat","position":"voluptas","opening_balance":10.3,"source_id":12,"life_stage_id":2,"assigned_to":[]}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/contactapi/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "type": "customer",
          "supplier_business_name": "distinctio",
          "prefix": "perspiciatis",
          "first_name": "voluptatibus",
          "middle_name": "dignissimos",
          "last_name": "hic",
          "tax_number": "488744dwd",
          "pay_term_number": 3,
          "pay_term_type": "months",
          "mobile": "8795461009",
          "landline": "65484-848-848",
          "alternate_number": "9898795220",
          "address_line_1": "velit",
          "address_line_2": "similique",
          "city": "aut",
          "state": "libero",
          "country": "reiciendis",
          "zip_code": "soluta",
          "customer_group_id": "iure",
          "contact_id": "sed",
          "dob": "2000-06-13",
          "custom_field1": "veritatis",
          "custom_field2": "dolorem",
          "custom_field3": "occaecati",
          "custom_field4": "commodi",
          "email": "unde",
          "shipping_address": "fugiat",
          "position": "voluptas",
          "opening_balance": 10.3,
          "source_id": 12,
          "life_stage_id": 2,
          "assigned_to": []
      }
      
      fetch(url, {
          method: "PUT",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      PUT connector/api/contactapi/{contactapi}

      PATCH connector/api/contactapi/{contactapi}

      URL Parameters

      Parameter Status Description
      contact required id of the contact to be updated

      Body Parameters

      Parameter Type Status Description
      type string optional Type of contact (supplier, customer, both)
      supplier_business_name string optional required* Required if type is supplier
      prefix string optional Prefix for the name of the contact
      first_name string required Name of the contact
      middle_name string optional
      last_name string optional
      tax_number string optional
      pay_term_number float optional
      pay_term_type string optional (months ,days)
      mobile string required
      landline string optional
      alternate_number string optional
      address_line_1 string optional
      address_line_2 string optional
      city string optional
      state string optional
      country string optional
      zip_code string optional
      customer_group_id string optional
      contact_id string optional
      dob string optional Fromat: Y-m-d
      custom_field1 string optional
      custom_field2 string optional
      custom_field3 string optional
      custom_field4 string optional
      email string optional
      shipping_address string optional
      position string optional
      opening_balance float optional
      source_id integer optional Id of the source. Applicable only if the type is lead
      life_stage_id integer optional Id of the Life stage. Applicable only if the type is lead
      assigned_to array optional Ids of the users the lead is assigned to. Applicable only if the type is lead

      Contact payment


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/contactapi-payment" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"contact_id":17,"amount":453.13,"method":"cash","paid_on":"2020-07-22 15:48:29","account_id":14,"card_number":"cumque","card_holder_name":"ipsa","card_transaction_number":"sit","card_type":"quia","card_month":"fugiat","card_year":"aliquid","card_security":"voluptatum","transaction_no_1":"aliquid","transaction_no_2":"sed","transaction_no_3":"et","cheque_number":"vitae","bank_account_number":"placeat","note":"velit"}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/contactapi-payment"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "contact_id": 17,
          "amount": 453.13,
          "method": "cash",
          "paid_on": "2020-07-22 15:48:29",
          "account_id": 14,
          "card_number": "cumque",
          "card_holder_name": "ipsa",
          "card_transaction_number": "sit",
          "card_type": "quia",
          "card_month": "fugiat",
          "card_year": "aliquid",
          "card_security": "voluptatum",
          "transaction_no_1": "aliquid",
          "transaction_no_2": "sed",
          "transaction_no_3": "et",
          "cheque_number": "vitae",
          "bank_account_number": "placeat",
          "note": "velit"
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      POST connector/api/contactapi-payment

      Body Parameters

      Parameter Type Status Description
      contact_id integer required id of the contact
      amount float required amount of the payment
      method string optional payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3')
      paid_on string optional transaction date format:Y-m-d H:i:s,
      account_id integer optional account id
      card_number string optional
      card_holder_name string optional
      card_transaction_number string optional
      card_type string optional
      card_month string optional
      card_year string optional
      card_security string optional
      transaction_no_1 string optional
      transaction_no_2 string optional
      transaction_no_3 string optional
      cheque_number string optional
      bank_account_number string optional
      note string optional payment note

      Expense management

      List expenses


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/expense?location_id=in&payment_status=paid&start_date=2018-06-25&end_date=2018-06-25&expense_for=ipsam&per_page=15" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/expense"
      );
      
      let params = {
          "location_id": "in",
          "payment_status": "paid",
          "start_date": "2018-06-25",
          "end_date": "2018-06-25",
          "expense_for": "ipsam",
          "per_page": "15",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      GET connector/api/expense

      Query Parameters

      Parameter Status Description
      location_id optional id of the location
      payment_status optional payment status
      start_date optional format:Y-m-d
      end_date optional format:Y-m-d
      expense_for optional id of the user for which expense is created
      per_page optional Total records per page. default: 10, Set -1 for no pagination

      Create expense / expense refund


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/expense" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"location_id":20,"final_total":7825.93,"transaction_date":"2020-5-7 15:20:22","tax_rate_id":12,"expense_for":1,"contact_id":17,"additional_notes":"molestiae","is_refund":0,"is_recurring":0,"recur_interval":6,"recur_interval_type":"months","subscription_repeat_on":15,"subscription_no":"est","recur_repetitions":11,"payment":[{"amount":453.13,"method":"cash","account_id":8,"card_number":"sequi","card_holder_name":"sint","card_transaction_number":"recusandae","card_type":"corporis","card_month":"tempora","card_year":"architecto","card_security":"asperiores","transaction_no_1":"quisquam","transaction_no_2":"doloremque","transaction_no_3":"odio","note":"beatae","cheque_number":"fugiat"}]}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/expense"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "location_id": 20,
          "final_total": 7825.93,
          "transaction_date": "2020-5-7 15:20:22",
          "tax_rate_id": 12,
          "expense_for": 1,
          "contact_id": 17,
          "additional_notes": "molestiae",
          "is_refund": 0,
          "is_recurring": 0,
          "recur_interval": 6,
          "recur_interval_type": "months",
          "subscription_repeat_on": 15,
          "subscription_no": "est",
          "recur_repetitions": 11,
          "payment": [
              {
                  "amount": 453.13,
                  "method": "cash",
                  "account_id": 8,
                  "card_number": "sequi",
                  "card_holder_name": "sint",
                  "card_transaction_number": "recusandae",
                  "card_type": "corporis",
                  "card_month": "tempora",
                  "card_year": "architecto",
                  "card_security": "asperiores",
                  "transaction_no_1": "quisquam",
                  "transaction_no_2": "doloremque",
                  "transaction_no_3": "odio",
                  "note": "beatae",
                  "cheque_number": "fugiat"
              }
          ]
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": []
          }
      }

      HTTP Request

      POST connector/api/expense

      Body Parameters

      Parameter Type Status Description
      location_id integer required id of the business location
      final_total float required Expense amount
      transaction_date string optional transaction date format:Y-m-d H:i:s,
      tax_rate_id integer optional id of the tax rate applicable to the expense
      expense_for integer optional id of the user for which expense is created
      contact_id integer optional id of the contact(customer or supplier) for which expense is created
      additional_notes string optional
      is_refund integer optional whether expense refund (0, 1)
      is_recurring integer optional whether expense is recurring (0, 1)
      recur_interval integer optional value of the interval expense will be regenerated
      recur_interval_type string optional type of the recur interval ('days', 'months', 'years')
      subscription_repeat_on integer optional day of the month on which expense will be generated if recur interval type is months (1-30)
      subscription_no string optional subscription number
      recur_repetitions integer optional total number of expense to be generated
      payment array optional payment lines for the expense
      payment.*.amount float optional amount of the payment
      payment.*.method string optional payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3')
      payment.*.account_id integer optional account id
      payment.*.card_number string optional
      payment.*.card_holder_name string optional
      payment.*.card_transaction_number string optional
      payment.*.card_type string optional
      payment.*.card_month string optional
      payment.*.card_year string optional
      payment.*.card_security string optional
      payment.*.transaction_no_1 string optional
      payment.*.transaction_no_2 string optional
      payment.*.transaction_no_3 string optional
      payment.*.note string optional payment note
      payment.*.cheque_number string optional

      Get the specified expense / expense refund


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/expense/59" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/expense/59"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
                  }
              }
          ]
      }

      HTTP Request

      GET connector/api/expense/{expense}

      URL Parameters

      Parameter Status Description
      expense required comma separated ids of the expenses

      Update expense / expense refund


      Requires authentication

      Example request:

      curl -X PUT \
          "https://pos.ultimatefosters.com/connector/api/expense/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"final_total":12040736.922855476,"transaction_date":"2020-5-7 15:20:22","tax_rate_id":14,"expense_for":11,"contact_id":1,"additional_notes":"autem","is_recurring":0,"recur_interval":8,"recur_interval_type":"months","subscription_repeat_on":15,"subscription_no":"corporis","recur_repetitions":19,"payment":[]}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/expense/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "final_total": 12040736.922855476,
          "transaction_date": "2020-5-7 15:20:22",
          "tax_rate_id": 14,
          "expense_for": 11,
          "contact_id": 1,
          "additional_notes": "autem",
          "is_recurring": 0,
          "recur_interval": 8,
          "recur_interval_type": "months",
          "subscription_repeat_on": 15,
          "subscription_no": "corporis",
          "recur_repetitions": 19,
          "payment": []
      }
      
      fetch(url, {
          method: "PUT",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": []
          }
      }

      HTTP Request

      PUT connector/api/expense/{expense}

      PATCH connector/api/expense/{expense}

      Body Parameters

      Parameter Type Status Description
      final_total float optional Expense amount
      transaction_date string optional transaction date format:Y-m-d H:i:s,
      tax_rate_id integer optional id of the tax rate applicable to the expense
      expense_for integer optional id of the user for which expense is created
      contact_id integer optional id of the contact(customer or supplier) for which expense is created
      additional_notes string optional
      is_recurring integer optional whether expense is recurring (0, 1)
      recur_interval integer optional value of the interval expense will be regenerated
      recur_interval_type string optional type of the recur interval ('days', 'months', 'years')
      subscription_repeat_on integer optional day of the month on which expense will be generated if recur interval type is months (1-30)
      subscription_no string optional subscription number
      recur_repetitions integer optional total number of expense to be generated
      payment array optional payment lines for the expense

      List expense refunds


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/expense-refund?location_id=sed&payment_status=paid&start_date=2018-06-25&end_date=2018-06-25&expense_for=voluptatem&per_page=15" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/expense-refund"
      );
      
      let params = {
          "location_id": "sed",
          "payment_status": "paid",
          "start_date": "2018-06-25",
          "end_date": "2018-06-25",
          "expense_for": "voluptatem",
          "per_page": "15",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      GET connector/api/expense-refund

      Query Parameters

      Parameter Status Description
      location_id optional id of the location
      payment_status optional payment status
      start_date optional format:Y-m-d
      end_date optional format:Y-m-d
      expense_for optional id of the user for which expense is created
      per_page optional Total records per page. default: 10, Set -1 for no pagination

      Product management

      List products


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/product?brand_id=alias&category_id=alias&sub_category_id=nobis&location_id=ut&selling_price_group=accusamus&name=nisi&sku=ipsa&per_page=10" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/product"
      );
      
      let params = {
          "brand_id": "alias",
          "category_id": "alias",
          "sub_category_id": "nobis",
          "location_id": "ut",
          "selling_price_group": "accusamus",
          "name": "nisi",
          "sku": "ipsa",
          "per_page": "10",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
                                      }
                                  ],
                                  "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
          }
      }

      HTTP Request

      GET connector/api/product

      Query Parameters

      Parameter Status Description
      brand_id optional
      category_id optional
      sub_category_id optional
      location_id optional
      selling_price_group optional (1, 0)
      name optional Search term for product name
      sku optional Search term for product sku
      per_page optional Total records per page. default: 10, Set -1 for no pagination

      Get the specified product


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/product/1?selling_price_group=est" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/product/1"
      );
      
      let params = {
          "selling_price_group": "est",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
                                      }
                                  ],
                                  "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
                          }
                      }
                  ]
              }
          ]
      }

      HTTP Request

      GET connector/api/product/{product}

      URL Parameters

      Parameter Status Description
      product required comma separated ids of products

      Query Parameters

      Parameter Status Description
      selling_price_group optional (1, 0)

      List Selling Price Group


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/selling-price-group" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/selling-price-group"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/selling-price-group

      List Variations


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/variation/?brand_id=beatae&category_id=porro&sub_category_id=non&not_for_selling=magni&name=rerum&sku=enim&per_page=10" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/variation/"
      );
      
      let params = {
          "brand_id": "beatae",
          "category_id": "porro",
          "sub_category_id": "non",
          "not_for_selling": "magni",
          "name": "rerum",
          "sku": "enim",
          "per_page": "10",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
                          }
                      }
                  ]
              }
          ],
          "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
          }
      }

      HTTP Request

      GET connector/api/variation/{id?}

      URL Parameters

      Parameter Status Description
      product optional comma separated ids of variations

      Query Parameters

      Parameter Status Description
      brand_id optional
      category_id optional
      sub_category_id optional
      not_for_selling optional Values: 0 or 1
      name optional Search term for product name
      sku optional Search term for product sku
      per_page optional Total records per page. default: 10, Set -1 for no pagination

      Sales management

      List sells


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/sell?location_id=deserunt&contact_id=ex&payment_status=paid&start_date=2018-06-25&end_date=2018-06-25&user_id=voluptatem&service_staff_id=dolores&shipping_status=ordered&only_subscriptions=unde&per_page=10" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/sell"
      );
      
      let params = {
          "location_id": "deserunt",
          "contact_id": "ex",
          "payment_status": "paid",
          "start_date": "2018-06-25",
          "end_date": "2018-06-25",
          "user_id": "voluptatem",
          "service_staff_id": "dolores",
          "shipping_status": "ordered",
          "only_subscriptions": "unde",
          "per_page": "10",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": "",
                  "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"
                      }
                  ]
              }
          ],
          "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
          }
      }

      HTTP Request

      GET connector/api/sell

      Query Parameters

      Parameter Status Description
      location_id optional id of the location
      contact_id optional id of the customer
      payment_status optional payment status
      start_date optional format:Y-m-d
      end_date optional format:Y-m-d
      user_id optional id of the user who created the sale
      service_staff_id optional id of the service staff assigned with the sale
      shipping_status optional Shipping Status of the sale ('ordered', 'packed', 'shipped', 'delivered', 'cancelled')
      only_subscriptions optional Filter only subcription invoices (1, 0)
      per_page optional Total records per page. default: 10, Set -1 for no pagination

      Create sell


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/sell" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"sells":[{"location_id":15,"contact_id":7,"transaction_date":"2020-07-22 15:48:29","invoice_no":"quaerat","status":"final","is_quotation":true,"tax_rate_id":4,"discount_amount":10,"discount_type":"fixed","sale_note":"recusandae","staff_note":"nulla","commission_agent":5,"shipping_details":"Express Delivery","shipping_address":"laboriosam","shipping_status":"ordered","delivered_to":"'Mr robin'","shipping_charges":10,"packing_charge":10,"exchange_rate":1,"selling_price_group_id":5,"pay_term_number":3,"pay_term_type":"months","is_recurring":0,"recur_interval":3,"recur_interval_type":"months","subscription_repeat_on":15,"subscription_no":"nihil","recur_repetitions":20,"rp_redeemed":1,"rp_redeemed_amount":13.5,"types_of_service_id":13,"service_custom_field_1":"quia","service_custom_field_2":"ullam","service_custom_field_3":"distinctio","service_custom_field_4":"id","round_off_amount":639.2552,"table_id":1,"service_staff_id":1,"change_return":0,"products":[{"product_id":17,"variation_id":58,"quantity":1,"unit_price":437.5,"tax_rate_id":0,"discount_amount":0,"discount_type":"percentage","sub_unit_id":11,"note":"consectetur"}],"payments":[{"amount":453.13,"method":"cash","account_id":2,"card_number":"rerum","card_holder_name":"molestias","card_transaction_number":"est","card_type":"explicabo","card_month":"earum","card_year":"in","card_security":"corrupti","transaction_no_1":"provident","transaction_no_2":"veritatis","transaction_no_3":"dolore","bank_account_number":"suscipit","note":"doloremque","cheque_number":"voluptate"}]}]}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/sell"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "sells": [
              {
                  "location_id": 15,
                  "contact_id": 7,
                  "transaction_date": "2020-07-22 15:48:29",
                  "invoice_no": "quaerat",
                  "status": "final",
                  "is_quotation": true,
                  "tax_rate_id": 4,
                  "discount_amount": 10,
                  "discount_type": "fixed",
                  "sale_note": "recusandae",
                  "staff_note": "nulla",
                  "commission_agent": 5,
                  "shipping_details": "Express Delivery",
                  "shipping_address": "laboriosam",
                  "shipping_status": "ordered",
                  "delivered_to": "'Mr robin'",
                  "shipping_charges": 10,
                  "packing_charge": 10,
                  "exchange_rate": 1,
                  "selling_price_group_id": 5,
                  "pay_term_number": 3,
                  "pay_term_type": "months",
                  "is_recurring": 0,
                  "recur_interval": 3,
                  "recur_interval_type": "months",
                  "subscription_repeat_on": 15,
                  "subscription_no": "nihil",
                  "recur_repetitions": 20,
                  "rp_redeemed": 1,
                  "rp_redeemed_amount": 13.5,
                  "types_of_service_id": 13,
                  "service_custom_field_1": "quia",
                  "service_custom_field_2": "ullam",
                  "service_custom_field_3": "distinctio",
                  "service_custom_field_4": "id",
                  "round_off_amount": 639.2552,
                  "table_id": 1,
                  "service_staff_id": 1,
                  "change_return": 0,
                  "products": [
                      {
                          "product_id": 17,
                          "variation_id": 58,
                          "quantity": 1,
                          "unit_price": 437.5,
                          "tax_rate_id": 0,
                          "discount_amount": 0,
                          "discount_type": "percentage",
                          "sub_unit_id": 11,
                          "note": "consectetur"
                      }
                  ],
                  "payments": [
                      {
                          "amount": 453.13,
                          "method": "cash",
                          "account_id": 2,
                          "card_number": "rerum",
                          "card_holder_name": "molestias",
                          "card_transaction_number": "est",
                          "card_type": "explicabo",
                          "card_month": "earum",
                          "card_year": "in",
                          "card_security": "corrupti",
                          "transaction_no_1": "provident",
                          "transaction_no_2": "veritatis",
                          "transaction_no_3": "dolore",
                          "bank_account_number": "suscipit",
                          "note": "doloremque",
                          "cheque_number": "voluptate"
                      }
                  ]
              }
          ]
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": "",
                  "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"
                      }
                  ]
              }
          ]
      }

      HTTP Request

      POST connector/api/sell

      Body Parameters

      Parameter Type Status Description
      sells.*.location_id integer required id of the business location
      sells.*.contact_id integer required id of the customer
      sells.*.transaction_date string optional transaction date format:Y-m-d H:i:s,
      sells.*.invoice_no string optional Invoice number
      sells.*.status string optional sale status (final, draft)
      sells.*.is_quotation boolean optional Is sell quotation (0, 1), If 1 status should be draft
      sells.*.tax_rate_id integer optional id of the tax rate applicable to the sale
      sells.*.discount_amount float optional discount amount applicable to the sale
      sells.*.discount_type string optional type of the discount amount (fixed, percentage)
      sells.*.sale_note string optional
      sells.*.staff_note string optional
      sells.*.commission_agent integer optional commission agent id
      sells.*.shipping_details string optional shipping details
      sells.*.shipping_address string optional shipping address
      sells.*.shipping_status string optional ('ordered', 'packed', 'shipped', 'delivered', 'cancelled')
      sells.*.delivered_to string optional Name of the person recieved the consignment
      sells.*.shipping_charges float optional shipping amount
      sells.*.packing_charge float optional packing charge
      sells.*.exchange_rate float optional exchange rate for the currency used
      sells.*.selling_price_group_id integer optional id of the selling price group
      sells.*.pay_term_number integer optional pay term value
      sells.*.pay_term_type string optional type of the pay term value ('days', 'months')
      sells.*.is_recurring integer optional whether the invoice is recurring (0, 1)
      sells.*.recur_interval integer optional value of the interval invoice will be regenerated
      sells.*.recur_interval_type string optional type of the recur interval ('days', 'months', 'years')
      sells.*.subscription_repeat_on integer optional day of the month on which invoice will be generated if recur interval type is months (1-30)
      sells.*.subscription_no string optional subscription number
      sells.*.recur_repetitions integer optional total number of invoices to be generated
      sells.*.rp_redeemed integer optional reward points redeemed
      sells.*.rp_redeemed_amount float optional reward point redeemed amount after conversion
      sells.*.types_of_service_id integer optional types of service id
      sells.*.service_custom_field_1 string optional types of service custom field 1
      sells.*.service_custom_field_2 string optional types of service custom field 2
      sells.*.service_custom_field_3 string optional types of service custom field 3
      sells.*.service_custom_field_4 string optional types of service custom field 4
      sells.*.round_off_amount float optional round off amount on total payable
      sells.*.table_id integer optional id of the table
      sells.*.service_staff_id integer optional id of the service staff assigned to the sale
      sells.*.change_return float optional Excess paid amount
      sells.*.products array required array of the products for the sale
      sells.*.payments array optional payment lines for the sale
      sells.*.products.*.product_id integer required product id
      sells.*.products.*.variation_id integer required variation id
      sells.*.products.*.quantity float required quantity
      sells.*.products.*.unit_price float optional unit selling price
      sells.*.products.*.tax_rate_id integer optional tax rate id applicable on the product
      sells.*.products.*.discount_amount float optional discount amount applicable on the product
      sells.*.products.*.discount_type string optional type of discount amount ('fixed', 'percentage')
      sells.*.products.*.sub_unit_id integer optional sub unit id
      sells.*.products.*.note string optional note for the product
      sells.*.payments.*.amount float required amount of the payment
      sells.*.payments.*.method string optional payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3')
      sells.*.payments.*.account_id integer optional account id
      sells.*.payments.*.card_number string optional
      sells.*.payments.*.card_holder_name string optional
      sells.*.payments.*.card_transaction_number string optional
      sells.*.payments.*.card_type string optional
      sells.*.payments.*.card_month string optional
      sells.*.payments.*.card_year string optional
      sells.*.payments.*.card_security string optional
      sells.*.payments.*.transaction_no_1 string optional
      sells.*.payments.*.transaction_no_2 string optional
      sells.*.payments.*.transaction_no_3 string optional
      sells.*.payments.*.bank_account_number string optional
      sells.*.payments.*.note string optional payment note
      sells.*.payments.*.cheque_number string optional

      Get the specified sell


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/sell/55" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/sell/55"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": "",
                  "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"
                      }
                  ]
              }
          ]
      }

      HTTP Request

      GET connector/api/sell/{sell}

      URL Parameters

      Parameter Status Description
      sell required comma separated ids of the sells

      Update sell


      Requires authentication

      Example request:

      curl -X PUT \
          "https://pos.ultimatefosters.com/connector/api/sell/6" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"contact_id":13,"transaction_date":"2020-5-7 15:20:22","status":"final","is_quotation":true,"tax_rate_id":9,"discount_amount":10,"discount_type":"fixed","sale_note":"impedit","staff_note":"quia","commission_agent":17,"shipping_details":"Express Delivery","shipping_address":"cum","shipping_status":"ordered","delivered_to":"Mr Robin","shipping_charges":10,"packing_charge":10,"exchange_rate":1,"selling_price_group_id":7,"pay_term_number":3,"pay_term_type":"months","is_recurring":0,"recur_interval":9,"recur_interval_type":"days","subscription_repeat_on":7,"subscription_no":"et","recur_repetitions":13,"rp_redeemed":13,"rp_redeemed_amount":13.5,"types_of_service_id":5,"service_custom_field_1":"reprehenderit","service_custom_field_2":"nobis","service_custom_field_3":"distinctio","service_custom_field_4":"nihil","round_off_amount":93870.13096,"table_id":11,"service_staff_id":16,"change_return":0,"change_return_id":8,"products":[{"sell_line_id":8,"product_id":17,"variation_id":58,"quantity":1,"unit_price":437.5,"tax_rate_id":11,"discount_amount":0,"discount_type":"percentage","sub_unit_id":15,"note":"doloremque"}],"payments":[{"payment_id":18,"amount":453.13,"method":"cash","account_id":19,"card_number":"vitae","card_holder_name":"ex","card_transaction_number":"et","card_type":"aut","card_month":"et","card_year":"cupiditate","card_security":"odit","transaction_no_1":"iste","transaction_no_2":"eos","transaction_no_3":"tempore","note":"alias","cheque_number":"corporis","bank_account_number":"quasi"}]}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/sell/6"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "contact_id": 13,
          "transaction_date": "2020-5-7 15:20:22",
          "status": "final",
          "is_quotation": true,
          "tax_rate_id": 9,
          "discount_amount": 10,
          "discount_type": "fixed",
          "sale_note": "impedit",
          "staff_note": "quia",
          "commission_agent": 17,
          "shipping_details": "Express Delivery",
          "shipping_address": "cum",
          "shipping_status": "ordered",
          "delivered_to": "Mr Robin",
          "shipping_charges": 10,
          "packing_charge": 10,
          "exchange_rate": 1,
          "selling_price_group_id": 7,
          "pay_term_number": 3,
          "pay_term_type": "months",
          "is_recurring": 0,
          "recur_interval": 9,
          "recur_interval_type": "days",
          "subscription_repeat_on": 7,
          "subscription_no": "et",
          "recur_repetitions": 13,
          "rp_redeemed": 13,
          "rp_redeemed_amount": 13.5,
          "types_of_service_id": 5,
          "service_custom_field_1": "reprehenderit",
          "service_custom_field_2": "nobis",
          "service_custom_field_3": "distinctio",
          "service_custom_field_4": "nihil",
          "round_off_amount": 93870.13096,
          "table_id": 11,
          "service_staff_id": 16,
          "change_return": 0,
          "change_return_id": 8,
          "products": [
              {
                  "sell_line_id": 8,
                  "product_id": 17,
                  "variation_id": 58,
                  "quantity": 1,
                  "unit_price": 437.5,
                  "tax_rate_id": 11,
                  "discount_amount": 0,
                  "discount_type": "percentage",
                  "sub_unit_id": 15,
                  "note": "doloremque"
              }
          ],
          "payments": [
              {
                  "payment_id": 18,
                  "amount": 453.13,
                  "method": "cash",
                  "account_id": 19,
                  "card_number": "vitae",
                  "card_holder_name": "ex",
                  "card_transaction_number": "et",
                  "card_type": "aut",
                  "card_month": "et",
                  "card_year": "cupiditate",
                  "card_security": "odit",
                  "transaction_no_1": "iste",
                  "transaction_no_2": "eos",
                  "transaction_no_3": "tempore",
                  "note": "alias",
                  "cheque_number": "corporis",
                  "bank_account_number": "quasi"
              }
          ]
      }
      
      fetch(url, {
          method: "PUT",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": "",
          "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"
              }
          ]
      }

      HTTP Request

      PUT connector/api/sell/{sell}

      PATCH connector/api/sell/{sell}

      URL Parameters

      Parameter Status Description
      sell required id of sell to update

      Body Parameters

      Parameter Type Status Description
      contact_id integer optional id of the customer
      transaction_date string optional transaction date format:Y-m-d H:i:s,
      status string optional sale status (final, draft)
      is_quotation boolean optional Is sell quotation (0, 1), If 1 status should be draft
      tax_rate_id integer optional id of the tax rate applicable to the sale
      discount_amount float optional discount amount applicable to the sale
      discount_type string optional type of the discount amount (fixed, percentage)
      sale_note string optional
      staff_note string optional
      commission_agent integer optional commission agent id
      shipping_details string optional shipping details
      shipping_address string optional shipping address
      shipping_status string optional ('ordered', 'packed', 'shipped', 'delivered', 'cancelled')
      delivered_to string optional Name of the person recieved the consignment
      shipping_charges float optional shipping amount
      packing_charge float optional packing charge
      exchange_rate float optional exchange rate for the currency used
      selling_price_group_id integer optional id of the selling price group
      pay_term_number integer optional pay term value
      pay_term_type string optional type of the pay term value ('days', 'months')
      is_recurring integer optional whether the invoice is recurring (0, 1)
      recur_interval integer optional value of the interval invoice will be regenerated
      recur_interval_type string optional type of the recur interval ('days', 'months', 'years')
      subscription_repeat_on integer optional day of the month on which invoice will be generated if recur interval type is months (1-30)
      subscription_no string optional subscription number
      recur_repetitions integer optional total number of invoices to be generated
      rp_redeemed integer optional reward points redeemed
      rp_redeemed_amount float optional reward point redeemed amount after conversion
      types_of_service_id integer optional types of service id
      service_custom_field_1 string optional types of service custom field 1
      service_custom_field_2 string optional types of service custom field 2
      service_custom_field_3 string optional types of service custom field 3
      service_custom_field_4 string optional types of service custom field 4
      round_off_amount float optional round off amount on total payable
      table_id integer optional id of the table
      service_staff_id integer optional id of the service staff assigned to the sale
      change_return float optional Excess paid amount
      change_return_id integer optional id of the change return payment if exists
      products array required array of the products for the sale
      payments array optional payment lines for the sale
      products.*.sell_line_id integer optional sell line id for existing item only
      products.*.product_id integer optional product id
      products.*.variation_id integer optional variation id
      products.*.quantity float optional quantity
      products.*.unit_price float optional unit selling price
      products.*.tax_rate_id integer optional tax rate id applicable on the product
      products.*.discount_amount float optional discount amount applicable on the product
      products.*.discount_type string optional type of discount amount ('fixed', 'percentage')
      products.*.sub_unit_id integer optional sub unit id
      products.*.note string optional note for the product
      payments.*.payment_id integer optional payment id for existing payment line
      payments.*.amount float optional amount of the payment
      payments.*.method string optional payment methods ('cash', 'card', 'cheque', 'bank_transfer', 'other', 'custom_pay_1', 'custom_pay_2', 'custom_pay_3')
      payments.*.account_id integer optional account id
      payments.*.card_number string optional
      payments.*.card_holder_name string optional
      payments.*.card_transaction_number string optional
      payments.*.card_type string optional
      payments.*.card_month string optional
      payments.*.card_year string optional
      payments.*.card_security string optional
      payments.*.transaction_no_1 string optional
      payments.*.transaction_no_2 string optional
      payments.*.transaction_no_3 string optional
      payments.*.note string optional payment note
      payments.*.cheque_number string optional
      payments.*.bank_account_number string optional

      Delete Sell


      Requires authentication

      Example request:

      curl -X DELETE \
          "https://pos.ultimatefosters.com/connector/api/sell/odio" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/sell/odio"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "DELETE",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      HTTP Request

      DELETE connector/api/sell/{sell}

      URL Parameters

      Parameter Status Description
      sell required id of the sell to be deleted

      Add Sell Return


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/sell-return" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"transaction_id":6,"transaction_date":"2020-5-7 15:20:22","invoice_no":"qui","discount_amount":10,"discount_type":"fixed","products":[{"sell_line_id":5,"quantity":1,"unit_price_inc_tax":437.5}]}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/sell-return"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "transaction_id": 6,
          "transaction_date": "2020-5-7 15:20:22",
          "invoice_no": "qui",
          "discount_amount": 10,
          "discount_type": "fixed",
          "products": [
              {
                  "sell_line_id": 5,
                  "quantity": 1,
                  "unit_price_inc_tax": 437.5
              }
          ]
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
      }

      HTTP Request

      POST connector/api/sell-return

      Body Parameters

      Parameter Type Status Description
      transaction_id integer required Id of the sell
      transaction_date string optional transaction date format:Y-m-d H:i:s,
      invoice_no string optional Invoice number of the return
      discount_amount float optional discount amount applicable to the sale
      discount_type string optional type of the discount amount (fixed, percentage)
      products array required array of the products for the sale
      products.*.sell_line_id integer required sell line id
      products.*.quantity float required quantity to be returned from the sell line
      products.*.unit_price_inc_tax float required unit selling price of the returning item

      List Sell Return


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/list-sell-return" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/list-sell-return"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      GET connector/api/list-sell-return

      URL Parameters

      Parameter Status Description
      sell_id optional Id of the sell for which return is added

      Update shipping status


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/update-shipping-status" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"id":20,"shipping_status":"ordered","delivered_to":"beatae"}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/update-shipping-status"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "id": 20,
          "shipping_status": "ordered",
          "delivered_to": "beatae"
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      HTTP Request

      POST connector/api/update-shipping-status

      Body Parameters

      Parameter Type Status Description
      id integer required id of the sale
      shipping_status string optional ('ordered', 'packed', 'shipped', 'delivered', 'cancelled')
      delivered_to string optional Name of the consignee

      Superadmin

      Get active subscription details


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/active-subscription" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/active-subscription"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      GET connector/api/active-subscription

      Get Superadmin Package List


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/packages" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/packages"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/packages

      Table management

      List tables


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/table?location_id=velit" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/table"
      );
      
      let params = {
          "location_id": "velit",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/table

      Query Parameters

      Parameter Status Description
      location_id optional int id of the location

      Show the specified table


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/table/5" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/table/5"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/table/{table}

      URL Parameters

      Parameter Status Description
      table required comma separated ids of required tables

      Tax management

      List taxes


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/tax" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/tax"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/tax

      Get the specified tax


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/tax/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/tax/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/tax/{tax}

      URL Parameters

      Parameter Status Description
      tax required comma separated ids of required taxes

      Taxonomy management

      List taxonomy


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/taxonomy?type=quia" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/taxonomy"
      );
      
      let params = {
          "type": "quia",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": []
              }
          ]
      }

      HTTP Request

      GET connector/api/taxonomy

      Query Parameters

      Parameter Status Description
      type optional Type of taxonomy (product, device, hrm_department)

      Get the specified taxonomy


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/taxonomy/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/taxonomy/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
                      }
                  ]
              }
          ]
      }

      HTTP Request

      GET connector/api/taxonomy/{taxonomy}

      URL Parameters

      Parameter Status Description
      taxonomy required comma separated ids of product categories

      Types of service management

      List types of service


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/types-of-service" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/types-of-service"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/types-of-service

      Get the specified types of service


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/types-of-service/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/types-of-service/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/types-of-service/{types_of_service}

      URL Parameters

      Parameter Status Description
      types_of_service required comma separated ids of required types of services

      Unit management

      List units


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/unit" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/unit"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
                  }
              }
          ]
      }

      HTTP Request

      GET connector/api/unit

      Get the specified unit


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/unit/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/unit/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
              }
          ]
      }

      HTTP Request

      GET connector/api/unit/{unit}

      URL Parameters

      Parameter Status Description
      unit required comma separated ids of the units

      User management

      Get the loggedin user details.


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/user/loggedin" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/user/loggedin"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
          }
      }

      HTTP Request

      GET connector/api/user/loggedin

      List users


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/user?service_staff=consequatur" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/user"
      );
      
      let params = {
          "service_staff": "consequatur",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/user

      Query Parameters

      Parameter Status Description
      service_staff optional boolean Filter service staffs from users list (0, 1)

      Get the specified user


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/user/1" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/user/1"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/user/{user}

      URL Parameters

      Parameter Status Description
      user required comma separated ids of the required users

      Update user password.


      Requires authentication

      Example request:

      curl -X POST \
          "https://pos.ultimatefosters.com/connector/api/update-password" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}" \
          -d '{"current_password":"et","new_password":"consequatur"}'
      
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/update-password"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      let body = {
          "current_password": "et",
          "new_password": "consequatur"
      }
      
      fetch(url, {
          method: "POST",
          headers: headers,
          body: body
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "success": 1,
          "msg": "Password updated successfully"
      }

      HTTP Request

      POST connector/api/update-password

      Body Parameters

      Parameter Type Status Description
      current_password string required Current password of the user
      new_password string required New password of the user

      general

      List payment accounts


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/payment-accounts" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/payment-accounts"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/payment-accounts

      List payment methods


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/payment-methods" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/payment-methods"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
      }

      HTTP Request

      GET connector/api/payment-methods

      Get business details


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/business-details" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/business-details"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": []
          }
      }

      HTTP Request

      GET connector/api/business-details

      Get profit and loss report


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/profit-loss-report?location_id=ipsa&start_date=2018-06-25&end_date=2018-06-25&user_id=eos" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/profit-loss-report"
      );
      
      let params = {
          "location_id": "ipsa",
          "start_date": "2018-06-25",
          "end_date": "2018-06-25",
          "user_id": "eos",
      };
      Object.keys(params)
          .forEach(key => url.searchParams.append(key, params[key]));
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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": []
          }
      }

      HTTP Request

      GET connector/api/profit-loss-report

      Query Parameters

      Parameter Status Description
      location_id optional optional id of the location
      start_date optional optional format:Y-m-d
      end_date optional optional format:Y-m-d
      user_id optional optional id of the user

      Get product current stock


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/product-stock-report" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/product-stock-report"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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
          }
      }

      HTTP Request

      GET connector/api/product-stock-report

      Get notifications


      Requires authentication

      Example request:

      curl -X GET \
          -G "https://pos.ultimatefosters.com/connector/api/notifications" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer {token}"
      const url = new URL(
          "https://pos.ultimatefosters.com/connector/api/notifications"
      );
      
      let headers = {
          "Content-Type": "application/json",
          "Accept": "application/json",
          "Authorization": "Bearer {token}",
      };
      
      fetch(url, {
          method: "GET",
          headers: headers,
      })
          .then(response => response.json())
          .then(json => console.log(json));

      Example response (200):

      {
          "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"
              }
          ]
      }

      HTTP Request

      GET connector/api/notifications