Addresses

getAddresses

Obtiene una lista de direcciones dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/addresses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
Identificadores ERP
client_ids
integer[]OPTIONAL
Identificadores del cliente
erp_client_ids
string[]OPTIONAL
Identificadores ERP del cliente
remote_id
integerOPTIONAL
Remote identifier

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/addresses?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2], "erp_ids": ["DIR-001", "DIR-002"], "client_ids": [1, 2] }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "erp_id": "DIR-001", "name": "Sede Central", "zip_code": "28001", "city": "Madrid" } ], "page": 0, "total": 1 }

postAddresses

POSThttps://api.gmaocloud.es/apigmao/{token}/addresses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of addresses to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/addresses' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "DIR-001", "name": "Sede Central", "address": "Calle Gran Vía 1" } ] }'
Response
200 OKapplication/json
{ "data": "Direcciones actualizadas correctamente" }

deleteAddresses

Elimina direcciones por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/addresses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/addresses' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["DIR-001", "DIR-002"] }'
Response
200 OKapplication/json
{ "data": "Direcciones eliminadas correctamente" }

Assets

getAssets

Obtiene una lista de activos dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/assets

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
Identificadores ERP
facility_id
integerOPTIONAL
Identificador de sistema
facility_erp_id
stringOPTIONAL
Identificador ERP de sistema
remote_id
integerOPTIONAL
Remote identifier

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/assets?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1], "erp_ids": ["value"], "facility_id": 1 }'
Response
200 OKapplication/json
{ "id": 1, "erp_id": "erp_id", "serial_number": "serial_number", "installation_date": "installation_date", "end_of_warranty": "end_of_warranty" }

postAssets

POSThttps://api.gmaocloud.es/apigmao/{token}/assets

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of assets to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/assets' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "ACT-001", "name": "Compresor Industrial", "brand": "Atlas Copco" } ] }'
Response
200 OKapplication/json
{ "data": "Activos actualizados correctamente" }

deleteAssets

Elimina activos por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/assets

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/assets' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["ACT-001", "ACT-002"] }'
Response
200 OKapplication/json
{ "data": "Activos eliminados correctamente" }

Budgets

postBudgetLine

Create or update budget lines. Send a list of line objects.

POSThttps://api.gmaocloud.es/apigmao/{token}/budgetLine

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of budget-line to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/budgetLine' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "line_id": 100, "budget_offer_id": 10, "budget_offer_erp_id": "OFFER-001" } ] }'
Response
200 OKapplication/json
// No response body

deleteBudgetLine

Soft-delete a budget line.

DELETEhttps://api.gmaocloud.es/apigmao/{token}/budgetLine

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

id
integerREQUIRED

Errors

StatusMeaning
200Successful operation.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/budgetLine' \ -H "Content-Type: application/json" \ -d '{ "id": 1 }'
Response
200 OKapplication/json
// No response body

postBudgetOffer

Create or update budget offers. Send a list of offer objects.

POSThttps://api.gmaocloud.es/apigmao/{token}/budgetOffer

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of budget-offer to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/budgetOffer' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "OFFER-001", "budget_id": 1, "budget_erp_id": "PRES-001" } ] }'
Response
200 OKapplication/json
// No response body

deleteBudgetOffer

Soft-delete a budget offer. Rejects accepted offers.

DELETEhttps://api.gmaocloud.es/apigmao/{token}/budgetOffer

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

id
integerREQUIRED

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/budgetOffer' \ -H "Content-Type: application/json" \ -d '{ "id": 1 }'
Response
200 OKapplication/json
// No response body

getBudgets

Returns a paginated list of budgets with blocks, lines, totals, and status history

