Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Code Block
 {
  "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

Code Block
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/[idcontact to updateIDJob]

 

Delete a job

Code Block
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