OfficeGest
Workshop/Reports/Service order statuses

Service order statuses

Returns the service orders behind the /oficinas/estadososv board and the dashboard.id=73 widget: one entry per order with its status, dates, vehicle, interventions, the mechanics clocked in on it right now and the sales documents linked to it. Every filter is optional. Without a status filter the query base applies its own default of ESP, EXE and MAR; sending status replaces that default, so any status the tenant defines can be asked for. Sending warehouses, departments or series replaces that default as well, and the answer then spans every status, so send status explicitly whenever the set matters. The response is not paginated, matching the board, which loads the whole set in one request. An empty workshop returns an empty data array, never a 404.

GET
/workshop/reports/service-order-statuses
AuthorizationBearer <token>

In: header

Query Parameters

date_reception_start?string

Lower bound for the reception date

Formatdate
date_reception_end?string

Upper bound for the reception date

Formatdate
has_delivery_date?boolean

true keeps only orders with an expected delivery date, false only those without one

date_delivery_start?string

Lower bound for the expected delivery date

Formatdate
date_delivery_end?string

Upper bound for the expected delivery date

Formatdate
status?array<unknown>

Service order status codes. Without it the query base applies its own default of ESP, EXE and MAR, unless warehouses, departments or series is sent: those replace the whole status default and the answer then spans every status. Send status explicitly whenever the set matters

warehouses?array<unknown>

Warehouse ids

departments?array<unknown>

Department ids

series?array<unknown>

Billing series numbers

budget_status?array<unknown>

Keeps only orders holding a linked document in one of these statuses. Orders with no linked document are dropped as well

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/workshop/reports/service-order-statuses?date_reception_start=2019-08-24&date_reception_end=2019-08-24&has_delivery_date=true&date_delivery_start=2019-08-24&date_delivery_end=2019-08-24&status=&warehouses=&departments=&series=&budget_status="
{
  "data": [
    {
      "number": 0,
      "document_number": "string",
      "status": "string",
      "date": "2019-08-24T14:15:22Z",
      "expected_delivery_date": "2019-08-24T14:15:22Z",
      "customer_id": 0,
      "invoice_name": "string",
      "vehicle_plate": "string",
      "awaiting_parts": true,
      "priority": 0,
      "completion_percentage": 0,
      "badge_color": "success",
      "vehicle_image_url": "string",
      "interventions": {
        "sequence_number": 0,
        "description": "string",
        "extra_description": "string",
        "department": "string",
        "is_executed": true,
        "estimated_time": 0,
        "priority": 0,
        "observations": "string"
      },
      "mechanics": {
        "employee_id": 0,
        "name": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "show_in_monitor": true
      },
      "budgets": {
        "number": 0,
        "document_number": "string",
        "document_type": "string",
        "date": "2019-08-24T14:15:22Z",
        "status": "string",
        "status_description": "string",
        "status_class": "string"
      },
      "vehicle": {
        "plate": "string",
        "description": "string",
        "brand": "string",
        "model": "string",
        "version": "string",
        "colour": "string",
        "manufacturing_year": 0,
        "km_counter": 0
      }
    }
  ]
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}