GEThttps://api.gmaocloud.es/apigmao/{token}/budgets

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
erp_ids
string[]OPTIONAL
project_id
integerOPTIONAL
subcontractor_ids
integer[]OPTIONAL
project_erp_id
string · ≤ 255OPTIONAL
client_id
integerOPTIONAL
client_erp_id
string · ≤ 255OPTIONAL
billing_client_id
integerOPTIONAL
billing_client_erp_id
string · ≤ 255OPTIONAL
address_id
integerOPTIONAL
address_erp_id
string · ≤ 255OPTIONAL
client_ref
string · ≤ 250OPTIONAL
date
stringOPTIONAL
date_from
stringOPTIONAL
date_to
stringOPTIONAL
status
string · ≤ 255OPTIONAL
incident_id
integerOPTIONAL
Filter by incident ID
work_order_id
integerOPTIONAL
Filter by origin work order ID

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/budgets?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2], "erp_ids": ["PRES-001"], "project_id": 1 }'
Response
200 OKapplication/json
{ "id": 1, "erp_id": "PRES-001", "code": "ES2501-001", "title": "Annual maintenance budget", "date": "2024-01-15" }

postBudgets

Create or update budgets. Send a list of budget objects. Partial update when a record exists.

POSThttps://api.gmaocloud.es/apigmao/{token}/budgets

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of budgets to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/budgets' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "PRES-001", "id": 1, "title": "Maintenance budget" } ] }'
Response
200 OKapplication/json
// No response body

deleteBudgets

Soft-delete a budget with cascading delete of its offers and lines. Rejects budgets with generated work orders.

DELETEhttps://api.gmaocloud.es/apigmao/{token}/budgets

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

id
integerOPTIONAL
erp_id
stringOPTIONAL

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/budgets' \ -H "Content-Type: application/json" \ -d '{ "id": 1, "erp_id": "PRES-001" }'
Response
200 OKapplication/json
// No response body

postBudgetState

Change the status of budgets, blocks, or offers. Send a list of state change objects.

POSThttps://api.gmaocloud.es/apigmao/{token}/budgetState

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of budget-state to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/budgetState' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "budget_id": 1, "state_id": 2, "state_erp_id": "EST-PRES-001" } ] }'
Response
200 OKapplication/json
// No response body

Clients

getClients

Obtiene una lista de clientes dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/clients

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_id
string · ≤ 255OPTIONAL
Identificador ERP
remote_id
integerOPTIONAL
Remote identifier

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/clients?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_id": "CLI-001", "remote_id": 1 }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "erp_id": "CLI-001", "name": "Empresa Ejemplo S.L.", "trade_name": "Ejemplo", "email": "contacto@ejemplo.com", "phone": "+34 91 123 4567" } ], "page": 0, "total": 1 }

postClients

POSThttps://api.gmaocloud.es/apigmao/{token}/clients

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of clients to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/clients' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "CLI-001", "name": "Empresa Ejemplo S.L.", "trade_name": "Ejemplo" } ] }'
Response
200 OKapplication/json
{ "data": "Clientes actualizados correctamente" }

deleteClients

Elimina clientes por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/clients

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/clients' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["CLI-001", "CLI-002"] }'
Response
200 OKapplication/json
{ "data": "Clientes eliminados correctamente" }

Report expenses and bonuses

getExpensesAndBonuses

Obtiene datos del informe de gastos y pluses

GEThttps://api.gmaocloud.es/apigmao/{token}/expensesAndBonuses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

project_code
string · ≤ 255OPTIONAL
Project code
project_erp_id
string · ≤ 255OPTIONAL
Project ERP identifier
project_id
integerOPTIONAL
Project identifier
team_name
stringOPTIONAL
Team name
team_id
integerOPTIONAL
Team identifier
status
stringOPTIONAL
Export status
date_from
stringOPTIONAL
Date from
date_to
stringOPTIONAL
Date to
wo_ids
integer[]OPTIONAL
Work orders identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/expensesAndBonuses?page=0' \ -H "Content-Type: application/json" \ -d '{ "project_code": "PRJ-2024", "project_erp_id": "PROJ-001", "project_id": 1 }'
Response
200 OKapplication/json
{ "id": 1, "technician": "value", "date": "2024-01-15T08:00:00", "exported_at": "2024-01-16T10:30:00", "project_code": "PRJ-2024" }

