Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

CreateUpdateTodo

Creates or updates a todo in Microbizz.

If a todo with the given todo id already exists, then the todo will be overwritten.

If the todo provided has a todo id of 0, a new todo will be created and a new todo id will be provided.

If a toolid is provided then the tool will be attached to the todo.

Input


todotodoThe todo to create/update
toolidnumberThe ID of a tool to attach to the todo

Output


todotodoThe todo object as it is in Microbizz after the update

CreateUpdateTodoByTodoNumber

Creates or updates a todo in Microbizz. The todo is identified by the number field in the todo.

If a todo with the given todo number already exists, then the todo will be overwritten, otherwise a new todo will be created and assigned the supplied todo number. Currently no test is made as to the validity of the todo number.

If a toolid is provided then the tool will be attached to the todo.

Input


todotodoThe todo to create/update
toolidnumberThe ID of a tool to attach to the todo

Output


todotodoThe todo object as it is in Microbizz after the update

CloseTodoByID

Closes a todo by todo ID

The todo is only closed if close conditions are fullfilled. The command will not fail, if the todo isn't closed, but the returned object will reflect that the todo is still open

Input


todoidnumberThe ID of the todo which should be closed
stateidnumberThe state to which this todo should be closed to. (Obtained by GetTodoStates). Only close states is allowed here.
answeranswerIf a question form is requested on todo close, then the answers can be provided here.
notenoteA note, will be tagged with 'Solution'

Output


todotodoThe todo object as it is in Microbizz after the update

GetTodosByLastChange

Get a collection of todos changed since a given date and time.

Input


changedatedateReturn all tod's changed on or after the provided date.
changetimetimeIf this is provided only return todo's changed after the provided date and time.
resumekeystringIf a partial result is returned, provide the resumekey received along with the partial result, to get the rest of the entries
ignoreclosedboolIf 1 then don't send todo's that current user do not have access to
limitnumobjectsboolIf 1 then Microbizz will only send todo's that it thinks are particularly relevant for the user

Output


todoscollectiontodo]A collection of the relevant todos, or an empty collection if no todosNiko was found.
resumekeystringSometimes the entire result cannot be returned because it's to large. In that case a resumekey is returned along with the results. Execute the command again with this resumekey to get the remaining results.

GetTodoByID

Get a todo by their Microbizz todo id

If no such todo exist an empty collection will be returned.

Input


todoidnumberThe microbizz todo id of the todo to fetch

Output


todoscollectiontodo]A collection either empty if no todo was found, or with exactly one element being the todo.

GetTodoByTodoNumber

Get a todo by their todo number.

If no such todo exist an empty collection will be returned.

If several todos exists with the provided todo number, only one of these (unpredicted) is returned.

Input


todonumberstringThe todo number of the customer to fetch

Output


todoscollection[ todo ]A collection either empty if no todo was found, or with exactly one element being the todo.

GetTodoLogByID

Get the log for a todo by the ID and date.

If no such todo exist an empty collection will be returned.

If some todo exist in the log with the provided ID and date, will be returned log data.

Input


todoidintegerThe todo number of the customer to fetch
datestringThe date
logtypestringWhich log to read, either db (default) or activity

Output


resultcollection[set]A list of log lines, the contents of each set depends on the logtype parameter

Logtype = db

headstringLog head information. Contains date, time, log level and user ID
textstringLog text information
lognamestringUsed log name
datestringLog date
timestringLog time
levelstringThe level of the log
uidintegerUser ID
objectstringLog object data


Logtype = activity

useridnumberThe Microbizz ID of the user who genereated this log line
customeridnumberThe MB ID of a customer which may be relevant
unitidnumberThe MB ID of a unit which may be relevant
projectidnumberThe MB ID of a project which may be relevant
modcodestringA code for which module generated this log line
datedateWhen the log line was generated
timetime
textstringThe log line, may be HTML
linkstringAn optional link to some page in MB which is relevant


GetTodosByPersonID

Get all todos which have a specific contact person.

Input


personidnumberThe Microbizz ID of the contact person

Output


todoscollection[ todo ]

AddPhotoToTodo

Add a photo file to a todo.

Input


