{"openapi":"3.1.0","info":{"title":"Nota Plena — API da empresa","version":"1","description":"Chave da própria empresa (plano Negócio): leia, emita e cancele as notas do seu CNPJ. Gere a chave em notaplena.com.br → Configurações → Integrações → Nova chave e envie `Authorization: Bearer np_live_...`. Documentação: https://notaplena.com.br/docs/api"},"servers":[{"url":"https://api.notaplena.com.br"}],"paths":{"/api/v1/integrations/emissions/{emission_id}":{"get":{"tags":["integrations"],"summary":"Integration Get Emission","operationId":"integration_get_emission_api_v1_integrations_emissions__emission_id__get","parameters":[{"name":"emission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Emission Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationEmission"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/emissions/{emission_id}/share-link":{"post":{"tags":["integrations"],"summary":"Integration Share Link","operationId":"integration_share_link_api_v1_integrations_emissions__emission_id__share_link_post","parameters":[{"name":"emission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Emission Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLinkOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/emissions/{emission_id}/pdf":{"get":{"tags":["integrations"],"summary":"Integration Get Emission Pdf","description":"Render and return the DANFSe PDF for an emitted NF (partner/tenant auth).","operationId":"integration_get_emission_pdf_api_v1_integrations_emissions__emission_id__pdf_get","parameters":[{"name":"emission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Emission Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/tenant/nfse":{"post":{"tags":["integrations-tenant"],"summary":"Tenant Emit","description":"Emit an NFS-e for the key's own CNPJ (plano Negócio).\n\nSame contract as ``POST /integrations/nfse`` — same body (minus\n``np_tenant_id``), same response, same structured errors, same\nIdempotency-Key semantics — because it IS that route underneath.","operationId":"tenant_emit_api_v1_integrations_tenant_nfse_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantEmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerEmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/tenant/nfse/{emission_id}/cancel":{"post":{"tags":["integrations-tenant"],"summary":"Tenant Cancel","description":"Cancel an NFS-e of the key's own CNPJ (plano Negócio).\n\nRuns ``partner_cancel``: the 180-day hard block, the competência\nconfirmation gate (``confirm_outside_window``), FOR UPDATE against a\nconcurrent double cancel, and the ``nfse.cancelled`` webhook.","operationId":"tenant_cancel_api_v1_integrations_tenant_nfse__emission_id__cancel_post","parameters":[{"name":"emission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Emission Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCancelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/tenant":{"get":{"tags":["integrations-tenant"],"summary":"Tenant Me","description":"The company this key belongs to (id, CNPJ, razão social, city).","operationId":"tenant_me_api_v1_integrations_tenant_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerTenantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/tenant/emissions":{"get":{"tags":["integrations-tenant"],"summary":"Tenant List Emissions","description":"The key's own notas, newest first — same rows and filters as the\npartner list (``cancelled_at`` set means the nota was cancelled).","operationId":"tenant_list_emissions_api_v1_integrations_tenant_emissions_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by emission status (success/error/pending/sandbox/imported). Comma-separated for multiple. Omit for all.","title":"Status"},"description":"Filter by emission status (success/error/pending/sandbox/imported). Comma-separated for multiple. Omit for all."},{"name":"period_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to emissions with created_at >= this ISO timestamp.","title":"Period Start"},"description":"Filter to emissions with created_at >= this ISO timestamp."},{"name":"period_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to emissions with created_at <= this ISO timestamp.","title":"Period End"},"description":"Filter to emissions with created_at <= this ISO timestamp."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerEmissionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/tenant/readiness":{"get":{"tags":["integrations-tenant"],"summary":"Tenant Readiness","description":"Can this key emit right now — and if not, what is missing and WHERE the\nperson fixes it (absolute links: certificate, inscrição municipal, plan).\n\nWritten for an AI assistant guiding the owner: the certificate and its\npassword are never sent through the API, so every block is a screen the\nperson opens. ``servicos_usados`` lists the códigos/alíquotas this empresa\nalready emitted with, so the assistant reuses them instead of guessing —\nwhich código and alíquota apply is a fiscal choice, never the caller's.","operationId":"tenant_readiness_api_v1_integrations_tenant_readiness_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantReadinessOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/tenant/webhooks":{"post":{"tags":["integrations-tenant"],"summary":"Tenant Create Webhook","operationId":"tenant_create_webhook_api_v1_integrations_tenant_webhooks_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["integrations-tenant"],"summary":"Tenant List Webhooks","operationId":"tenant_list_webhooks_api_v1_integrations_tenant_webhooks_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookOut"},"title":"Response Tenant List Webhooks Api V1 Integrations Tenant Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/tenant/webhooks/{subscription_id}":{"delete":{"tags":["integrations-tenant"],"summary":"Tenant Revoke Webhook","operationId":"tenant_revoke_webhook_api_v1_integrations_tenant_webhooks__subscription_id__delete","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"TenantReadinessOut":{"properties":{"can_emit":{"type":"boolean","title":"Can Emit"},"blocks":{"items":{"$ref":"#/components/schemas/ReadinessBlock"},"type":"array","title":"Blocks"},"default_codigo_servico":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Codigo Servico"},"default_descricao":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Descricao"},"servicos_usados":{"items":{"$ref":"#/components/schemas/ServicoUsado"},"type":"array","title":"Servicos Usados"}},"type":"object","required":["can_emit","blocks","default_codigo_servico","default_descricao","servicos_usados"],"title":"TenantReadinessOut"},"ReadinessBlock":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"action_label":{"type":"string","title":"Action Label"},"action_url":{"type":"string","title":"Action Url"}},"type":"object","required":["code","message","action_label","action_url"],"title":"ReadinessBlock"},"WebhookCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Success At"},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Failure At"},"last_failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failure Reason"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","url","events","last_success_at","last_failure_at","last_failure_reason","revoked_at","created_at","secret"],"title":"WebhookCreated","description":"Returned ONCE on creation — the only time the secret is exposed."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"WebhookCreate":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]}},"type":"object","required":["url"],"title":"WebhookCreate"},"ServicoUsado":{"properties":{"codigo_servico":{"type":"string","title":"Codigo Servico"},"aliquota_iss":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Aliquota Iss"},"exemplo_discriminacao":{"type":"string","title":"Exemplo Discriminacao"},"notas":{"type":"integer","title":"Notas"},"ultima_em":{"type":"string","format":"date-time","title":"Ultima Em"}},"type":"object","required":["codigo_servico","aliquota_iss","exemplo_discriminacao","notas","ultima_em"],"title":"ServicoUsado","description":"A (código, alíquota) pair this empresa has already emitted with."},"PartnerCancelResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"requires_extra_confirmation":{"type":"boolean","title":"Requires Extra Confirmation","default":false},"days_since_emission":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Since Emission"}},"type":"object","required":["success"],"title":"PartnerCancelResponse"},"TenantEmitRequest":{"properties":{"np_tenant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Np Tenant Id"},"valor_servicos":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Valor Servicos"},"discriminacao":{"type":"string","title":"Discriminacao"},"codigo_servico":{"type":"string","title":"Codigo Servico"},"aliquota_iss":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Aliquota Iss"},"iss_retido":{"type":"boolean","title":"Iss Retido","default":false},"deducoes":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Deducoes","default":"0"},"tomador_nome":{"type":"string","title":"Tomador Nome"},"tomador_documento":{"type":"string","title":"Tomador Documento"},"tomador_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tomador Email"},"tomador_endereco":{"type":"string","title":"Tomador Endereco","default":""},"tomador_ibge_code":{"type":"string","title":"Tomador Ibge Code","default":""},"tomador_cep":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tomador Cep"},"tomador_inscricao_municipal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tomador Inscricao Municipal","description":"Inscrição municipal (CCM) do TOMADOR — opcional, só para cliente com CNPJ. Só números (1 a 12). Envie apenas se o cliente pediu; nunca a do prestador."},"tomador_numero":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tomador Numero"},"tomador_complemento":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tomador Complemento"},"tomador_bairro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tomador Bairro"},"tomador_uf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tomador Uf"},"codigo_tributacao_municipio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codigo Tributacao Municipio"},"regime_especial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regime Especial"},"cnae_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cnae Code"},"cod_tributacao_nacional":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cod Tributacao Nacional"},"c_loc_prestacao":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"C Loc Prestacao"},"regime_simples":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regime Simples"},"rps_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rps Number"},"rps_serie":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rps Serie"},"allow_rps_bump":{"type":"boolean","title":"Allow Rps Bump","default":true},"pct_total_tributos_sn":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Pct Total Tributos Sn"},"data_emissao":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Emissao"},"source_refs":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20,"title":"Source Refs"}},"type":"object","required":["valor_servicos","discriminacao","codigo_servico","aliquota_iss","tomador_nome","tomador_documento"],"title":"TenantEmitRequest","description":"The partner emit body, with ``np_tenant_id`` optional.\n\nThe key already names the tenant. When a caller does send\n``np_tenant_id`` it must be its own — anything else is 404, exactly as a\npartner naming a tenant it does not own."},"ShareLinkOut":{"properties":{"url":{"type":"string","title":"Url"},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["url","token","expires_at"],"title":"ShareLinkOut"},"PartnerEmitResponse":{"properties":{"emission_id":{"type":"string","format":"uuid","title":"Emission Id"},"status":{"type":"string","title":"Status"},"numero_nfse":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Numero Nfse"},"codigo_verificacao":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codigo Verificacao"},"numero_rps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Numero Rps"},"serie_rps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serie Rps"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"error":{"anyOf":[{"$ref":"#/components/schemas/EmissionError"},{"type":"null"}]},"covered_by_idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Covered By Idempotency Key"},"valor_servicos":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Valor Servicos"}},"type":"object","required":["emission_id","status","numero_nfse","codigo_verificacao"],"title":"PartnerEmitResponse"},"IntegrationEmission":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"status":{"type":"string","title":"Status"},"numero_nfse":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Numero Nfse"},"codigo_verificacao":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codigo Verificacao"},"numero_rps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Numero Rps"},"serie_rps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serie Rps"},"tomador_nome":{"type":"string","title":"Tomador Nome"},"tomador_documento":{"type":"string","title":"Tomador Documento"},"valor_servicos":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Valor Servicos"},"discriminacao":{"type":"string","title":"Discriminacao"},"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"error":{"anyOf":[{"$ref":"#/components/schemas/EmissionError"},{"type":"null"}]}},"type":"object","required":["id","created_at","status","numero_nfse","codigo_verificacao","tomador_nome","tomador_documento","valor_servicos","discriminacao","pdf_url"],"title":"IntegrationEmission"},"PartnerEmissionList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PartnerEmissionRow"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"PartnerEmissionList"},"PartnerEmissionRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"numero_nfse":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Numero Nfse"},"codigo_verificacao":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codigo Verificacao"},"numero_rps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Numero Rps"},"serie_rps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serie Rps"},"tomador_nome":{"type":"string","title":"Tomador Nome"},"tomador_documento":{"type":"string","title":"Tomador Documento"},"valor_servicos":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Valor Servicos"},"discriminacao":{"type":"string","title":"Discriminacao"},"codigo_servico":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codigo Servico"},"aliquota_iss":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Aliquota Iss"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"}},"type":"object","required":["id","created_at","status","source","numero_nfse","codigo_verificacao","numero_rps","serie_rps","tomador_nome","tomador_documento","valor_servicos","discriminacao","codigo_servico","aliquota_iss","error_message","cancelled_at"],"title":"PartnerEmissionRow","description":"One row in the partner emissions list — same shape as PartnerEmitResponse\nplus the read-only fields that only become known after creation."},"TenantCancelRequest":{"properties":{"reason":{"type":"string","title":"Reason"},"confirm_outside_window":{"type":"boolean","title":"Confirm Outside Window","default":false}},"type":"object","required":["reason"],"title":"TenantCancelRequest","description":"The partner cancel body, with a reason that must say something.\n\nThe prefeitura records the motivo; an empty one is a cancellation nobody\ncan explain later, so the tenant surface refuses it up front."},"EmissionError":{"properties":{"code":{"type":"string","title":"Code"},"hint":{"type":"string","title":"Hint"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"retriable":{"type":"boolean","title":"Retriable","default":false}},"type":"object","required":["code","hint"],"title":"EmissionError","description":"One structured, partner-facing emission error."},"WebhookOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Success At"},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Failure At"},"last_failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failure Reason"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","url","events","last_success_at","last_failure_at","last_failure_reason","revoked_at","created_at"],"title":"WebhookOut"},"PartnerTenantOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cnpj":{"type":"string","title":"Cnpj"},"razao_social":{"type":"string","title":"Razao Social"},"nome_fantasia":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nome Fantasia"},"ibge_city_code":{"type":"string","title":"Ibge City Code"},"inscricao_municipal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inscricao Municipal"},"mode":{"type":"string","title":"Mode"},"status":{"type":"string","title":"Status"},"simples_ativo":{"type":"boolean","title":"Simples Ativo"},"is_mei":{"type":"boolean","title":"Is Mei"},"anexo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anexo"},"default_codigo_servico":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Codigo Servico"}},"type":"object","required":["id","cnpj","razao_social","nome_fantasia","ibge_city_code","inscricao_municipal","mode","status","simples_ativo","is_mei","anexo"],"title":"PartnerTenantOut"}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"np_live_..."}}},"security":[{"bearer":[]}]}