postExpensesAndBonuses

Actualiza la fecha de exportación de las lineas

POSThttps://api.gmaocloud.es/apigmao/{token}/expensesAndBonuses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of expenses-and-bonuses to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/expensesAndBonuses' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "id": 1, "group": "wo_hours" } ] }'
Response
200 OKapplication/json
{ "data": "Lineas actualizadas correctamente" }

Expenses and bonuses

deleteExpensesAndBonuses

Elimina gastos y bonificaciones por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/expensesAndBonuses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/expensesAndBonuses' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["GB-001", "GB-002"] }'
Response
200 OKapplication/json
{ "data": "Gastos y bonificaciones eliminados correctamente" }

Facilities

getFacilities

Obtiene una lista de sistemas dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/facilities

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
integer[]OPTIONAL
Identificadores ERP
address_erp_ids
string[]OPTIONAL
Identificadores ERP de direcciones
address_ids
integer[]OPTIONAL
Identificadores de direcciones
parent_erp_ids
string[]OPTIONAL
Identificadores ERP de sistemas padre
parent_ids
integer[]OPTIONAL
Identificadores de sistemas padre
remote_id
integerOPTIONAL
Remote identifier

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/facilities?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1], "erp_ids": [1], "address_erp_ids": ["value"] }'
Response
200 OKapplication/json
{ "id": 1, "erp_id": "erp_id", "name": "name", "level": 1, "remote_id": 1 }

postFacilities

POSThttps://api.gmaocloud.es/apigmao/{token}/facilities

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of facilities to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/facilities' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "SIS-001", "name": "Sistema HVAC Planta 1", "remote_id": 1 } ] }'
Response
200 OKapplication/json
{ "data": "Sistemas actualizados correctamente" }

deleteFacilities

Elimina sistemas por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/facilities

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/facilities' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["SIS-001", "SIS-002"] }'
Response
200 OKapplication/json
{ "data": "Sistemas eliminados correctamente" }

Incident states

getIncidentStates

Obtiene una lista de estados de incidencia según los filtros aplicados

GEThttps://api.gmaocloud.es/apigmao/{token}/incidentStates

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Internal identifiers
erp_ids
string[]OPTIONAL
ERP identifiers
status_flag
stringOPTIONAL
Filter by behaviour flag

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidentStates?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2], "erp_ids": ["EST-INC-001"], "status_flag": "DEFAULT" }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "erp_id": "EST-INC-001", "name": "Abierta", "visible": true, "visible_client": true, "max_time": 86400 } ], "page": 0, "total": 1 }

postIncidentStates

Crea o actualiza estados de incidencia. Si se pasan id y erp_id, id selecciona el registro y erp_id se actualiza.

POSThttps://api.gmaocloud.es/apigmao/{token}/incidentStates

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of incident-states to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidentStates' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "name": "Abierta", "id": 3, "erp_id": "EST-INC-001" } ] }'
Response
200 OKapplication/json
{ "data": "Estados de incidencia actualizados correctamente" }

deleteIncidentStates

Elimina estados de incidencia por ID interno o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/incidentStates

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Internal identifiers
erp_ids
string[]OPTIONAL
ERP identifiers

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidentStates' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["EST-INC-001", "EST-INC-002"] }'
Response
200 OKapplication/json
{ "data": "Estados de incidencia eliminados correctamente" }

Incident types

getIncidentTypes

Obtiene una lista de tipos de incidencia según los filtros aplicados

GEThttps://api.gmaocloud.es/apigmao/{token}/incidentTypes

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Internal identifiers
erp_ids
string[]OPTIONAL
ERP identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidentTypes?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2], "erp_ids": ["TIP-INC-001"] }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "erp_id": "TIP-INC-001", "name": "Correctivo", "code": "COR" } ], "page": 0, "total": 1 }

postIncidentTypes

