Orders
findOrders
Query for orders
Parameters
Parameter | Type | Description |
---|---|---|
Login | LoginObject | Standard login object with username, password, and application key |
BeginTime | iCalTimeString | Find orders from. Check getCurrentDateTime |
EndTime | iCalTimeString | Find orders to |
ModifiedBeginTime | iCalTimeString | Find orders modified from. Check getOffsetDateTime |
ModifiedEndTime | iCalTimeString | Find orders modified to |
RequiredSearchObjects | Object[] | Objects that must be present on the orders |
CustomerObjects | Object[] | Customer objects to search on |
OwnerObjects | Object[] | Owner objects to search on |
SearchObjects | Object[] | Order row objects to search on |
Status | Status[] | Order statuses to search for |
SortOrder | String | The sorting order for the orders matching the query |
IncludeObjectNames | Boolean | Flag to indicate whether to include object names or not on the return |
StartRow | Int | Index of the starting row (for pagination) |
NumberOfRows | Int | Maximum number of rows to return (capped at 1000 per query, use StartRow to paginate over the orders) |
Returns
Return | Type | Description |
---|---|---|
Rows | String[] | Array of orders matching the query |
TotalNumOfRows | Int | Total number of order rows matching the query |
Example
Request
<tns:begintime></tns:begintime>
<tns:endtime></tns:endtime>
<tns:modifiedbegintime></tns:modifiedbegintime>
<tns:modifiedendtime></tns:modifiedendtime>
<tns:requiredsearchobjects>
</tns:requiredsearchobjects>
<tns:customerobjects>
</tns:customerobjects>
<tns:ownerobjects>
</tns:ownerobjects>
<tns:searchobjects>
</tns:searchobjects>
<tns:status>
</tns:status>
<tns:allorders>true</tns:allorders>
<tns:sortorder></tns:sortorder>
<tns:includeobjectnames>true</tns:includeobjectnames>
<tns:useutc>false</tns:useutc>
<tns:startrow>0</tns:startrow>
<tns:numberofrows>1000</tns:numberofrows>
getOrders
Get orders by order ids
Parameters
Parameter | Type | Description |
---|---|---|
Login | LoginObject | Standard login object with username, password, and application key |
OrderIds | String[] | Array of ids for the orders to get |
CreateObjectsWithNames | Boolean | Flag to indicate whether to create objects with names or only ids |
UseUTC | Boolean | Indicate whether the order timestamps should be in UTC or in local time |
Returns
Return | Type | Description |
---|---|---|
Orders | String[] | Array of the requested orders |
Example
Request
<tns:orderids>
<order>_te_3</order>
</tns:orderids>
<tns:createobjectswithnames>true</tns:createobjectswithnames>
validateOrders
Validate new orders without importing them
Parameters
Parameter | Type | Description |
---|---|---|
Login | LoginObject | Standard login object with username, password, and application key |
Orders | Order[] | Array of orders to validate |
Returns
Return | Type | Description |
---|---|---|
Status | Status[] | Array of validation status per order. A status of 0 indicates the order was successfully validated |
Example
Request
<tns:orders>
<order>
<extid>40c89e67-826f-45dc-8486-50b6c6ab74f4</extid>
<organizations>
<organization>admin</organization>
</organizations>
<title>Example order</title>
<description>Extra order description</description>
<status>ACTIVE</status>
<begin>20190410T000000</begin>
<end>20200410T000000</end>
<requiredobject>
<extid>bd7ff3ff-d2ab-47b3-892e-7176c030184e</extid>
<type>project</type>
<fields/>
</requiredobject>
<rows>
<extid>_te_3#1</extid>
<ordertitle>SU TE3</ordertitle>
<orderbegin>20140410T000000</orderbegin>
<orderend>20150410T000000</orderend>
<description/>
<status>PARTIAL</status>
<active>true</active>
<possible>true</possible>
<ordercount>2</ordercount>
<orderlength>0</orderlength>
<deliveredcount>0</deliveredcount>
<deliveredlength>0</deliveredlength>
<objects>
<object>
<extid>237e2269-d446-49d2-8348-57626e7c1d1f</extid>
<type>staff</type>
<fields/>
</object>
<object>
<extid>b0364e47-6151-4c61-9362-af04b3040aaf</extid>
<type>place</type>
<fields/>
</object>
<object>
<extid>709fa369-4a63-44f4-9a38-72d69d96fa32</extid>
<type>project</type>
<fields/>
</object>
<object>
<extid>709fa369-4a63-44f4-9a38-72d69d96fa32</extid>
<type>company</type>
<fields/>
</object>
<object>
<extid>f2b97211-340c-45f4-8801-722f3d55d319</extid>
<type>activity</type>
<fields/>
</object>
<object>
<extid>f9b706f4-c8e0-40f4-b631-a8e997d724c4</extid>
<type>workorder</type>
<fields/>
</object>
</objects>
<extraobjects/>
</rows>
</order>
</tns:orders>
importOrders
Import orders
Parameters
Parameter | Type | Description |
---|---|---|
Login | LoginObject | Standard login object with username, password, and application key |
Orders | Order[] | Array of orders to import |
Returns
Return | Type | Description |
---|---|---|
Status | Status[] | Array of import status per order. A status of 0 indicates the order was successfully imported |
Example
Request
<tns:orders>
<order>
<extid>40c89e67-826f-45dc-8486-50b6c6ab74f4</extid>
<organizations>
<organization>admin</organization>
</organizations>
<title>Example order</title>
<description>Extra order description</description>
<status>ACTIVE</status>
<begin>20190410T000000</begin>
<end>20200410T000000</end>
<requiredobject>
<extid>bd7ff3ff-d2ab-47b3-892e-7176c030184e</extid>
<type>project</type>
<fields/>
</requiredobject>
<rows>
<extid>_te_3#1</extid>
<ordertitle>SU TE3</ordertitle>
<orderbegin>20140410T000000</orderbegin>
<orderend>20150410T000000</orderend>
<description/>
<status>PARTIAL</status>
<active>true</active>
<possible>true</possible>
<ordercount>2</ordercount>
<orderlength>0</orderlength>
<deliveredcount>0</deliveredcount>
<deliveredlength>0</deliveredlength>
<objects>
<object>
<extid>237e2269-d446-49d2-8348-57626e7c1d1f</extid>
<type>staff</type>
<fields/>
</object>
<object>
<extid>b0364e47-6151-4c61-9362-af04b3040aaf</extid>
<type>place</type>
<fields/>
</object>
<object>
<extid>709fa369-4a63-44f4-9a38-72d69d96fa32</extid>
<type>project</type>
<fields/>
</object>
<object>
<extid>709fa369-4a63-44f4-9a38-72d69d96fa32</extid>
<type>company</type>
<fields/>
</object>
<object>
<extid>f2b97211-340c-45f4-8801-722f3d55d319</extid>
<type>activity</type>
<fields/>
</object>
<object>
<extid>f9b706f4-c8e0-40f4-b631-a8e997d724c4</extid>
<type>workorder</type>
<fields/>
</object>
</objects>
<extraobjects/>
</rows>
</order>
</tns:orders>
exportOrders
Export orders
Parameters
Parameter | Type | Description |
---|---|---|
Login | LoginObject | Standard login object with username, password, and application key |
OrderIds | String[] | Array of ids for the orders to export |
Returns
Return | Type | Description |
---|---|---|
Orders | String[] | Array of orders requested |
Example
Request
<tns:orderids>
<order>_te_3</order>
</tns:orderids>
deleteOrders
Delete orders
Parameters
Parameter | Type | Description |
---|---|---|
Login | LoginObject | Standard login object with username, password, and application key |
OrderIds | String[] | Array of ids for the orders to delete |
Returns
Return | Type | Description |
---|---|---|
Results | Status[] | Array of statuses for the deletion request. A status of 0 indicates the order was successfully deleted |
Example
Request
<tns:orderids>
<order>_te_3</order>
</tns:orderids>