{
    "openapi": "3.1.2",
    "info": {
        "title": "TradeOps API",
        "version": "1.0.0",
        "description": "The TradeOps API powers the TradeOps field app and customer integrations.\n\nGuides, conventions and examples live at https://docs.tradeops.cc.\n\n- **Base URL:** `https://api.tradeops.cc/v1`\n- **Authentication:** send `Authorization: Bearer {token}`. The field app gets a token from `POST /auth/token` or `POST /auth/phone/token`.\n- **Organisations:** most routes start with the organisation's slug, for example `/acme-retail/sync`. `GET /me` lists the organisations a member can use.\n- **Format:** resources follow [JSON:API](https://jsonapi.org) (`application/vnd.api+json`) and support `include` and sparse `fields[...]`. Sign-in and sync return plain JSON.\n- **Errors:** `401` without a valid token, `403` when the member's role or plan doesn't allow the call, `404` when a record doesn't exist in the organisation, `422` with an `errors` object for invalid input, `429` when rate limited.\n"
    },
    "servers": [
        {
            "url": "https://api.tradeops.cc/v1",
            "description": "Production"
        }
    ],
    "tags": [
        {
            "name": "Authentication",
            "description": "Sign in, sign out and find out who you are. Field-app tokens are issued per device."
        },
        {
            "name": "Sync",
            "description": "The offline package the field app keeps on the device."
        },
        {
            "name": "Visits",
            "description": "Visits (assignments) are store checks scheduled for a rep."
        },
        {
            "name": "Checklists",
            "description": "Checklists (audit types) define the fields a rep fills in on a store visit."
        },
        {
            "name": "Store checks",
            "description": "Store checks (submissions) are completed checklists."
        },
        {
            "name": "Customers",
            "description": "Customers are the stores and outlets reps visit."
        },
        {
            "name": "Campaigns",
            "description": "Campaigns group store visits around a promotion or launch."
        },
        {
            "name": "Follow-ups",
            "description": "Follow-ups (corrective actions) are issues raised by a store check that need fixing."
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "/auth/token": {
            "post": {
                "operationId": "auth.token",
                "description": "Returns a bearer token for the field app. Members who use two-factor sign-in must also send `code` or `recovery_code`; without one the response is a `422` with an error on `code`.",
                "summary": "Sign in with email and password",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IssuePasswordTokenRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "token": {
                                            "type": "string",
                                            "description": "The bearer token. Send it as `Authorization: Bearer {token}`. It doesn't expire; revoke it by signing out."
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "const": "Bearer"
                                        }
                                    },
                                    "required": [
                                        "token",
                                        "token_type"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "delete": {
                "operationId": "auth.token.destroy",
                "description": "Revokes the token used for this request. Other devices stay signed in.",
                "summary": "Sign out",
                "tags": [
                    "Authentication"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/phone/code": {
            "post": {
                "operationId": "auth.phone.code",
                "description": "Sends a six-digit code to the member's phone. The code lasts 10 minutes. The response is the same whether or not the number is registered. Each number can ask 3 times in 15 minutes.",
                "summary": "Text a sign-in code",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RequestPhoneCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "If this number is registered, we've sent a code."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/auth/phone/token": {
            "post": {
                "operationId": "auth.phone.token",
                "description": "Exchanges the code for a bearer token for the field app.",
                "summary": "Sign in with a texted code",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IssuePhoneTokenRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "token": {
                                            "type": "string",
                                            "description": "The bearer token. Send it as `Authorization: Bearer {token}`. It doesn't expire; revoke it by signing out."
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "const": "Bearer"
                                        }
                                    },
                                    "required": [
                                        "token",
                                        "token_type"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/me": {
            "get": {
                "operationId": "me",
                "description": "Returns the member behind the token and the organisations they can work in.",
                "summary": "The signed-in member",
                "tags": [
                    "Authentication"
                ],
                "parameters": [
                    {
                        "name": "fields[users]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "email",
                                    "phone",
                                    "avatar",
                                    "two_factor_enabled",
                                    "teams"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`UserResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/UserResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/sync": {
            "get": {
                "operationId": "sync",
                "description": "Everything the field app needs to work without a signal: the rep's open visits, the checklists they can submit, active customers and the campaigns behind their visits. Pass the previous `last_synced_at` as `since` to get only what changed. Campaigns are always sent in full.",
                "summary": "Download the offline package",
                "tags": [
                    "Sync"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "description": "The `last_synced_at` from the previous sync. Leave it out for a full download.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "assignments": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "campaign_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "audit_type_id": {
                                                        "type": "integer"
                                                    },
                                                    "customer_id": {
                                                        "type": "integer"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "due_date": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "notes": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "audit_type": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "slug": {
                                                                "type": "string"
                                                            },
                                                            "settings": {
                                                                "type": "object"
                                                            },
                                                            "fields": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "id": {
                                                                            "type": "integer"
                                                                        },
                                                                        "name": {
                                                                            "type": "string"
                                                                        },
                                                                        "label": {
                                                                            "type": "string"
                                                                        },
                                                                        "type": {
                                                                            "type": "string"
                                                                        },
                                                                        "section": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "options": {
                                                                            "type": "object"
                                                                        },
                                                                        "validation": {
                                                                            "type": "object"
                                                                        },
                                                                        "order": {
                                                                            "type": "integer"
                                                                        },
                                                                        "required": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "score_weight": {
                                                                            "type": "number"
                                                                        },
                                                                        "conditional": {
                                                                            "type": [
                                                                                "object",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "id",
                                                                        "name",
                                                                        "label",
                                                                        "type",
                                                                        "section",
                                                                        "options",
                                                                        "validation",
                                                                        "order",
                                                                        "required",
                                                                        "score_weight",
                                                                        "conditional"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "slug",
                                                            "settings",
                                                            "fields"
                                                        ]
                                                    },
                                                    "customer": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "number": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "address": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "latitude": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "longitude": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "number",
                                                            "address",
                                                            "latitude",
                                                            "longitude"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "campaign_id",
                                                    "audit_type_id",
                                                    "customer_id",
                                                    "status",
                                                    "due_date",
                                                    "notes",
                                                    "audit_type",
                                                    "customer"
                                                ]
                                            }
                                        },
                                        "customers": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "number": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "address": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "city": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "latitude": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "longitude": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "number",
                                                    "type",
                                                    "address",
                                                    "city",
                                                    "latitude",
                                                    "longitude"
                                                ]
                                            }
                                        },
                                        "audit_types": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "settings": {
                                                        "type": "object"
                                                    },
                                                    "fields": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer"
                                                                },
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "label": {
                                                                    "type": "string"
                                                                },
                                                                "type": {
                                                                    "type": "string"
                                                                },
                                                                "section": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "options": {
                                                                    "type": "object"
                                                                },
                                                                "order": {
                                                                    "type": "integer"
                                                                },
                                                                "required": {
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "name",
                                                                "label",
                                                                "type",
                                                                "section",
                                                                "options",
                                                                "order",
                                                                "required"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "slug",
                                                    "settings",
                                                    "fields"
                                                ]
                                            }
                                        },
                                        "campaigns": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "ulid": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "starts_on": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "ends_on": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "details": {
                                                        "type": "object"
                                                    },
                                                    "detail_fields": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "label": {
                                                                    "type": "string"
                                                                },
                                                                "type": {
                                                                    "type": "string"
                                                                },
                                                                "options": {
                                                                    "type": "object"
                                                                },
                                                                "required": {
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "name",
                                                                "label",
                                                                "type",
                                                                "options",
                                                                "required"
                                                            ]
                                                        }
                                                    },
                                                    "items": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer"
                                                                },
                                                                "item_id": {
                                                                    "type": "integer"
                                                                },
                                                                "name": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "code": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "image": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "brand": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "category": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "price": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "quantity": {
                                                                    "type": [
                                                                        "number",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "meta": {
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "item_id",
                                                                "name",
                                                                "code",
                                                                "image",
                                                                "brand",
                                                                "category",
                                                                "price",
                                                                "quantity",
                                                                "meta"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "ulid",
                                                    "name",
                                                    "status",
                                                    "starts_on",
                                                    "ends_on",
                                                    "details",
                                                    "detail_fields",
                                                    "items"
                                                ]
                                            }
                                        },
                                        "last_synced_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Send this back as `since` on the next sync."
                                        }
                                    },
                                    "required": [
                                        "assignments",
                                        "customers",
                                        "audit_types",
                                        "campaigns",
                                        "last_synced_at"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/assignments": {
            "get": {
                "operationId": "assignments.index",
                "description": "Set `mine=1` for the signed-in rep's open visits, skipping closed campaigns. Results are paginated.",
                "summary": "List visits",
                "tags": [
                    "Visits"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "mine",
                        "in": "query",
                        "description": "Only the signed-in rep's visits, leaving out closed campaigns.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "For example `pending`, `in_progress` or `completed`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "campaign_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "auditType",
                                    "auditType.fields",
                                    "auditType.fields.auditType",
                                    "auditType.fields.auditType.fields",
                                    "auditType.fields.auditType.fields.auditType",
                                    "customer",
                                    "customer.locations",
                                    "submission",
                                    "submission.auditType",
                                    "submission.auditType.fields",
                                    "submission.auditType.fields.auditType",
                                    "submission.auditType.fields.auditType.fields",
                                    "submission.customer",
                                    "submission.customer.locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[assignments]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "status",
                                    "due_date",
                                    "completed_at",
                                    "notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `AssignmentResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AssignmentResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/SubmissionResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/assignments/{assignment}": {
            "get": {
                "operationId": "assignments.show",
                "description": "Add `include=auditType.fields,customer` to embed the checklist and store.",
                "summary": "Get a visit",
                "tags": [
                    "Visits"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "assignment",
                        "in": "path",
                        "required": true,
                        "description": "The assignment ulid",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "auditType",
                                    "auditType.fields",
                                    "auditType.fields.auditType",
                                    "auditType.fields.auditType.fields",
                                    "auditType.fields.auditType.fields.auditType",
                                    "customer",
                                    "customer.locations",
                                    "submission",
                                    "submission.auditType",
                                    "submission.auditType.fields",
                                    "submission.auditType.fields.auditType",
                                    "submission.auditType.fields.auditType.fields",
                                    "submission.customer",
                                    "submission.customer.locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[assignments]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "status",
                                    "due_date",
                                    "completed_at",
                                    "notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`AssignmentResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AssignmentResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/SubmissionResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/audit-types": {
            "get": {
                "operationId": "audit-types.index",
                "description": "Returns the checklists the member can submit or review.",
                "summary": "List checklists",
                "tags": [
                    "Checklists"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "fields",
                                    "fields.auditType",
                                    "fields.auditType.fields",
                                    "fields.auditType.fields.auditType",
                                    "fields.auditType.fields.auditType.fields"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `AuditTypeResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AuditTypeResource"
                                            }
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "audit-types.store",
                "summary": "Create a checklist",
                "tags": [
                    "Checklists"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "fields",
                                    "fields.auditType",
                                    "fields.auditType.fields",
                                    "fields.auditType.fields.auditType",
                                    "fields.auditType.fields.auditType.fields"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreAuditTypeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`AuditTypeResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AuditTypeResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/audit-types/{auditType}": {
            "get": {
                "operationId": "audit-types.show",
                "summary": "Get a checklist",
                "tags": [
                    "Checklists"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "auditType",
                        "in": "path",
                        "required": true,
                        "description": "The audit type ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "fields",
                                    "fields.auditType",
                                    "fields.auditType.fields",
                                    "fields.auditType.fields.auditType",
                                    "fields.auditType.fields.auditType.fields"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`AuditTypeResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AuditTypeResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "audit-types.update",
                "summary": "Update a checklist",
                "tags": [
                    "Checklists"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "auditType",
                        "in": "path",
                        "required": true,
                        "description": "The audit type ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "fields",
                                    "fields.auditType",
                                    "fields.auditType.fields",
                                    "fields.auditType.fields.auditType",
                                    "fields.auditType.fields.auditType.fields"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateAuditTypeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`AuditTypeResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AuditTypeResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "audit-types.destroy",
                "summary": "Delete a checklist",
                "tags": [
                    "Checklists"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "auditType",
                        "in": "path",
                        "required": true,
                        "description": "The audit type ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/audit-types/{auditType}/submissions": {
            "get": {
                "operationId": "submissions.index",
                "description": "Members who can't review the checklist only see their own.",
                "summary": "List store checks for a checklist",
                "tags": [
                    "Store checks"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "auditType",
                        "in": "path",
                        "required": true,
                        "description": "The audit type ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "auditType",
                                    "auditType.fields",
                                    "auditType.fields.auditType",
                                    "auditType.fields.auditType.fields",
                                    "auditType.fields.auditType.fields.auditType",
                                    "customer",
                                    "customer.locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `SubmissionResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SubmissionResource"
                                            }
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "submissions.store",
                "description": "Scores the answers, starts any workflows and returns the saved check. Only checklists that reps can start themselves accept submissions here.",
                "summary": "Submit a store check",
                "tags": [
                    "Store checks"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "auditType",
                        "in": "path",
                        "required": true,
                        "description": "The audit type ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "auditType",
                                    "auditType.fields",
                                    "auditType.fields.auditType",
                                    "auditType.fields.auditType.fields",
                                    "auditType.fields.auditType.fields.auditType",
                                    "customer",
                                    "customer.locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreSubmissionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`SubmissionResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/SubmissionResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/submissions/{submission}": {
            "get": {
                "operationId": "submissions.show",
                "summary": "Get a store check",
                "tags": [
                    "Store checks"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "submission",
                        "in": "path",
                        "required": true,
                        "description": "The submission ulid",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "auditType",
                                    "auditType.fields",
                                    "auditType.fields.auditType",
                                    "auditType.fields.auditType.fields",
                                    "auditType.fields.auditType.fields.auditType",
                                    "customer",
                                    "customer.locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`SubmissionResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/SubmissionResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/customers": {
            "get": {
                "operationId": "customers.index",
                "summary": "List customers",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `CustomerResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerResource"
                                            }
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerLocationResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "customers.store",
                "summary": "Create a customer",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreCustomerRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`CustomerResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CustomerResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerLocationResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/customers/{customer}": {
            "get": {
                "operationId": "customers.show",
                "summary": "Get a customer",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ulid",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`CustomerResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CustomerResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerLocationResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "customers.update",
                "summary": "Update a customer",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ulid",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateCustomerRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`CustomerResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CustomerResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerLocationResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "customers.destroy",
                "summary": "Delete a customer",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ulid",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/campaigns": {
            "get": {
                "operationId": "campaigns.index",
                "description": "Add `include=assignments` to embed each campaign's visits.",
                "summary": "List campaigns",
                "tags": [
                    "Campaigns"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "assignments",
                                    "assignments.auditType",
                                    "assignments.auditType.fields",
                                    "assignments.auditType.fields.auditType",
                                    "assignments.auditType.fields.auditType.fields",
                                    "assignments.customer",
                                    "assignments.customer.locations",
                                    "assignments.submission",
                                    "assignments.submission.auditType",
                                    "assignments.submission.auditType.fields",
                                    "assignments.submission.auditType.fields.auditType",
                                    "assignments.submission.customer",
                                    "assignments.submission.customer.locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[campaigns]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "starts_on",
                                    "ends_on",
                                    "status",
                                    "settings",
                                    "details",
                                    "detail_fields",
                                    "items",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[assignments]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "status",
                                    "due_date",
                                    "completed_at",
                                    "notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `CampaignResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CampaignResource"
                                            }
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/AssignmentResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/SubmissionResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/campaigns/{campaign}": {
            "get": {
                "operationId": "campaigns.show",
                "summary": "Get a campaign",
                "tags": [
                    "Campaigns"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "campaign",
                        "in": "path",
                        "required": true,
                        "description": "The campaign ulid",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "assignments",
                                    "assignments.auditType",
                                    "assignments.auditType.fields",
                                    "assignments.auditType.fields.auditType",
                                    "assignments.auditType.fields.auditType.fields",
                                    "assignments.customer",
                                    "assignments.customer.locations",
                                    "assignments.submission",
                                    "assignments.submission.auditType",
                                    "assignments.submission.auditType.fields",
                                    "assignments.submission.auditType.fields.auditType",
                                    "assignments.submission.customer",
                                    "assignments.submission.customer.locations"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[campaigns]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "starts_on",
                                    "ends_on",
                                    "status",
                                    "settings",
                                    "details",
                                    "detail_fields",
                                    "items",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[assignments]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "status",
                                    "due_date",
                                    "completed_at",
                                    "notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`CampaignResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CampaignResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/AssignmentResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/SubmissionResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/corrective-actions": {
            "get": {
                "operationId": "corrective-actions.index",
                "summary": "List follow-ups",
                "tags": [
                    "Follow-ups"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "submission",
                                    "submission.auditType",
                                    "submission.auditType.fields",
                                    "submission.auditType.fields.auditType",
                                    "submission.auditType.fields.auditType.fields",
                                    "submission.customer",
                                    "submission.customer.locations",
                                    "customer",
                                    "customer.locations",
                                    "assignedTo"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[corrective_actions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "title",
                                    "description",
                                    "priority",
                                    "status",
                                    "due_date",
                                    "resolved_at",
                                    "resolution_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[users]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "email",
                                    "phone",
                                    "avatar",
                                    "two_factor_enabled",
                                    "teams"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `CorrectiveActionResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CorrectiveActionResource"
                                            }
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/SubmissionResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/UserResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{currentTeam}/corrective-actions/{correctiveAction}": {
            "get": {
                "operationId": "corrective-actions.show",
                "summary": "Get a follow-up",
                "tags": [
                    "Follow-ups"
                ],
                "parameters": [
                    {
                        "name": "currentTeam",
                        "in": "path",
                        "required": true,
                        "description": "The current team slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "correctiveAction",
                        "in": "path",
                        "required": true,
                        "description": "The corrective action ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "submission",
                                    "submission.auditType",
                                    "submission.auditType.fields",
                                    "submission.auditType.fields.auditType",
                                    "submission.auditType.fields.auditType.fields",
                                    "submission.customer",
                                    "submission.customer.locations",
                                    "customer",
                                    "customer.locations",
                                    "assignedTo"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[corrective_actions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "title",
                                    "description",
                                    "priority",
                                    "status",
                                    "due_date",
                                    "resolved_at",
                                    "resolution_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[submissions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "data",
                                    "status",
                                    "score",
                                    "max_score",
                                    "latitude",
                                    "longitude",
                                    "submitted_at",
                                    "reviewed_at",
                                    "review_notes",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audit_types]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "icon",
                                    "color",
                                    "status",
                                    "settings",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[fields]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "label",
                                    "type",
                                    "section",
                                    "options",
                                    "validation",
                                    "order",
                                    "required",
                                    "score_weight",
                                    "conditional"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customers]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "number",
                                    "type",
                                    "channel",
                                    "region",
                                    "territory",
                                    "address",
                                    "city",
                                    "parish",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "metadata",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[customer_locations]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "address",
                                    "city",
                                    "state_province",
                                    "latitude",
                                    "longitude",
                                    "contact_name",
                                    "contact_phone",
                                    "contact_email",
                                    "is_primary",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[users]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "email",
                                    "phone",
                                    "avatar",
                                    "two_factor_enabled",
                                    "teams"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`CorrectiveActionResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CorrectiveActionResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/SubmissionResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AuditTypeResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/FieldResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/CustomerLocationResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/UserResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "429": {
                        "description": "Too many requests. Wait for `Retry-After` seconds before trying again.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds until you can try again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "AssignmentResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "assignments"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "status": {
                                "type": "string"
                            },
                            "due_date": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "completed_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "notes": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "created_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "auditType": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "audit_types"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            },
                            "customer": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "customers"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            },
                            "submission": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "submissions"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "self": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "self"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "links"
                ],
                "title": "AssignmentResource"
            },
            "AuditTypeResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "audit_types"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "description": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "icon": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "color": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "status": {
                                "type": "string"
                            },
                            "settings": {
                                "type": "object"
                            },
                            "created_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "fields": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "const": "fields"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "self": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "self"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "links"
                ],
                "title": "AuditTypeResource"
            },
            "CampaignResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "campaigns"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "description": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "starts_on": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "ends_on": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "status": {
                                "type": "string"
                            },
                            "settings": {
                                "type": "object"
                            },
                            "details": {
                                "type": "object"
                            },
                            "detail_fields": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string"
                                        },
                                        "options": {
                                            "type": "object"
                                        },
                                        "required": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "name",
                                        "label",
                                        "type",
                                        "options",
                                        "required"
                                    ]
                                }
                            },
                            "items": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer"
                                        },
                                        "item_id": {
                                            "type": "integer"
                                        },
                                        "name": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "code": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "image": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "brand": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "category": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "price": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "quantity": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "item_id",
                                        "name",
                                        "code",
                                        "image",
                                        "brand",
                                        "category",
                                        "price",
                                        "quantity",
                                        "meta"
                                    ]
                                }
                            },
                            "created_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "assignments": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "const": "assignments"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "self": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "self"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "links"
                ],
                "title": "CampaignResource"
            },
            "CorrectiveActionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "corrective_actions"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "title": {
                                "type": "string"
                            },
                            "description": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "priority": {
                                "type": "string"
                            },
                            "status": {
                                "type": "string"
                            },
                            "due_date": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "resolved_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "resolution_notes": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "created_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "submission": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "submissions"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            },
                            "customer": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "customers"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            },
                            "assignedTo": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "users"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "self": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "self"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "links"
                ],
                "title": "CorrectiveActionResource"
            },
            "CustomerLocationResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "customer_locations"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "address": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "city": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "state_province": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "latitude": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "longitude": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "contact_name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "contact_phone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "contact_email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "is_primary": {
                                "type": "boolean"
                            },
                            "is_active": {
                                "type": "boolean"
                            },
                            "created_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "CustomerLocationResource"
            },
            "CustomerResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "customers"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "number": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "type": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "channel": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "region": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "territory": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "address": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "city": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "parish": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "latitude": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "longitude": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "contact_name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "contact_phone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "contact_email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "metadata": {
                                "type": "object"
                            },
                            "is_active": {
                                "type": "boolean"
                            },
                            "created_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "locations": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "const": "customer_locations"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "self": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "self"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "links"
                ],
                "title": "CustomerResource"
            },
            "FieldResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "fields"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "label": {
                                "type": "string"
                            },
                            "type": {
                                "type": "string"
                            },
                            "section": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "options": {
                                "type": "object"
                            },
                            "validation": {
                                "type": "object"
                            },
                            "order": {
                                "type": "integer"
                            },
                            "required": {
                                "type": "boolean"
                            },
                            "score_weight": {
                                "type": "string"
                            },
                            "conditional": {
                                "type": [
                                    "object",
                                    "null"
                                ]
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "auditType": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "audit_types"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "FieldResource"
            },
            "IssuePasswordTokenRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "password": {
                        "type": "string"
                    },
                    "device_name": {
                        "type": "string",
                        "description": "A name for this device, shown to the member when they review their signed-in devices. Signing in again from a device with the same name replaces its old token.",
                        "maxLength": 255
                    },
                    "code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Six-digit code from the member's authenticator app. Required when they use two-factor sign-in, unless `recovery_code` is sent."
                    },
                    "recovery_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "One of the member's two-factor recovery codes. Each code works once."
                    }
                },
                "required": [
                    "email",
                    "password",
                    "device_name"
                ],
                "title": "IssuePasswordTokenRequest"
            },
            "IssuePhoneTokenRequest": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string",
                        "description": "The same phone number or staff ID the code was requested for.",
                        "maxLength": 50
                    },
                    "code": {
                        "type": "string",
                        "description": "The six-digit code from the text message. Spaces and dashes are ignored."
                    },
                    "device_name": {
                        "type": "string",
                        "description": "A name for this device. Signing in again from a device with the same name replaces its old token.",
                        "maxLength": 255
                    }
                },
                "required": [
                    "identifier",
                    "code",
                    "device_name"
                ],
                "title": "IssuePhoneTokenRequest"
            },
            "RequestPhoneCodeRequest": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string",
                        "description": "The member's phone number or staff ID.",
                        "maxLength": 50
                    }
                },
                "required": [
                    "identifier"
                ],
                "title": "RequestPhoneCodeRequest"
            },
            "StoreAuditTypeRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "icon": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "color": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 7
                    },
                    "settings": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Checklist settings such as `score_threshold`, `self_start_enabled` and `customer_selection`.",
                        "additionalProperties": {}
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "active",
                            "archived"
                        ]
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreAuditTypeRequest"
            },
            "StoreCustomerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "channel": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "region": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "territory": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "parish": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "latitude": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": -90,
                        "maximum": 90
                    },
                    "longitude": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": -180,
                        "maximum": 180
                    },
                    "contact_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "contact_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "contact_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 255
                    },
                    "metadata": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Custom attributes keyed by attribute name.",
                        "additionalProperties": {}
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "locations": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "name": {
                                    "type": "string",
                                    "maxLength": 255
                                },
                                "address": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "city": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 100
                                },
                                "state_province": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 100
                                },
                                "latitude": {
                                    "type": [
                                        "number",
                                        "null"
                                    ],
                                    "minimum": -90,
                                    "maximum": 90
                                },
                                "longitude": {
                                    "type": [
                                        "number",
                                        "null"
                                    ],
                                    "minimum": -180,
                                    "maximum": 180
                                },
                                "contact_name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 255
                                },
                                "contact_phone": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 50
                                },
                                "contact_email": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "email",
                                    "maxLength": 255
                                },
                                "is_primary": {
                                    "type": "boolean"
                                },
                                "is_active": {
                                    "type": "boolean"
                                }
                            }
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreCustomerRequest"
            },
            "StoreSubmissionRequest": {
                "type": "object",
                "properties": {
                    "customer_id": {
                        "type": "integer",
                        "description": "The customer's numeric `id` from the sync package. Optional when the checklist doesn't need a customer."
                    },
                    "submission_ulid": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "data": {
                        "type": "object",
                        "description": "Answers keyed by field `name`. Each field's type sets what its value looks like.",
                        "additionalProperties": {}
                    },
                    "latitude": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": -90,
                        "maximum": 90
                    },
                    "longitude": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": -180,
                        "maximum": 180
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "in_progress",
                            "submitted"
                        ]
                    }
                },
                "required": [
                    "customer_id",
                    "data"
                ],
                "title": "StoreSubmissionRequest"
            },
            "SubmissionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "submissions"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "data": {
                                "type": "object"
                            },
                            "status": {
                                "type": "string"
                            },
                            "score": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "max_score": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "latitude": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "longitude": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "submitted_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "reviewed_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "review_notes": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "created_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "auditType": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "audit_types"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            },
                            "customer": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "customers"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "self": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "self"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "links"
                ],
                "title": "SubmissionResource"
            },
            "UpdateAuditTypeRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "icon": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "color": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 7
                    },
                    "settings": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Checklist settings such as `score_threshold`, `self_start_enabled` and `customer_selection`.",
                        "additionalProperties": {}
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "draft",
                            "active",
                            "archived",
                            null
                        ]
                    }
                },
                "title": "UpdateAuditTypeRequest"
            },
            "UpdateCustomerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "channel": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "region": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "territory": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "parish": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "latitude": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": -90,
                        "maximum": 90
                    },
                    "longitude": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": -180,
                        "maximum": 180
                    },
                    "contact_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "contact_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "contact_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 255
                    },
                    "metadata": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Custom attributes keyed by attribute name.",
                        "additionalProperties": {}
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "locations": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "name": {
                                    "type": "string",
                                    "maxLength": 255
                                },
                                "address": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "city": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 100
                                },
                                "state_province": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 100
                                },
                                "latitude": {
                                    "type": [
                                        "number",
                                        "null"
                                    ],
                                    "minimum": -90,
                                    "maximum": 90
                                },
                                "longitude": {
                                    "type": [
                                        "number",
                                        "null"
                                    ],
                                    "minimum": -180,
                                    "maximum": 180
                                },
                                "contact_name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 255
                                },
                                "contact_phone": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 50
                                },
                                "contact_email": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "email",
                                    "maxLength": 255
                                },
                                "is_primary": {
                                    "type": "boolean"
                                },
                                "is_active": {
                                    "type": "boolean"
                                }
                            }
                        },
                        "minItems": 1
                    }
                },
                "title": "UpdateCustomerRequest"
            },
            "UserResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "users"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "phone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "avatar": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "two_factor_enabled": {
                                "type": "boolean"
                            },
                            "teams": {
                                "type": "array",
                                "description": "The organisations the member can work in. Use `slug` as the team in team routes.",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "slug": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "role": {
                                            "type": "string",
                                            "enum": [
                                                "owner",
                                                "admin",
                                                "manager",
                                                "rep",
                                                "viewer"
                                            ]
                                        },
                                        "timezone": {
                                            "type": "string"
                                        },
                                        "logo_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "slug",
                                        "name",
                                        "role",
                                        "timezone",
                                        "logo_url"
                                    ]
                                }
                            }
                        }
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "UserResource"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}