Crea o actualiza tipos de incidencia. Si se pasan id y erp_id, id selecciona el registro y erp_id se actualiza.

POSThttps://api.gmaocloud.es/apigmao/{token}/incidentTypes

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of incident-types to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidentTypes' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "name": "Correctivo", "id": 1, "erp_id": "TIP-INC-001" } ] }'
Response
200 OKapplication/json
{ "data": "Tipos de incidencia actualizados correctamente" }

deleteIncidentTypes

Elimina tipos de incidencia por ID interno o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/incidentTypes

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Internal identifiers
erp_ids
string[]OPTIONAL
ERP identifiers

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidentTypes' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["TIP-INC-001", "TIP-INC-002"] }'
Response
200 OKapplication/json
{ "data": "Tipos de incidencia eliminados correctamente" }

Incidents

getIncidents

Obtiene una lista de incidencias según los filtros aplicados

GEThttps://api.gmaocloud.es/apigmao/{token}/incidents

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Internal identifiers
erp_ids
string[]OPTIONAL
ERP identifiers
address_id
integerOPTIONAL
Address identifier
customer_id
integerOPTIONAL
Customer identifier
system_id
integerOPTIONAL
System identifier

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidents?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2], "erp_ids": ["INC-001"], "address_id": 10 }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "erp_id": "INC-001", "description": "Fuga de agua", "priority": 5, "warranty": false, "observations": "Revisar urgente" } ], "page": 0, "total": 1 }

postIncidents

Crea o actualiza incidencias. Si se pasan id y erp_id, id selecciona el registro y erp_id se actualiza.

POSThttps://api.gmaocloud.es/apigmao/{token}/incidents

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of incidents to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidents' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "description": "Fuga de agua", "id": 42, "erp_id": "INC-001" } ] }'
Response
200 OKapplication/json
{ "data": "Incidencias actualizadas correctamente" }

deleteIncidents

Elimina incidencias por ID interno o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/incidents

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Internal identifiers
erp_ids
string[]OPTIONAL
ERP identifiers

Errors

StatusMeaning
200Successful operation.
400Bad request.
404No records found.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/incidents' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["INC-001", "INC-002"] }'
Response
200 OKapplication/json
{ "data": "Incidencias eliminadas correctamente" }

Items

getItems

Obtiene una lista de artículos dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/items

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

id
integerOPTIONAL
Identifier
erp_id
string · ≤ 255OPTIONAL
Identificador ERP
reference
string · ≤ 255OPTIONAL
Referencia del artículo

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/items?page=0' \ -H "Content-Type: application/json" \ -d '{ "id": 1, "erp_id": "ART-001", "reference": "REF-001" }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "erp_id": "ART-001", "reference": "REF-001", "description": "Tornillo M6 acero inoxidable", "price": 1.5, "cost": 0.8 } ], "page": 0, "total": 1 }

postItems

POSThttps://api.gmaocloud.es/apigmao/{token}/items

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of items to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/items' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "ART-001", "reference": "REF-001", "description": "Tornillo M6" } ] }'
Response
200 OKapplication/json
{ "data": "Artículos actualizados correctamente" }

deleteItems

Elimina artículos por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/items

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/items' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["ART-001", "ART-002"] }'
Response
200 OKapplication/json
{ "data": "Artículos eliminados correctamente" }

Projects

getProjects

Obtiene una lista de projectos dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/projects

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
project_code
string · ≤ 20OPTIONAL
Project code
erp_id
string · ≤ 255OPTIONAL
Identificador ERP

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/projects?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1], "project_code": "project_code", "erp_id": "erp_id" }'
Response
200 OKapplication/json
{ "id": 1, "project_code": "project_code", "title": "title", "current_state": "current_state", "erp_id": "erp_id" }

postProjects

Actualiza los proyectos en la base de datos. Si el proyecto no existe, lo crea. Si existe, lo actualiza

POSThttps://api.gmaocloud.es/apigmao/{token}/projects

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of projects to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/projects' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "PROJ-001", "title": "Mantenimiento Edificio A", "project_code": "PRJ-2024-001" } ] }'
Response
200 OKapplication/json
{ "data": "Proyectos actualizados correctamente" }

deleteProjects

Elimina proyectos por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/projects

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/projects' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["PRY-001", "PRY-002"] }'
Response
200 OKapplication/json
{ "data": "Proyectos eliminados correctamente" }

Stock

getStock

Obtiene una lista de stock por almacén/artículo. Requiere módulo de lotes activo.

GEThttps://api.gmaocloud.es/apigmao/{token}/stock

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

item_id
integerOPTIONAL
Identifier del artículo
item_erp_id
string · ≤ 255OPTIONAL
Identificador ERP del artículo
wharehouse_id
integerOPTIONAL
Identifier del almacén
wharehouse_erp_id
string · ≤ 255OPTIONAL
Identificador ERP del almacén
lot
string · ≤ 255OPTIONAL
Código del lote

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/stock?page=0' \ -H "Content-Type: application/json" \ -d '{ "item_id": 1, "item_erp_id": "ART-001", "wharehouse_id": 1 }'
Response
200 OKapplication/json
{ "data": [ { "stock": 50 } ], "page": 0, "total": 1 }

postStock

POSThttps://api.gmaocloud.es/apigmao/{token}/stock

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of stock to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/stock' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "stock": 50, "wharehouse_id": 1, "wharehouse_erp_id": "ALM-001" } ] }'
Response
200 OKapplication/json
{ "data": "Stock actualizado correctamente" }

deleteStock

Elimina registros de stock por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/stock

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/stock' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["STK-001", "STK-002"] }'
Response
200 OKapplication/json
{ "data": "Stock eliminado correctamente" }

Subcontracts

getSubcontracts

Obtiene una lista de subcontratas dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/subcontracts

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers
service_provider
booleanOPTIONAL
Filter by service providers
material_provider
booleanOPTIONAL
Filter by material providers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/subcontracts?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2], "erp_ids": ["SUB-001", "SUB-002"], "service_provider": true }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "erp_id": "SUB-001", "name": "Servicios Técnicos S.L.", "trade_name": "ServTec", "email": "info@servtec.com", "phone": "+34 93 123 4567" } ], "page": 0, "total": 1 }

postSubcontracts

POSThttps://api.gmaocloud.es/apigmao/{token}/subcontracts

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of subcontracts to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/subcontracts' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "SUB-001", "name": "Servicios Técnicos S.L.", "tax_id": "A87654321" } ] }'
Response
200 OKapplication/json
{ "data": "Subcontratas actualizadas correctamente" }

deleteSubcontracts

Elimina subcontratas por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/subcontracts

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/subcontracts' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["PROV-001", "PROV-002"] }'
Response
200 OKapplication/json
{ "data": "Subcontratas eliminadas correctamente" }

Users

getUsers

Obtiene una lista de usuarios dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/users

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
role_id
integerOPTIONAL
Users role identifier
erp_id
string · ≤ 255OPTIONAL
Identificador ERP
subcontractor_ids
integer[]OPTIONAL
Subcontractors identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/users?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1], "role_id": 1, "erp_id": "erp_id" }'
Response
200 OKapplication/json
{ "id": 1, "role_id": 1, "erp_id": "erp_id", "name": "name", "surname": "surname" }

postUsers

Actualiza los usuarios en la base de datos. Si el usuario no existe, lo crea. Si existe, lo actualiza

POSThttps://api.gmaocloud.es/apigmao/{token}/users

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of users to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/users' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "USR-001", "password": "SecurePass123!", "cost_value": 25 } ] }'
Response
200 OKapplication/json
{ "data": "Usuarios actualizados correctamente", "tokens": [ {} ] }

deleteUsers

Elimina usuarios por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/users

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/users' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["USR-001", "USR-002"] }'
Response
200 OKapplication/json
{ "data": "Usuarios eliminados correctamente" }

Whare houses

getWhareHouses

