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 7 Next »

Working with a single job

MethodResult
URIhttps://[CompanyID].crittah.com/ws/apiv2/[json or xml]/jobs/[IDJob]
DELETEDeletes one job
GETReturns data for one job
POSTCreate or modify only the supplied data for one job; returns job data after request
PUTNot supported

Data fields

FieldValue typeMandatoryDescriptionExample
IDJobTypestringYESID of the job type being created. Job type information can be retrieved from here.7090fad1-c4da-4488-9ceb-55ee9847edcc
IDStatusstring ID of the job status. Job statuses can be retries from here  .926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa
IDSitestringYESID of the site the job belongs to.20058233-7388-418b-9193-6b57e28604f9
IDCustomerstringEither IDCustomer and/or IDContact is RequiredID of the customer. More information on the API for customers can be found here.c0fd94f3-2ddd-4eea-bc24-40189480d10f
IDContactstringEither IDCustomer and/or IDContact is RequiredID of the contact. More information on the API for contacts can be found here.20058233-7388-418b-9193-6b57e28604f9
DueDatestring UTC date in ISO 8601 format2010-08-20T15:00:00Z
FollowUpDatestring UTC date in ISO 8601 format. If omitted the follow up time will default to the current time.2010-08-20T15:00:00Z
ChargeAmountdecimal Amount to charge for the job. If omitted the default charge amount will be used as configured in the job type.20.52
StartDatestring UTC date in ISO 8601 format. Omit this values if the job has not started.2010-08-20T15:00:00Z
FinishDatestring UTC date in ISO 8601 format. Omit this values if the job has not finished.2010-08-20T15:00:00Z
Durationint Duration of job in minutes20
AddressAddress Object  Address of the job.

See Address Object

AddressDeliveryAddress Object  Delivery address if the job has a start and a destination. This address will be displayed if the job type has been configured to use a delivery address.See Address Object
CustFieldsArray of custom fields objects An array of all custom field data for the job. Custom field attributes are described below. 
NotesArray of Notes Object Notes for the job.See Notes Object
ItemsArray of Items objects Inventory items used on the job. These items can be items from the inventory information in Crittah or free text line items. 

Custom field, fields

FieldValue typeMandatoryDescriptionExample
IDCFstring ID of the job type being created. Job type information can be retrieved from here.7090fad1-c4da-4488-9ceb-55ee9847edcc
VDatestring UTC date in ISO 8601 format2010-08-20T15:00:00Z
VDecdecimal 

Number value for Numeric and Measurement fields.

With measure values, measures are stored as kg or cubic meters depending on the measure type. These measure are then converted based on the users personal preferences.

23.45
VStrstring String value for String fieldsHello this is a string
VIDstring Value selected if field is a selector field.7090fad1-c4da-4488-9ceb-55ee9847edcc

Examples

Get a customers details

Sample cURL call:

curl -H "Content-Type: application/json"  \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://[companyID].crittah.com/ws/apiv2/json/jobs/c1ed6b2c-40c2-4d98-8445-148ae1890b67

