Create client

Add a client to the catalog with RFC, name, CFDI use, tax zip code and fiscal regime.

POST https://cotlet.dev/api/v1/facturama/tax-zips/{tax_zip_code}/clients

write

Saves a client and returns its client_id. It reaches no one and issues nothing, and a wrong entry is fixed in Facturama, so it does not ask for confirmation.

Parameters

Parameters: create_client
NameTypeDescription
rfc string required string Client RFC.
name string required string Legal name as registered with the SAT.
cfdi_use string required string CFDI use code, for example G03.
tax_zip_code string required string Tax zip code of the client.
fiscal_regime string required string Fiscal regime code of the client.
email string string Address that email_invoice uses by default.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/facturama/tax-zips/tax%20zip%20code/clients \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rfc":"rfc","name":"Jane Doe","cfdi_use":"cfdi use","fiscal_regime":"fiscal regime"}'
Python
result = client.call("facturama", "create_client", {"rfc":"rfc","name":"Jane Doe","cfdi_use":"cfdi use","tax_zip_code":"tax zip code","fiscal_regime":"fiscal regime"})
Node.js
const result = await cotlet.call('facturama', 'create_client', {"rfc":"rfc","name":"Jane Doe","cfdi_use":"cfdi use","tax_zip_code":"tax zip code","fiscal_regime":"fiscal regime"});
CLI
cotlet call facturama create_client --data '{"rfc":"rfc","name":"Jane Doe","cfdi_use":"cfdi use","tax_zip_code":"tax zip code","fiscal_regime":"fiscal regime"}'

Example response

JSON

{
  "client_id": "cl_4822",
  "rfc": "XAXX010101000",
  "name": "Clinica Alba SC",
  "cfdi_use": "G03",
  "tax_zip_code": "03100",
  "fiscal_regime": "612",
  "email": "pagos@clinicaalba.example"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.