{
  "item": [
    {
      "name": "reference",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "GET /company",
          "request": {
            "name": "Read the company the key belongs to: its wording, timezone, statuses, status labels and Type label.",
            "description": {},
            "url": {
              "path": [
                "company"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [],
              "raw": "{{base_url}}/company"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /projects",
          "request": {
            "name": "List the projects the key can see, oldest first, a page at a time.",
            "description": {},
            "url": {
              "path": [
                "projects"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                }
              ],
              "variable": [],
              "raw": "{{base_url}}/projects?limit=50&cursor=<string>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /projects/{projectId}",
          "request": {
            "name": "Read one project.",
            "description": {},
            "url": {
              "path": [
                "projects",
                ":projectId"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "projectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/projects/:projectId"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /projects/{projectId}/locations",
          "request": {
            "name": "List a project's locations as a flat list, oldest first, a page at a time.",
            "description": {},
            "url": {
              "path": [
                "projects",
                ":projectId",
                "locations"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                }
              ],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "projectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/projects/:projectId/locations?limit=50&cursor=<string>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /trades",
          "request": {
            "name": "List the trades defects can be issued to, oldest first, a page at a time.",
            "description": {},
            "url": {
              "path": [
                "trades"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                }
              ],
              "variable": [],
              "raw": "{{base_url}}/trades?limit=50&cursor=<string>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "name": "defects",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "GET /defects",
          "request": {
            "name": "List the defects the key can see, oldest first, a page at a time.",
            "description": {
              "content": "Without updated_since the list is every defect the key can see, ordered by when it was created. With updated_since it is a sync: only defects that changed at or after that moment, ordered by when they last changed, with each deleted defect as a deletion marker of five keys. A walk is bounded by the as_of returned on its first page, so it always ends; a change made while you walk is returned by your next sync, which should start from that as_of. An updated_since older than 90 days is refused with the error code sync_window_expired: run a full resync without updated_since.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                },
                {
                  "disabled": true,
                  "key": "project_id",
                  "value": "<uuid>",
                  "description": "Only the defects of this project. A project the key cannot see, or that does not exist, is answered exactly as GET /v1/projects/{projectId} answers it: not_found."
                },
                {
                  "disabled": true,
                  "key": "status",
                  "value": "<string>",
                  "description": "Only defects in this status. Repeat the parameter for several, as status=open&status=fixed. Naming a status twice is the same as naming it once. Deletion markers in a sync list are not filtered by status."
                },
                {
                  "disabled": true,
                  "key": "status",
                  "value": "<string>",
                  "description": "Only defects in this status. Repeat the parameter for several, as status=open&status=fixed. Naming a status twice is the same as naming it once. Deletion markers in a sync list are not filtered by status."
                },
                {
                  "disabled": true,
                  "key": "external_system",
                  "value": "<string>",
                  "description": "The short lower case name you chose for your own system. Send it with external_id, never alone. Finds the defect that carries your id for it."
                },
                {
                  "disabled": true,
                  "key": "external_id",
                  "value": "<string>",
                  "description": "Your own id for the defect, one to 200 characters with no control characters. Send it with external_system, never alone."
                },
                {
                  "disabled": true,
                  "key": "updated_since",
                  "value": "<dateTime>",
                  "description": "Return only defects that changed at or after this moment, with deletions as markers (a sync). It must end in Z or an offset such as +10:00 (percent-encode the plus sign), and may carry up to six fractional digits. A value older than 90 days is refused with sync_window_expired: run a full resync without it. Start each sync a few minutes before the as_of of the last one."
                }
              ],
              "variable": [],
              "raw": "{{base_url}}/defects?limit=50&cursor=<string>&project_id=<uuid>&status=<string>&status=<string>&external_system=<string>&external_id=<string>&updated_since=<dateTime>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "POST /defects",
          "request": {
            "name": "Create a defect.",
            "description": {
              "content": "Raises a defect in a project the key can see, exactly as a person raising it in the app would. Only project_id and description are required. Omitted, the priority is medium, the type is defect and the fix-by day (due_date) is three days after creation; send due_date as null for no fix-by day. If the company requires a location on every new defect, location_id is required too. The defect is numbered like any other, is created by the API user named after the key, and reads modified_source api. The response is the defect exactly as GET /v1/defects/{defectId} returns it, and the Location header holds its address. Send external_ids to keep your own ids on the defect: each is a system name you choose and your id in it, and GET /v1/defects?external_system=&external_id= finds the defect by any of them. An id another defect in the company already holds for the same system is refused with external_id_conflict, so a retry that is unsure whether the first call worked can look the defect up by its id.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [],
              "raw": "{{base_url}}/defects"
            },
            "header": [
              {
                "disabled": true,
                "description": "A key of 1 to 255 printable ASCII characters that you choose for this request. Send the same key and the same request again, for example after a timeout, and you get the first answer back with Idempotent-Replayed: true instead of a second defect. The same key with a different request is refused. Keys are kept for 24 hours.",
                "key": "Idempotency-Key",
                "value": "<string>"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_id\": \"<uuid>\",\n  \"description\": \"<string>\",\n  \"custom_type_id\": \"<uuid>\",\n  \"due_date\": \"<date>\",\n  \"external_ids\": [\n    {\n      \"system\": \"<string>\",\n      \"id\": \"<string>\"\n    },\n    {\n      \"system\": \"<string>\",\n      \"id\": \"<string>\"\n    }\n  ],\n  \"location_id\": \"<uuid>\",\n  \"priority\": \"<string>\",\n  \"type\": \"<string>\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /defects/{defectId}",
          "request": {
            "name": "Read one defect.",
            "description": {},
            "url": {
              "path": [
                "defects",
                ":defectId"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "PATCH /defects/{defectId}",
          "request": {
            "name": "Change a defect.",
            "description": {
              "content": "Changes only the fields you send; every field you leave out keeps its value. You can change description, priority, type, custom_type_id, due_date, location_id and external_ids. Send due_date or custom_type_id as null to clear it; description, priority, type and location_id cannot be null. An empty object changes nothing. A request that asks for what the defect already is changes nothing and notifies no one, and the answer carries the same ETag. external_ids is merged system by system: a system with an id sets or replaces it, a system with id null removes it, and a system you do not list is kept. The response is the defect exactly as GET /v1/defects/{defectId} returns it. A key limited to some projects can change only the defects its own API user raised; a key for all projects can change any defect it can see. Send the ETag you last read in If-Match to change the defect only if nobody else has: if it changed since, nothing is written and the answer is 412 precondition_failed carrying the current ETag. If-Match also accepts *, and a list of ETags.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId"
            },
            "header": [
              {
                "disabled": true,
                "description": "The ETag you last read for this defect, as sent in the ETag header of a read or a write, for example \"abc\". The change is made only if the defect still has that ETag; otherwise nothing is written and the answer is 412 with the current ETag. * means any current version, and a comma-separated list of ETags is accepted.",
                "key": "If-Match",
                "value": "<string>"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "PATCH",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"custom_type_id\": \"<uuid>\",\n  \"description\": \"<string>\",\n  \"due_date\": \"<date>\",\n  \"external_ids\": [\n    {\n      \"system\": \"<string>\",\n      \"id\": \"<string>\"\n    },\n    {\n      \"system\": \"<string>\",\n      \"id\": \"<string>\"\n    }\n  ],\n  \"location_id\": \"<uuid>\",\n  \"priority\": \"<string>\",\n  \"type\": \"<string>\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "POST /defects/{defectId}/close",
          "request": {
            "name": "Close a defect.",
            "description": {
              "content": "Closes the defect exactly as a manager pressing Close in the app would: every Issued To line the defect has is closed with it, and the defect reads closed with closed_at set. Closing a defect that is already closed changes nothing. Only a key for all projects can close a defect; a key limited to some projects is refused with 403 forbidden whatever the defect. The request takes no body fields. If the company requires a root cause before a defect is closed and this defect has none, the answer is 409 action_not_available with the detail code root_cause_required, because the Public API cannot set a root cause yet. The response is the defect exactly as GET /v1/defects/{defectId} returns it.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "close"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/close"
            },
            "header": [
              {
                "disabled": true,
                "description": "The ETag you last read for this defect, as sent in the ETag header of a read or a write, for example \"abc\". The change is made only if the defect still has that ETag; otherwise nothing is written and the answer is 412 with the current ETag. * means any current version, and a comma-separated list of ETags is accepted.",
                "key": "If-Match",
                "value": "<string>"
              },
              {
                "disabled": true,
                "description": "A key of 1 to 255 printable ASCII characters that you choose for this request. Send the same key and the same request again, for example after a timeout, and you get the first answer back with Idempotent-Replayed: true instead of a second defect. The same key with a different request is refused. Keys are kept for 24 hours.",
                "key": "Idempotency-Key",
                "value": "<string>"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "POST /defects/{defectId}/issued-to",
          "request": {
            "name": "Issue a defect to a trade.",
            "description": {
              "content": "Issues the defect to one of the company's trades, exactly as a person adding the trade under Issued To in the app would: the defect gets a new Issued To line for that trade, and the defect's status follows from its lines as it does in the app. Send trade_id from GET /v1/trades. due_date is the day this trade should fix the defect by; left out, it is three days after the defect was created, and null means no fix-by day for this line. Send notify_trade as false to issue the defect without emailing the trade; your own staff are still told. Issuing a trade that already has an open or pending line on the defect changes nothing. A defect can be issued to at most 11 trades. A key limited to some projects can issue trades only on the defects its own API user raised. The response is the defect exactly as GET /v1/defects/{defectId} returns it.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "issued-to"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/issued-to"
            },
            "header": [
              {
                "disabled": true,
                "description": "The ETag you last read for this defect, as sent in the ETag header of a read or a write, for example \"abc\". The change is made only if the defect still has that ETag; otherwise nothing is written and the answer is 412 with the current ETag. * means any current version, and a comma-separated list of ETags is accepted.",
                "key": "If-Match",
                "value": "<string>"
              },
              {
                "disabled": true,
                "description": "A key of 1 to 255 printable ASCII characters that you choose for this request. Send the same key and the same request again, for example after a timeout, and you get the first answer back with Idempotent-Replayed: true instead of a second defect. The same key with a different request is refused. Keys are kept for 24 hours.",
                "key": "Idempotency-Key",
                "value": "<string>"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"trade_id\": \"<uuid>\",\n  \"due_date\": \"<date>\",\n  \"notify_trade\": \"<boolean>\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "DELETE /defects/{defectId}/issued-to/{tradeId}",
          "request": {
            "name": "Take a defect off a trade.",
            "description": {
              "content": "Removes the trade from the defect's Issued To, exactly as a person removing it in the app would: every line the defect has for that trade is removed, and the defect's status follows from the lines that are left. Removing a trade that has no line on the defect changes nothing. A key limited to some projects can remove trades only on the defects its own API user raised. The response is the defect exactly as GET /v1/defects/{defectId} returns it.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "issued-to",
                ":tradeId"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                },
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "tradeId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/issued-to/:tradeId"
            },
            "header": [
              {
                "disabled": true,
                "description": "The ETag you last read for this defect, as sent in the ETag header of a read or a write, for example \"abc\". The change is made only if the defect still has that ETag; otherwise nothing is written and the answer is 412 with the current ETag. * means any current version, and a comma-separated list of ETags is accepted.",
                "key": "If-Match",
                "value": "<string>"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "DELETE"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /defects/{defectId}/notes",
          "request": {
            "name": "List a defect's notes, oldest first, a page at a time.",
            "description": {
              "content": "The live notes of the defect, each with its audience: staff (only the company's own people), trade, tenant, client or everyone. A key reads notes of every audience, so check the audience before showing a note to anyone outside the company. Deleted notes are never returned. Reading notes through the API changes nothing in IssuesID: it is not counted as someone having read the conversation.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "notes"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                }
              ],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/notes?limit=50&cursor=<string>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "POST /defects/{defectId}/notes",
          "request": {
            "name": "Add a staff note to a defect.",
            "description": {
              "content": "Adds a note to the defect's conversation, exactly as a staff member adding a note in the app would, with one difference: a note added through the Public API is always staff only. Only the company's own people see it, and nobody outside the company is emailed or told about it, so there is no audience field and any other key in the body is refused with 422 unknown_field. Send body as plain text of at least one visible character and at most 10,000; it is stored and returned exactly as sent. Text such as @Jane Smith stays plain text: it does not tag anyone, give anyone access to the defect or send a mention notification, though the company's staff are told about the note as they are for a note added in the app. The note is written by the API user named after the key, and the defect's modified_at and ETag move. A key limited to some projects can add a note to any defect it can see, including one it did not raise. The response is the note exactly as GET /v1/defects/{defectId}/notes lists it.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "notes"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/notes"
            },
            "header": [
              {
                "disabled": true,
                "description": "A key of 1 to 255 printable ASCII characters that you choose for this request. Send the same key and the same request again, for example after a timeout, and you get the first answer back with Idempotent-Replayed: true instead of a second defect. The same key with a different request is refused. Keys are kept for 24 hours.",
                "key": "Idempotency-Key",
                "value": "<string>"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"body\": \"<string>\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /defects/{defectId}/photos",
          "request": {
            "name": "List a defect's photos, oldest upload first, a page at a time.",
            "description": {
              "content": "The confirmed photos of the defect. Each photo has a download link (url) and, once the small version has been made, a thumbnail link (thumbnail_url). The links are made for the request and stop working at url_expires_at, one hour later; the response must not be cached, so ask again when you need a photo rather than keeping a link. Other files attached to the defect, such as PDFs, are not listed, and neither is who took a photo or where.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "photos"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                }
              ],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/photos?limit=50&cursor=<string>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "POST /defects/{defectId}/photos",
          "request": {
            "name": "Start a photo upload on a defect.",
            "description": {
              "content": "The first of three steps to add a photo to a defect. 1. Send file_name, content_type (image/jpeg, image/png, image/webp, image/heic or image/heif) and size_bytes (1 to 26,214,400, the exact size of the file). The answer holds a photo_id and an upload_url. 2. Send the file's bytes to upload_url with the HTTP method in upload_method, the headers in upload_headers exactly as given and exactly size_bytes bytes as the body, before upload_expires_at, 15 minutes after the answer. The link accepts only that type and that size. 3. Confirm the upload with the photo_id; until then the photo does not exist: it is not listed by GET /v1/defects/{defectId}/photos and does not appear on the defect. Send captured_at when you know when the photo was taken. A key limited to some projects can add a photo to any defect it can see. The answer must not be cached. A repeated request with the same Idempotency-Key and body returns the same photo_id with a freshly signed upload_url and the header Idempotent-Replayed: true, and makes no second upload.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "photos"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/photos"
            },
            "header": [
              {
                "disabled": true,
                "description": "A key of 1 to 255 printable ASCII characters that you choose for this request. Send the same key and the same request again, for example after a timeout, and you get the first answer back with Idempotent-Replayed: true instead of a second defect. The same key with a different request is refused. Keys are kept for 24 hours.",
                "key": "Idempotency-Key",
                "value": "<string>"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"file_name\": \"<string>\",\n  \"content_type\": \"<string>\",\n  \"size_bytes\": \"<integer>\",\n  \"captured_at\": \"<dateTime>\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "POST /defects/{defectId}/photos/{photoId}/confirm",
          "request": {
            "name": "Confirm a photo upload.",
            "description": {
              "content": "The third step to add a photo to a defect, after the file was sent to the upload_url of POST /v1/defects/{defectId}/photos. The photo_id is the one that answer gave. The file is checked first: it must have arrived, be exactly the size_bytes and content_type that were declared, and start with the bytes of that image format. If it has not arrived yet the answer is 409 upload_missing and nothing changes: finish the upload, then confirm again. If it arrived but is not what was declared the answer is 422 upload_rejected with one detail naming the reason (size_mismatch, too_large, type_mismatch or content_mismatch), the file and its upload record are removed, and you start again from POST /v1/defects/{defectId}/photos. Only a file that passes is confirmed; it is listed by GET /v1/defects/{defectId}/photos from then on, moves the defect modified_at and ETag once, and gets a thumbnail shortly after. The response is the photo exactly as that list returns it. Confirming a photo that is already confirmed changes nothing and answers the same, so a retry is safe. The check of the type, the size and the first bytes of the file runs once, at confirm, and is a best effort check of the file as it is then. The upload link itself stays writable until it expires, 15 minutes after it was issued, so confirm only after the upload has finished. The answer must not be cached.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "photos",
                ":photoId",
                "confirm"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                },
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "photoId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/photos/:photoId/confirm"
            },
            "header": [
              {
                "disabled": true,
                "description": "A key of 1 to 255 printable ASCII characters that you choose for this request. Send the same key and the same request again, for example after a timeout, and you get the first answer back with Idempotent-Replayed: true instead of a second defect. The same key with a different request is refused. Keys are kept for 24 hours.",
                "key": "Idempotency-Key",
                "value": "<string>"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "POST /defects/{defectId}/reopen",
          "request": {
            "name": "Reopen a closed defect.",
            "description": {
              "content": "Reopens a closed defect exactly as a manager pressing Reopen in the app would: its Issued To lines are opened again and the defect's status follows from them. Reopening a defect that is not closed changes nothing, and in particular never resets the progress a trade has recorded on its lines. Only a key for all projects can reopen a defect; a key limited to some projects is refused with 403 forbidden whatever the defect. The request takes no body fields. The response is the defect exactly as GET /v1/defects/{defectId} returns it.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "defects",
                ":defectId",
                "reopen"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "defectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/defects/:defectId/reopen"
            },
            "header": [
              {
                "disabled": true,
                "description": "The ETag you last read for this defect, as sent in the ETag header of a read or a write, for example \"abc\". The change is made only if the defect still has that ETag; otherwise nothing is written and the answer is 412 with the current ETag. * means any current version, and a comma-separated list of ETags is accepted.",
                "key": "If-Match",
                "value": "<string>"
              },
              {
                "disabled": true,
                "description": "A key of 1 to 255 printable ASCII characters that you choose for this request. Send the same key and the same request again, for example after a timeout, and you get the first answer back with Idempotent-Replayed: true instead of a second defect. The same key with a different request is refused. Keys are kept for 24 hours.",
                "key": "Idempotency-Key",
                "value": "<string>"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "name": "diary",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "GET /diary-entries",
          "request": {
            "name": "List the diary entries the key can see, oldest first, a page at a time.",
            "description": {
              "content": "Every entry the key can see, ordered by when it was created, each with its subcontractors, labour, delays, plant and visitors. Drafts are included, with status draft. Filter by project_id, by from and to (inclusive bounds on entry_date) and by status. A walk is bounded by the as_of returned on its first page, so it always ends. A submitted entry can still change, because site gate sign-ins and approved timesheets write into it, so read modified_at to see whether your copy is current.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "diary-entries"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                },
                {
                  "disabled": true,
                  "key": "project_id",
                  "value": "<uuid>",
                  "description": "Only the entries of this project. A project the key cannot see, or that does not exist, is answered exactly as GET /v1/projects/{projectId} answers it: not_found."
                },
                {
                  "disabled": true,
                  "key": "from",
                  "value": "<date>",
                  "description": "Only entries on or after this day, as YYYY-MM-DD. It is an inclusive bound on entry_date. It must be a real calendar day."
                },
                {
                  "disabled": true,
                  "key": "to",
                  "value": "<date>",
                  "description": "Only entries on or before this day, as YYYY-MM-DD. It is an inclusive bound on entry_date. It must be a real calendar day and not before from."
                },
                {
                  "disabled": true,
                  "key": "status",
                  "value": "<string>",
                  "description": "Only entries in this status: draft or submitted."
                },
                {
                  "disabled": true,
                  "key": "updated_since",
                  "value": "<dateTime>",
                  "description": "Return only entries that changed at or after this moment, with deletions as markers (a sync). An entry changes when its header, its status or any section line under it changes. It must end in Z or an offset such as +10:00 (percent-encode the plus sign), and may carry up to six fractional digits. A value older than 90 days is refused with sync_window_expired: run a full resync without it. The status, from and to filters do not remove deletion markers; project_id does. Start each sync a few minutes before the as_of of the last one."
                }
              ],
              "variable": [],
              "raw": "{{base_url}}/diary-entries?limit=50&cursor=<string>&project_id=<uuid>&from=<date>&to=<date>&status=<string>&updated_since=<dateTime>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /diary-entries/{entryId}",
          "request": {
            "name": "Read one diary entry with its day sections.",
            "description": {
              "content": "The entry carries its subcontractors, labour, delays, plant and visitors. Drafts are returned with status draft. A submitted entry can still change, because site gate sign-ins and approved timesheets write into it, so read modified_at to see whether your copy is current. An entry the key cannot see is answered exactly like one that does not exist.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "diary-entries",
                ":entryId"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "entryId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/diary-entries/:entryId"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "name": "forms",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "GET /form-submissions",
          "request": {
            "name": "List the filed forms of the company, oldest submitted first, a page at a time.",
            "description": {
              "content": "Each item is a lean summary of one submitted or closed form of either kind: who filed it, when, from which form and version, on which project and location, its status, title and severity, and when it last changed. It carries no question responses and no location reading from the phone: read each changed submission by id for those. Drafts are never listed, and a filed form is never deleted, so there are no deletion markers. A key that covers all projects sees every filed form of the company, including those filed with no project, except those on a deleted project. A key limited to some projects is refused with 403 forbidden, because the app shows that kind of user only the forms they filed themselves and the API user files none. Pass updated_since to read only the filed forms that changed since your last sync, then read each changed submission by id. A project_id the key cannot see is answered as not found, and a form_id the key cannot see returns an empty list.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "form-submissions"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                },
                {
                  "disabled": true,
                  "key": "project_id",
                  "value": "<uuid>",
                  "description": "Only the filed forms of this project. A project the key cannot see, or that does not exist, is answered exactly as GET /v1/projects/{projectId} answers it: not_found."
                },
                {
                  "disabled": true,
                  "key": "form_id",
                  "value": "<uuid>",
                  "description": "Only the forms filed from this form. A form id the key cannot see, or that does not exist, returns an empty list."
                },
                {
                  "disabled": true,
                  "key": "kind",
                  "value": "<string>",
                  "description": "Only filed forms of this kind: incident or general."
                },
                {
                  "disabled": true,
                  "key": "status",
                  "value": "<string>",
                  "description": "Only filed forms in this status: submitted or closed."
                },
                {
                  "disabled": true,
                  "key": "updated_since",
                  "value": "<dateTime>",
                  "description": "Return only filed forms that changed at or after this moment, ordered by when they changed (a sync). A filed form changes when it is submitted, closed or reopened, or when its contractor is merged into another. There are no deletion markers because a filed form is never deleted. It must end in Z or an offset such as +10:00 (percent-encode the plus sign), and may carry up to six fractional digits. A value older than 90 days is refused with sync_window_expired: run a full resync without it. Start each sync a few minutes before the as_of of the last one."
                }
              ],
              "variable": [],
              "raw": "{{base_url}}/form-submissions?limit=50&cursor=<string>&project_id=<uuid>&form_id=<uuid>&kind=<string>&status=<string>&updated_since=<dateTime>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /form-submissions/{submissionId}",
          "request": {
            "name": "Read one filed form with its answers.",
            "description": {
              "content": "Every key of the list item, plus the asset, worker and trade the form is about (each an id and a name, or null), the close note, the phone's own position when the form was filed (geo, a reading and not a verified position, null when none was asked for) and the answers. The answers hold one entry for every question of the version the form was filled against, in question order, information blocks excepted: the question id, its type and a value encoded by the type, or null when the question was not answered or the form hides it because of another answer. Photo answers list photo ids, which download from the photos of the submission. A signature answer lists who signed and when; the drawn image, the address and the device are never included. A draft, a form on a deleted project, another company's form and an id that does not exist all answer with the same not found error. A key limited to some projects is refused with 403 forbidden, whatever the id.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "form-submissions",
                ":submissionId"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "submissionId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/form-submissions/:submissionId"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /form-submissions/{submissionId}/photos",
          "request": {
            "name": "List a filed form's photos, oldest upload first, a page at a time.",
            "description": {
              "content": "The confirmed photos that the answers of the filed form name, for the questions the form shows. A photo of a question the form hides because of another answer is not listed, and neither is an upload that was never finished. Each photo has a download link (url) and, once the small version has been made, a thumbnail link (thumbnail_url). The links are made for the request and stop working at url_expires_at, one hour later; the response must not be cached, so ask again when you need a photo rather than keeping a link. Who took a photo and where are not listed. A draft, a form on a deleted project, another company's form and an id that does not exist all answer with the same not found error as the filed form itself. A key limited to some projects is refused with 403 forbidden, whatever the id.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "form-submissions",
                ":submissionId",
                "photos"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                }
              ],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "submissionId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/form-submissions/:submissionId/photos?limit=50&cursor=<string>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /forms",
          "request": {
            "name": "List the published form definitions the key can see, oldest first, a page at a time.",
            "description": {
              "content": "Each form is a company form that has been published, with its name, kind, project and the number of its latest published version. A draft that was never published is never listed. A new published version of a form shows as a higher current_version. A key that covers all projects sees every published form of both kinds, retired ones included with archived true. A key limited to some projects sees every published company form and the project forms of its own projects, and no archived form. There is no updated_since: this is a small list, so read it again to see changes. A company that has never opened its forms in the app may show no starter incident forms yet, because the Public API never creates anything when it reads.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "forms"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                }
              ],
              "variable": [],
              "raw": "{{base_url}}/forms?limit=50&cursor=<string>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /forms/{formId}",
          "request": {
            "name": "Read one published form definition.",
            "description": {
              "content": "The same object the list returns. A form the key cannot see, a form that was never published and a form that does not exist all answer with the same not found error.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "forms",
                ":formId"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "formId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/forms/:formId"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "name": "GET /forms/{formId}/versions/{version}",
          "request": {
            "name": "Read the questions of one published version of a form.",
            "description": {
              "content": "A published version never changes, so you can keep it. A filed form names the version it was filled against in its schema_version, and this route returns that version's questions. Questions that depend on another answer say so in visible_when. Defect-raising rules, embedded images and the form designer's settings are never included. A version number that is not a positive whole number is refused. A form the key cannot see answers with the not found error of a form, and a version the form does not have answers with the not found error of a form version.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "forms",
                ":formId",
                "versions",
                ":version"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "formId",
                  "description": "(Required) "
                },
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "version",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/forms/:formId/versions/:version"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "name": "me",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "GET /me",
          "request": {
            "name": "Show which key, company and projects this request is for.",
            "description": {},
            "url": {
              "path": [
                "me"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [],
              "variable": [],
              "raw": "{{base_url}}/me"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "name": "job-checklists",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "name": "GET /projects/{projectId}/job-checklist-tasks",
          "request": {
            "name": "List a project's job checklist tasks, oldest first, a page at a time.",
            "description": {
              "content": "Only a key that covers all projects can read job checklists. A key limited to some projects is refused with the error code forbidden, on a project it can see. A project the key cannot see at all is answered exactly like one that does not exist. Sort the tasks by stage_order, then sort_order, to show the checklist as the app does. There is no updated_since: a task removed in the app is deleted outright and leaves no marker, so to keep a copy in step, read each project's checklist again.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "projects",
                ":projectId",
                "job-checklist-tasks"
              ],
              "host": [
                "{{base_url}}"
              ],
              "query": [
                {
                  "disabled": true,
                  "key": "limit",
                  "value": "50",
                  "description": "How many rows to return. The most allowed is 200; a larger value is refused, not reduced."
                },
                {
                  "disabled": true,
                  "key": "cursor",
                  "value": "<string>",
                  "description": "The next_cursor from the previous page of this list. Leave it out for the first page. It only works with the same list and the same filters."
                }
              ],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "projectId",
                  "description": "(Required) "
                }
              ],
              "raw": "{{base_url}}/projects/:projectId/job-checklist-tasks?limit=50&cursor=<string>"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    }
  ],
  "event": [],
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.issuesid.com/v1",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "",
      "type": "string"
    }
  ],
  "info": {
    "name": "IssuesID Public API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": {
      "content": "Read and write a company's data in IssuesID over HTTPS with an API key.",
      "type": "text/plain"
    }
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  }
}