todoidnumberThe ID of the todo to add the photo to.
titlestringA file title (not a file name)
imagedatabinaryA binary stream containing photo data in jpeg format.
onxnetboolean1 if the file should be visible on the extranet
createdatedateWhen the photo was taken
createtimetimeWhen the photo was taken
tagscollection [number]An optional collection of tags to attach to this image (tag IDs)

Output


None--

AddPhotoToCustomer

Add a photo file to a company.

Input


customeridnumberThe ID of the customer to add the photo to.
titlestringA file title (not a file name)
imagedatabinaryA binary stream containing photo data in jpeg format.
onxnetboolean1 if the file should be visible on the extranet
createdatedateWhen the photo was taken
createtimetimeWhen the photo was taken
tagscollection [number]An optional collection of tags to attach to this image (tag IDs)

Output


None--

AddPhotoToTool

Add a photo file to a tool/equipment.

Input


toolidnumberThe ID of the tool to add the photo to.
titlestringA file title (not a file name)
imagedatabinaryA binary stream containing photo data in jpeg format.
onxnetboolean1 if the file should be visible on the extranet
createdatedateWhen the photo was taken
createtimetimeWhen the photo was taken
tagscollection [number]An optional collection of tags to attach to this image (tag IDs)

Output


None--

AddFileToTodo

Add a file to a task.

Input


todoidnumberThe ID of the task to add the file to.
filenamestringThe name of the file, eg. “MyDocument.PDF”
filedatabinaryA binary stream.
titlestringA file title (not a file name)
folderstringThe path of the folder, eg. "FilesFromAPI/Diagrams"

Output


None--

AddAudioToTodo

Add an audio file to a todo.

Input


todoidnumberThe ID of the todo to add the audio to.
titlestringA file title (not a file name)
formatstringOne of: mp3 wav aac
audiodatabinaryA binary stream containing audio data in the specified format.

Output


None.--

GetTodoTemplates

Get a list of all todo templates.

Input


None.--

Output


templatescollection [ todotemplate ]The available templates

GetTodoStates

Get a list of all todo states.

Input


None.--

Output


statescollection [ todostate ]The available states

CreateTodoFromTemplate

Create a todo based on a given template.

If a toolid is provided then the tool will be attached to the todo.

Input


templateidnumberThe id of the template (which can be obtained by GetTodoTemplates)
titlestringA base title for the created todo
customeridnumberAn id of a customer on which to attach the todo. (In some configurations this is required)
toolidnumberThe ID of a tool to attach to the todo

Output


todotodoThe primary todo created from the template. (A template can contain more than one todo)

GetPlannedTodos

Get list of tasks that are planned for the current user.

Input


None--

Output


todoscollection[number]List of IDs of the tasks that are planned for the user.

GetDocumentsByTodoID

Get all documents on a todo by todo id

Input


todoidnumberThe Microbizz todo ID
inclthumbsboolTrue to include thumbnails
inclfoldersboolTrue to include folders

Output


documentscollection [ document ]The documents present on the todo
folderscollection [ folder ]The folders present on the todo

GetProductUseByLastChange

Get a collection of all product use since the given date.

Input


changedatedateReturn all product use on or after the provided date.
changetimetimeIf this is provided only return product use changed after the provided date and time.
resumekeystringIf a partial result is returned, provide the resumekey received along with the partial result, to get the rest of the entries

Output


productusecollection[ todoitem ]A collection of the relevant product use, or an empty collection if no products were used.
resumekeystringSometimes the entire result cannot be returned because it's to large. In that case a resumekey is returned along with the results. Execute the command again with this resumekey to get the remaining results.

GetProductUseByTodoID

Get a collection of all product use on the given todo.

Input


todoidnumberID of todo to receive product use

Output


productusecollection[ todoitem ]A collection of the relevant product use, or an empty collection if no products were used on this todo.

GetProductUseByToolID

Get a collection of all product use on the given tool.

Input


toolidnumberID of tool to receive product use
sparepartsboolean1 to get spareparts only, 0 to get non-spareparts only

Output


productusecollection[ todoitem ]A collection of the relevant product use, or an empty collection if no products were used with this tool.

DeleteProductUseByID

Delete some product use by product use ID. The command will succeed even if the product use doesn't exist.