Obtiene una lista de almacenes dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/whareHouses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

id
integerOPTIONAL
Identifier
erp_id
string · ≤ 255OPTIONAL
Identificador ERP
name
string · ≤ 255OPTIONAL
Nombre del almacén

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/whareHouses?page=0' \ -H "Content-Type: application/json" \ -d '{ "id": 1, "erp_id": "ALM-001", "name": "Almacén Central" }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "name": "Almacén Central", "erp_id": "ALM-001" } ], "page": 0, "total": 1 }

postWhareHouses

POSThttps://api.gmaocloud.es/apigmao/{token}/whareHouses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of whare-houses to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/whareHouses' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "ALM-001", "name": "Almacén Central", "client_id": 1 } ] }'
Response
200 OKapplication/json
{ "data": "Almacenes actualizados correctamente" }

deleteWhareHouses

Elimina almacenes por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/whareHouses

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/whareHouses' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["ALM-001", "ALM-002"] }'
Response
200 OKapplication/json
{ "data": "Almacenes eliminados correctamente" }

Work order state

deleteWorkOrderState

Elimina estados de orden de trabajo por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/workOrderState

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/workOrderState' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["EST-001", "EST-002"] }'
Response
200 OKapplication/json
{ "data": "Estados de orden de trabajo eliminados correctamente" }

Work orders

getWorkOrders

Obtiene una lista de OT's dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/workOrders

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP identifiers
project_id
integerOPTIONAL
Project identifier
project_code
string · ≤ 255OPTIONAL
Project code
project_erp_id
string · ≤ 255OPTIONAL
Project ERP identifier
subcontractor_ids
integer[]OPTIONAL
Subcontractors identifiers
customer_id
integerOPTIONAL
Customer identifier
customer_ids
integer[]OPTIONAL
Customers identifier
customer_erp_id
string · ≤ 255OPTIONAL
Customer ERP identifier
address_id
integerOPTIONAL
Address identifier
address_ids
integer[]OPTIONAL
Addresses identifier
address_erp_id
string · ≤ 255OPTIONAL
Address ERP identifier
model_id
integerOPTIONAL
model identifier
model_erp_id
string · ≤ 255OPTIONAL
Model ERP identifier
specialty_id
integerOPTIONAL
Specialty identifier
specialty_erp_id
string · ≤ 255OPTIONAL
Specialty ERP identifier
external_reference
string · ≤ 250OPTIONAL
External reference
date
stringOPTIONAL
Date
date_from
stringOPTIONAL
Date from. Must use date_to twice
date_to
stringOPTIONAL
Date to. Must use date_from twice
remote_id
integerOPTIONAL
Remote identifier
workorder_type_id
integerOPTIONAL
Work order type identifier (partes.id_tipo)
type
string[]OPTIONAL
Filtra por tipo de OT. Acepta un string o array de strings.
status_flag
object[]OPTIONAL
Status flags

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/workOrders?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1001, 1002], "erp_ids": ["OT-001", "OT-002"], "project_id": 1 }'
Response
200 OKapplication/json
{ "data": [ { "id": 1001, "erp_id": "BC-43", "duration": 120, "date": "2024-01-15", "observations": "Revisión anual programada", "required": false } ], "page": 0, "total": 1 }

postWorkOrders

Crea o actualiza OTs en la base de datos. <br><br><b>Hay 3 operaciones especiales</b> que, si se informan, deben venir acompañadas de un identificador de OT y <b>no pueden combinarse con otros campos</b>: <br>· <b>status_flag</b>: cambia el estado de la OT al indicado. Identificador: id, erp_id o remote_id. <br>· <b>assets</b>: reemplaza los activos asociados a la OT. Array de id_remoto de activo. Identificador: remote_id (= id interno de la OT). <br>· <b>materials</b>: reemplaza las líneas de material de la OT. Array de objetos con remote_id, quantity, planned_units (solo si la OT es de tipo suministro), observations, unit_price. Identificador: remote_id (= id interno de la OT).

