{"openapi":"3.1.0","info":{"contact":{"name":"Xestando","url":"https://xestando.com"},"description":"API de operaciones de negocio y cumplimiento para pymes españolas y europeas.\n\nCada operacion declara un nivel de riesgo. Las de nivel L2 y L3 no se ejecutan en la llamada: devuelven 202 con una operacion pendiente que una persona tiene que aprobar en Xestando. El catalogo completo, con el nivel de cada una, esta en GET /v1/capabilities.\n\nLas escrituras admiten la cabecera Idempotency-Key: repetir la misma peticion con la misma clave devuelve la respuesta de la primera y no repite el efecto.","title":"Xestando Business API","version":"v1"},"servers":[{"url":"https://api.xestando.com","description":"Produccion"}],"security":[{"oauth2":[]}],"paths":{"/v1/accounting/summary":{"get":{"operationId":"summary_1","parameters":[{"in":"query","name":"from","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"to","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingSummaryV1"}}},"description":"OK"}},"tags":["accounting-v-1-controller"]}},"/v1/capabilities":{"get":{"operationId":"catalog","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilityCatalogV1"}}},"description":"OK"}},"tags":["capabilities-v-1-controller"]}},"/v1/customers":{"get":{"operationId":"customers","parameters":[{"in":"query","name":"query","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPagePartyV1"}}},"description":"OK"}},"tags":["parties-v-1-controller"]},"post":{"operationId":"createCustomer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartyDraftV1"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartyV1"}}},"description":"OK"}},"tags":["parties-v-1-controller"]}},"/v1/customers/{id}":{"get":{"operationId":"customer","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartyV1"}}},"description":"OK"}},"tags":["parties-v-1-controller"]}},"/v1/documents":{"get":{"operationId":"list_1","parameters":[{"in":"query","name":"directory","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPageDocumentV1"}}},"description":"OK"}},"tags":["documents-v-1-controller"]},"post":{"operationId":"upload","parameters":[{"in":"query","name":"directory","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentV1"}}},"description":"OK"}},"tags":["documents-v-1-controller"]}},"/v1/documents/content":{"get":{"operationId":"content","parameters":[{"in":"query","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string","format":"binary"}}},"description":"OK"}},"tags":["documents-v-1-controller"]}},"/v1/expenses":{"get":{"operationId":"search_2","parameters":[{"in":"query","name":"from","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"to","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPageExpenseV1"}}},"description":"OK"}},"tags":["expenses-v-1-controller"]},"post":{"operationId":"create_3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseDraftV1"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseV1"}}},"description":"OK"}},"tags":["expenses-v-1-controller"]}},"/v1/expenses/{id}":{"delete":{"operationId":"delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}},"tags":["expenses-v-1-controller"]},"get":{"operationId":"get_5","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseV1"}}},"description":"OK"}},"tags":["expenses-v-1-controller"]}},"/v1/invoices":{"get":{"operationId":"search_1","parameters":[{"in":"query","name":"from","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"to","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"number","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPageInvoiceV1"}}},"description":"OK"}},"tags":["invoices-v-1-controller"]},"post":{"operationId":"create_2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDraftV1"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceV1"}}},"description":"OK"}},"tags":["invoices-v-1-controller"]}},"/v1/invoices/{id}":{"get":{"operationId":"get_4","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceV1"}}},"description":"OK"}},"tags":["invoices-v-1-controller"]}},"/v1/invoices/{id}/annul":{"post":{"operationId":"annul","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingApproval"}}},"description":"OK"}},"tags":["invoices-v-1-controller"]}},"/v1/invoices/{id}/compliance":{"get":{"operationId":"compliance","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceStatusV1"}}},"description":"OK"}},"tags":["invoices-v-1-controller"]}},"/v1/invoices/{id}/issue":{"post":{"operationId":"issue","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingApproval"}}},"description":"OK"}},"tags":["invoices-v-1-controller"]}},"/v1/invoices/{id}/send":{"post":{"operationId":"send","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingApproval"}}},"description":"OK"}},"tags":["invoices-v-1-controller"]}},"/v1/operations":{"get":{"operationId":"list_2","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPageOperationV1"}}},"description":"OK"}},"tags":["operations-v-1-controller"]}},"/v1/operations/{id}":{"get":{"operationId":"get_3","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationV1"}}},"description":"OK"}},"tags":["operations-v-1-controller"]}},"/v1/signatures/requests":{"get":{"operationId":"search","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPageSignatureRequestV1"}}},"description":"OK"}},"tags":["signatures-v-1-controller"]},"post":{"operationId":"request","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequestDraftV1"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingApproval"}}},"description":"OK"}},"tags":["signatures-v-1-controller"]}},"/v1/signatures/requests/{id}":{"get":{"operationId":"get_2","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequestV1"}}},"description":"OK"}},"tags":["signatures-v-1-controller"]}},"/v1/suppliers":{"get":{"operationId":"suppliers","parameters":[{"in":"query","name":"query","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPagePartyV1"}}},"description":"OK"}},"tags":["parties-v-1-controller"]},"post":{"operationId":"createSupplier","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartyDraftV1"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartyV1"}}},"description":"OK"}},"tags":["parties-v-1-controller"]}},"/v1/suppliers/{id}":{"get":{"operationId":"supplier","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartyV1"}}},"description":"OK"}},"tags":["parties-v-1-controller"]}},"/v1/usage-invoices":{"post":{"operationId":"create_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageInvoiceDraftV1"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageInvoiceV1"}}},"description":"OK"}},"tags":["usage-invoices-v-1-controller"]}},"/v1/usage-invoices/{operationId}":{"get":{"operationId":"get_1","parameters":[{"in":"path","name":"operationId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageInvoiceV1"}}},"description":"OK"}},"tags":["usage-invoices-v-1-controller"]}},"/v1/usage-plans":{"get":{"operationId":"list","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPageUsagePlanV1"}}},"description":"OK"}},"tags":["usage-plans-v-1-controller"]},"post":{"operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePlanDraftV1"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePlanApprovalV1"}}},"description":"OK"}},"tags":["usage-plans-v-1-controller"]}},"/v1/usage-plans/{id}":{"get":{"operationId":"get","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePlanV1"}}},"description":"OK"}},"tags":["usage-plans-v-1-controller"]}},"/v1/usage-plans/{id}/pause":{"post":{"operationId":"pause","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePlanV1"}}},"description":"OK"}},"tags":["usage-plans-v-1-controller"]}},"/v1/usage-plans/{id}/resume":{"post":{"operationId":"resume","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePlanV1"}}},"description":"OK"}},"tags":["usage-plans-v-1-controller"]}},"/v1/usage-plans/{id}/revoke":{"post":{"operationId":"revoke","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePlanV1"}}},"description":"OK"}},"tags":["usage-plans-v-1-controller"]}},"/v1/usage-records":{"post":{"operationId":"record","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRecordDraftV1"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}},"description":"OK"}},"tags":["usage-records-v-1-controller"]}},"/v1/usage-records/summary":{"get":{"operationId":"summary","parameters":[{"in":"query","name":"planId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}},"description":"OK"}},"tags":["usage-records-v-1-controller"]}}},"components":{"schemas":{"AccountingSummaryV1":{"type":"object","properties":{"expenses":{"type":"number","format":"double"},"from":{"type":"string","format":"date"},"income":{"type":"number","format":"double"},"result":{"type":"number","format":"double"},"to":{"type":"string","format":"date"}}},"ApiPageDocumentV1":{"type":"object","properties":{"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DocumentV1"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}}},"ApiPageExpenseV1":{"type":"object","properties":{"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseV1"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}}},"ApiPageInvoiceV1":{"type":"object","properties":{"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceV1"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}}},"ApiPageOperationV1":{"type":"object","properties":{"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OperationV1"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}}},"ApiPagePartyV1":{"type":"object","properties":{"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PartyV1"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}}},"ApiPageSignatureRequestV1":{"type":"object","properties":{"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SignatureRequestV1"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}}},"ApiPageUsagePlanV1":{"type":"object","properties":{"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/UsagePlanV1"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}}},"CapabilityCatalogV1":{"type":"object","properties":{"documentationUrl":{"type":"string"},"openApiUrl":{"type":"string"},"operations":{"type":"array","items":{"$ref":"#/components/schemas/CapabilityV1"}},"product":{"type":"string"},"riskLevels":{"type":"object","additionalProperties":{"type":"string"}},"scopeEnforced":{"type":"boolean"},"version":{"type":"string"}}},"CapabilityV1":{"type":"object","properties":{"group":{"type":"string"},"id":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"requiresApproval":{"type":"boolean"},"risk":{"type":"string"},"scope":{"type":"string"},"summary":{"type":"string"}}},"ComplianceStatusV1":{"type":"object","properties":{"completedAt":{"type":"string","format":"date-time"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"fingerprint":{"type":"string"},"identifier":{"type":"string"},"issuedAt":{"type":"string","format":"date-time"},"qrPayload":{"type":"string"},"regime":{"type":"string"},"status":{"type":"string"}}},"DocumentV1":{"type":"object","properties":{"modifiedAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"path":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64"}}},"Event":{"type":"object","properties":{"description":{"type":"string","maxLength":200,"minLength":0},"externalId":{"type":"string","maxLength":120,"minLength":0},"occurredAt":{"type":"string","format":"date-time"},"quantity":{"type":"number","format":"double","minimum":0},"unitPriceCents":{"type":"integer","format":"int64","minimum":0}},"required":["description","externalId","quantity","unitPriceCents"]},"ExpenseDraftV1":{"type":"object","properties":{"baseAmount":{"type":"number","format":"double"},"category":{"type":"string","maxLength":60,"minLength":0},"date":{"type":"string","format":"date"},"description":{"type":"string","maxLength":200,"minLength":0},"documentClass":{"type":"string","maxLength":20,"minLength":0},"documentNumber":{"type":"string","maxLength":60,"minLength":0},"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineV1"}},"supplier":{"$ref":"#/components/schemas/PartyDraftV1"},"taxAmount":{"type":"number","format":"double"},"taxRate":{"type":"number","format":"double"},"taxWithheld":{"type":"number","format":"double"},"total":{"type":"number","format":"double"}}},"ExpenseV1":{"type":"object","properties":{"attachment":{"type":"string"},"baseAmount":{"type":"number","format":"double"},"category":{"type":"string"},"date":{"type":"string","format":"date"},"documentClass":{"type":"string"},"documentNumber":{"type":"string"},"id":{"type":"string","format":"uuid"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineV1"}},"supplier":{"$ref":"#/components/schemas/PartyV1"},"taxAmount":{"type":"number","format":"double"},"taxWithheld":{"type":"number","format":"double"},"total":{"type":"number","format":"double"}}},"InvoiceDraftV1":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/PartyDraftV1"},"issueDate":{"type":"string","format":"date"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineV1"}},"notes":{"type":"string","maxLength":500,"minLength":0},"seriesCode":{"type":"string","maxLength":20,"minLength":0},"taxWithheldPercentage":{"type":"number","format":"double"}},"required":["customer"]},"InvoiceV1":{"type":"object","properties":{"baseAmount":{"type":"number","format":"double"},"compliance":{"$ref":"#/components/schemas/ComplianceStatusV1"},"currency":{"type":"string"},"customer":{"$ref":"#/components/schemas/PartyV1"},"id":{"type":"string","format":"uuid"},"issueDate":{"type":"string","format":"date"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineV1"}},"notes":{"type":"string"},"number":{"type":"string"},"seriesCode":{"type":"string"},"taxAmount":{"type":"number","format":"double"},"taxWithheld":{"type":"number","format":"double"},"total":{"type":"number","format":"double"}}},"LineV1":{"type":"object","properties":{"baseAmount":{"type":"number","format":"double"},"description":{"type":"string"},"quantity":{"type":"number","format":"double"},"taxAmount":{"type":"number","format":"double"},"taxRate":{"type":"number","format":"double"},"total":{"type":"number","format":"double"},"unitPrice":{"type":"number","format":"double"}}},"OperationV1":{"type":"object","properties":{"action":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"error":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"rejectionReason":{"type":"string"},"resolvedAt":{"type":"string","format":"date-time"},"result":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"}}},"PartyDraftV1":{"type":"object","properties":{"address":{"type":"string","maxLength":300,"minLength":0},"countryCode":{"type":"string","maxLength":3,"minLength":0},"email":{"type":"string","maxLength":200,"minLength":0},"name":{"type":"string","maxLength":200,"minLength":0},"phone":{"type":"string","maxLength":40,"minLength":0},"postCode":{"type":"string","maxLength":20,"minLength":0},"province":{"type":"string","maxLength":100,"minLength":0},"taxId":{"type":"string","maxLength":30,"minLength":0},"town":{"type":"string","maxLength":100,"minLength":0},"tradeName":{"type":"string","maxLength":200,"minLength":0}},"required":["name"]},"PartyV1":{"type":"object","properties":{"address":{"type":"string"},"countryCode":{"type":"string"},"email":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"phone":{"type":"string"},"postCode":{"type":"string"},"province":{"type":"string"},"role":{"type":"string"},"taxId":{"type":"string"},"town":{"type":"string"},"tradeName":{"type":"string"}}},"PendingApproval":{"type":"object","properties":{"approvalUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"message":{"type":"string"},"operation":{"type":"string"},"operationId":{"type":"string","format":"uuid"},"requiresDeviceVerification":{"type":"boolean"},"status":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"}}},"SignatureRequestDraftV1":{"type":"object","properties":{"documentPath":{"type":"string","maxLength":400,"minLength":0},"level":{"type":"string","maxLength":20,"minLength":0},"signerPhone":{"type":"string","maxLength":40,"minLength":0}},"required":["documentPath"]},"SignatureRequestV1":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"documentName":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"level":{"type":"string"},"resolvedAt":{"type":"string","format":"date-time"},"signerPhoneHint":{"type":"string"},"smsVerified":{"type":"boolean"},"status":{"type":"string"}}},"UsageInvoiceDraftV1":{"type":"object","properties":{"clientRef":{"type":"string","format":"uuid"},"concept":{"type":"string","maxLength":200,"minLength":0},"currency":{"type":"string","maxLength":3,"minLength":0},"emisorId":{"type":"string"},"externalRef":{"type":"string","maxLength":100,"minLength":0},"lines":{"type":"array","items":{"$ref":"#/components/schemas/UsageLineV1"}},"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"}},"required":["clientRef"]},"UsageInvoiceLineCommand":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number","format":"double"},"unitPriceCents":{"type":"integer","format":"int64"}}},"UsageInvoiceV1":{"type":"object","properties":{"clientRef":{"type":"string","format":"uuid"},"concept":{"type":"string"},"confirmationUrl":{"type":"string"},"currency":{"type":"string"},"error":{"type":"string"},"invoiceId":{"type":"string","format":"uuid"},"message":{"type":"string"},"operationId":{"type":"string","format":"uuid"},"paid":{"type":"boolean"},"paymentUrl":{"type":"string"},"periodFrom":{"type":"string","format":"date"},"periodTo":{"type":"string","format":"date"},"planId":{"type":"string","format":"uuid"},"reason":{"type":"string"},"status":{"type":"string"},"subtotalMinor":{"type":"integer","format":"int64"},"taxJurisdiction":{"type":"string"},"taxKind":{"type":"string"},"taxMinor":{"type":"integer","format":"int64"},"taxRate":{"type":"number","format":"double"},"totalMinor":{"type":"integer","format":"int64"}}},"UsageLineV1":{"type":"object","properties":{"description":{"type":"string","maxLength":200,"minLength":0},"quantity":{"type":"number","format":"double","minimum":0},"unitPriceCents":{"type":"integer","format":"int64","minimum":0}},"required":["description","quantity","unitPriceCents"]},"UsagePlanApprovalV1":{"type":"object","properties":{"approval":{"$ref":"#/components/schemas/PendingApproval"},"plan":{"$ref":"#/components/schemas/UsagePlanV1"}}},"UsagePlanDraftV1":{"type":"object","properties":{"autoCharge":{"type":"boolean"},"autoIssue":{"type":"boolean"},"clientRef":{"type":"string","format":"uuid"},"concept":{"type":"string","maxLength":200,"minLength":0},"currency":{"type":"string","maxLength":3,"minLength":0},"emisorId":{"type":"string"},"externalRef":{"type":"string","maxLength":100,"minLength":0},"periodCapCents":{"type":"integer","format":"int64","minimum":0},"seriesId":{"type":"string","format":"uuid"},"taxRate":{"type":"number","format":"double","maximum":100.0,"minimum":0.0}},"required":["clientRef"]},"UsagePlanV1":{"type":"object","properties":{"authorizedAt":{"type":"string","format":"date-time"},"autoCharge":{"type":"boolean"},"autoIssue":{"type":"boolean"},"clientRef":{"type":"string","format":"uuid"},"concept":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string"},"externalRef":{"type":"string"},"id":{"type":"string","format":"uuid"},"paymentMethodStored":{"type":"boolean"},"periodCapCents":{"type":"integer","format":"int64"},"status":{"type":"string"},"taxRate":{"type":"number","format":"double"}}},"UsageRecordDraftV1":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"},"minItems":1},"planId":{"type":"string","format":"uuid"}},"required":["events","planId"]},"UsageSummary":{"type":"object","properties":{"currency":{"type":"string"},"feeMinor":{"type":"integer","format":"int64"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/UsageInvoiceLineCommand"}},"netMinor":{"type":"integer","format":"int64"},"planId":{"type":"string","format":"uuid"},"records":{"type":"integer","format":"int32"},"subtotalMinor":{"type":"integer","format":"int64"},"taxMinor":{"type":"integer","format":"int64"},"totalMinor":{"type":"integer","format":"int64"}}}},"securitySchemes":{"oauth2":{"bearerFormat":"JWT","description":"Token emitido por https://oauth2.xestando.com","scheme":"bearer","type":"http"}}},"x-xestando-capabilities":"/v1/capabilities"}