JSON Rsponse:

 {
  "IDJob": "c1ed6b2c-40c2-4d98-8445-148ae1890b67",
  "IDShift": "00000000-0000-0000-0000-000000000000",
  "JobOrder": 0,
  "JobReference": "AHC817040595",
  "IDJobType": "49b86bf8-a610-4594-baea-30b76c21974d",
  "JobType": "AdHoc",
  "Colour": "#f5c9cb",
  "IDStatus": "a610305a-1a34-4c3d-b271-d710ba6b3be3",
  "Status": "New",
  "Customer": {
    "IDCustomer": "5f3f2135-d0f5-47a4-906e-7274b0128054",
    "IDSite": "20058233-7388-418b-9193-6b57e28604f9",
    "Site": "SYD",
    "Types": [
      {
        "IDType": "4d819963-731c-41fd-9378-fd7a10199b78",
        "Type": "Associates"
      },
      {
        "IDType": "27ec5309-9426-4a05-b51c-532f8582c436",
        "Type": "Financial"
      },
      {
        "IDType": "21a952eb-089e-467a-98bf-f8cb9a0ebd88",
        "Type": "Producer"
      }
    ],
    "IDStatus": "926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa",
    "Status": "Active",
    "Parent": null,
    "CompanyName": "North Bunting Supplies",
    "CompanyNo": "111 222 3333",
    "CustomerRef": "7193032",
    "Phone": "9575 545",
    "Mobile": "0414 656 654",
    "Fax": "654 654 124",
    "Council": "Sydney",
    "WebSite": "http:\/\/www.buntingsupplies.com.au",
    "AddressBilling": {
      "IDAddress": "368321fe-de7e-4f38-80a7-e7ea8e34fe26",
      "AddressLine1": "99 Castlereagh Street",
      "AddressLine2": null,
      "City": "NORTH SYDNEY",
      "State": "NSW",
      "IDCountry": 1013,
      "Country": "Australia",
      "PostCode": "2001",
      "LocRef": {
        "IDLocation": "6db14940-f906-4c20-949a-e332f6798336",
        "LatLng": {
          "Lat": -33.869738,
          "Lng": 151.209448
        }
      }
    },
    "Address": {
      "IDAddress": "2d69c03b-5b57-46b4-8d67-43d2f27d225a",
      "AddressLine1": "91 Castlereagh Street",
      "AddressLine2": null,
      "City": "NORTH SYDNEY",
      "State": "NSW",
      "IDCountry": 1013,
      "Country": "Australia",
      "PostCode": "2000",
      "LocRef": {
        "IDLocation": "e97c85a5-62c0-4e13-bb63-ed8a43050360",
        "LatLng": {
          "Lat": -33.869738,
          "Lng": 151.209448
        }
      }
    },
    "AccountOwner": "00000000-0000-0000-0000-000000000000",
    "Notes": [
      {
        "IDNote": "05629a9b-2869-4197-82af-b6f975be93c8",
        "IDEntity": "5f3f2135-d0f5-47a4-906e-7274b0128054",
        "IDNoteType": "77d5d244-eb29-4b5b-8b14-87d92b4215ea",
        "Type": "General",
        "NoteInfo": "Contact the front desk for assistance"
      },
      {
        "IDNote": "cf67b514-3ba2-44d9-82f0-c0d5f8d57816",
        "IDEntity": "5f3f2135-d0f5-47a4-906e-7274b0128054",
        "IDNoteType": "77d5d244-eb29-4b5b-8b14-87d92b4215ea",
        "Type": "General",
        "NoteInfo": "Entry is via 120 King st - last driveway on right before Castlereagh st."
      }
    ]
  },
  "Contact": {
    "IDContact": "cd62aad8-9e0d-408a-827b-c620ff9b3598",
    "ContactRef": "4713828",
    "IDSite": "20058233-7388-418b-9193-6b57e28604f9",
    "Site": "SYD",
    "Types": [
      
    ],
    "Salutation": "Mr",
    "FirstName": "John",
    "LastName": "Peterson",
    "Email": "j.peterson@gmal.com",
    "Phone": "(02) 9506 3560",
    "Mobile": "0412 544 654",
    "Fax": "9567 680",
    "BirthDate": null,
    "Position": "",
    "Department": "",
    "IDStatus": "926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa",
    "Status": "Active",
    "Customer": {
      "IDCustomer": "5f3f2135-d0f5-47a4-906e-7274b0128054",
      "IDSite": "20058233-7388-418b-9193-6b57e28604f9",
      "Site": "SYD",
      "Types": [
        {
          "IDType": "4d819963-731c-41fd-9378-fd7a10199b78",
          "Type": "Associates"
        },
        {
          "IDType": "27ec5309-9426-4a05-b51c-532f8582c436",
          "Type": "Financial"
        },
        {
          "IDType": "21a952eb-089e-467a-98bf-f8cb9a0ebd88",
          "Type": "Producer"
        }
      ],
      "IDStatus": "926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa",
      "Status": "Active",
      "Parent": null,
      "CompanyName": "North Bunting Supplies",
      "CompanyNo": "111 222 3333",
      "CustomerRef": "7193032",
      "Phone": "9575 545",
      "Mobile": "0414 656 654",
      "Fax": "654 654 124",
      "Council": "Sydney",
      "WebSite": "http:\/\/www.buntingsupplies.com.au",
      "AddressBilling": {
        "IDAddress": "368321fe-de7e-4f38-80a7-e7ea8e34fe26",
        "AddressLine1": "99 Castlereagh Street",
        "AddressLine2": null,
        "City": "NORTH SYDNEY",
        "State": "NSW",
        "IDCountry": 1013,
        "Country": "Australia",
        "PostCode": "2001",
        "LocRef": {
          "IDLocation": "6db14940-f906-4c20-949a-e332f6798336",
          "LatLng": {
            "Lat": -33.869738,
            "Lng": 151.209448
          }
        }
      },
      "Address": {
        "IDAddress": "2d69c03b-5b57-46b4-8d67-43d2f27d225a",
        "AddressLine1": "91 Castlereagh Street",
        "AddressLine2": null,
        "City": "NORTH SYDNEY",
        "State": "NSW",
        "IDCountry": 1013,
        "Country": "Australia",
        "PostCode": "2000",
        "LocRef": {
          "IDLocation": "e97c85a5-62c0-4e13-bb63-ed8a43050360",
          "LatLng": {
            "Lat": -33.869738,
            "Lng": 151.209448
          }
        }
      },
      "AccountOwner": "00000000-0000-0000-0000-000000000000",
      "Notes": [
        {
          "IDNote": "05629a9b-2869-4197-82af-b6f975be93c8",
          "IDEntity": "5f3f2135-d0f5-47a4-906e-7274b0128054",
          "IDNoteType": "77d5d244-eb29-4b5b-8b14-87d92b4215ea",
          "Type": "General",
          "NoteInfo": "Contact the front desk for assistance"
        },
        {
          "IDNote": "cf67b514-3ba2-44d9-82f0-c0d5f8d57816",
          "IDEntity": "5f3f2135-d0f5-47a4-906e-7274b0128054",
          "IDNoteType": "77d5d244-eb29-4b5b-8b14-87d92b4215ea",
          "Type": "General",
          "NoteInfo": "Entry is via 120 King st - last driveway on right before Castlereagh st."
        }
      ]
    },
    "Address": {
      "IDAddress": "b8ec4614-cbcc-4a20-9bc3-64ab2ba89fda",
      "AddressLine1": "26 Wolongong ROad",
      "AddressLine2": null,
      "City": "ARNCLIFFE",
      "State": "NSW",
      "IDCountry": 1013,
      "Country": "Australia",
      "PostCode": "2205",
      "LocRef": {
        "IDLocation": "2be70140-b953-4935-b075-02660288bb1e",
        "LatLng": {
          "Lat": -33.934813,
          "Lng": 151.146104
        }
      }
    },
    "Notes": [
      {
        "IDNote": "5b4dac63-e226-4270-99d3-17e289115ba7",
        "IDEntity": "cd62aad8-9e0d-408a-827b-c620ff9b3598",
        "IDNoteType": "2b11efc3-2a43-4c03-92ac-923e77f821a2",
        "Type": "Important",
        "NoteInfo": "Maincontact for organisation"
      }
    ]
  },
  "DueDate": "2014-10-06T10:55:00Z",
  "Address": {
    "IDAddress": "362eb124-d124-4a47-ba94-6585e8bf4426",
    "AddressLine1": "91 Castlereagh Street",
    "AddressLine2": null,
    "City": "NORTH SYDNEY",
    "State": "NSW",
    "IDCountry": 1013,
    "Country": "Australia",
    "PostCode": "2000",
    "LocRef": {
      "IDLocation": "3ac45077-b768-4264-b085-506892b46691",
      "LatLng": {
        "Lat": -33.869738,
        "Lng": 151.209448
      }
    }
  },
  "AddressDelivery": {
    "IDAddress": "9f446daf-c80f-4112-9e1f-c8d867632e38",
    "AddressLine1": "91 Castlereagh Street",
    "AddressLine2": null,
    "City": "NORTH SYDNEY",
    "State": "NSW",
    "IDCountry": 1013,
    "Country": "Australia",
    "PostCode": "2000",
    "LocRef": {
      "IDLocation": "4e878177-7de5-431e-b843-3ecdc4b6e8f0",
      "LatLng": {
        "Lat": -33.869738,
        "Lng": 151.209448
      }
    }
  },
  "CustFields": {
    "CF": [
      {
        "Order": 1,
        "IDCF": "ac0a7cf2-2496-4147-a8e0-f679a538f3bc",
        "Name": "# Containers",
        "Type": "Number",
        "Descr": "Number of containers required",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "NCNT",
        "VDate": "",
        "VDec": 22,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 2,
        "IDCF": "55535646-a0d5-48d9-b718-e5abdc792192",
        "Name": "Fruit\/Veg\/Salad",
        "Type": "Measurement",
        "Descr": "Fruit, Vegetables and Salad",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "FVS",
        "VDate": "",
        "VDec": 1,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 3,
        "IDCF": "d4602f75-d0b1-46b4-968b-549cfac7ef79",
        "Name": "Cooked Meals",
        "Type": "Measurement",
        "Descr": "Cooked Meals",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "CM",
        "VDate": "",
        "VDec": 2,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 4,
        "IDCF": "122727dc-b753-4a39-8fb2-921a2b483523",
        "Name": "Sandwiches",
        "Type": "Measurement",
        "Descr": "Sandwiches",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "S",
        "VDate": "",
        "VDec": 3,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 5,
        "IDCF": "b980cf94-c37c-49fe-bcc1-ff63c552923f",
        "Name": "Dairy",
        "Type": "Measurement",
        "Descr": "Dairy",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "D",
        "VDate": "",
        "VDec": 45,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 6,
        "IDCF": "9edc2d59-36d9-40ce-87d0-cb0250098787",
        "Name": "Raw Meat",
        "Type": "Measurement",
        "Descr": "Raw Meat",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "RM",
        "VDate": "",
        "VDec": 6,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 7,
        "IDCF": "fa609e1c-4775-414f-af6c-e957cff27eaf",
        "Name": "Raw Meat Used By",
        "Type": "Date",
        "Descr": "Raw Meat Used By date. The date in which the raw meat expires.",
        "DV": "",
        "DP": 0,
        "AddV": 1,
        "Mand": false,
        "ML": 0,
        "Abrev": "RME",
        "VDate": "",
        "VDec": 0,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 8,
        "IDCF": "313c714f-2f8d-4638-98f2-b18be1155e1d",
        "Name": "Deserts and Pastries",
        "Type": "Measurement",
        "Descr": "Deserts and Pastries",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "DP",
        "VDate": "",
        "VDec": 0,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 9,
        "IDCF": "e24167b0-6bb0-4cc6-8e03-ee85ee233d52",
        "Name": "Bread",
        "Type": "Measurement",
        "Descr": "Bread",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "B",
        "VDate": "",
        "VDec": 0,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 10,
        "IDCF": "3013af25-b9c8-4c5d-b74d-a6c9bddf2120",
        "Name": "Dry Stock",
        "Type": "Measurement",
        "Descr": "Dry Stock",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "DS",
        "VDate": "",
        "VDec": 0,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 11,
        "IDCF": "7c8039fe-681d-4ffe-a0c6-1b58c2c5c635",
        "Name": "Dry Stock Used By",
        "Type": "Date",
        "Descr": "Dry Stock used by date",
        "DV": "",
        "DP": 0,
        "AddV": 1,
        "Mand": false,
        "ML": 0,
        "Abrev": "DSU",
        "VDate": "",
        "VDec": 0,
        "VStr": "",
        "VID": null
      },
      {
        "Order": 12,
        "IDCF": "6117a168-bfc3-482a-b0ef-74edb8b85ca8",
        "Name": "Drinks",
        "Type": "Measurement",
        "Descr": "Drinks",
        "DV": "0",
        "DP": 0,
        "AddV": 1,
        "Mand": true,
        "ML": 0,
        "Abrev": "DRINK",
        "VDate": "",
        "VDec": 0,
        "VStr": "",
        "VID": null
      }
    ]
  },
  "Notes": [
    
  ],
  "Items": [
    
  ]
}

