Difference between revisions of "Get Company"

From MyMobileWorkers API
Jump to: navigation, search
(→‎Example response)
(→‎Example curl request)
 
(2 intermediate revisions by 2 users not shown)
Line 95: Line 95:
 
|-
 
|-
 
! file
 
! file
−
| Filename. To hotlink use http://live.mymobileworkers.com/uploads/company_uploads/"file"
+
| Filename. To hotlink use http://api.mymobileworkers.com/uploads/company_attachments/"file"
 
|-
 
|-
 
! comment
 
! comment
Line 146: Line 146:
 
== Example curl request ==
 
== Example curl request ==
  
−
http://live.mymobileworkers.com:8080/api/1/mobile_users?api_key=YOURAPIKEY
+
http://api.mymobileworkers.com:8080/api/1/mobile_users?api_key=YOURAPIKEY

Latest revision as of 12:47, 14 November 2016

Contents

[edit] Summary

Get Company
URL http://:base_url/:api_path/:version/companies/company
Type GET
Params: api_key required
Response JSON


Returns company data and company attachments. Company attachments are separate from job attachments. Along with the basic information on the company you get a few bits related to their customisations (colour scheme etc) which may be useful for developing bespoke applications.


[edit] Response Parameters

Field Description
name Company Name
contact_name Contact Name
contact_email Contact Email
created_at Date company signed up to MMW
color_1 One of the colours used to customise the portal
color_2 One of the colours used to customise the portal
color_3 One of the colours used to customise the portal
locale Currently not used
logo_path Raw filename of companies logo. To hotlink use http://live.mymobileworkers.com/uploads/logos/"logo_path"
vehicle_check_disclaimer Vehicle Check Disclaimer
company_registration_number VAT number if entered
subdomain If customer portal is enabled companies customers can visit http://"subdomain".mymobileworkers.com
address_1 Address line 1
address_2 Address line 2
address_3 Address line 3
address_4 Address line 4
postcode Postcode
vat_rate VAT percentage (1.2 = 20% etc.)
attachments Array of attachments

[edit] Attachments array

Field Description
file Filename. To hotlink use http://api.mymobileworkers.com/uploads/company_attachments/"file"
comment Comment
created_at Date attachment was uploaded

[edit] Example response

{
   "name":"Test Company",
   "locale":"",
   "contact_name":"John Smith",
   "contact_number":"01942295906",
   "contact_email":"john.smith@momote.com",
   "created_at":"2011-10-10T14:37:09+01:00",
   "color_1":"3d0155",
   "color_2":"bfbfbf",
   "color_3":"8b8a8c",
   "logo_path":"c9d54453184ea0a0544f.png",
   "vehicle_check_disclaimer":"Please sign to verify checks are complete, a valid tax disc is present and you are legally capable of driving under EC regulations",
   "customer_disclaimer":"Please sign here to confirm completion of delivery and/or any associated failed items ",
   "company_registration_number":null,
   "subdomain":"testcompany",
   "address_1":"8 The Parks",
   "address_2":"",
   "address_3":"",
   "address_4":"",
   "postcode":"",
   "vat_rate":1.2,
   "attachments":[
      {
         "file":"testfile_20130228_094621.txt",
         "comment":"Transferred from API",
         "created_at":"2013-02-28T09:46:22+00:00"
      },
      {
         "file":"testfile_20130228_113853.txt",
         "comment":"Transferred from API",
         "created_at":"2013-02-28T11:38:53+00:00"
      }
   ]
}

[edit] Example curl request

http://api.mymobileworkers.com:8080/api/1/mobile_users?api_key=YOURAPIKEY

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox