curl --location 'https://app.mgpanel.co/api/functions' \
--header 'X-Account-Nick: {{ACCOUNT_NICK}}' \
--header 'Authorization: Bearer {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"endpoint": "estado-factura",
"title": "Estado de factura",
"status": 1,
"handler": "proxy-rest",
"configuration": {
"method": "GET",
"baseUrl": "https://mgpanel.co",
"path": "api/invoices/{invoice_id}/status",
"allowedClientPath": [
"invoice_id"
],
"pathParamPattern": {
"invoice_id": "^[a-f0-9]{24}$"
},
"headers": {
"Authorization": "Bearer {{API_KEY}}",
"X-Account-Nick": "{{ACCOUNT_NICK}}"
}
},
"metadata": {
"allowedMethods": [
"GET"
]
}
}'