Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
api:api_applicants_trackers [2014/06/25 11:09] Lauri Elevantapi:api_applicants_trackers [2020/05/11 15:53] – [Response example] Lauri Elevant
Line 15: Line 15:
   Content-Type: application/json   Content-Type: application/json
   Content-Length: 1234   Content-Length: 1234
 +
 +==== Response example ====
 +
 +  {
 +    "1": {
 +        "created": "2014-06-25T11:09:37+00:00",
 +        "code": "FAIR",
 +        "notes": "Some notes",
 +        "reduction": null
 +    },
 +    "3": {
 +        "created": "2014-06-25T16:47:24+00:00",
 +        "code": "INTERNET",
 +        "notes": "Some notes",
 +        "reduction": {
 +            "reduction": "Percent",
 +            "percent": 20
 +        }
 +    },
 +    
 +  }
  
  
 ===== POST ===== ===== POST =====
  
-Add a new tracker using any text (2 to 16 characters) as the tracker code. If a tracker with this code exists, a ''409 Conflict'' will be returned. You are expected to use the ''PUT'' verb to add **existing** flags to applicants, see [[api:api_applicants_123_trackers_agent|/api/applicants/123/trackers/AGENT]]+Add a new tracker using any text (2 to 16 characters) as the tracker code. The URI for the tracker created is returned in the ''Location'' header. 
 + 
 +If a tracker with this code exists, a ''409 Conflict'' will be returned, along with the URI of the offending tracker in the ''Location'' header.
  
-In any casethe URI for the tracker created (or the tracker conflicting) is returned in the ''Location'' header.+**This method simply creates a new trackerbut does not assign it to any applicants.** You can later ''PUT'' the tracker to any number of applicants using ''PUT'' [[api:api_applicants_id_trackers_id|/api/applicants/ID/trackers/ID]].
  
 ==== Syntax ==== ==== Syntax ====
Line 31: Line 54:
 ==== Parameters ==== ==== Parameters ====
  
-| ''name'' | **Required** | This is the unique tracker code, should be easily recognisable. 2 to 16 characters. |+^ Name ^  ^ Description ^ 
 +| ''code'' | **Required** | This is the unique tracker code, should be easily recognisable. 2 to 16 characters. |
 | ''notes'' | **Required** | This text will be used to additionally explain the meaning of the tracker code. 2 to 200 characters. | | ''notes'' | **Required** | This text will be used to additionally explain the meaning of the tracker code. 2 to 200 characters. |
  
Line 43: Line 67:
  
 | ''201 Created'' | New tracker was created | | ''201 Created'' | New tracker was created |
-| ''209 Conflict''Such a tracker already exists |+| ''409 Conflict''tracker with this code already exists |