XML Response: 

 <JobObj xmlns="http://schemas.datacontract.org/2004/07/Spinifex.lib.objects" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <IDJob>c1ed6b2c-40c2-4d98-8445-148ae1890b67</IDJob>
    <IDShift>00000000-0000-0000-0000-000000000000</IDShift>
    <JobOrder>0</JobOrder>
    <JobReference>AHC817040595</JobReference>
    <IDJobType>49b86bf8-a610-4594-baea-30b76c21974d</IDJobType>
    <JobType>AdHoc</JobType>
    <Colour>#f5c9cb</Colour>
    <IDStatus>a610305a-1a34-4c3d-b271-d710ba6b3be3</IDStatus>
    <Status>New</Status>
    <Customer>
        <IDCustomer>5f3f2135-d0f5-47a4-906e-7274b0128054</IDCustomer>
        <IDSite>20058233-7388-418b-9193-6b57e28604f9</IDSite>
        <Site>SYD</Site>
        <Types>
            <TypeObj>
                <IDType>4d819963-731c-41fd-9378-fd7a10199b78</IDType>
                <Type>Associates</Type>
            </TypeObj>
            <TypeObj>
                <IDType>27ec5309-9426-4a05-b51c-532f8582c436</IDType>
                <Type>Financial</Type>
            </TypeObj>
            <TypeObj>
                <IDType>21a952eb-089e-467a-98bf-f8cb9a0ebd88</IDType>
                <Type>Producer</Type>
            </TypeObj>
        </Types>
        <IDStatus>926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa</IDStatus>
        <Status>Active</Status>
        <Parent i:nil="true" />
        <CompanyName>North Bunting Supplies</CompanyName>
        <CompanyNo>111 222 3333</CompanyNo>
        <CustomerRef>7193032</CustomerRef>
        <Phone>9575 545</Phone>
        <Mobile>0414 656 654</Mobile>
        <Fax>654 654 124</Fax>
        <Council>Sydney</Council>
        <WebSite>http://www.buntingsupplies.com.au</WebSite>
        <AddressBilling>
            <IDAddress>368321fe-de7e-4f38-80a7-e7ea8e34fe26</IDAddress>
            <AddressLine1>99 Castlereagh Street</AddressLine1>
            <AddressLine2 i:nil="true" />
            <City>NORTH SYDNEY</City>
            <State>NSW</State>
            <IDCountry>1013</IDCountry>
            <Country>Australia</Country>
            <PostCode>2001</PostCode>
            <LocRef>
                <IDLocation>6db14940-f906-4c20-949a-e332f6798336</IDLocation>
                <LatLng>
                    <Lat>-33.869738</Lat>
                    <Lng>151.209448</Lng>
                </LatLng>
            </LocRef>
        </AddressBilling>
        <Address>
            <IDAddress>2d69c03b-5b57-46b4-8d67-43d2f27d225a</IDAddress>
            <AddressLine1>91 Castlereagh Street</AddressLine1>
            <AddressLine2 i:nil="true" />
            <City>NORTH SYDNEY</City>
            <State>NSW</State>
            <IDCountry>1013</IDCountry>
            <Country>Australia</Country>
            <PostCode>2000</PostCode>
            <LocRef>
                <IDLocation>e97c85a5-62c0-4e13-bb63-ed8a43050360</IDLocation>
                <LatLng>
                    <Lat>-33.869738</Lat>
                    <Lng>151.209448</Lng>
                </LatLng>
            </LocRef>
        </Address>
        <AccountOwner>00000000-0000-0000-0000-000000000000</AccountOwner>
        <Notes>
            <NoteObj>
                <IDNote>05629a9b-2869-4197-82af-b6f975be93c8</IDNote>
                <IDEntity>5f3f2135-d0f5-47a4-906e-7274b0128054</IDEntity>
                <IDNoteType>77d5d244-eb29-4b5b-8b14-87d92b4215ea</IDNoteType>
                <Type>General</Type>
                <NoteInfo>Contact the front desk for assistance</NoteInfo>
            </NoteObj>
            <NoteObj>
                <IDNote>cf67b514-3ba2-44d9-82f0-c0d5f8d57816</IDNote>
                <IDEntity>5f3f2135-d0f5-47a4-906e-7274b0128054</IDEntity>
                <IDNoteType>77d5d244-eb29-4b5b-8b14-87d92b4215ea</IDNoteType>
                <Type>General</Type>
                <NoteInfo>Entry is via 120 King st - last driveway on right before Castlereagh st.</NoteInfo>
            </NoteObj>
        </Notes>
    </Customer>
    <Contact>
        <IDContact>cd62aad8-9e0d-408a-827b-c620ff9b3598</IDContact>
        <ContactRef>4713828</ContactRef>
        <IDSite>20058233-7388-418b-9193-6b57e28604f9</IDSite>
        <Site>SYD</Site>
        <Types />
        <Salutation>Mr</Salutation>
        <FirstName>John</FirstName>
        <LastName>Peterson</LastName>
        <Email>j.peterson@gmal.com</Email>
        <Phone>(02) 9506 3560</Phone>
        <Mobile>0412 544 654</Mobile>
        <Fax>9567 680</Fax>
        <BirthDate i:nil="true" />
        <Position />
        <Department />
        <IDStatus>926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa</IDStatus>
        <Status>Active</Status>
        <Customer>
            <IDCustomer>5f3f2135-d0f5-47a4-906e-7274b0128054</IDCustomer>
            <IDSite>20058233-7388-418b-9193-6b57e28604f9</IDSite>
            <Site>SYD</Site>
            <Types>
                <TypeObj>
                    <IDType>4d819963-731c-41fd-9378-fd7a10199b78</IDType>
                    <Type>Associates</Type>
                </TypeObj>
                <TypeObj>
                    <IDType>27ec5309-9426-4a05-b51c-532f8582c436</IDType>
                    <Type>Financial</Type>
                </TypeObj>
                <TypeObj>
                    <IDType>21a952eb-089e-467a-98bf-f8cb9a0ebd88</IDType>
                    <Type>Producer</Type>
                </TypeObj>
            </Types>
            <IDStatus>926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa</IDStatus>
            <Status>Active</Status>
            <Parent i:nil="true" />
            <CompanyName>North Bunting Supplies</CompanyName>
            <CompanyNo>111 222 3333</CompanyNo>
            <CustomerRef>7193032</CustomerRef>
            <Phone>9575 545</Phone>
            <Mobile>0414 656 654</Mobile>
            <Fax>654 654 124</Fax>
            <Council>Sydney</Council>
            <WebSite>http://www.buntingsupplies.com.au</WebSite>
            <AddressBilling>
                <IDAddress>368321fe-de7e-4f38-80a7-e7ea8e34fe26</IDAddress>
                <AddressLine1>99 Castlereagh Street</AddressLine1>
                <AddressLine2 i:nil="true" />
                <City>NORTH SYDNEY</City>
                <State>NSW</State>
                <IDCountry>1013</IDCountry>
                <Country>Australia</Country>
                <PostCode>2001</PostCode>
                <LocRef>
                    <IDLocation>6db14940-f906-4c20-949a-e332f6798336</IDLocation>
                    <LatLng>
                        <Lat>-33.869738</Lat>
                        <Lng>151.209448</Lng>
                    </LatLng>
                </LocRef>
            </AddressBilling>
            <Address>
                <IDAddress>2d69c03b-5b57-46b4-8d67-43d2f27d225a</IDAddress>
                <AddressLine1>91 Castlereagh Street</AddressLine1>
                <AddressLine2 i:nil="true" />
                <City>NORTH SYDNEY</City>
                <State>NSW</State>
                <IDCountry>1013</IDCountry>
                <Country>Australia</Country>
                <PostCode>2000</PostCode>
                <LocRef>
                    <IDLocation>e97c85a5-62c0-4e13-bb63-ed8a43050360</IDLocation>
                    <LatLng>
                        <Lat>-33.869738</Lat>
                        <Lng>151.209448</Lng>
                    </LatLng>
                </LocRef>
            </Address>
            <AccountOwner>00000000-0000-0000-0000-000000000000</AccountOwner>
            <Notes>
                <NoteObj>
                    <IDNote>05629a9b-2869-4197-82af-b6f975be93c8</IDNote>
                    <IDEntity>5f3f2135-d0f5-47a4-906e-7274b0128054</IDEntity>
                    <IDNoteType>77d5d244-eb29-4b5b-8b14-87d92b4215ea</IDNoteType>
                    <Type>General</Type>
                    <NoteInfo>Contact the front desk for assistance</NoteInfo>
                </NoteObj>
                <NoteObj>
                    <IDNote>cf67b514-3ba2-44d9-82f0-c0d5f8d57816</IDNote>
                    <IDEntity>5f3f2135-d0f5-47a4-906e-7274b0128054</IDEntity>
                    <IDNoteType>77d5d244-eb29-4b5b-8b14-87d92b4215ea</IDNoteType>
                    <Type>General</Type>
                    <NoteInfo>Entry is via 120 King st - last driveway on right before Castlereagh st.</NoteInfo>
                </NoteObj>
            </Notes>
        </Customer>
        <Address>
            <IDAddress>b8ec4614-cbcc-4a20-9bc3-64ab2ba89fda</IDAddress>
            <AddressLine1>26 Wolongong ROad</AddressLine1>
            <AddressLine2 i:nil="true" />
            <City>ARNCLIFFE</City>
            <State>NSW</State>
            <IDCountry>1013</IDCountry>
            <Country>Australia</Country>
            <PostCode>2205</PostCode>
            <LocRef>
                <IDLocation>2be70140-b953-4935-b075-02660288bb1e</IDLocation>
                <LatLng>
                    <Lat>-33.934813</Lat>
                    <Lng>151.146104</Lng>
                </LatLng>
            </LocRef>
        </Address>
        <Notes>
            <NoteObj>
                <IDNote>5b4dac63-e226-4270-99d3-17e289115ba7</IDNote>
                <IDEntity>cd62aad8-9e0d-408a-827b-c620ff9b3598</IDEntity>
                <IDNoteType>2b11efc3-2a43-4c03-92ac-923e77f821a2</IDNoteType>
                <Type>Important</Type>
                <NoteInfo>Maincontact for organisation</NoteInfo>
            </NoteObj>
        </Notes>
    </Contact>
    <DueDate>2014-10-06T10:55:00Z</DueDate>
    <Address>
        <IDAddress>362eb124-d124-4a47-ba94-6585e8bf4426</IDAddress>
        <AddressLine1>91 Castlereagh Street</AddressLine1>
        <AddressLine2 i:nil="true" />
        <City>NORTH SYDNEY</City>
        <State>NSW</State>
        <IDCountry>1013</IDCountry>
        <Country>Australia</Country>
        <PostCode>2000</PostCode>
        <LocRef>
            <IDLocation>3ac45077-b768-4264-b085-506892b46691</IDLocation>
            <LatLng>
                <Lat>-33.869738</Lat>
                <Lng>151.209448</Lng>
            </LatLng>
        </LocRef>
    </Address>
    <AddressDelivery>
        <IDAddress>9f446daf-c80f-4112-9e1f-c8d867632e38</IDAddress>
        <AddressLine1>91 Castlereagh Street</AddressLine1>
        <AddressLine2 i:nil="true" />
        <City>NORTH SYDNEY</City>
        <State>NSW</State>
        <IDCountry>1013</IDCountry>
        <Country>Australia</Country>
        <PostCode>2000</PostCode>
        <LocRef>
            <IDLocation>4e878177-7de5-431e-b843-3ecdc4b6e8f0</IDLocation>
            <LatLng>
                <Lat>-33.869738</Lat>
                <Lng>151.209448</Lng>
            </LatLng>
        </LocRef>
    </AddressDelivery>
    <CustFields xmlns:a="http://schemas.datacontract.org/2004/07/">
        <a:CF>
            <a:CustomFieldObj>
                <a:Order>1</a:Order>
                <a:IDCF>ac0a7cf2-2496-4147-a8e0-f679a538f3bc</a:IDCF>
                <a:Name># Containers</a:Name>
                <a:Type>Number</a:Type>
                <a:Descr>Number of containers required</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>NCNT</a:Abrev>
                <a:VDate />
                <a:VDec>22</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>2</a:Order>
                <a:IDCF>55535646-a0d5-48d9-b718-e5abdc792192</a:IDCF>
                <a:Name>Fruit/Veg/Salad</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Fruit, Vegetables and Salad</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>FVS</a:Abrev>
                <a:VDate />
                <a:VDec>1</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>3</a:Order>
                <a:IDCF>d4602f75-d0b1-46b4-968b-549cfac7ef79</a:IDCF>
                <a:Name>Cooked Meals</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Cooked Meals</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>CM</a:Abrev>
                <a:VDate />
                <a:VDec>2</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>4</a:Order>
                <a:IDCF>122727dc-b753-4a39-8fb2-921a2b483523</a:IDCF>
                <a:Name>Sandwiches</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Sandwiches</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>S</a:Abrev>
                <a:VDate />
                <a:VDec>3</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>5</a:Order>
                <a:IDCF>b980cf94-c37c-49fe-bcc1-ff63c552923f</a:IDCF>
                <a:Name>Dairy</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Dairy</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>D</a:Abrev>
                <a:VDate />
                <a:VDec>45</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>6</a:Order>
                <a:IDCF>9edc2d59-36d9-40ce-87d0-cb0250098787</a:IDCF>
                <a:Name>Raw Meat</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Raw Meat</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>RM</a:Abrev>
                <a:VDate />
                <a:VDec>6</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>7</a:Order>
                <a:IDCF>fa609e1c-4775-414f-af6c-e957cff27eaf</a:IDCF>
                <a:Name>Raw Meat Used By</a:Name>
                <a:Type>Date</a:Type>
                <a:Descr>Raw Meat Used By date. The date in which the raw meat expires.</a:Descr>
                <a:DV />
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>false</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>RME</a:Abrev>
                <a:VDate />
                <a:VDec>0</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>8</a:Order>
                <a:IDCF>313c714f-2f8d-4638-98f2-b18be1155e1d</a:IDCF>
                <a:Name>Deserts and Pastries</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Deserts and Pastries</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>DP</a:Abrev>
                <a:VDate />
                <a:VDec>0</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>9</a:Order>
                <a:IDCF>e24167b0-6bb0-4cc6-8e03-ee85ee233d52</a:IDCF>
                <a:Name>Bread</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Bread</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>B</a:Abrev>
                <a:VDate />
                <a:VDec>0</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>10</a:Order>
                <a:IDCF>3013af25-b9c8-4c5d-b74d-a6c9bddf2120</a:IDCF>
                <a:Name>Dry Stock</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Dry Stock</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>DS</a:Abrev>
                <a:VDate />
                <a:VDec>0</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>11</a:Order>
                <a:IDCF>7c8039fe-681d-4ffe-a0c6-1b58c2c5c635</a:IDCF>
                <a:Name>Dry Stock Used By</a:Name>
                <a:Type>Date</a:Type>
                <a:Descr>Dry Stock used by date</a:Descr>
                <a:DV />
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>false</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>DSU</a:Abrev>
                <a:VDate />
                <a:VDec>0</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
            <a:CustomFieldObj>
                <a:Order>12</a:Order>
                <a:IDCF>6117a168-bfc3-482a-b0ef-74edb8b85ca8</a:IDCF>
                <a:Name>Drinks</a:Name>
                <a:Type>Measurement</a:Type>
                <a:Descr>Drinks</a:Descr>
                <a:DV>0</a:DV>
                <a:DP>0</a:DP>
                <a:AddV>1</a:AddV>
                <a:Mand>true</a:Mand>
                <a:ML>0</a:ML>
                <a:Abrev>DRINK</a:Abrev>
                <a:VDate />
                <a:VDec>0</a:VDec>
                <a:VStr />
                <a:VID i:nil="true" />
            </a:CustomFieldObj>
        </a:CF>
    </CustFields>
    <Notes />
    <Items />