Input


productuseidnumberID of the product use to remove

Output


None--

AddProductUse

Deprecated: Consider using CreateUpdateProductUse

Add product use to the todo specified by the given todo ID.

Input


productusetodoitemThe product use. Even though the id field must be provided, it is ignored.
todoidnumberID of todo to receive product use
nopricecalcbooleanSet to 1 to disable price calculation (eg. when copying product use)
copyidnumberOptional ID of the prod.use that was copied, used for copying some details

Output


None--

AddPartsList

Add product use to the todo specified by the given todo ID. Most of the details will be taken from the parts list setup.

Input


productusecollection[ partuse ]Details about the product used for each part in the parts list.
todoidnumberID of todo to receive product use
useddatedateThe date of use
usedtimetimeThe time of use

Output


None--

CreateUpdateProductUse

Creates or updates some product use in Microbizz.

If some product use with the given productuse id already exists, then the product use will be overwritten.

If the product use provided have a productuse id of 0, new product use will be created and a new productuse id will be provided.

Input


productusetodoitemThe product use to create/update
nopricecalcbooleanSet to 1 to disable price calculation (eg. when copying product use)
copyidnumberOptional ID of the prod.use that was copied, used for copying some details

Output


productusetodoitemThe product use object as it is in Microbizz after the update

GetProductUsePendingInvoicing

Get all product use pending invoicing.

Input


None--

Output


productusecollection[ todoitem ]A collection of all product use pending invoicing.

MarkProductUseAsInvoiced

Mark the selected product use as invoiced.

Input


productuseidscollection[number]A collection of all product use ids to mark as invoiced.

Output


None--

GetPlanDestinations

Get all destinations for use when planning a todo

Input


None--

Output


destinationscollection[ plandestination ]A collection of all destinations which can be used.
myselfnumberThe destination that is the user himself

PlanTodo

Plan a todo to a specific destination.

Input


todoidnumberID of the todo to plan.
datedateDate to plan to.
timetimeTime to plan to.
destinationstringThe destination to plan to, see GetPlanDestinations ; may be an array of string, to plan to multiple users/teams.
durationnumberNumber of minutes to plan; must be 0 if enddate is set.
enddatedateIf set then there will be planned for all the dates between 'date' and 'enddate'.
endtimetimeOnly used if enddate is set, in which case it is required.
nonworkingdaysboolIf true then also plan on non-working days.
fulldayboolean1 to create full day planning or 0 to create normal planning; duration+enddate+endtime+time are ignored for full day plannings

Output


prodplanidscollection[number]The Microbizz IDs of all the plannings that were created

destination consist of a letter (either u for user or t for team) followed by a number (the ID of the user/team). Eg. u29 or t3. When planning to a team, the team of the todo will be changed to the specified team, and the planning will be made anonymous.

GetWorkpoolsByLastChange

Get info about the workpools.

Input


changedatedate
changetimetime

Output


disabledboolIf workpools are disabled, default is false
workpoolscollection[ workpool ]A collection of workpools

Each set in workpools contains information about a workpool. The API call will always return all the workpools, but the content (list of tasks) of a workpool will only be included in if the workpool or its contents has changed since changedate.

AddRemoveWorkpoolEntry

Add a Todo to a workpool, or remove a Todo from a workpool.

Input


workpoolentryidnumberID of a workpool entry in Microbizz
todoidnumberID of a Todo in Microbizz
workpoolidnumberID of a workpool in Microbizz

Output


wastakenboolTrue if the Todo was removed from the workpool
workpoolentryworkpoolentryOnly if the Todo was added to a workpool

If workpoolentryid is specified, then the Todo will be removed from the pool, and the responsible user will be set to the current user.

If workpoolentryid isn't specified, but workpoolid and todoid both are, then the Todo will be added to the workpool.

Product and invoicing commands

CreateUpdateProductByID

Creates or updates a product in Microbizz.

If a product with the given product id already exists, then the product will be overwritten.

If the product provided have a product id of 0, a new product will be created and a new product id will be provided.

Input


productproductThe product to create/update


Output


productproductThe product object as it is in Microbizz after the update

CreateUpdateProductByProductNumber

Creates or updates a product in Microbizz.