POSThttps://api.gmaocloud.es/apigmao/{token}/workOrders

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of work-orders to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/workOrders' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "OT-001", "id": 1001, "status_flag": "SEND_TO_ERP" } ] }'
Response
200 OKapplication/json
{ "data": "OT's actualizadas correctamente" }

deleteWorkOrders

Elimina órdenes de trabajo por ID o identificador ERP

DELETEhttps://api.gmaocloud.es/apigmao/{token}/workOrders

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
erp_ids
string[]OPTIONAL
ERP Identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X DELETE 'https://api.gmaocloud.es/apigmao/<TOKEN>/workOrders' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3], "erp_ids": ["OT-001", "OT-002"] }'
Response
200 OKapplication/json
{ "data": "Órdenes de trabajo eliminadas correctamente" }

Validation billable

getValidationBillable

Obtiene una lista de lineas de OT facturables dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/validationBillable

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body filters

Content-Type: application/json

project_code
string · ≤ 255OPTIONAL
Project code
project_erp_id
string · ≤ 255OPTIONAL
Project ERP identifier
project_id
integerOPTIONAL
Project identifier
client_erp_id
stringOPTIONAL
Client ERP identifier
client_id
integerOPTIONAL
Client identifier
date_from
stringREQUIRED
Date from
date_to
stringREQUIRED
Date to
status_flags
string[]OPTIONAL
status_flags
wo_ids
integer[]OPTIONAL
Work orders identifiers

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/validationBillable?page=0' \ -H "Content-Type: application/json" \ -d '{ "project_code": "PRJ-2024", "project_erp_id": "PROJ-001", "project_id": 1 }'
Response
200 OKapplication/json
{ "main_line": [ {} ], "normal_line": [ {} ] }

Work order states

getWorkOrderStates

Obtiene una lista de estados de OT dependiendo del filtro aplicado

GEThttps://api.gmaocloud.es/apigmao/{token}/workOrderStates

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Query parameters

page
number · default 0OPTIONAL
50 record page number required

Body filters

Content-Type: application/json

ids
integer[]OPTIONAL
Identifiers
status_flag
string · ≤ 255OPTIONAL
Status flags

Errors

StatusMeaning
200Successful operation.
501Service unavailable.
Request
cURLNodePythonPHP
curl -X GET 'https://api.gmaocloud.es/apigmao/<TOKEN>/workOrderStates?page=0' \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2], "status_flag": "SEND_TO_ERP" }'
Response
200 OKapplication/json
{ "data": [ { "id": 1, "name": "Enviado a ERP" } ], "page": 0, "total": 1 }

postWorkOrderStates

Actualiza los estados de OT de la base de datos. También asignar un estado predetermiando a un estado de OT.

POSThttps://api.gmaocloud.es/apigmao/{token}/workOrderStates

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

list
object[]REQUIRED
Array of work-order-states to create or update. See full schema in the OpenAPI spec.

Errors

StatusMeaning
200Successful operation.
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/workOrderStates' \ -H "Content-Type: application/json" \ -d '{ "list": [ { "erp_id": "EST-001", "name": "Enviado a ERP", "status_flag": "SEND_TO_ERP" } ] }'
Response
200 OKapplication/json
{ "data": "Estados de OT's creados correctamente" }

Internal stack

postInternalStack

POSThttps://api.gmaocloud.es/apigmao/{token}/internalStack

Authorizations

token
string · ≤ 40REQUIRED
Tenant API token passed in the URL path.

Body payload

Content-Type: application/json

actions
object[]REQUIRED

Errors

StatusMeaning
200Successful operation.
303Forbidden
404No records found.
503Service unavailable.
Request
cURLNodePythonPHP
curl -X POST 'https://api.gmaocloud.es/apigmao/<TOKEN>/internalStack' \ -H "Content-Type: application/json" \ -d '{ "actions": [ {} ] }'
Response
200 OKapplication/json
{ "data": "value" }