</JobObj>

Add Job Basic

Add the following contents to a file called "add_job_basic.data"

{
  "IDJobType": "49b86bf8-a610-4594-baea-30b76c21974d",
  "IDContact": "cd62aad8-9e0d-408a-827b-c620ff9b3598",
  "IDSite": "20058233-7388-418b-9193-6b57e28604f9",
  "Address": {
    "AddressLine1": "91 Castlereagh Street",
    "AddressLine2": null,
    "City": "NORTH SYDNEY",
    "State": "NSW",
    "Country": "Australia",
    "PostCode": "2000",
    "LocRef": {
      "IDLocation": "3ac45077-b768-4264-b085-506892b46691",
      "LatLng": {
        "Lat": -33.869738,
        "Lng": 151.209448
      }
    }
  }
}

Run the follow cURL command

curl -X POST -d add_job_basic.data  \
-H "Content-Type: application/json"  \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/jobs

Add Job Complicated

Add the following contents to a file called "add_job_complicated.data"

{
  "IDJobType": "49b86bf8-a610-4594-baea-30b76c21974d",
  "IDSite": "20058233-7388-418b-9193-6b57e28604f9",
  "IDStatus": "a610305a-1a34-4c3d-b271-d710ba6b3be3",
  "IDCustomer": "5f3f2135-d0f5-47a4-906e-7274b0128054",
  "IDContact": "cd62aad8-9e0d-408a-827b-c620ff9b3598",
  "DueDate": "2014-10-06T10:55:00Z",
  "Address": {
    "AddressLine1": "91 Castlereagh Street",
    "AddressLine2": null,
    "City": "NORTH SYDNEY",
    "State": "NSW",
    "Country": "Australia",
    "PostCode": "2000",
    "LocRef": {
      "IDLocation": "3ac45077-b768-4264-b085-506892b46691",
      "LatLng": {
        "Lat": -33.869738,
        "Lng": 151.209448
      }
    }
  },
  "AddressDelivery": {
    "AddressLine1": "200 George St",
    "AddressLine2": null,
    "City": "SYDNEY",
    "State": "NSW",
    "Country": "Australia",
    "PostCode": "2000",
    "LocRef": {
      "IDLocation": "4e878177-7de5-431e-b843-3ecdc4b6e8f0",
      "LatLng": {
        "Lat": -33.869738,
        "Lng": 151.209448
      }
    }
  },
  "CustFields": {
    "CF": [
      {
        "IDCF": "ac0a7cf2-2496-4147-a8e0-f679a538f3bc",
        "VDec": 33
      },
      {
        "IDCF": "55535646-a0d5-48d9-b718-e5abdc792192",
        "VDec": 34
      }
    ]
  },
  "Notes": [
    {
      "IDNoteType": "77d5d244-eb29-4b5b-8b14-87d92b4215ea",
      "NoteInfo": "This just came in from the web"
    }
  ],
  "Items": [
    
  ]
}

