Clients
HTTP header parameters
- Authorization (string): API authorisation. Example:
Bearer {token}
Base URL
https://api.saltra.es/api/web/v3/customerGet clients
Parameters
- search (string): Search field; you can search by email, name, CIF, etc. Optional.
- page (integer): Current page. Optional.
- perPage (integer): Number of records per page. Optional.
GET /
{
"search": "B188888888",
"page": 1,
"perPage": 20
}Response
Respuesta
{
"success": true,
"message": "OK",
"data": {
"data": [
{
"id": 9999,
"name": "USER CUSTOMER",
"active": 1,
"access": {
"email": "test@example.es"
},
"profile": {
"identificacion": 1,
"dni": "B188888888",
"razon_social": "CUSTOMER",
"codigo_postal": "01005",
"direccion": "CALLE",
"country": 724,
"account": [
{
"id": 9999,
"activa": 1,
"alias": "CUSTOMER",
"convenio_colectivo": "60888888888888",
"cuenta": "28199993333",
"regimen": "0111",
}
],
"parameters": {
"representativeData": {
"doc": "77056403D",
"name": "JOSE",
"surname": "APELLIDO",
"job_position": "ADMINISTRADOR"
}
}
}
}
],
"pagination": {
"page": 1,
"lastPage": 1,
"perPage": 50,
"total": 2
}
}
}Save a client
Parameters
- name (string) : Client name.
- access (object) : Access credentials.
- email (string) : Email address.
- password (string) : Password.
- password_confirmation (string) : Password confirmation.
- not_notify (boolean): Do NOT notify the client that the user was created. Possible values: 1 = do NOT notify the client, 0 = notify the client
- profile (object) : Client profile data.
- dni (string) : Company CIF
- razon_social (string) : Registered name of the company.
- account (array) : Contribution accounts; at least one account is required.
- regimen (string) : Scheme of the account.
- cuenta (string) : Contribution account code.
- alias (string) : Account alias.
- convenio_colectivo (string) : Collective agreement. Optional.
- parameters (array) : Client parameters. Optional.
- representativeData (object) : Details of the company representative.
- doc (string) : National identity document.
- name (string) : Representative's first name.
- surname (string) : Representative's surname.
- job_position (string) : Representative's job position.
- representativeData (object) : Details of the company representative.
POST /
{
"name": "NOMBRE DE LA EMPRESA",
"access": {
"email": "test@example.es",
"password": 123456,
"password_confirmation": 123456
},
"not_notify": 1,
"profile": {
"dni": "B46469763",
"razon_social": "NOMBRE DE LA EMPRESA",
"codigo_postal": "01005",
"direccion": "calle alava...",
"account": [
{
"activa": 1,
"alias": "Regimen de madrid",
"cuenta": "28148369999",
"regimen": "0111"
},
{
"activa": 0,
"alias": "Regimen de prueba",
"anulada": 0,
"cuenta": "13119940999",
"regimen": "0112"
}
],
"parameters": {
"representativeData": {
"doc": "77056403D",
"name": "JOSE",
"surname": "APELLIDO",
"job_position": "ADMINISTRADOR"
}
}
}
}Response
Respuesta
{
"success": true,
"message": "OK",
"data": {
"id": 9999,
"name": "NOMBRE DE LA EMPRESA",
"access": {
"email": "test@example.es"
},
"...": "..."
}
}Delete a client
Parameters
- id (integer): Client ID.
DELETE /{customerID}
customerIDResponse
Respuesta
{
"success": true,
"message": "OK"
}Deactivate a client
Parameters
- id (integer): Client ID.
- active (integer) : Possible values:
- true: Activate
- false: Deactivate
PUT /{customerID}/activate
{
"active": false,
}Response
Respuesta
{
"success": true,
"message": "OK"
}