{ "openapi": "3.1.0", "externalDocs": { "url": "https://ayuda.clara.com.mx/hc/es-mx/articles/17827687040787-Clara-API" }, "components": { "securitySchemes": { "mutualTLS": { "type": "mutualTLS" }, "oauth2": { "flows": { "clientCredentials": { "scopes": {}, "tokenUrl": "https://public-api..clara.com/oauth/token" } }, "type": "oauth2" } }, "schemas": { "CreationGroupResponse": { "properties": { "uuid": { "format": "uuid", "type": "string" } } }, "CardV2": { "properties": { "status": { "description": "Status of the card", "type": "string" }, "threshold": { "format": "float", "description": "Threshold for the card", "type": "number" }, "claraStatus": { "description": "Status of the card", "type": "string" }, "type": { "description": "Type of the card", "type": "string" }, "user": { "description": "User of the card", "$ref": "#/components/schemas/InternalUser" }, "maskedPan": { "description": "Card number", "type": "string" }, "alias": { "description": "Alias or nickname for the card", "type": "string" }, "brand": { "description": "Periodicity of the card", "type": "string" }, "lockCode": { "type": "string" }, "periodicity": { "description": "Periodicity of the card", "type": "string" }, "uuid": { "description": "UUID of the card", "type": "string" } } }, "TransactionV2": { "properties": { "card": { "description": "Card used in the transaction", "$ref": "#/components/schemas/TransactionCardV2" }, "authorizationNumber": { "description": "Authorization Number", "type": "string" }, "type": { "description": "Type of the transaction", "type": "string" }, "lastUpdate": { "type": "string" }, "merchant": { "$ref": "#/components/schemas/Merchant" }, "bankConcept": { "$ref": "#/components/schemas/BankConcept" }, "accountingDate": { "format": "date", "description": "Accounting date of the transaction", "type": "string" }, "hasInvoice": { "type": "boolean" }, "uuid": { "description": "UUID of the transaction", "type": "string" }, "attachments": { "items": { "$ref": "#/components/schemas/InternalAttachment" }, "type": "array" }, "hasReceipt": { "type": "boolean" }, "comment": { "description": "Comment associated with the transaction", "type": "string" }, "amount": { "$ref": "#/components/schemas/Amount" }, "invoices": { "items": { "$ref": "#/components/schemas/InvoiceV2" }, "type": "array" }, "operationDate": { "format": "date", "description": "Operation date of the transaction", "type": "string" }, "billingStatement": { "$ref": "#/components/schemas/BillingStatementV2" }, "originalAmount": { "$ref": "#/components/schemas/Amount" }, "labels": { "items": { "$ref": "#/components/schemas/InternalLabel" }, "type": "array" }, "label": { "description": "Transaction description", "type": "string" }, "status": { "description": "Transaction operation status. Values include 'AU' for Pending and 'OP' for Authorized transactions.", "type": "string" } } }, "Attachment": { "properties": { "type": { "format": "int32", "type": "integer" }, "fileName": { "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "originalId": { "type": "integer" }, "uuid": { "format": "uuid", "type": "string" }, "subtypeName": { "type": "string" }, "entityTypeName": { "type": "string" }, "createdBy": { "type": "integer" }, "updatedBy": { "type": "integer" }, "status": { "format": "int32", "type": "integer" }, "validationStatus": { "type": "string" }, "fileFormat": { "type": "string" }, "preSignedUrl": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "entityId": { "type": "integer" } } }, "UserPage": { "properties": { "empty": { "type": "boolean" }, "size": { "format": "int32", "type": "integer" }, "last": { "type": "boolean" }, "numberOfElements": { "format": "int32", "type": "integer" }, "content": { "items": { "$ref": "#/components/schemas/UserV2" }, "type": "array" }, "first": { "type": "boolean" }, "pageable": { "$ref": "#/components/schemas/PageableObject" }, "totalElements": { "format": "int64", "type": "integer" }, "number": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" }, "totalPages": { "format": "int32", "type": "integer" } } }, "GroupPage": { "properties": { "empty": { "type": "boolean" }, "size": { "format": "int32", "type": "integer" }, "last": { "type": "boolean" }, "numberOfElements": { "format": "int32", "type": "integer" }, "content": { "items": { "$ref": "#/components/schemas/GroupV2" }, "type": "array" }, "first": { "type": "boolean" }, "pageable": { "$ref": "#/components/schemas/PageableObject" }, "totalElements": { "format": "int64", "type": "integer" }, "number": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" }, "totalPages": { "format": "int32", "type": "integer" } } }, "CardPage": { "properties": { "empty": { "type": "boolean" }, "size": { "format": "int32", "type": "integer" }, "last": { "type": "boolean" }, "numberOfElements": { "format": "int32", "type": "integer" }, "content": { "items": { "$ref": "#/components/schemas/CardV2" }, "type": "array" }, "first": { "type": "boolean" }, "pageable": { "$ref": "#/components/schemas/PageableObject" }, "totalElements": { "format": "int64", "type": "integer" }, "number": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" }, "totalPages": { "format": "int32", "type": "integer" } } }, "AttachmentDTO": { "properties": { "format": { "type": "string" }, "updatedAt": { "type": "string" }, "type": { "type": "string" }, "fileName": { "type": "string" }, "url": { "type": "string" }, "uuid": { "format": "uuid", "type": "string" } } }, "ToggleCardLockRequest": { "properties": { "locked": { "type": "boolean" } }, "required": [ "locked" ] }, "InternalUserV2": { "properties": { "taxIdentifier": { "type": "string" }, "erpId": { "type": "string" }, "role": { "type": "string" }, "userFullName": { "type": "string" }, "uuid": { "type": "string" }, "location": { "$ref": "#/components/schemas/Location" }, "username": { "type": "string" }, "status": { "type": "string" } } }, "TransactionCardV2": { "properties": { "status": { "description": "Status of the card", "type": "string" }, "threshold": { "format": "float", "description": "Threshold for the card", "type": "number" }, "claraStatus": { "description": "Status of the card", "type": "string" }, "type": { "description": "Type of the card", "type": "string" }, "user": { "description": "User of the card", "$ref": "#/components/schemas/InternalUser" }, "maskedPan": { "description": "Card number", "type": "string" }, "alias": { "description": "Alias or nickname for the card", "type": "string" }, "brand": { "description": "Periodicity of the card", "type": "string" }, "lockCode": { "type": "string" }, "periodicity": { "description": "Periodicity of the card", "type": "string" }, "uuid": { "description": "UUID of the card", "type": "string" } } }, "PaymentResponseList": { "properties": { "empty": { "type": "boolean" }, "last": { "$ref": "#/components/schemas/PaymentResponse" }, "first": { "$ref": "#/components/schemas/PaymentResponse" } }, "items": { "$ref": "#/components/schemas/PaymentResponse" }, "type": "array" }, "InternalUser": { "properties": { "taxIdentifier": { "type": "string" }, "erpId": { "type": "string" }, "role": { "type": "string" }, "userFullName": { "type": "string" }, "uuid": { "type": "string" }, "location": { "$ref": "#/components/schemas/InternalLocation" }, "username": { "type": "string" }, "status": { "type": "string" } } }, "InvoicePage": { "properties": { "empty": { "type": "boolean" }, "size": { "format": "int32", "type": "integer" }, "last": { "type": "boolean" }, "numberOfElements": { "format": "int32", "type": "integer" }, "content": { "items": { "$ref": "#/components/schemas/InvoiceV2" }, "type": "array" }, "first": { "type": "boolean" }, "pageable": { "$ref": "#/components/schemas/PageableObject" }, "totalElements": { "format": "int64", "type": "integer" }, "number": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" }, "totalPages": { "format": "int32", "type": "integer" } } }, "PaymentResponse": { "properties": { "digitableLine": { "description": "Number sequence that describes the payment", "example": "00193373700000001000500940144816060680935031", "type": "string" }, "externalId": { "description": "External Id of the optional boleto", "example": 4567, "type": "string" }, "barcode": { "description": "Bar code number that describes the payment", "example": "00190500954014481606906809350314337370000000100", "type": "string" }, "errorMessage": { "description": "Error message of the processing of the payment", "example": "Digitable line or barcode not found", "type": "string" }, "id": { "description": "Id of the payment", "example": "9e52e1b3-e846-4bb5-8439-2430af8c3cff", "type": "string" }, "batchId": { "description": "Id of the batchId of all these payments", "example": "a0c82a20-ac09-4cfd-b429-d0623585911e", "type": "string" }, "status": { "enum": [ "SENT", "CREATED", "PROCESSING", "SETTLED", "PAID", "CANCELLED", "ERROR", "INVALID" ], "description": "Status of the payment", "example": "SENT", "type": "string" } } }, "InternalAttachment": { "properties": { "updatedAt": { "type": "string" }, "uuid": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "fileName": { "type": "string" }, "preSignedUrl": { "type": "string" } } }, "SortObject": { "properties": { "direction": { "type": "string" }, "ignoreCase": { "type": "boolean" }, "ascending": { "type": "boolean" }, "property": { "type": "string" }, "nullHandling": { "type": "string" } } }, "UpdateLabelRequest": { "properties": { "labelName": { "type": "string" } }, "required": [ "labelName" ] }, "TransactionPage": { "properties": { "empty": { "type": "boolean" }, "size": { "format": "int32", "type": "integer" }, "last": { "type": "boolean" }, "numberOfElements": { "format": "int32", "type": "integer" }, "content": { "items": { "$ref": "#/components/schemas/TransactionV2" }, "type": "array" }, "first": { "type": "boolean" }, "pageable": { "$ref": "#/components/schemas/PageableObject" }, "totalElements": { "format": "int64", "type": "integer" }, "number": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" }, "totalPages": { "format": "int32", "type": "integer" } } }, "LabelPage": { "properties": { "empty": { "type": "boolean" }, "size": { "format": "int32", "type": "integer" }, "last": { "type": "boolean" }, "numberOfElements": { "format": "int32", "type": "integer" }, "content": { "items": { "$ref": "#/components/schemas/LabelV2" }, "type": "array" }, "first": { "type": "boolean" }, "pageable": { "$ref": "#/components/schemas/PageableObject" }, "totalElements": { "format": "int64", "type": "integer" }, "number": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" }, "totalPages": { "format": "int32", "type": "integer" } } }, "InvoiceV2": { "properties": { "xmlCode": { "type": "string" }, "documentDate": { "description": "Date when the document was issued", "type": "string" }, "tax": { "$ref": "#/components/schemas/Tax" }, "invoiceId": { "description": "Unique Invoice ID identifier for the invoice", "type": "string" }, "issuer": { "$ref": "#/components/schemas/Issuer" }, "amount": { "$ref": "#/components/schemas/Amount" }, "taxReceipts": { "$ref": "#/components/schemas/TaxReceipts" }, "invoiceNumber": { "description": "Sequential number of the invoice", "type": "string" }, "xmlStatus": { "type": "string" }, "taxRegime": { "description": "Fiscal regime under which the invoice is issued", "type": "string" } } }, "Amount": { "properties": { "subTotal": { "type": "number" }, "currency": { "type": "string" }, "total": { "type": "number" } } }, "LabelsRequestCreate": { "properties": { "names": { "items": { "type": "string" }, "type": "array" } }, "required": [ "names" ] }, "UpdateCardThresholdRequest": { "properties": { "threshold": { "format": "double", "type": "number" } }, "required": [ "threshold" ] }, "Issuer": { "properties": { "rfc": { "type": "string" }, "businessName": { "type": "string" } } }, "PaymentPage": { "properties": { "empty": { "type": "boolean" }, "size": { "format": "int32", "type": "integer" }, "last": { "type": "boolean" }, "numberOfElements": { "format": "int32", "type": "integer" }, "content": { "items": { "$ref": "#/components/schemas/Payment" }, "type": "array" }, "first": { "type": "boolean" }, "pageable": { "$ref": "#/components/schemas/PageableObject" }, "totalElements": { "format": "int64", "type": "integer" }, "number": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" }, "totalPages": { "format": "int32", "type": "integer" } } }, "LocationV2": { "properties": { "name": { "description": "Name of the location", "type": "string" }, "uuid": { "description": "UUID of the location", "type": "string" } } }, "Merchant": { "properties": { "description": { "type": "string" }, "code": { "type": "string" }, "commerceName": { "type": "string" }, "category": { "$ref": "#/components/schemas/Category" } } }, "LocationPage": { "properties": { "empty": { "type": "boolean" }, "size": { "format": "int32", "type": "integer" }, "last": { "type": "boolean" }, "numberOfElements": { "format": "int32", "type": "integer" }, "content": { "items": { "$ref": "#/components/schemas/LocationV2" }, "type": "array" }, "first": { "type": "boolean" }, "pageable": { "$ref": "#/components/schemas/PageableObject" }, "totalElements": { "format": "int64", "type": "integer" }, "number": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" }, "totalPages": { "format": "int32", "type": "integer" } } }, "CreationCardRequest": { "properties": { "threshold": { "format": "double", "type": "number" }, "type": { "format": "int32", "type": "integer" }, "companyUUID": { "format": "uuid", "type": "string" }, "alias": { "type": "string" }, "businessType": { "format": "int32", "type": "integer" }, "periodicityType": { "format": "int32", "type": "integer" }, "userUUID": { "format": "uuid", "type": "string" } }, "required": [ "alias", "businessType", "periodicityType", "threshold", "type", "userUUID" ] }, "UserV2": { "properties": { "taxIdentifier": { "description": "Tax identifier of the user", "type": "string" }, "erpId": { "description": "ERP ID of the user", "type": "string" }, "role": { "description": "Role information of the user", "type": "string" }, "cards": { "items": { "$ref": "#/components/schemas/UserCard" }, "type": "array" }, "userFullName": { "description": "Full name of the user", "type": "string" }, "manager": { "$ref": "#/components/schemas/InternalUserV2" }, "uuid": { "description": "UUID of the user", "type": "string" }, "groups": { "items": { "$ref": "#/components/schemas/GroupV2" }, "type": "array" }, "location": { "description": "Location associated with the user", "$ref": "#/components/schemas/LocationV2" }, "username": { "description": "Username of the user", "type": "string" }, "status": { "description": "Status of the user", "type": "string" } } }, "TaxReceipts": { "properties": { "paymentMethod": { "type": "string" }, "cfdi": { "type": "string" } } }, "InternalLabel": { "properties": { "active": { "type": "boolean" }, "name": { "type": "string" }, "uuid": { "type": "string" } } }, "ListTransactionAttachmentsDTO": { "properties": { "empty": { "type": "boolean" }, "last": { "$ref": "#/components/schemas/Attachment" }, "first": { "$ref": "#/components/schemas/Attachment" } }, "items": { "$ref": "#/components/schemas/Attachment" }, "type": "array" }, "InternalLocation": { "properties": { "name": { "type": "string" }, "uuid": { "type": "string" } } }, "Category": { "properties": { "description": { "type": "string" }, "code": { "type": "string" } } }, "CreationGroupRequest": { "properties": { "name": { "type": "string" } }, "required": [ "name" ] }, "UpdateGroupRequest": { "properties": { "status": { "format": "int32", "type": "integer" }, "threshold": { "format": "double", "type": "number" }, "name": { "type": "string" }, "managerUUID": { "format": "uuid", "type": "string" }, "uuid": { "format": "uuid", "type": "string" } }, "required": [ "managerUUID", "name", "status", "threshold", "uuid" ] }, "UserResponse": { "properties": { "description": { "type": "string" } } }, "BillingStatementDetailsV2": { "properties": { "dueDate": { "description": "The due date from the billing statement", "type": "string" }, "end": { "description": "The ending date from the billing statement", "type": "string" }, "numberOfTransactions": { "format": "int32", "description": "The total of transactions being shown", "type": "integer" }, "start": { "description": "The starting date from the billing statement", "type": "string" }, "transactions": { "description": "The list of transactions", "items": { "$ref": "#/components/schemas/TransactionV2" }, "type": "array" }, "transactionsTotalAmount": { "description": "The sum of transactions being shown", "type": "number" } } }, "Tax": { "properties": { "transferred": { "$ref": "#/components/schemas/Transferred" }, "retained": { "$ref": "#/components/schemas/Retained" } } }, "PaymentRequest": { "properties": { "boletos": { "description": "List of boletos to pay", "items": { "$ref": "#/components/schemas/BoletoRequest" }, "type": "array" } }, "required": [ "boletos" ] }, "BoletoRequest": { "properties": { "digitableLine": { "description": "Number sequence that describes the payment. If both are sent, barcode is taken into account.", "example": "00193373700000001000500940144816060680935031", "type": "string" }, "externalId": { "description": "External Id of the optional boleto", "example": 4567, "type": "string" }, "barcode": { "description": "Bar code number that describes the payment. If both are sent, barcode is taken into account.", "example": "00190500954014481606906809350314337370000000100", "type": "string" } } }, "PageableObject": { "properties": { "paged": { "type": "boolean" }, "offset": { "format": "int64", "type": "integer" }, "unpaged": { "type": "boolean" }, "pageNumber": { "format": "int32", "type": "integer" }, "pageSize": { "format": "int32", "type": "integer" }, "sort": { "items": { "$ref": "#/components/schemas/SortObject" }, "type": "array" } } }, "Retained": { "properties": { "ieps": { "type": "number" }, "isr": { "type": "number" }, "iva": { "type": "number" } } }, "Location": { "properties": { "name": { "type": "string" }, "uuid": { "type": "string" } } }, "BillingStatementV2": { "properties": { "start": { "type": "string" }, "dueDate": { "type": "string" }, "end": { "type": "string" } } }, "LabelV2": { "properties": { "active": { "type": "boolean" }, "name": { "type": "string" }, "uuid": { "type": "string" } } }, "Payment": { "properties": { "digitableLine": { "description": "Number sequence that describes the payment", "example": "00193373700000001000500940144816060680935031", "type": "string" }, "externalId": { "description": "External Id of the optional boleto", "example": 4567, "type": "string" }, "barcode": { "description": "Bar code number that describes the payment", "example": "00190500954014481606906809350314337370000000100", "type": "string" }, "beneficiaryDocumentNumber": { "description": "Document number of the beneficiary", "example": 7707650000110, "type": "string" }, "errorCode": { "description": "Error code of the processing of the payment", "example": 500, "type": "string" }, "paymentDatetime": { "format": "date-time", "description": "Payment date and time", "example": "2024-09-05T14:04:56.283Z", "type": "string" }, "beneficiaryName": { "description": "Name of the beneficiary", "example": "AYMORE CREDITO, FINANCIAMENTO E INV S.AJ", "type": "string" }, "errorMessage": { "description": "Error message of the processing of the payment", "example": "Digitable line or barcode not found", "type": "string" }, "batchId": { "description": "Id of the batchId of all these payments", "example": "a0c82a20-ac09-4cfd-b429-d0623585911e", "type": "string" }, "updateDate": { "format": "date-time", "description": "Date of the last update of the payment", "example": "2024-08-26T14:00:14.04001", "type": "string" }, "transactionId": { "description": "The transaction ID related to the receipt", "example": 3057805688, "type": "string" }, "companyUuid": { "format": "uuid", "description": "Unique 32 characters identifier from the company in Clara", "example": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "type": "string" }, "status": { "enum": [ "SENT", "CREATED", "PROCESSING", "SETTLED", "PAID", "CANCELLED", "ERROR", "INVALID" ], "description": "Status of the payment", "example": "PAID", "type": "string" }, "timestamp": { "format": "date-time", "description": "Timestamp of the creation of the payment", "example": "2024-08-25T15:00:14.04001", "type": "string" }, "accountId": { "description": "Unique 8 digits identifier from the company digital principal account", "example": 51702669, "type": "string" }, "id": { "description": "Id of the payment", "example": "9e52e1b3-e846-4bb5-8439-2430af8c3cff", "type": "string" } } }, "UserCard": { "properties": { "threshold": { "format": "float", "description": "Threshold for the card", "type": "number" }, "claraStatus": { "description": "Status of the card", "type": "string" }, "type": { "description": "Type of the card", "type": "string" }, "maskedPan": { "description": "Card number", "type": "string" }, "alias": { "description": "Alias or nickname for the card", "type": "string" }, "brand": { "description": "Periodicity of the card", "type": "string" }, "periodicity": { "description": "Periodicity of the card", "type": "string" }, "uuid": { "description": "UUID of the card", "type": "string" } } }, "Transferred": { "properties": { "ieps": { "type": "number" }, "iva": { "type": "number" } } }, "GroupV2": { "properties": { "name": { "description": "Name of the group", "type": "string" }, "uuid": { "description": "UUID of the group", "type": "string" } } }, "BankConcept": { "properties": { "description": { "type": "string" }, "number": { "type": "string" } } } } }, "paths": { "/api/v2/invoices": { "get": { "tags": [ "Invoices" ], "operationId": "findAllInvoices", "summary": "Find all Invoices with optional filters", "description": "Find all Invoices with optional filters", "parameters": [ { "in": "query", "description": "Zero-based page index (0..N)", "name": "page", "schema": { "default": 0 } }, { "in": "query", "description": "The size of the page to be returned", "name": "size", "schema": { "default": 100 } }, { "in": "query", "description": "Invoice number to filter invoices", "name": "invoiceNumber", "schema": { "type": "string" } }, { "in": "query", "description": "Transaction UUID to filter invoices", "name": "transactionUuid", "schema": { "type": "string" } }, { "in": "query", "description": "Invoice ID to filter invoices", "name": "invoiceId", "schema": { "type": "string" } }, { "in": "query", "description": "Start date for invoice date range filter", "example": "YYYY-MM-DD", "name": "startDocumentDate", "schema": { "type": "string" } }, { "in": "query", "description": "End date for invoice date range filter", "example": "YYYY-MM-DD", "name": "endDocumentDate", "schema": { "type": "string" } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoicePage" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/api/v2/locations": { "get": { "tags": [ "Locations" ], "operationId": "findAllLocations", "summary": "Find all locations", "description": "Find all locations", "parameters": [ { "in": "query", "description": "Zero-based page index (0..N)", "name": "page", "schema": { "default": 0 } }, { "in": "query", "description": "The size of the page to be returned", "name": "size", "schema": { "default": 100 } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationPage" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/api/v2/locations/{uuid}": { "get": { "tags": [ "Locations" ], "operationId": "findLocation", "summary": "Find location by UUID", "description": "Find location by UUID", "parameters": [ { "in": "path", "description": "Location UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationV2" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/api/v2/cards/{uuid}": { "get": { "tags": [ "Cards" ], "operationId": "findCards", "summary": "Find cards by UUID", "description": "Find cards by UUID", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardV2" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "parameters": [ { "in": "path", "description": "Card UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ] }, "delete": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Cards" ], "operationId": "deleteCard", "summary": "Delete Card", "description": "Delete Card", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" } }, "parameters": [ { "in": "path", "description": "Card's UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ] }, "patch": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Cards" ], "operationId": "updateCard", "summary": "Update Card Threshold", "description": "Update Card Threshold", "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/UpdateCardThresholdRequest" } } } }, "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" } }, "parameters": [ { "in": "path", "description": "Card's UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ] } }, "/api/v2/attachments": { "get": { "tags": [ "Attachments" ], "operationId": "get-all-attachments", "summary": "Get a list of attachments and it's respective transactions", "description": "Get a list of attachments and it's respective transactions", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation ()", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListTransactionAttachmentsDTO" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ] } }, "/api/v2/transactions": { "get": { "tags": [ "Transactions" ], "operationId": "findAllTransactions", "summary": "Find all transactions", "description": "Find all transactions", "parameters": [ { "in": "query", "description": "Zero-based page index (0..N)", "name": "page", "schema": { "default": 0 } }, { "in": "query", "description": "The size of the page to be returned", "name": "size", "schema": { "default": 100 } }, { "in": "query", "description": "Sort the results by specific fields and directions. (accountingDate | operationDate),(ASC | DESC)", "example": "accountingDate,ASC", "name": "sort", "schema": { "type": "string" } }, { "in": "query", "description": "Operation start date", "example": "YYYY-MM-DD", "name": "operationDateRangeStart", "schema": { "type": "string" } }, { "in": "query", "description": "Operation max date", "example": "YYYY-MM-DD", "name": "operationDateRangeEnd", "schema": { "type": "string" } }, { "in": "query", "description": "Accounting start date", "example": "YYYY-MM-DD", "name": "accountingDateRangeStart", "schema": { "type": "string" } }, { "in": "query", "description": "Accounting max date", "example": "YYYY-MM-DD", "name": "accountingDateRangeEnd", "schema": { "type": "string" } }, { "in": "query", "description": "UUID of the user associated with the transactions", "name": "userUuid", "schema": { "type": "string" } }, { "in": "query", "description": "UUID of the card associated with the transactions", "name": "cardUuid", "schema": { "type": "string" } }, { "in": "query", "description": "Masked Pan Last Digits of the card associated with the transactions", "name": "cardLastDigits", "schema": { "type": "string" } }, { "in": "query", "description": "Merchant category of the transactions", "name": "merchantCategoryDescription", "schema": { "type": "string" } }, { "in": "query", "description": "ERP id of the transaction user", "name": "userErpId", "schema": { "type": "string" } }, { "in": "query", "description": "Username of the transaction user", "name": "username", "schema": { "type": "string" } }, { "in": "query", "description": "Operation status", "name": "operationTypeCode", "schema": { "enum": [ "ECONOMIC_CONCEPT", "NOTIFICATION", "PENDING", "PAYMENT", "PAYMENT_LITE", "PAYMENT_SERVICE", "AUTHORIZED" ] } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation (Invoice info of the transaction is available only for transactions in Mexico.)", "content": { "application/json": { "schema": { "example": { "empty": false, "size": 100, "last": false, "numberOfElements": 100, "content": [ { "card": { "status": "ACTIVE_HELD_BY_CARDHOLDER", "threshold": 1500.0, "claraStatus": "ACTIVE", "type": "MASTER_VIRTUAL", "user": { "taxIdentifier": "SOMEUSERNAMEHERE", "erpId": null, "role": "COMPANY_OWNER", "userFullName": "Some Username Here", "uuid": "d253a344-13d5-4c5d-b397-f6973611082d", "location": null, "username": "some.username@clara.team", "status": "ACTIVE" }, "maskedPan": "123456******9876", "alias": "Tarjeta Demo Some User", "brand": "MASTER", "lockCode": "UNLOCKED", "periodicity": "MONTHLY", "uuid": "ca6f5ce4-ff2d-4391-82c1-d713d672b3ae" }, "authorizationNumber": "662508", "type": "PURCHASE", "lastUpdate": "2024-09-29", "merchant": { "description": "Bridge and Road Fees, Tolls", "code": "4784", "commerceName": "TELEVIA RECARGAS APPV3", "category": { "description": "Transportation", "code": "14" } }, "bankConcept": { "description": "CONSUMO NACIONAL", "number": "0005" }, "accountingDate": null, "hasInvoice": null, "uuid": "3904575a-f237-45b2-b1d6-88a4ee3a6231", "attachments": null, "hasReceipt": null, "comment": null, "amount": { "currency": { "code": "MXN", "name": "Mexican Peso", "number": "484", "monetaryUnits": "2" }, "value": 20.0 }, "invoices": null, "operationDate": "2024-09-28", "billingStatement": null, "originalAmount": { "currency": { "code": "MXN", "name": "Mexican Peso", "number": "484", "monetaryUnits": "2" }, "value": 20.0 }, "labels": null, "label": "TELEVIA RECARGAS APPV3", "status": "PENDING" } ], "first": true, "pageable": { "paged": true, "offset": 0, "unpaged": false, "pageSize": 100, "pageNumber": 0, "sort": { "empty": false, "sorted": true, "unsorted": false } }, "totalElements": 1, "number": 0, "sort": { "empty": false, "sorted": true, "unsorted": false }, "totalPages": 1 }, "$ref": "#/components/schemas/TransactionPage" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/api/v2/labels": { "get": { "tags": [ "Labels" ], "operationId": "findAllLabels", "summary": "Find all labels", "description": "Find all labels", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation (Detailed information about the label)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LabelPage" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "parameters": [ { "in": "query", "description": "Zero-based page index (0..N)", "name": "page", "schema": { "default": 0 } }, { "in": "query", "description": "The size of the page to be returned", "name": "size", "schema": { "default": 100 } }, { "in": "query", "description": "Name of the label", "name": "name", "schema": { "type": "string" } }, { "in": "query", "description": "Active status of the label", "name": "active", "schema": {} } ] }, "post": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Labels" ], "operationId": "createLabels", "summary": "Create multiple labels", "description": "Create multiple labels", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": {} } }, "401": { "description": "Unauthorized" } }, "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/LabelsRequestCreate" } } } } } }, "/api/v2/cards": { "get": { "tags": [ "Cards" ], "operationId": "findAllCards", "summary": "Find all cards", "description": "Find all cards", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardPage" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "parameters": [ { "in": "query", "description": "Zero-based page index (0..N)", "name": "page", "schema": { "default": 0 } }, { "in": "query", "description": "The size of the page to be returned", "name": "size", "schema": { "default": 100 } }, { "in": "query", "description": "UUID of the user for which to retrieve cards", "name": "userUuid", "schema": { "type": "string" } }, { "in": "query", "description": "Username of the user", "name": "username", "schema": { "type": "string" } }, { "in": "query", "description": "Status of the cards", "name": "status", "schema": { "enum": [ "NONE", "SELECTED_FOR_STAMPING", "PENDING_ACK", "SELECTED_FOR_PRINTING_DUE_TO_RENEWAL", "PENDING_ACK_OF_RECEIPT_FOR_RENEWAL", "ACTIVE_HELD_BY_CARDHOLDER", "PENDING_PIN_CHANGE_BY_REGISTRATION", "PENDING_THE_FIRST_OPERATION_WITH_A_CORRECT_PIN_BY_REGISTRATION", "COLLECTED_DUE_TO_SERVICE_CANCELLATION", "PENDING_TO_COLLECT_DUE_TO_SERVICE_CANCELLATION", "NOT_ISSUED", "PENDING_PICKING_UP_ANOTHER", "SELECTED_FOR_STAMPING_BY_MASS_REGISTRATION", "PENDING_ACK_OF_RECEIPT_FOR_MASSIVE_REGISTRATION", "INACTIVE_CARD_REISSUED_DUE_TO_PAN_CHANGE", "ERROR_IN_STAMPING", "PENDING_PIN_CHANGE_DUE_TO_RENEWAL", "PENDING_THE_FIRST_OPERATION_WITH_THE_CORRECT_PIN_DUE_TO_RENEWAL", "ACTIVE_IN_THE_RENEWAL_PERIOD", "SELECTED_FOR_STAMPING_AFTER_REISSUING", "PENDING_ACK_AFTER_REISSUING", "PENDING_PIN_CHANGE_DUE_TO_REISSUE", "PENDING_THE_FIRST_OPERATION_WITH_THE_CORRECT_PIN_DUE_TO_REISSUE", "SELECTED_FOR_STAMPING_BY_CONTRACT_UPGRADE", "PENDING_ACK_OF_RECEIPT_FOR_A_CONTRACT_UPGRADE", "INACTIVE_DUE_TO_CONTRACT_UPGRADE", "ACTIVE_IN_THE_REISSUE_PERIOD" ] } }, { "in": "query", "description": "Periodicity of the cards.", "name": "periodicity", "schema": { "enum": [ "DAILY", "MONTHLY", "NONE" ] } }, { "in": "query", "description": "Brand of the cards", "name": "brand", "schema": { "enum": [ "NONE", "VISA", "MASTER" ] } }, { "in": "query", "description": "Type of the cards", "name": "type", "schema": { "enum": [ "MASTER_WORLD_ELITE", "MASTER_CORPORATE", "MASTER_VIRTUAL", "VISA_PHYSICAL", "VISA_VIRTUAL" ] } }, { "in": "query", "description": "User ERP ID", "name": "userErpId", "schema": { "type": "string" } } ] }, "post": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Cards" ], "operationId": "createCard", "summary": "Create Card", "description": "Create Card", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" } }, "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CreationCardRequest" } } } } } }, "/api/v2/cards/{uuid}/lock": { "patch": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Cards" ], "operationId": "updateCard_1", "summary": "Toggle Card Lock", "description": "Toggle Card Lock", "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ToggleCardLockRequest" } } } }, "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" } }, "parameters": [ { "in": "path", "description": "Card's UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ] } }, "/api/v2/labels/{uuid}": { "get": { "tags": [ "Labels" ], "operationId": "findLabel", "summary": "Find label by UUID", "description": "Find label by UUID", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation (Detailed information about the label)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LabelV2" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "parameters": [ { "in": "path", "description": "Label UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ] }, "delete": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Labels" ], "operationId": "deleteLabel", "summary": "Delete a single label by UUID", "description": "Delete a single label by UUID", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": {} } }, "401": { "description": "Unauthorized" } }, "parameters": [ { "in": "path", "description": "Label's UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ] }, "patch": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Labels" ], "operationId": "updateLabel", "summary": "Update label details", "description": "Update label details", "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/UpdateLabelRequest" } } } }, "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": {} } }, "401": { "description": "Unauthorized" } }, "parameters": [ { "in": "path", "description": "Label's UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ] } }, "/api/v2/groups/{uuid}": { "get": { "tags": [ "Groups" ], "operationId": "findGroup", "summary": "Find group by UUID", "description": "Find group by UUID", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupV2" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "parameters": [ { "in": "path", "description": "Group UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ] }, "delete": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Groups" ], "operationId": "deleteGroup", "summary": "Delete a single group by UUID", "description": "Delete a single group by UUID", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": {} } }, "401": { "description": "Unauthorized" } }, "parameters": [ { "in": "path", "description": "UUID of the group to delete", "required": true, "name": "uuid", "schema": { "type": "string" } } ] } }, "/api/v2/labels/bulk-delete": { "post": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Labels" ], "operationId": "deleteLabels", "summary": "Bulk delete labels", "description": "Bulk delete labels", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": {} } }, "401": { "description": "Unauthorized" } }, "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/LabelsRequestCreate" } } } } } }, "/v1/api-docs": { "servers": [ { "url": "https://public-api.mx.clara.com" }, { "url": "https://public-api.br.clara.com" }, { "url": "https://public-api.co.clara.com" }, { "url": "https://public-beta-api.mx.clara.com" }, { "url": "https://public-beta-api.br.clara.com" }, { "url": "https://public-beta-api.co.clara.com" } ] }, "/api/v2/users/{uuid}": { "get": { "tags": [ "Users" ], "operationId": "findUser", "summary": "Find user by UUID", "description": "Find user by UUID", "parameters": [ { "in": "path", "description": "User UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserV2" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/api/v2/attachments/{uuid}/base64": { "get": { "tags": [ "Attachments" ], "operationId": "get-single-attachment-base64", "summary": "Get a single attachment in base 64", "description": "Get a single attachment in base 64", "parameters": [ { "in": "path", "description": "UUID of the attachment", "required": true, "name": "uuid", "schema": { "type": "string" } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation (Output example: A plain text containing only the word Clara \"data:@file/plain;base64,Q2xhcmE=\")", "content": { "application/json": { "example": "data:@file/plain;base64,Q2xhcmE=", "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/api/v2/payments": { "get": { "tags": [ "Payments" ], "operationId": "findBatchOfPayments", "summary": "Find payments by parameters", "description": "Find payments by parameters", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentPage" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "parameters": [ { "in": "query", "description": "Zero-based page index (0..N)", "name": "page", "schema": { "default": 0 } }, { "in": "query", "description": "The size of the page to be returned", "name": "size", "schema": { "default": 100 } }, { "in": "query", "description": "Id of the payment", "name": "id", "schema": { "type": "string" } }, { "in": "query", "description": "BatchId of the payments", "name": "batchId", "schema": { "type": "string" } }, { "in": "query", "description": "External Id of the optional boleto", "name": "externalId", "schema": { "type": "string" } }, { "in": "query", "description": "Bar code number that describes the payment", "name": "barcode", "schema": { "type": "string" } }, { "in": "query", "description": "Number sequence that describes the payment", "name": "digitableLine", "schema": { "type": "string" } }, { "in": "query", "description": "Creation start date of the payment", "name": "creationStartDate", "schema": { "type": "string" } }, { "in": "query", "description": "Creation end date of the payment", "name": "creationEndDate", "schema": { "type": "string" } }, { "in": "query", "description": "The transaction ID related to the receipt", "name": "transactionId", "schema": { "type": "string" } }, { "in": "query", "description": "Document number of the beneficiary", "name": "beneficiaryDocumentNumber", "schema": { "type": "string" } }, { "in": "query", "description": "Name of the beneficiary", "name": "beneficiaryName", "schema": { "type": "string" } }, { "in": "query", "description": "Start date of the payment", "name": "paymentDateStart", "schema": { "type": "string" } }, { "in": "query", "description": "End date of the payment", "name": "paymentDateEnd", "schema": { "type": "string" } } ] }, "post": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Payments" ], "operationId": "createPayment", "summary": "Create Payment", "description": "Create Payment", "responses": { "204": { "description": "No content" }, "403": { "description": "Forbidden" }, "201": { "description": "Payments created successfully", "content": { "*/*": { "schema": { "items": { "$ref": "#/components/schemas/PaymentResponse" } } } } }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentResponseList" } } } }, "401": { "description": "Unauthorized" } }, "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/PaymentRequest" } } } } } }, "/api/v2/attachments/{uuid}": { "get": { "tags": [ "Attachments" ], "operationId": "get-single-attachment", "summary": "Get a single attachment information with the pre signed URL", "description": "Get a single attachment information with the pre signed URL", "parameters": [ { "in": "path", "description": "UUID of the attachment", "required": true, "name": "uuid", "schema": { "type": "string" } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation ()", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentDTO" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/api/v2/billing-statements/{yyyy:\\d{4}}/{MM:\\d{2}}": { "get": { "tags": [ "Billing-Statements" ], "operationId": "findByMonthAndYear", "summary": "Find all transactions in a billing statement given the year and month of it's due date.", "description": "Find all transactions in a billing statement given the year and month of it's due date.", "parameters": [ { "in": "path", "example": 2024, "name": "yyyy:\\d{4", "description": "Year of the billing statement (always 4 digits)", "required": true, "schema": { "type": "string" } }, { "in": "path", "example": "01", "name": "MM:\\d{2", "description": "Month of the billing statement (always 2 digits)", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "UUID of the user associated with the transactions", "name": "userUuid", "schema": { "type": "string" } }, { "in": "query", "description": "UUID of the card associated with the transactions", "name": "cardUuid", "schema": { "type": "string" } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation ()", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingStatementDetailsV2" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/v2/api-docs": { "servers": [ { "url": "https://public-api.mx.clara.com" }, { "url": "https://public-api.br.clara.com" }, { "url": "https://public-api.co.clara.com" }, { "url": "https://public-beta-api.mx.clara.com" }, { "url": "https://public-beta-api.br.clara.com" }, { "url": "https://public-beta-api.co.clara.com" } ] }, "/api/v2/transactions/{uuid}": { "get": { "tags": [ "Transactions" ], "operationId": "findTransaction", "summary": "Find transaction by UUID", "description": "Find transaction by UUID", "parameters": [ { "in": "path", "description": "Transaction UUID", "required": true, "name": "uuid", "schema": { "type": "string" } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation (Invoice info of the transaction is available only for transactions in Mexico.)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionV2" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } }, "/api/v2/groups": { "get": { "tags": [ "Groups" ], "operationId": "findAllGroups", "summary": "Find all groups", "description": "Find all groups", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupPage" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "parameters": [ { "in": "query", "description": "Zero-based page index (0..N)", "name": "page", "schema": { "default": 0 } }, { "in": "query", "description": "The size of the page to be returned", "name": "size", "schema": { "default": 100 } } ] }, "put": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Groups" ], "operationId": "updateGroup", "summary": "Update group details", "description": "Update group details", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": {} } }, "401": { "description": "Unauthorized" } }, "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/UpdateGroupRequest" } } } } }, "post": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Groups" ], "operationId": "createGroup", "summary": "Create Group", "description": "Create Group", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreationGroupResponse" } } } }, "401": { "description": "Unauthorized" } }, "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CreationGroupRequest" } } } } } }, "/api/v2/users": { "get": { "tags": [ "Users" ], "operationId": "findAllUsers", "summary": "Find all users", "description": "Find all users", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "example": { "empty": false, "size": 100, "last": false, "numberOfElements": 100, "sort": { "empty": false, "sorted": true, "unsorted": false }, "first": true, "pageable": { "paged": true, "offset": 0, "unpaged": false, "pageSize": 100, "pageNumber": 0, "sort": { "empty": false, "sorted": true, "unsorted": false } }, "totalElements": 1, "number": 0, "content": [ { "taxIdentifier": "SOMEUSERNAMEHERE", "erpId": null, "status": "ACTIVE", "role": "COMPANY_OWNER", "cards": null, "userFullName": "Some Username Here", "manager": null, "groups": null, "location": { "name": "CDMX", "uuid": "976e2c62-ad15-448a-834d-941595e415ff" }, "username": "some.username@clara.team", "uuid": "d253a344-13d5-4c5d-b397-f6973611082d" } ], "totalPages": 1 }, "$ref": "#/components/schemas/UserPage" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } }, "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "parameters": [ { "in": "query", "description": "Zero-based page index (0..N)", "name": "page", "schema": { "default": 0 } }, { "in": "query", "description": "The size of the page to be returned", "name": "size", "schema": { "default": 100 } }, { "in": "query", "description": "Status of the user", "name": "statusName", "schema": { "enum": [ "ONBOARDING_CANDIDATE", "WAITING", "DELETED", "ACTIVE", "LOCKED", "INACTIVE", "PENDING", "MASTER_LOCKED", "CLARA_BLOCKED" ] }, "allowEmptyValue": true }, { "in": "query", "description": "Role of the user.", "name": "role", "schema": { "enum": [ "EMPLOYEE", "MANAGER", "COMPANY_OWNER", "BOOKKEEPER" ] }, "allowEmptyValue": true } ] }, "post": { "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "tags": [ "Users" ], "operationId": "createUser", "summary": "Create an User", "description": "Create an User", "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "400": { "description": "Bad Request" }, "default": { "description": "default response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" } }, "requestBody": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/UserResponse" } } } } } }, "/api/v2/billing-statements/current": { "get": { "tags": [ "Billing-Statements" ], "operationId": "findCurrent", "summary": "Find all transactions in the open billing statement.", "description": "Find all transactions in the open billing statement.", "parameters": [ { "in": "query", "description": "UUID of the user associated with the transactions", "name": "userUuid", "schema": { "type": "string" } }, { "in": "query", "description": "UUID of the card associated with the transactions", "name": "cardUuid", "schema": { "type": "string" } } ], "security": [ { "oauth2": [] }, { "mutualTLS": [] } ], "responses": { "403": { "description": "Forbidden" }, "204": { "description": "No content" }, "200": { "description": "Successful operation ()", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingStatementDetailsV2" } } } }, "401": { "description": "Unauthorized" }, "400": { "description": "Bad Request" } } } } }, "info": { "contact": { "email": "contacto@clara.com" }, "description": "Clara API use MTLS authentication require two-way TLS certificate exchange between the API Client and Clara Server.\n\nGetting Client Credentials and Certificates:\n\n- Log in to the Clara platform using your credentials.\n- Create a new project within the platform, specifying the project name, validity period and necessary permissions.\n- Download the Client Certificate and Credentials necessary once the project has been setup.\n\nAuthentication and Access to the Clara API:\n\n- To gain access to the API send a request to /oauth/token\n- Include the necessary parameters in your request, such as the client_id and client_secret, along with the certificates.\n- On successful request you will receive an access_token, scopes, and the number of expiration days for the token.\n- Refer to the documentation to see the appropriate requirements.\n\nUsing the Access Token:\n\n- Refer to the API documentation provided by Clara to check the available endpoints and their functionalities.\n- Include the access token in the request headers 'bearer token' of your API requests, along with the certificates.\n- Ensure that the access token is valid and has the necessary scopes to perform the action.\n", "title": "Clara API", "version": "1.0" }, "servers": [ { "url": "https://public-api.mx.clara.com" }, { "url": "https://public-api.br.clara.com" }, { "url": "https://public-api.co.clara.com" }, { "url": "https://public-beta-api.mx.clara.com" }, { "url": "https://public-beta-api.br.clara.com" }, { "url": "https://public-beta-api.co.clara.com" } ] }