{
    "openapi": "3.1.0",
    "info": {
        "title": "nptak-tax partner API",
        "version": "1.0.0",
        "description": "Foundation read endpoints only. Invoice delivery is not implemented."
    },
    "paths": {
        "/api/v1/me": {
            "get": {
                "operationId": "partner_me",
                "tags": [
                    "me"
                ],
                "security": [
                    {
                        "partnerBearer": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Partner"
                                }
                            }
                        },
                        "description": ""
                    }
                }
            }
        },
        "/api/v1/profiles": {
            "get": {
                "operationId": "profiles_list",
                "tags": [
                    "profiles"
                ],
                "security": [
                    {
                        "partnerBearer": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProfilePage"
                                }
                            }
                        },
                        "description": ""
                    }
                }
            }
        },
        "/api/v1/profiles/{profile_id}": {
            "get": {
                "operationId": "profiles_retrieve",
                "parameters": [
                    {
                        "in": "path",
                        "name": "profile_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "profiles"
                ],
                "security": [
                    {
                        "partnerBearer": []
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProfileDetail"
                                }
                            }
                        },
                        "description": ""
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Partner": {
                "type": "object",
                "properties": {
                    "partner_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "scopes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "expires_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "expires_at",
                    "name",
                    "partner_id",
                    "scopes"
                ]
            },
            "Profile": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "external_profile_id": {
                        "type": "string"
                    },
                    "active_revision_number": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "active_revision_number",
                    "created_at",
                    "external_profile_id",
                    "id"
                ]
            },
            "ProfileDetail": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "external_profile_id": {
                        "type": "string"
                    },
                    "active_revision_number": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "revision_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": {}
                    }
                },
                "required": [
                    "active_revision_number",
                    "created_at",
                    "external_profile_id",
                    "id",
                    "metadata",
                    "revision_id"
                ]
            },
            "ProfilePage": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Profile"
                        }
                    },
                    "next_cursor": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "items",
                    "next_cursor"
                ]
            }
        },
        "securitySchemes": {
            "partnerBearer": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "opaque partner token"
            }
        }
    }
}