Run the follow cURL command

curl -X POST -d add_job_complicated.data  \
-H "Content-Type: application/json"  \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/jobs

Update job

Add the following contents to a file calls "update_job.data"

 {
  "IDSite": "20058233-7388-418b-9193-6b57e28604f9",
  "IDShift": "1b64b18f-2799-4e18-a9ee-b483323b4153",
  "JobOrder": 5,
  "DueDate": "2014-10-06T14:55:00Z",
  "Address": {
    "AddressLine1": "22 Castlereagh Driver",
    "City": "SYDNEY"
  },
  "AddressDelivery": {
    "AddressLine1": "300 George Drive"
    
  },
  "CustFields": {
    "CF": [
      {
        "IDCF": "ac0a7cf2-2496-4147-a8e0-f679a538f3bc",
        "VDec": "10"
      },
      {
        "IDCF": "55535646-a0d5-48d9-b718-e5abdc792192",
        "VDec": 11
      },
      {
        "IDCF": "d4602f75-d0b1-46b4-968b-549cfac7ef79",
        "VDec": 12
      },
      {
        "IDCF": "122727dc-b753-4a39-8fb2-921a2b483523",
        "VDec": 13
      }
    ]
  },
  "Notes": [
    {
      "IDNoteType": "77d5d244-eb29-4b5b-8b14-87d92b4215ea",
      "NoteInfo": "Additional note for the job"
    }
  ]
}

Run the follow cURL command

curl -X POST -d update_customer.data  \
-H "Content-Type: application/json"  \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/jobs/[IDJob]

 

Delete a job

curl  -X DELETE \
-H "Content-Type: application/json"  \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/delete/fde3e1d7-5a7c-493d-b49f-dd514fa3b3af

  • No labels