If a product with the given product number already exists, then the product will be overwritten.

If several products exists with the given product number, only one of these (unpredicted) will be overwritten.

If a product number isn't provided in the product object, the command will fail.

The product id in the input product object will be ignored.

Input


productproductThe product to create/update

Output


productproductThe product object as it is in Microbizz after the update

AssignIndividualPriceByProductNumber

Assigns an individual price to a given product identified by product number, to a given customer identified by a customer id.

If several products exists with the given product number, only one of these (unpredicted) will be assigned the individual price.

If the product or the customer doesn't exists, the command will still succeed, but nothing will happen.

Input


productnumberstringProduct number
customeridnumberId of the customer for which to assign the price
pricenumberIndividual price pr. unit in lowest local currency. (Typical danish ører)

Output


None--

RemoveIndividualPriceByProductNumber

Removes an individual price to a given product identified by product number, from a given customer identified by a customer id.

If neither the product, the customer nor the individual price exists, the command will still succeed, but nothing will happen.

Input


productnumberstringProduct number
customeridnumberId of the customer for which to remove any individual price. If this is omitted, then individual pricing will be removed for all customers.

Output


None--

GetProductByID

Get a product by their Microbizz product id

If no such product exist an empty collection will be returned.

Input


productidnumberThe Microbizz product id of the product to fetch
include_pricesbooleanGet prices even if these are disabled

Output


productscollection[ product ]A collection either empty if no products was found, or with exactly one element being the product.

AddInvoiceLine

Adds a new invoice line in Microbizz.

Input


invoicelineinvoicelineThe invoice line to add. The id of the invoice line object will be ignored

Output


None.--

GetPendingInvoiceLines

Get all pending invoice lines in Microbizz.

Input


None.--

Output


invoicelinescollection[ invoiceline ]All pending invoice lines in Microbizz

GetInvoiceLinesByLastChange

Get all invoice lines changed after a certain date.

Input


changedatedateReturn all invoice lines changed on or after the provided date.
changetimetimeIf this is provided only return invoice lines changed after the provided date and time.
resumekeystringIf a partial result is returned, provide the resumekey received along with the partial result, to get the rest of the entries.

Output


invoicelinescollection [ invoiceline ]The invoice lines

MarkInvoiceLinesAsProcessed

Mark the invoice lines with the provided invoice line id's as processed in the Microbizz system, and attach an optional order number for information about which order they were attached to.

Input


invoicelineidscollection[number]The invoice line ids of the lines that were processed.
ordernumberstringOptional order number to indicate on which order the lines were attached.

Output


None.--

GetProductByProductNumber

Get a product by their product number.

If no such product exist an empty collection will be returned.

If several products exists with the provided product number, only one of these (unpredicted) is returned.

Input


productnumberstringThe product number of the product to fetch
include_pricesbooleanGet prices even if these are disabled

Output


productscollection[ product ]A collection either empty if no products was found, or with exactly one element being the product.

GetProductsByLastChange

Get a collection of products changed since a given date and time.

Input


changedatedateReturn all products changed on or after the provided date.
changetimetimeIf this is provided only return products changed after the provided date and time.
resumekeystringIf a partial result is returned, provide the resumekey received along with the partial result, to get the rest of the entries
include_pricesbooleanGet prices even if these are disabled
ignoreclosedbooleanSkip products that are deleted
onlyfavoritesbooleanIf 1 then only get products that are the favorites of the current user

Output


productscollection[ product ]A collection of the relevant products, or an empty collection if no products were found.
resumekeystringSometimes the entire result cannot be returned because it's to large. In that case a resumekey is returned along with the results. Execute the command again with this resumekey to get the remaining results.

DeleteProductByID

Deletes a product by their Microbizz product id

The product is only deleted from the product catalog. Instances of the product used in offers and on customers are retained.

Input


productidnumberThe Microbizz product id of the product to delete

Output


None.--

CreateDirectOrder

Create a direct order / quotation.

Input


customeridnumberThe ID of the customer in Microbizz
linescollection[directorderline]The order lines
notestringA note to use for the quotation
deliverydatedateDelivery date for the quotation

There must be at least 1 order line.

Output


None--
  • No labels