@fiscalapi/docs-mcp 4.0.461 → 4.0.474

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"operationId":"createInvoice","method":"POST","path":"/api/v4/invoices","tag":"Invoices","summary":"Emitir (timbrar) una factura CFDI 4.0","description":"Timbra el CFDI ante el PAC y cobra 1 timbre del saldo; si el PAC lo rechaza, el timbre se reembolsa. Sin saldo, responde 403. typeCode y complement deciden el comprobante: factura de ingreso (I), nota de crédito o egreso (E), complemento de pago (P), recibo de nómina (N) o traslado (T), con carta porte o comercio exterior; globalInformation la vuelve factura global. Por valores, el cuerpo lleva los datos completos del emisor y del receptor; por referencias, issuer.id y recipient.id de personas ya registradas. Docs: [por valores](https://docs.fiscalapi.com/invoices-by-value#crear-factura-ingreso) y [por referencias](https://docs.fiscalapi.com/invoices-by-reference#crear-factura-ingreso).","parameters":[{"name":"X-TIME-ZONE","in":"header","description":"Zona horaria IANA de las fechas sin zona del cuerpo JSON: el request las lee y la respuesta las escribe en ella. Si falta o no es válida, America/Mexico_City. No aplica a los campos que la operación documenta en UTC o en hora civil.","example":"America/Mexico_City","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"versionCode":{"type":["null","string"]},"paymentFormCode":{"type":["null","string"]},"paymentMethodCode":{"type":["null","string"]},"currencyCode":{"type":["null","string"]},"typeCode":{"type":["null","string"]},"expeditionZipCode":{"type":["null","string"]},"pacConfirmation":{"type":["null","string"]},"series":{"type":["null","string"]},"number":{"type":["null","string"]},"date":{"type":"string","format":"date-time"},"paymentConditions":{"type":["null","string"]},"exchangeRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"exportCode":{"type":["null","string"]},"issuer":{"oneOf":[{"type":"null"},{"type":"object","properties":{"id":{"type":["null","string"]},"tin":{"type":["null","string"]},"legalName":{"type":["null","string"]},"taxRegimeCode":{"type":["null","string"]},"employerData":{"oneOf":[{"type":"null"},{"type":"object","properties":{"curp":{"type":["null","string"]},"employerRegistration":{"type":["null","string"]},"originEmployerTin":{"type":["null","string"]},"satFundSourceId":{"type":["null","string"]},"ownResourceAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"}}}]},"taxCredentials":{"type":["null","array"],"items":{"type":"object","properties":{"id":{"type":["null","string"]},"base64File":{"type":["null","string"]},"fileType":{"oneOf":[{"type":"null"},{"type":"integer"}]},"password":{"type":["null","string"]}}}}}}]},"recipient":{"oneOf":[{"type":"null"},{"type":"object","properties":{"id":{"type":["null","string"]},"tin":{"type":["null","string"]},"legalName":{"type":["null","string"]},"zipCode":{"type":["null","string"]},"taxRegimeCode":{"type":["null","string"]},"cfdiUseCode":{"type":["null","string"]},"email":{"type":["null","string"]},"countryId":{"type":["null","string"]},"foreignTin":{"type":["null","string"]},"employeeData":{"oneOf":[{"type":"null"},{"type":"object","properties":{"curp":{"type":["null","string"]},"socialSecurityNumber":{"type":["null","string"]},"laborRelationStartDate":{"type":["null","string"],"format":"date-time"},"seniority":{"type":["null","string"]},"satContractTypeId":{"type":["null","string"]},"satUnionizedStatusId":{"type":["null","string"]},"satWorkdayTypeId":{"type":["null","string"]},"satTaxRegimeTypeId":{"type":["null","string"]},"employeeNumber":{"type":["null","string"]},"department":{"type":["null","string"]},"position":{"type":["null","string"]},"satJobRiskId":{"type":["null","string"]},"satPaymentPeriodicityId":{"type":["null","string"]},"satBankId":{"type":["null","string"]},"bankAccount":{"type":["null","string"]},"baseSalaryForContributions":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"integratedDailySalary":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"satPayrollStateId":{"type":["null","string"]},"subcontractorRfc":{"type":["null","string"]},"timePercentage":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]}}}]},"items":{"type":["null","array"],"items":{"type":"object","properties":{"id":{"type":["null","string"]},"itemCode":{"type":["null","string"]},"itemSku":{"type":["null","string"]},"quantity":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"unitOfMeasurementCode":{"type":["null","string"]},"description":{"type":["null","string"]},"unitPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"discount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxObjectCode":{"type":["null","string"]},"itemTaxes":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":["null","string"]},"taxTypeCode":{"type":["null","string"]},"taxRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxFlagCode":{"type":["null","string"]}}}},"onBehalfOf":{"oneOf":[{"type":"null"},{"type":"object","properties":{"tin":{"type":["null","string"]},"legalName":{"type":["null","string"]},"taxRegimeCode":{"type":["null","string"]},"zipCode":{"type":["null","string"]}}}]},"customsInfo":{"type":["null","array"],"items":{"type":"object","properties":{"customsNumber":{"type":["null","string"]}}}},"propertyInfo":{"type":["null","array"],"items":{"type":"object","properties":{"number":{"type":["null","string"]}}}},"parts":{"type":["null","array"],"items":{"type":"object","properties":{"itemCode":{"type":["null","string"]},"itemSku":{"type":["null","string"]},"quantity":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"unitOfMeasurementCode":{"type":["null","string"]},"description":{"type":["null","string"]},"unitPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"customsInfo":{"type":["null","array"],"items":{"type":"object","properties":{"customsNumber":{"type":["null","string"]}}}}}}},"ticketId":{"type":["null","string"]}}}},"globalInformation":{"oneOf":[{"type":"null"},{"type":"object","properties":{"periodicityCode":{"type":["null","string"]},"monthCode":{"type":["null","string"]},"year":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}}}]},"relatedInvoices":{"type":["null","array"],"items":{"type":"object","properties":{"relationshipTypeCode":{"type":["null","string"]},"uuid":{"type":["null","string"]}}}},"complement":{"oneOf":[{"type":"null"},{"type":"object","properties":{"localTaxes":{"oneOf":[{"type":"null"},{"type":"object","properties":{"taxes":{"type":"array","items":{"type":"object","properties":{"taxName":{"type":["null","string"]},"taxRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxFlagCode":{"type":["null","string"]}}}}}}]},"payment":{"oneOf":[{"type":"null"},{"type":"object","properties":{"paymentDate":{"type":"string","format":"date-time"},"paymentFormCode":{"type":["null","string"]},"currencyCode":{"type":"string"},"exchangeRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"operationNumber":{"type":["null","string"]},"sourceBankTin":{"type":["null","string"]},"sourceBankAccount":{"type":["null","string"]},"targetBankTin":{"type":["null","string"]},"targetBankAccount":{"type":["null","string"]},"foreignBankName":{"type":["null","string"]},"paymentTypeCode":{"type":["null","string"]},"base64PaymentCertificate":{"type":["null","string"]},"paymentOriginalString":{"type":["null","string"]},"signatureValue":{"type":["null","string"]},"paidInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":["null","string"]},"uuid":{"type":["null","string"]},"series":{"type":["null","string"]},"number":{"type":["null","string"]},"currencyCode":{"type":["null","string"]},"partialityNumber":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"subTotal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"previousBalance":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"paymentAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"remainingBalance":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxObjectCode":{"type":["null","string"]},"equivalence":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"exchangeRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"paidInvoiceTaxes":{"type":["null","array"],"items":{"type":"object","properties":{"base":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxCode":{"type":["null","string"]},"taxTypeCode":{"type":["null","string"]},"taxRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxFlagCode":{"type":["null","string"]}}}}}}}}}]},"payroll":{"oneOf":[{"type":"null"},{"type":"object","properties":{"version":{"type":"string"},"payrollTypeCode":{"type":["null","string"]},"paymentDate":{"type":"string","format":"date-time"},"initialPaymentDate":{"type":"string","format":"date-time"},"finalPaymentDate":{"type":"string","format":"date-time"},"daysPaid":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"earnings":{"oneOf":[{"type":"null"},{"type":"object","properties":{"earnings":{"type":["null","array"],"items":{"type":"object","properties":{"earningTypeCode":{"type":"string"},"code":{"type":"string"},"concept":{"type":"string"},"taxedAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"exemptAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"stockOptions":{"oneOf":[{"type":"null"},{"type":"object","properties":{"marketPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"grantPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]},"overtime":{"type":["null","array"],"items":{"type":"object","properties":{"days":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"hoursTypeCode":{"type":"string"},"extraHours":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"amountPaid":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}}}}},"otherPayments":{"type":["null","array"],"items":{"type":"object","properties":{"otherPaymentTypeCode":{"type":"string"},"code":{"type":"string"},"concept":{"type":"string"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"subsidyCaused":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"balanceCompensation":{"oneOf":[{"type":"null"},{"type":"object","properties":{"favorableBalance":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"year":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int16"},"remainingFavorableBalance":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]}}}},"retirement":{"oneOf":[{"type":"null"},{"type":"object","properties":{"totalOneTime":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"totalInstallments":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"dailyAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"accumulableIncome":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"nonAccumulableIncome":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]},"severance":{"oneOf":[{"type":"null"},{"type":"object","properties":{"totalPaid":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"yearsOfService":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"lastMonthlySalary":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"accumulableIncome":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"nonAccumulableIncome":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]}},"additionalProperties":false}]},"deductions":{"type":["null","array"],"items":{"type":"object","properties":{"deductionTypeCode":{"type":"string"},"code":{"type":"string"},"concept":{"type":"string"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}},"disabilities":{"type":["null","array"],"items":{"type":"object","properties":{"disabilityDays":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"disabilityTypeCode":{"type":"string"},"monetaryAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}}},"additionalProperties":false}]},"cartaPorte":{"oneOf":[{"type":"null"},{"type":"object","properties":{"transpInternacId":{"type":"string"},"entradaSalidaMercId":{"type":["null","string"]},"paisOrigenDestinoId":{"type":["null","string"]},"viaEntradaSalidaId":{"type":["null","string"]},"totalDistRec":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"registroISTMOId":{"type":["null","string"]},"ubicacionPoloOrigenId":{"type":["null","string"]},"ubicacionPoloDestinoId":{"type":["null","string"]},"unidadPesoId":{"type":"string"},"pesoNetoTotal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"cargoPorTasacion":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"logisticaInversaRecoleccionDevolucionId":{"type":["null","string"]},"regimenAduaneros":{"type":["null","array"],"items":{"type":"object","properties":{"regimenAduaneroId":{"type":"string"}}}},"ubicaciones":{"type":"array","items":{"type":"object","properties":{"tipoUbicacion":{"type":"string"},"idUbicacion":{"type":["null","string"]},"rfcRemitenteDestinatario":{"type":"string"},"nombreRemitenteDestinatario":{"type":["null","string"]},"numRegIdTrib":{"type":["null","string"]},"residenciaFiscalId":{"type":["null","string"]},"numEstacionId":{"type":["null","string"]},"nombreEstacion":{"type":["null","string"]},"navegacionTraficoId":{"type":["null","string"]},"fechaHoraSalidaLlegada":{"type":"string","format":"date-time"},"tipoEstacionId":{"type":["null","string"]},"distanciaRecorrida":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"domicilio":{"oneOf":[{"type":"null"},{"type":"object","properties":{"calle":{"type":["null","string"]},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"coloniaId":{"type":["null","string"]},"localidadId":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipioId":{"type":["null","string"]},"estadoId":{"type":"string"},"paisId":{"type":"string"},"codigoPostalId":{"type":"string"}}}]}}}},"mercancias":{"type":"array","items":{"type":"object","properties":{"bienesTranspId":{"type":"string"},"claveSTCCId":{"type":["null","string"]},"descripcion":{"type":"string"},"cantidad":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"claveUnidadId":{"type":"string"},"unidad":{"type":["null","string"]},"dimensiones":{"type":["null","string"]},"materialPeligrosoId":{"type":["null","string"]},"cveMaterialPeligrosoId":{"type":["null","string"]},"embalajeId":{"type":["null","string"]},"descripEmbalaje":{"type":["null","string"]},"sectorCOFEPRISId":{"type":["null","string"]},"nombreIngredienteActivo":{"type":["null","string"]},"nomQuimico":{"type":["null","string"]},"denominacionGenericaProd":{"type":["null","string"]},"denominacionDistintivaProd":{"type":["null","string"]},"fabricante":{"type":["null","string"]},"fechaCaducidad":{"type":["null","string"],"format":"date-time"},"loteMedicamento":{"type":["null","string"]},"formaFarmaceuticaId":{"type":["null","string"]},"condicionesEspTranspId":{"type":["null","string"]},"registroSanitarioFolioAutorizacion":{"type":["null","string"]},"permisoImportacion":{"type":["null","string"]},"folioImpoVUCEM":{"type":["null","string"]},"numCAS":{"type":["null","string"]},"razonSocialEmpImp":{"type":["null","string"]},"numRegSanPlagCOFEPRIS":{"type":["null","string"]},"datosFabricante":{"type":["null","string"]},"datosFormulador":{"type":["null","string"]},"datosMaquilador":{"type":["null","string"]},"usoAutorizado":{"type":["null","string"]},"pesoEnKg":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"valorMercancia":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"monedaId":{"type":["null","string"]},"fraccionArancelariaId":{"type":["null","string"]},"uuidComercioExt":{"type":["null","string"]},"tipoMateriaId":{"type":["null","string"]},"descripcionMateria":{"type":["null","string"]},"documentacionAduanera":{"type":["null","array"],"items":{"type":"object","properties":{"tipoDocumentoId":{"type":"string"},"numPedimento":{"type":["null","string"]},"identDocAduanero":{"type":["null","string"]},"rfcImpo":{"type":["null","string"]}}}},"guiasIdentificacion":{"type":["null","array"],"items":{"type":"object","properties":{"numeroGuiaIdentificacion":{"type":"string"},"descripGuiaIdentificacion":{"type":"string"},"pesoGuiaIdentificacion":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}},"cantidadTransporta":{"type":["null","array"],"items":{"type":"object","properties":{"cantidad":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"idOrigen":{"type":"string"},"idDestino":{"type":"string"},"cvesTransporteId":{"type":["null","string"]}}}},"detalleMercancia":{"oneOf":[{"type":"null"},{"type":"object","properties":{"unidadPesoMercId":{"type":"string"},"pesoBruto":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"pesoNeto":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"pesoTara":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"numPiezas":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"}}}]}}}},"autotransporte":{"oneOf":[{"type":"null"},{"type":"object","properties":{"permSCTId":{"type":"string"},"numPermisoSCT":{"type":"string"},"configVehicularId":{"type":"string"},"pesoBrutoVehicular":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"placaVM":{"type":"string"},"anioModeloVM":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"aseguraRespCivil":{"type":"string"},"polizaRespCivil":{"type":"string"},"aseguraMedAmbiente":{"type":["null","string"]},"polizaMedAmbiente":{"type":["null","string"]},"aseguraCarga":{"type":["null","string"]},"polizaCarga":{"type":["null","string"]},"primaSeguro":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"remolques":{"type":["null","array"],"items":{"type":"object","properties":{"subTipoRemId":{"type":"string"},"placa":{"type":"string"}}}}}}]},"transporteMaritimo":{"oneOf":[{"type":"null"},{"type":"object","properties":{"permSCTId":{"type":["null","string"]},"numPermisoSCT":{"type":["null","string"]},"nombreAseg":{"type":["null","string"]},"numPolizaSeguro":{"type":["null","string"]},"tipoEmbarcacionId":{"type":"string"},"matricula":{"type":"string"},"numeroOMI":{"type":"string"},"anioEmbarcacion":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"nombreEmbarc":{"type":["null","string"]},"nacionalidadEmbarcId":{"type":"string"},"unidadesDeArqBruto":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"tipoCargaId":{"type":"string"},"eslora":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"manga":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"calado":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"puntal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"lineaNaviera":{"type":["null","string"]},"nombreAgenteNaviero":{"type":"string"},"numAutorizacionNavieroId":{"type":"string"},"numViaje":{"type":["null","string"]},"numConocEmbarc":{"type":["null","string"]},"permisoTempNavegacion":{"type":["null","string"]},"contenedores":{"type":["null","array"],"items":{"type":"object","properties":{"tipoContenedorId":{"type":"string"},"matriculaContenedor":{"type":["null","string"]},"numPrecinto":{"type":["null","string"]},"idCCPRelacionado":{"type":["null","string"]},"placaVMCCP":{"type":["null","string"]},"fechaCertificacionCCP":{"type":["null","string"],"format":"date-time"},"remolquesCCP":{"type":["null","array"],"items":{"type":"object","properties":{"subTipoRemCCPId":{"type":"string"},"placaCCP":{"type":"string"}}}}}}}}}]},"transporteAereo":{"oneOf":[{"type":"null"},{"type":"object","properties":{"permSCTId":{"type":"string"},"numPermisoSCT":{"type":"string"},"matriculaAeronave":{"type":["null","string"]},"nombreAseg":{"type":["null","string"]},"numPolizaSeguro":{"type":["null","string"]},"numeroGuia":{"type":"string"},"lugarContrato":{"type":["null","string"]},"codigoTransportistaId":{"type":"string"},"rfcEmbarcador":{"type":["null","string"]},"numRegIdTribEmbarc":{"type":["null","string"]},"residenciaFiscalEmbarcId":{"type":["null","string"]},"nombreEmbarcador":{"type":["null","string"]}}}]},"transporteFerroviario":{"oneOf":[{"type":"null"},{"type":"object","properties":{"tipoDeServicioId":{"type":"string"},"tipoDeTraficoId":{"type":"string"},"nombreAseg":{"type":["null","string"]},"numPolizaSeguro":{"type":["null","string"]},"derechosDePaso":{"type":["null","array"],"items":{"type":"object","properties":{"tipoDerechoDePasoId":{"type":"string"},"kilometrajePagado":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}},"carros":{"type":"array","items":{"type":"object","properties":{"tipoCarroId":{"type":"string"},"matriculaCarro":{"type":"string"},"guiaCarro":{"type":"string"},"toneladasNetasCarro":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"contenedores":{"type":["null","array"],"items":{"type":"object","properties":{"tipoContenedorId":{"type":"string"},"pesoContenedorVacio":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"pesoNetoMercancia":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}}}}}}}]},"tiposFigura":{"type":["null","array"],"items":{"type":"object","properties":{"tipoFiguraId":{"type":"string"},"rfcFigura":{"type":["null","string"]},"numLicencia":{"type":["null","string"]},"nombreFigura":{"type":"string"},"numRegIdTribFigura":{"type":["null","string"]},"residenciaFiscalFiguraId":{"type":["null","string"]},"partesTransporte":{"type":["null","array"],"items":{"type":"object","properties":{"parteTransporteId":{"type":"string"}}}},"domicilio":{"oneOf":[{"type":"null"},{"type":"object","properties":{"calle":{"type":["null","string"]},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"coloniaId":{"type":["null","string"]},"localidadId":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipioId":{"type":["null","string"]},"estadoId":{"type":"string"},"paisId":{"type":"string"},"codigoPostalId":{"type":"string"}}}]}}}}}}]},"comercioExterior":{"oneOf":[{"type":"null"},{"type":"object","properties":{"motivoTrasladoId":{"type":["null","string"]},"claveDePedimentoId":{"type":"string"},"certificadoOrigen":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"numCertificadoOrigen":{"type":["null","string"]},"numeroExportadorConfiable":{"type":["null","string"]},"incotermId":{"type":["null","string"]},"observaciones":{"type":["null","string"]},"tipoCambioUSD":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"emisor":{"oneOf":[{"type":"null"},{"type":"object","properties":{"curp":{"type":["null","string"]},"domicilio":{"type":"object","properties":{"calle":{"type":"string"},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"coloniaId":{"type":["null","string"]},"localidadId":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipioId":{"type":["null","string"]},"estadoId":{"type":"string"},"paisId":{"type":"string"},"codigoPostalId":{"type":"string"}}}}}]},"receptor":{"oneOf":[{"type":"null"},{"type":"object","properties":{"numRegIdTrib":{"type":["null","string"]},"domicilio":{"oneOf":[{"type":"null"},{"type":"object","properties":{"calle":{"type":"string"},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"colonia":{"type":["null","string"]},"localidad":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipio":{"type":["null","string"]},"estado":{"type":"string"},"paisId":{"type":"string"},"codigoPostal":{"type":"string"}}}]}}}]},"propietarios":{"type":["null","array"],"items":{"type":"object","properties":{"numRegIdTrib":{"type":"string"},"residenciaFiscalId":{"type":"string"}}}},"destinatarios":{"type":["null","array"],"items":{"type":"object","properties":{"numRegIdTrib":{"type":["null","string"]},"nombre":{"type":["null","string"]},"domicilios":{"type":"array","items":{"type":"object","properties":{"calle":{"type":"string"},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"colonia":{"type":["null","string"]},"localidad":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipio":{"type":["null","string"]},"estado":{"type":"string"},"paisId":{"type":"string"},"codigoPostal":{"type":"string"}}}}}}},"mercancias":{"type":"array","items":{"type":"object","properties":{"noIdentificacion":{"type":"string"},"fraccionArancelariaId":{"type":["null","string"]},"cantidadAduana":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"unidadAduanaId":{"type":["null","string"]},"valorUnitarioAduana":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"valorDolares":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"descripcionesEspecificas":{"type":["null","array"],"items":{"type":"object","properties":{"marca":{"type":"string"},"modelo":{"type":["null","string"]},"subModelo":{"type":["null","string"]},"numeroSerie":{"type":["null","string"]}}}}}}}}}]}}}]},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"}}}}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"ApiKey":[],"TenantKey":[]}],"securitySchemes":{"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"},"TenantKey":{"type":"apiKey","name":"X-TENANT-KEY","in":"header"}}}
1
+ {"operationId":"createInvoice","method":"POST","path":"/api/v4/invoices","tag":"Invoices","summary":"Emitir (timbrar) una factura CFDI 4.0","description":"Timbra el CFDI ante el PAC y cobra 1 timbre del saldo; si el PAC lo rechaza, el timbre se reembolsa. Sin saldo, responde 403. typeCode y complement deciden el comprobante: factura de ingreso (I), nota de crédito o egreso (E), complemento de pago (P), recibo de nómina (N) o traslado (T), con carta porte o comercio exterior; globalInformation la vuelve factura global. Por valores, el cuerpo lleva los datos completos del emisor y del receptor; por referencias, issuer.id y recipient.id de personas ya registradas. Docs: [por valores](https://docs.fiscalapi.com/invoices-by-value#crear-factura-ingreso) y [por referencias](https://docs.fiscalapi.com/invoices-by-reference#crear-factura-ingreso).","parameters":[{"name":"X-TIME-ZONE","in":"header","description":"Zona horaria IANA de las fechas sin zona del cuerpo JSON: el request las lee y la respuesta las escribe en ella. Si falta o no es válida, America/Mexico_City. No aplica a los campos que la operación documenta en UTC o en hora civil.","example":"America/Mexico_City","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Identificador único de la operación, de 1 a 64 caracteres ASCII visibles (se recomienda un UUID v4). Si la misma petición se repite con la misma llave de idempotencia dentro de las 24 h siguientes, no se vuelve a ejecutar: se devuelve la respuesta original, también si fue un error, con el header Idempotent-Replayed: true. Un 400 de validación no consume la llave de idempotencia. La misma llave de idempotencia con otra petición responde 422 y, mientras la original sigue en proceso, 409.","example":"550e8400-e29b-41d4-a716-446655440000","schema":{"maxLength":64,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"versionCode":{"type":["null","string"]},"paymentFormCode":{"type":["null","string"]},"paymentMethodCode":{"type":["null","string"]},"currencyCode":{"type":["null","string"]},"typeCode":{"type":["null","string"]},"expeditionZipCode":{"type":["null","string"]},"pacConfirmation":{"type":["null","string"]},"series":{"type":["null","string"]},"number":{"type":["null","string"]},"date":{"type":"string","format":"date-time"},"paymentConditions":{"type":["null","string"]},"exchangeRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"exportCode":{"type":["null","string"]},"issuer":{"oneOf":[{"type":"null"},{"type":"object","properties":{"id":{"type":["null","string"]},"tin":{"type":["null","string"]},"legalName":{"type":["null","string"]},"taxRegimeCode":{"type":["null","string"]},"employerData":{"oneOf":[{"type":"null"},{"type":"object","properties":{"curp":{"type":["null","string"]},"employerRegistration":{"type":["null","string"]},"originEmployerTin":{"type":["null","string"]},"satFundSourceId":{"type":["null","string"]},"ownResourceAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"}}}]},"taxCredentials":{"type":["null","array"],"items":{"type":"object","properties":{"id":{"type":["null","string"]},"base64File":{"type":["null","string"]},"fileType":{"oneOf":[{"type":"null"},{"type":"integer"}]},"password":{"type":["null","string"]}}}}}}]},"recipient":{"oneOf":[{"type":"null"},{"type":"object","properties":{"id":{"type":["null","string"]},"tin":{"type":["null","string"]},"legalName":{"type":["null","string"]},"zipCode":{"type":["null","string"]},"taxRegimeCode":{"type":["null","string"]},"cfdiUseCode":{"type":["null","string"]},"email":{"type":["null","string"]},"countryId":{"type":["null","string"]},"foreignTin":{"type":["null","string"]},"employeeData":{"oneOf":[{"type":"null"},{"type":"object","properties":{"curp":{"type":["null","string"]},"socialSecurityNumber":{"type":["null","string"]},"laborRelationStartDate":{"type":["null","string"],"format":"date-time"},"seniority":{"type":["null","string"]},"satContractTypeId":{"type":["null","string"]},"satUnionizedStatusId":{"type":["null","string"]},"satWorkdayTypeId":{"type":["null","string"]},"satTaxRegimeTypeId":{"type":["null","string"]},"employeeNumber":{"type":["null","string"]},"department":{"type":["null","string"]},"position":{"type":["null","string"]},"satJobRiskId":{"type":["null","string"]},"satPaymentPeriodicityId":{"type":["null","string"]},"satBankId":{"type":["null","string"]},"bankAccount":{"type":["null","string"]},"baseSalaryForContributions":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"integratedDailySalary":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"satPayrollStateId":{"type":["null","string"]},"subcontractorRfc":{"type":["null","string"]},"timePercentage":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]}}}]},"items":{"type":["null","array"],"items":{"type":"object","properties":{"id":{"type":["null","string"]},"itemCode":{"type":["null","string"]},"itemSku":{"type":["null","string"]},"quantity":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"unitOfMeasurementCode":{"type":["null","string"]},"description":{"type":["null","string"]},"unitPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"discount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxObjectCode":{"type":["null","string"]},"itemTaxes":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":["null","string"]},"taxTypeCode":{"type":["null","string"]},"taxRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxFlagCode":{"type":["null","string"]}}}},"onBehalfOf":{"oneOf":[{"type":"null"},{"type":"object","properties":{"tin":{"type":["null","string"]},"legalName":{"type":["null","string"]},"taxRegimeCode":{"type":["null","string"]},"zipCode":{"type":["null","string"]}}}]},"customsInfo":{"type":["null","array"],"items":{"type":"object","properties":{"customsNumber":{"type":["null","string"]}}}},"propertyInfo":{"type":["null","array"],"items":{"type":"object","properties":{"number":{"type":["null","string"]}}}},"parts":{"type":["null","array"],"items":{"type":"object","properties":{"itemCode":{"type":["null","string"]},"itemSku":{"type":["null","string"]},"quantity":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"unitOfMeasurementCode":{"type":["null","string"]},"description":{"type":["null","string"]},"unitPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"customsInfo":{"type":["null","array"],"items":{"type":"object","properties":{"customsNumber":{"type":["null","string"]}}}}}}},"ticketId":{"type":["null","string"]}}}},"globalInformation":{"oneOf":[{"type":"null"},{"type":"object","properties":{"periodicityCode":{"type":["null","string"]},"monthCode":{"type":["null","string"]},"year":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}}}]},"relatedInvoices":{"type":["null","array"],"items":{"type":"object","properties":{"relationshipTypeCode":{"type":["null","string"]},"uuid":{"type":["null","string"]}}}},"complement":{"oneOf":[{"type":"null"},{"type":"object","properties":{"localTaxes":{"oneOf":[{"type":"null"},{"type":"object","properties":{"taxes":{"type":"array","items":{"type":"object","properties":{"taxName":{"type":["null","string"]},"taxRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxFlagCode":{"type":["null","string"]}}}}}}]},"payment":{"oneOf":[{"type":"null"},{"type":"object","properties":{"paymentDate":{"type":"string","format":"date-time"},"paymentFormCode":{"type":["null","string"]},"currencyCode":{"type":"string"},"exchangeRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"operationNumber":{"type":["null","string"]},"sourceBankTin":{"type":["null","string"]},"sourceBankAccount":{"type":["null","string"]},"targetBankTin":{"type":["null","string"]},"targetBankAccount":{"type":["null","string"]},"foreignBankName":{"type":["null","string"]},"paymentTypeCode":{"type":["null","string"]},"base64PaymentCertificate":{"type":["null","string"]},"paymentOriginalString":{"type":["null","string"]},"signatureValue":{"type":["null","string"]},"paidInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":["null","string"]},"uuid":{"type":["null","string"]},"series":{"type":["null","string"]},"number":{"type":["null","string"]},"currencyCode":{"type":["null","string"]},"partialityNumber":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"subTotal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"previousBalance":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"paymentAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"remainingBalance":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxObjectCode":{"type":["null","string"]},"equivalence":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"exchangeRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"paidInvoiceTaxes":{"type":["null","array"],"items":{"type":"object","properties":{"base":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxCode":{"type":["null","string"]},"taxTypeCode":{"type":["null","string"]},"taxRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxFlagCode":{"type":["null","string"]}}}}}}}}}]},"payroll":{"oneOf":[{"type":"null"},{"type":"object","properties":{"version":{"type":"string"},"payrollTypeCode":{"type":["null","string"]},"paymentDate":{"type":"string","format":"date-time"},"initialPaymentDate":{"type":"string","format":"date-time"},"finalPaymentDate":{"type":"string","format":"date-time"},"daysPaid":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"earnings":{"oneOf":[{"type":"null"},{"type":"object","properties":{"earnings":{"type":["null","array"],"items":{"type":"object","properties":{"earningTypeCode":{"type":"string"},"code":{"type":"string"},"concept":{"type":"string"},"taxedAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"exemptAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"stockOptions":{"oneOf":[{"type":"null"},{"type":"object","properties":{"marketPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"grantPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]},"overtime":{"type":["null","array"],"items":{"type":"object","properties":{"days":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"hoursTypeCode":{"type":"string"},"extraHours":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"amountPaid":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}}}}},"otherPayments":{"type":["null","array"],"items":{"type":"object","properties":{"otherPaymentTypeCode":{"type":"string"},"code":{"type":"string"},"concept":{"type":"string"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"subsidyCaused":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"balanceCompensation":{"oneOf":[{"type":"null"},{"type":"object","properties":{"favorableBalance":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"year":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int16"},"remainingFavorableBalance":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]}}}},"retirement":{"oneOf":[{"type":"null"},{"type":"object","properties":{"totalOneTime":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"totalInstallments":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"dailyAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"accumulableIncome":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"nonAccumulableIncome":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]},"severance":{"oneOf":[{"type":"null"},{"type":"object","properties":{"totalPaid":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"yearsOfService":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"lastMonthlySalary":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"accumulableIncome":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"nonAccumulableIncome":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]}},"additionalProperties":false}]},"deductions":{"type":["null","array"],"items":{"type":"object","properties":{"deductionTypeCode":{"type":"string"},"code":{"type":"string"},"concept":{"type":"string"},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}},"disabilities":{"type":["null","array"],"items":{"type":"object","properties":{"disabilityDays":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"disabilityTypeCode":{"type":"string"},"monetaryAmount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}}},"additionalProperties":false}]},"cartaPorte":{"oneOf":[{"type":"null"},{"type":"object","properties":{"transpInternacId":{"type":"string"},"entradaSalidaMercId":{"type":["null","string"]},"paisOrigenDestinoId":{"type":["null","string"]},"viaEntradaSalidaId":{"type":["null","string"]},"totalDistRec":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"registroISTMOId":{"type":["null","string"]},"ubicacionPoloOrigenId":{"type":["null","string"]},"ubicacionPoloDestinoId":{"type":["null","string"]},"unidadPesoId":{"type":"string"},"pesoNetoTotal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"cargoPorTasacion":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"logisticaInversaRecoleccionDevolucionId":{"type":["null","string"]},"regimenAduaneros":{"type":["null","array"],"items":{"type":"object","properties":{"regimenAduaneroId":{"type":"string"}}}},"ubicaciones":{"type":"array","items":{"type":"object","properties":{"tipoUbicacion":{"type":"string"},"idUbicacion":{"type":["null","string"]},"rfcRemitenteDestinatario":{"type":"string"},"nombreRemitenteDestinatario":{"type":["null","string"]},"numRegIdTrib":{"type":["null","string"]},"residenciaFiscalId":{"type":["null","string"]},"numEstacionId":{"type":["null","string"]},"nombreEstacion":{"type":["null","string"]},"navegacionTraficoId":{"type":["null","string"]},"fechaHoraSalidaLlegada":{"type":"string","format":"date-time"},"tipoEstacionId":{"type":["null","string"]},"distanciaRecorrida":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"domicilio":{"oneOf":[{"type":"null"},{"type":"object","properties":{"calle":{"type":["null","string"]},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"coloniaId":{"type":["null","string"]},"localidadId":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipioId":{"type":["null","string"]},"estadoId":{"type":"string"},"paisId":{"type":"string"},"codigoPostalId":{"type":"string"}}}]}}}},"mercancias":{"type":"array","items":{"type":"object","properties":{"bienesTranspId":{"type":"string"},"claveSTCCId":{"type":["null","string"]},"descripcion":{"type":"string"},"cantidad":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"claveUnidadId":{"type":"string"},"unidad":{"type":["null","string"]},"dimensiones":{"type":["null","string"]},"materialPeligrosoId":{"type":["null","string"]},"cveMaterialPeligrosoId":{"type":["null","string"]},"embalajeId":{"type":["null","string"]},"descripEmbalaje":{"type":["null","string"]},"sectorCOFEPRISId":{"type":["null","string"]},"nombreIngredienteActivo":{"type":["null","string"]},"nomQuimico":{"type":["null","string"]},"denominacionGenericaProd":{"type":["null","string"]},"denominacionDistintivaProd":{"type":["null","string"]},"fabricante":{"type":["null","string"]},"fechaCaducidad":{"type":["null","string"],"format":"date-time"},"loteMedicamento":{"type":["null","string"]},"formaFarmaceuticaId":{"type":["null","string"]},"condicionesEspTranspId":{"type":["null","string"]},"registroSanitarioFolioAutorizacion":{"type":["null","string"]},"permisoImportacion":{"type":["null","string"]},"folioImpoVUCEM":{"type":["null","string"]},"numCAS":{"type":["null","string"]},"razonSocialEmpImp":{"type":["null","string"]},"numRegSanPlagCOFEPRIS":{"type":["null","string"]},"datosFabricante":{"type":["null","string"]},"datosFormulador":{"type":["null","string"]},"datosMaquilador":{"type":["null","string"]},"usoAutorizado":{"type":["null","string"]},"pesoEnKg":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"valorMercancia":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"monedaId":{"type":["null","string"]},"fraccionArancelariaId":{"type":["null","string"]},"uuidComercioExt":{"type":["null","string"]},"tipoMateriaId":{"type":["null","string"]},"descripcionMateria":{"type":["null","string"]},"documentacionAduanera":{"type":["null","array"],"items":{"type":"object","properties":{"tipoDocumentoId":{"type":"string"},"numPedimento":{"type":["null","string"]},"identDocAduanero":{"type":["null","string"]},"rfcImpo":{"type":["null","string"]}}}},"guiasIdentificacion":{"type":["null","array"],"items":{"type":"object","properties":{"numeroGuiaIdentificacion":{"type":"string"},"descripGuiaIdentificacion":{"type":"string"},"pesoGuiaIdentificacion":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}},"cantidadTransporta":{"type":["null","array"],"items":{"type":"object","properties":{"cantidad":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"idOrigen":{"type":"string"},"idDestino":{"type":"string"},"cvesTransporteId":{"type":["null","string"]}}}},"detalleMercancia":{"oneOf":[{"type":"null"},{"type":"object","properties":{"unidadPesoMercId":{"type":"string"},"pesoBruto":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"pesoNeto":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"pesoTara":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"numPiezas":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"}}}]}}}},"autotransporte":{"oneOf":[{"type":"null"},{"type":"object","properties":{"permSCTId":{"type":"string"},"numPermisoSCT":{"type":"string"},"configVehicularId":{"type":"string"},"pesoBrutoVehicular":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"placaVM":{"type":"string"},"anioModeloVM":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"aseguraRespCivil":{"type":"string"},"polizaRespCivil":{"type":"string"},"aseguraMedAmbiente":{"type":["null","string"]},"polizaMedAmbiente":{"type":["null","string"]},"aseguraCarga":{"type":["null","string"]},"polizaCarga":{"type":["null","string"]},"primaSeguro":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"remolques":{"type":["null","array"],"items":{"type":"object","properties":{"subTipoRemId":{"type":"string"},"placa":{"type":"string"}}}}}}]},"transporteMaritimo":{"oneOf":[{"type":"null"},{"type":"object","properties":{"permSCTId":{"type":["null","string"]},"numPermisoSCT":{"type":["null","string"]},"nombreAseg":{"type":["null","string"]},"numPolizaSeguro":{"type":["null","string"]},"tipoEmbarcacionId":{"type":"string"},"matricula":{"type":"string"},"numeroOMI":{"type":"string"},"anioEmbarcacion":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"nombreEmbarc":{"type":["null","string"]},"nacionalidadEmbarcId":{"type":"string"},"unidadesDeArqBruto":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"tipoCargaId":{"type":"string"},"eslora":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"manga":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"calado":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"puntal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"lineaNaviera":{"type":["null","string"]},"nombreAgenteNaviero":{"type":"string"},"numAutorizacionNavieroId":{"type":"string"},"numViaje":{"type":["null","string"]},"numConocEmbarc":{"type":["null","string"]},"permisoTempNavegacion":{"type":["null","string"]},"contenedores":{"type":["null","array"],"items":{"type":"object","properties":{"tipoContenedorId":{"type":"string"},"matriculaContenedor":{"type":["null","string"]},"numPrecinto":{"type":["null","string"]},"idCCPRelacionado":{"type":["null","string"]},"placaVMCCP":{"type":["null","string"]},"fechaCertificacionCCP":{"type":["null","string"],"format":"date-time"},"remolquesCCP":{"type":["null","array"],"items":{"type":"object","properties":{"subTipoRemCCPId":{"type":"string"},"placaCCP":{"type":"string"}}}}}}}}}]},"transporteAereo":{"oneOf":[{"type":"null"},{"type":"object","properties":{"permSCTId":{"type":"string"},"numPermisoSCT":{"type":"string"},"matriculaAeronave":{"type":["null","string"]},"nombreAseg":{"type":["null","string"]},"numPolizaSeguro":{"type":["null","string"]},"numeroGuia":{"type":"string"},"lugarContrato":{"type":["null","string"]},"codigoTransportistaId":{"type":"string"},"rfcEmbarcador":{"type":["null","string"]},"numRegIdTribEmbarc":{"type":["null","string"]},"residenciaFiscalEmbarcId":{"type":["null","string"]},"nombreEmbarcador":{"type":["null","string"]}}}]},"transporteFerroviario":{"oneOf":[{"type":"null"},{"type":"object","properties":{"tipoDeServicioId":{"type":"string"},"tipoDeTraficoId":{"type":"string"},"nombreAseg":{"type":["null","string"]},"numPolizaSeguro":{"type":["null","string"]},"derechosDePaso":{"type":["null","array"],"items":{"type":"object","properties":{"tipoDerechoDePasoId":{"type":"string"},"kilometrajePagado":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}},"carros":{"type":"array","items":{"type":"object","properties":{"tipoCarroId":{"type":"string"},"matriculaCarro":{"type":"string"},"guiaCarro":{"type":"string"},"toneladasNetasCarro":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"contenedores":{"type":["null","array"],"items":{"type":"object","properties":{"tipoContenedorId":{"type":"string"},"pesoContenedorVacio":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"pesoNetoMercancia":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}}}}}}}]},"tiposFigura":{"type":["null","array"],"items":{"type":"object","properties":{"tipoFiguraId":{"type":"string"},"rfcFigura":{"type":["null","string"]},"numLicencia":{"type":["null","string"]},"nombreFigura":{"type":"string"},"numRegIdTribFigura":{"type":["null","string"]},"residenciaFiscalFiguraId":{"type":["null","string"]},"partesTransporte":{"type":["null","array"],"items":{"type":"object","properties":{"parteTransporteId":{"type":"string"}}}},"domicilio":{"oneOf":[{"type":"null"},{"type":"object","properties":{"calle":{"type":["null","string"]},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"coloniaId":{"type":["null","string"]},"localidadId":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipioId":{"type":["null","string"]},"estadoId":{"type":"string"},"paisId":{"type":"string"},"codigoPostalId":{"type":"string"}}}]}}}}}}]},"comercioExterior":{"oneOf":[{"type":"null"},{"type":"object","properties":{"motivoTrasladoId":{"type":["null","string"]},"claveDePedimentoId":{"type":"string"},"certificadoOrigen":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"numCertificadoOrigen":{"type":["null","string"]},"numeroExportadorConfiable":{"type":["null","string"]},"incotermId":{"type":["null","string"]},"observaciones":{"type":["null","string"]},"tipoCambioUSD":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"emisor":{"oneOf":[{"type":"null"},{"type":"object","properties":{"curp":{"type":["null","string"]},"domicilio":{"type":"object","properties":{"calle":{"type":"string"},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"coloniaId":{"type":["null","string"]},"localidadId":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipioId":{"type":["null","string"]},"estadoId":{"type":"string"},"paisId":{"type":"string"},"codigoPostalId":{"type":"string"}}}}}]},"receptor":{"oneOf":[{"type":"null"},{"type":"object","properties":{"numRegIdTrib":{"type":["null","string"]},"domicilio":{"oneOf":[{"type":"null"},{"type":"object","properties":{"calle":{"type":"string"},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"colonia":{"type":["null","string"]},"localidad":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipio":{"type":["null","string"]},"estado":{"type":"string"},"paisId":{"type":"string"},"codigoPostal":{"type":"string"}}}]}}}]},"propietarios":{"type":["null","array"],"items":{"type":"object","properties":{"numRegIdTrib":{"type":"string"},"residenciaFiscalId":{"type":"string"}}}},"destinatarios":{"type":["null","array"],"items":{"type":"object","properties":{"numRegIdTrib":{"type":["null","string"]},"nombre":{"type":["null","string"]},"domicilios":{"type":"array","items":{"type":"object","properties":{"calle":{"type":"string"},"numeroExterior":{"type":["null","string"]},"numeroInterior":{"type":["null","string"]},"colonia":{"type":["null","string"]},"localidad":{"type":["null","string"]},"referencia":{"type":["null","string"]},"municipio":{"type":["null","string"]},"estado":{"type":"string"},"paisId":{"type":"string"},"codigoPostal":{"type":"string"}}}}}}},"mercancias":{"type":"array","items":{"type":"object","properties":{"noIdentificacion":{"type":"string"},"fraccionArancelariaId":{"type":["null","string"]},"cantidadAduana":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"unidadAduanaId":{"type":["null","string"]},"valorUnitarioAduana":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"valorDolares":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"descripcionesEspecificas":{"type":["null","array"],"items":{"type":"object","properties":{"marca":{"type":"string"},"modelo":{"type":["null","string"]},"subModelo":{"type":["null","string"]},"numeroSerie":{"type":["null","string"]}}}}}}}}}]}}}]},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"}}}}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"ApiKey":[],"TenantKey":[]}],"securitySchemes":{"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"},"TenantKey":{"type":"apiKey","name":"X-TENANT-KEY","in":"header"}}}
@@ -1 +1 @@
1
- {"operationId":"createTicket","method":"POST","path":"/api/v4/tickets","tag":"Tickets","summary":"Crear un ticket","description":"Registra una venta pagada del punto de venta y cobra 1 crédito de ticket. Responde el código del ticket y la URL del portal para su QR. Exige el feature Auto CFDI. 201: el ticket nuevo. 200: el ticket original, porque la Idempotency-Key ya se usó con el mismo cuerpo (no cobra otra vez). 400: el cuerpo no tiene la estructura esperada o le faltan datos. 401: sin API key o JWT válidos. 403: la persona no tiene el permiso Tickets.Create, el tenant no tiene Auto CFDI o no hay saldo de créditos de ticket. 409: el emisor ya tiene un ticket activo con esa serie y folio (data.existingTicketId), u otro ticket con la misma serie y folio o la misma Idempotency-Key cambió al mismo tiempo. 422: una regla fiscal o aritmética no se cumple, el emisor no puede facturar, o la Idempotency-Key ya se usó con otro cuerpo.","parameters":[{"name":"Idempotency-Key","in":"header","description":"Llave de idempotencia opcional: repetirla con el mismo cuerpo devuelve el ticket original.","schema":{"type":"string"}},{"name":"X-TIME-ZONE","in":"header","description":"Zona horaria IANA de las fechas sin zona del cuerpo JSON: el request las lee y la respuesta las escribe en ella. Si falta o no es válida, America/Mexico_City. No aplica a los campos que la operación documenta en UTC o en hora civil.","example":"America/Mexico_City","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"oneOf":[{"type":"null"},{"type":"object","properties":{"id":{"type":["null","string"]}}}]},"folio":{"type":["null","string"]},"series":{"type":["null","string"]},"paymentDate":{"format":"date-time"},"paymentFormCode":{"type":["null","string"]},"currencyCode":{"type":["null","string"]},"exchangeRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"expeditionZipCode":{"type":["null","string"]},"total":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"items":{"type":["null","array"],"items":{"type":"object","properties":{"itemCode":{"type":["null","string"]},"itemSku":{"type":["null","string"]},"quantity":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"unitOfMeasurementCode":{"type":["null","string"]},"description":{"type":["null","string"]},"unitPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"discount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxObjectCode":{"type":["null","string"]},"itemTaxes":{"type":["null","array"],"items":{"type":"object","properties":{"taxCode":{"type":["null","string"]},"taxTypeCode":{"type":["null","string"]},"taxRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxFlagCode":{"type":["null","string"]}}}}}}}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"required":["id","ticketCode","qrUrl","status","selfInvoiceEligible","eligibleUntil","subtotal","totalTransferredTaxes","totalWithheldTaxes","total"],"type":"object","properties":{"id":{"type":"string"},"ticketCode":{"type":"string"},"qrUrl":{"type":"string"},"status":{"enum":["pending","invoicing","invoiced","globalizing","globalized","cancelled"],"description":"Estado del ticket. pending: sin factura; el receptor lo puede autofacturar o el tenant incluirlo en una global. invoicing: el receptor lo está timbrando. invoiced: tiene su factura individual (invoiceId). globalizing: una factura global lo está timbrando. globalized: está en una factura global (globalInvoiceId). cancelled: el tenant lo canceló antes de facturarlo; es final y libera la serie y el folio."},"selfInvoiceEligible":{"type":"boolean"},"eligibleUntil":{"type":["null","string"],"format":"date-time"},"subtotal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"totalTransferredTaxes":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"totalWithheldTaxes":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"total":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"required":["id","ticketCode","qrUrl","status","selfInvoiceEligible","eligibleUntil","subtotal","totalTransferredTaxes","totalWithheldTaxes","total"],"type":"object","properties":{"id":{"type":"string"},"ticketCode":{"type":"string"},"qrUrl":{"type":"string"},"status":{"enum":["pending","invoicing","invoiced","globalizing","globalized","cancelled"],"description":"Estado del ticket. pending: sin factura; el receptor lo puede autofacturar o el tenant incluirlo en una global. invoicing: el receptor lo está timbrando. invoiced: tiene su factura individual (invoiceId). globalizing: una factura global lo está timbrando. globalized: está en una factura global (globalInvoiceId). cancelled: el tenant lo canceló antes de facturarlo; es final y libera la serie y el folio."},"selfInvoiceEligible":{"type":"boolean"},"eligibleUntil":{"type":["null","string"],"format":"date-time"},"subtotal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"totalTransferredTaxes":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"totalWithheldTaxes":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"total":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"required":["existingTicketId"],"type":"object","properties":{"existingTicketId":{"type":"string"}}}]},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}}},"security":[{"ApiKey":[],"TenantKey":[]}],"securitySchemes":{"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"},"TenantKey":{"type":"apiKey","name":"X-TENANT-KEY","in":"header"}}}
1
+ {"operationId":"createTicket","method":"POST","path":"/api/v4/tickets","tag":"Tickets","summary":"Crear un ticket","description":"Registra una venta pagada del punto de venta y cobra 1 crédito de ticket. Responde el código del ticket y la URL del portal para su QR. Exige el feature Auto CFDI. 201: el ticket nuevo. 400: el cuerpo no tiene la estructura esperada o le faltan datos. 401: sin API key o JWT válidos. 403: la persona no tiene el permiso Tickets.Create, el tenant no tiene Auto CFDI o no hay saldo de créditos de ticket. 409: el emisor ya tiene un ticket activo con esa serie y folio (data.existingTicketId), u otro ticket con la misma serie y folio cambió al mismo tiempo. 422: una regla fiscal o aritmética no se cumple o el emisor no puede facturar.","parameters":[{"name":"X-TIME-ZONE","in":"header","description":"Zona horaria IANA de las fechas sin zona del cuerpo JSON: el request las lee y la respuesta las escribe en ella. Si falta o no es válida, America/Mexico_City. No aplica a los campos que la operación documenta en UTC o en hora civil.","example":"America/Mexico_City","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Identificador único de la operación, de 1 a 64 caracteres ASCII visibles (se recomienda un UUID v4). Si la misma petición se repite con la misma llave de idempotencia dentro de las 24 h siguientes, no se vuelve a ejecutar: se devuelve la respuesta original, también si fue un error, con el header Idempotent-Replayed: true. Un 400 de validación no consume la llave de idempotencia. La misma llave de idempotencia con otra petición responde 422 y, mientras la original sigue en proceso, 409.","example":"550e8400-e29b-41d4-a716-446655440000","schema":{"maxLength":64,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"oneOf":[{"type":"null"},{"type":"object","properties":{"id":{"type":["null","string"]}}}]},"folio":{"type":["null","string"]},"series":{"type":["null","string"]},"paymentDate":{"format":"date-time"},"paymentFormCode":{"type":["null","string"]},"currencyCode":{"type":["null","string"]},"exchangeRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["null","number","string"],"format":"double"},"expeditionZipCode":{"type":["null","string"]},"total":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"items":{"type":["null","array"],"items":{"type":"object","properties":{"itemCode":{"type":["null","string"]},"itemSku":{"type":["null","string"]},"quantity":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"unitOfMeasurementCode":{"type":["null","string"]},"description":{"type":["null","string"]},"unitPrice":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"discount":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxObjectCode":{"type":["null","string"]},"itemTaxes":{"type":["null","array"],"items":{"type":"object","properties":{"taxCode":{"type":["null","string"]},"taxTypeCode":{"type":["null","string"]},"taxRate":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"taxFlagCode":{"type":["null","string"]}}}}}}}}}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"required":["id","ticketCode","qrUrl","status","selfInvoiceEligible","eligibleUntil","subtotal","totalTransferredTaxes","totalWithheldTaxes","total"],"type":"object","properties":{"id":{"type":"string"},"ticketCode":{"type":"string"},"qrUrl":{"type":"string"},"status":{"enum":["pending","invoicing","invoiced","globalizing","globalized","cancelled"],"description":"Estado del ticket. pending: sin factura; el receptor lo puede autofacturar o el tenant incluirlo en una global. invoicing: el receptor lo está timbrando. invoiced: tiene su factura individual (invoiceId). globalizing: una factura global lo está timbrando. globalized: está en una factura global (globalInvoiceId). cancelled: el tenant lo canceló antes de facturarlo; es final y libera la serie y el folio."},"selfInvoiceEligible":{"type":"boolean"},"eligibleUntil":{"type":["null","string"],"format":"date-time"},"subtotal":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"totalTransferredTaxes":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"totalWithheldTaxes":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"},"total":{"pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","type":["number","string"],"format":"double"}}}]},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"required":["existingTicketId"],"type":"object","properties":{"existingTicketId":{"type":"string"}}}]},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"succeeded":{"type":"boolean"},"message":{"type":["null","string"]},"details":{"type":["null","string"]},"httpStatusCode":{"type":"integer"},"traceIdentifier":{"type":["null","string"]}}}}}}},"security":[{"ApiKey":[],"TenantKey":[]}],"securitySchemes":{"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"},"TenantKey":{"type":"apiKey","name":"X-TENANT-KEY","in":"header"}}}
@@ -1 +1 @@
1
- {"operationId":"transferStamps","method":"POST","path":"/api/v4/stamps","tag":"Stamps","summary":"Transferir o retirar timbres entre personas","description":"Resta amount (mayor que 0) del saldo de fromPersonId y lo suma a toPersonId en un solo movimiento de transferencia; retirar timbres es la misma operación en sentido inverso. creditType elige el saldo (1 timbres por omisión, 2 validaciones, 3 tickets) y, si el del origen no alcanza, responde 403 sin mover nada. Origen y destino deben ser personas distintas del tenant con id GUID (si no, 400) y solo el owner del tenant transfiere desde una persona que no es la autenticada (403). Docs: [transferir](https://docs.fiscalapi.com/stamps#transferir-timbres) y [retirar](https://docs.fiscalapi.com/stamps#retirar-timbres).","parameters":[{"name":"X-TIME-ZONE","in":"header","description":"Zona horaria IANA de las fechas sin zona del cuerpo JSON: el request las lee y la respuesta las escribe en ella. Si falta o no es válida, America/Mexico_City. No aplica a los campos que la operación documenta en UTC o en hora civil.","example":"America/Mexico_City","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fromPersonId":{"type":["null","string"]},"toPersonId":{"type":["null","string"]},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"comments":{"type":["null","string"]},"creditType":{"type":"integer","format":"int32"}}}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"ApiKey":[],"TenantKey":[]}],"securitySchemes":{"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"},"TenantKey":{"type":"apiKey","name":"X-TENANT-KEY","in":"header"}}}
1
+ {"operationId":"transferStamps","method":"POST","path":"/api/v4/stamps","tag":"Stamps","summary":"Transferir o retirar timbres entre personas","description":"Resta amount (mayor que 0) del saldo de fromPersonId y lo suma a toPersonId en un solo movimiento de transferencia; retirar timbres es la misma operación en sentido inverso. creditType elige el saldo (1 timbres por omisión, 2 validaciones, 3 tickets) y, si el del origen no alcanza, responde 403 sin mover nada. Origen y destino deben ser personas distintas del tenant con id GUID (si no, 400) y solo el owner del tenant transfiere desde una persona que no es la autenticada (403). Docs: [transferir](https://docs.fiscalapi.com/stamps#transferir-timbres) y [retirar](https://docs.fiscalapi.com/stamps#retirar-timbres).","parameters":[{"name":"X-TIME-ZONE","in":"header","description":"Zona horaria IANA de las fechas sin zona del cuerpo JSON: el request las lee y la respuesta las escribe en ella. Si falta o no es válida, America/Mexico_City. No aplica a los campos que la operación documenta en UTC o en hora civil.","example":"America/Mexico_City","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Identificador único de la operación, de 1 a 64 caracteres ASCII visibles (se recomienda un UUID v4). Si la misma petición se repite con la misma llave de idempotencia dentro de las 24 h siguientes, no se vuelve a ejecutar: se devuelve la respuesta original, también si fue un error, con el header Idempotent-Replayed: true. Un 400 de validación no consume la llave de idempotencia. La misma llave de idempotencia con otra petición responde 422 y, mientras la original sigue en proceso, 409.","example":"550e8400-e29b-41d4-a716-446655440000","schema":{"maxLength":64,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fromPersonId":{"type":["null","string"]},"toPersonId":{"type":["null","string"]},"amount":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"comments":{"type":["null","string"]},"creditType":{"type":"integer","format":"int32"}}}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"ApiKey":[],"TenantKey":[]}],"securitySchemes":{"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"},"TenantKey":{"type":"apiKey","name":"X-TENANT-KEY","in":"header"}}}
package/data/source.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "openApi": {
3
3
  "source": "https://live.fiscalapi.com/api/openapi/v4.json",
4
- "sha256": "04bb1143e33759cbb9ed000de585a65999a4df88df9803668cc401842ee8cca0",
4
+ "sha256": "6f9a6438495ee294a3876bcf926fe8e068561be474e8102cbcf24291a6d8411e",
5
5
  "operations": 100
6
6
  },
7
7
  "docs": {
8
8
  "baseUrl": "https://docs.fiscalapi.com",
9
- "sha256": "19fd40897cb257fa21dd7d2ab2407ca3b51316a138024014a9c4a080c154c235",
10
- "sections": 388
9
+ "sha256": "518701bf364eb1d310bd9876d02a17eb688d1601e262ba5da765bf29316e8a1d",
10
+ "sections": 421
11
11
  }
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiscalapi/docs-mcp",
3
- "version": "4.0.461",
3
+ "version": "4.0.474",
4
4
  "description": "Servidor MCP de solo lectura con la documentación y la referencia de la API de FiscalAPI (CFDI 4.0) para agentes de código.",
5
5
  "type": "module",
6
6
  "bin": {