> For the complete documentation index, see [llms.txt](https://developers.myscreators.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.myscreators.com/referencia-de-la-api/facturas.md).

# Facturas

Crear y buscar facturas.

Operaciones para crear y buscar facturas.

## POST /invoices

> Crear factura

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Facturas","description":"Creación y búsqueda de facturas."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Producción"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"Token de instalación de M&S. Envíalo en el encabezado `authtoken` de cada solicitud."}},"schemas":{"InvoiceCreate":{"type":"object","description":"Datos para crear una factura.","required":["invoice_due_date","invoice_client_id"],"properties":{"invoice_due_date":{"type":"string","format":"date","description":"Fecha de vencimiento."},"invoice_client_id":{"type":"string","description":"ID del cliente."},"invoice_bill_date":{"type":"string","format":"date","description":"Fecha de emisión."},"invoice_project_id":{"type":"string"},"tax_id":{"type":"string"},"tax_id2":{"type":"string"},"tax_id3":{"type":"string"},"recurring":{"type":"string","description":"Marca de factura recurrente."},"invoice_note":{"type":"string"}}},"ApiMessage":{"type":"object","description":"Respuesta genérica de estado para operaciones de escritura y borrado.","properties":{"status":{"type":"boolean","description":"`true` si la operación fue exitosa."},"message":{"type":"string","description":"Mensaje legible del resultado."}}}},"responses":{"Unauthorized":{"description":"Token ausente o inválido.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/invoices":{"post":{"tags":["Facturas"],"operationId":"createInvoice","summary":"Crear factura","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"}}}},"responses":{"200":{"description":"Factura creada.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## GET /invoices/search/{keysearch}

> Buscar facturas

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Facturas","description":"Creación y búsqueda de facturas."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Producción"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"Token de instalación de M&S. Envíalo en el encabezado `authtoken` de cada solicitud."}},"schemas":{"InvoiceSearchItem":{"type":"object","description":"Coincidencia de factura en una búsqueda.","properties":{"id":{"type":"integer"},"client_id":{"type":"string"},"status":{"type":"string"}}},"ApiMessage":{"type":"object","description":"Respuesta genérica de estado para operaciones de escritura y borrado.","properties":{"status":{"type":"boolean","description":"`true` si la operación fue exitosa."},"message":{"type":"string","description":"Mensaje legible del resultado."}}}},"responses":{"Unauthorized":{"description":"Token ausente o inválido.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/invoices/search/{keysearch}":{"get":{"tags":["Facturas"],"operationId":"searchInvoices","summary":"Buscar facturas","parameters":[{"in":"path","name":"keysearch","required":true,"schema":{"type":"string"},"description":"Texto a buscar."}],"responses":{"200":{"description":"Coincidencias de facturas.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSearchItem"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.myscreators.com/referencia-de-la-api/facturas.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
