CUSTOMER

Known Limitations and Behaviors

Birth Date Validation: Invalid dates (e.g., 1998-04-31) can cause issues. In POST, invalid data is silently ignored. In PUT, an explicit error is returned.

Phone Length: Phones with more than 20 characters may cause API errors. We recommend validating the length before sending.

client_id Type: The client_id field must always be sent as a string. Pure numeric values may cause errors in some scenarios.


Endpoints

Search customers

GET /customer

Description: Returns all registered customers, with the ability to filter by name, email, phone, CPF, external id, among others.

GET /public/customer?token=YOUR_USER_TOKEN&name=Maria HTTP/1.1
Host: api.solucx.com.br
x-solucx-api-key: YOUR_API_KEY
Accept: */*

Responses:

  • 200 OK: Returns a list of customers.
  • 422 Unprocessable Entity: Invalid parameters.

Create customer

POST /customer

Description: Creates a new customer.

POST /public/customer HTTP/1.1
Host: api.solucx.com.br
x-solucx-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*

{
  "name": "Maria",
  "email": "[email protected]",
  "phone": "11999999999",
  "cpf": "12345678900"
}

Responses:

  • 200 OK: Customer successfully created.
  • 400 Bad Request: Invalid parameters.

Search customer by id

GET /customer/{id}

Description: Returns a customer by id.

GET /public/customer/{id} HTTP/1.1
Host: api.solucx.com.br
x-solucx-api-key: YOUR_API_KEY
Accept: */*

Responses:

  • 200 OK: Returns the customer.
  • 404 Not Found: Customer not found.

Edit customer

PUT /customer/{id}

Description: Edits an existing customer.

PUT /public/customer/{id} HTTP/1.1
Host: api.solucx.com.br
x-solucx-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*

{
  "name": "Novo Nome",
  "email": "[email protected]"
}

Responses:

  • 201 Success: Customer successfully edited.
  • 400 Bad Request: Invalid parameters.