Difference between revisions of "Get Assets Assigned To Customer"

From MyMobileWorkers API
Jump to: navigation, search
(→‎Example response)
(→‎Example curl request)
 
Line 114: Line 114:
 
== Example curl request ==
 
== Example curl request ==
  
−
curl "http://live.mymobileworkers.com:8080/api/1/assets/asset/customer/?api_key=darrenwebapi&customer=john"
+
curl "http://api.mymobileworkers.com:8080/api/1/assets/asset/customer/?api_key=darrenwebapi&customer=john"

Latest revision as of 12:39, 14 November 2016

Contents

[edit] Summary

Asset by customer name
URL http://:base_url/:api_path/:version/asset/customer?api_key=YOUR_KEY&customer=CUSTOMER
Type GET
Params: api_key required
customer required
Response JSON

The Get Assets Assigned To Customer method returns the list of assets assigned to the customer name provided in the parameter.

[edit] Response Parameters

Field Description
location Asset location
status Contains both external id and status name for asset status
description Asset description
item Contains the name, category and external id of the item the asset is linked to
serial_number Asset serial number
created_at Date asset was created
last_updated_by User who last updated asset
external_id Asset external id
last_scanned_by User who last scanned asset
custom_fields Asset custom fields
last_updated_by User who last updated asset
job Job the asset is linked to
customer Customer the asset is linked to
branch Branch the asset is linked to

[edit] Example response

{
   "location":"aPlace2",
   "status":{
      "external_id":null,
      "name":"test"
   },
   "description":"describingwords",
   "item":{
      "external_id":null,
      "category":"test3",
      "name":"Woo"
   },
   "serial_number":"serialNo456",
   "created_at":"2013-10-08 14:19:17",
   "last_updated_by":null,
   "external_id":"sss32",
   "last_scanned_by":null,
   "job":{
      "job_ number":"123"
   },
   "customer":{
      "name":"john"
   },
   "custom_fields":{
      "testFieldName3":"testFieldValue3",
      "testFieldName2":"testFieldValue2",
      "testFieldName1":"testFieldValue1"
   },
   "branch":{
      "name":"DarrenDevTest"
   }
}

[edit] Example curl request

curl "http://api.mymobileworkers.com:8080/api/1/assets/asset/customer/?api_key=darrenwebapi&customer=john"

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox