> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.useopenwrench.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a service call with work logs

> Service call helicopter expansion: each /with_* path segment hoists one section into the response. with_work_logs returns the call's wrench-mode events plus trueWorkTimeMillis (pause-excluded); with_tech_details returns the call's technicians, with hourlyRate populated only for the buyer's own internal service team — third-party rates stay hidden.



## OpenAPI

````yaml /openapi/buyer.json get /v1/buyer/work_order/service_calls/{id}/with_work_logs
openapi: 3.1.0
info:
  title: OpenWrench Buyer API
  version: 1.0.0
  description: >-
    External REST API for OpenWrench buyers (facilities-management side).
    Generated from the application source (Play routes, controllers and models).


    ## Authentication

    Every request must carry a buyer API key in the `X-API-KEY` header. The key
    resolves to a buyer contact, and all reads/writes are tenant-scoped to that
    contact's buyer company (plus, on several endpoints, role-based
    location/brand restrictions). Endpoints under `/v1/buyer/super_admin/...`
    (and a few others noted per-operation) additionally require the key's
    contact to be a buyer super admin.


    ## Rate limiting

    10 requests per 20-second window per API key; requests beyond that receive
    **429**. A handful of operations noted per-operation bypass the rate
    limiter.


    ## Response envelope

    Single-entity responses: `{ "type": "<EntityName>", "data": { ... },
    "status": "ok" }`.

    List responses: `{ "type": "<EntityName>", "data": [ ... ], "count":
    <total>, "status": "ok" }`.

    count_by responses: `{ "type": "CountBy", "data": <integer>, "status": "ok"
    }`.

    Errors: `{ "message": "...", "type": "<ExceptionType>", "status": "error",
    "traceId": "..." }` — 401 missing/invalid key, 400 bad input, 404 not found,
    429 rate limit.


    ## Pagination & filtering

    List endpoints accept `offset`, `limit` (default 10, max 25 — the locations
    list clamps to 10), `sort_by` and `order` (asc|desc). Every other query
    parameter is treated as a filter and matched against the entity's indexed
    columns (multi-value filters are comma-separated strings); these are
    combined with the tenant-security filters derived from the API key.


    Timestamps are ISO 8601 strings unless noted otherwise.


    ## Date formats

    Date-time fields serialize as strings in one of two shapes depending on the
    underlying type: ISO 8601 with offset (e.g. `2026-08-14T13:05:22.000-07:00`)
    for most timestamps, or `yyyy-MM-dd HH:mm:ss.S` (space-separated, no offset)
    for database timestamp fields. Plain dates are `yyyy-MM-dd`. When sending
    date-times, ISO 8601 is accepted.


    ## Required headers

    Every request must carry BOTH `X-API-KEY` (your API key) and `OW-KEY` (the
    OpenWrench shared secret issued with it). Requests missing either return
    401.
servers:
  - url: https://api.useopenwrench.com/api/external
security:
  - ApiKeyAuth: []
    OwKeyAuth: []
tags:
  - name: Ping
  - name: Me
  - name: Locations
  - name: Regions
  - name: Asset Types
  - name: Asset Meters
  - name: Assets
  - name: Asset Labels
    description: Read the asset label catalog and replace the labels applied to an asset.
  - name: Asset Models
  - name: Work Orders
  - name: Work Order Notes
  - name: Work Order Labels
    description: >-
      Read your work order label catalog and replace the labels applied to a
      work order.
  - name: Service Calls
  - name: Site Survey Walkthroughs
  - name: Invoices
  - name: Proposals
  - name: Files
  - name: Planned Maintenance
  - name: Currency Exchange
  - name: Supplier Network
  - name: User Provisioning
paths:
  /v1/buyer/work_order/service_calls/{id}/with_work_logs:
    get:
      tags:
        - Service Calls
      summary: Get a service call with work logs
      description: >-
        Service call helicopter expansion: each /with_* path segment hoists one
        section into the response. with_work_logs returns the call's wrench-mode
        events plus trueWorkTimeMillis (pause-excluded); with_tech_details
        returns the call's technicians, with hourlyRate populated only for the
        buyer's own internal service team — third-party rates stay hidden.
      operationId: getServiceCallWithWorkLogs
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpandedServiceCallResponse'
        '400':
          description: >-
            Bad input, parse failure, or the API key's contact could not be
            resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid X-API-KEY.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (10 requests per 20-second window per key).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ExpandedServiceCallResponse:
      type: object
      properties:
        type:
          type: string
          description: Entity type marker, e.g. "ExpandedServiceCall".
        data:
          $ref: '#/components/schemas/ExpandedServiceCall'
        status:
          type: string
          enum:
            - ok
      required:
        - type
        - data
        - status
    Error:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
          description: >-
            Exception type, e.g. unauthorizedException, NotFoundException,
            BadRequestException, ParseException, InvalidInputDataException,
            ConflictException, UnexpectedException.
        status:
          type: string
          enum:
            - error
        traceId:
          type: string
          description: >-
            Trace id (a random 11-char alphanumeric string when no explicit
            trace applies).
      required:
        - message
        - type
        - status
        - traceId
      description: >-
        Standard error envelope. 401 = missing/invalid API key, 400 = bad input,
        404 = not found, 429 = rate limit exceeded.
    ExpandedServiceCall:
      type: object
      properties:
        serviceCall:
          $ref: '#/components/schemas/ServiceCall'
        workLogs:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/WrenchModeEvent'
        techDetails:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/ServiceCallTech'
        trueWorkTimeMillis:
          type:
            - integer
            - 'null'
          description: >-
            Work time in milliseconds with pause spans subtracted; null when
            work logs were not requested or not permitted.
      required:
        - serviceCall
      description: >-
        Response shape for the /with_* expansion routes: each optional section
        is present iff its with_* path segment was in the request.
    ServiceCall:
      type: object
      properties:
        id:
          type:
            - integer
            - 'null'
        leadTechnicianEmail:
          type:
            - string
            - 'null'
        leadTechnicianEmailContact:
          anyOf:
            - $ref: '#/components/schemas/Contact'
            - type: 'null'
        additionalTechnicianEmails:
          type: array
          items:
            type: string
        additionalTechnicians:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        stockLocationIds:
          type: array
          items:
            type: integer
        stockLocations:
          type: array
          items:
            type: object
            properties: {}
            additionalProperties: true
        supplierFacilityId:
          type: integer
        supplierFacility:
          anyOf:
            - $ref: '#/components/schemas/SupplierFacility'
            - type: 'null'
        serviceScheduledAt:
          type:
            - string
            - 'null'
          format: date-time
        checkInByEmail:
          type:
            - string
            - 'null'
        checkInByContact:
          anyOf:
            - $ref: '#/components/schemas/Contact'
            - type: 'null'
        checkInStatus:
          type:
            - string
            - 'null'
        checkInTime:
          type:
            - string
            - 'null'
          format: date-time
        checkInNotes:
          type:
            - string
            - 'null'
        checkInImages:
          type: array
          items:
            type: string
        checkInImagesWithCaption:
          type: array
          items:
            $ref: '#/components/schemas/Image'
        checkInGeoLocation:
          anyOf:
            - $ref: '#/components/schemas/ServiceLatLong'
            - type: 'null'
        checkInAudio:
          type:
            - string
            - 'null'
        checkInAudioTranscription:
          type:
            - string
            - 'null'
        checkInIsAudioTranslated:
          type:
            - boolean
            - 'null'
        checkInIsAudioTranscriptionError:
          type:
            - boolean
            - 'null'
        checkOutByEmail:
          type:
            - string
            - 'null'
        checkOutByContact:
          anyOf:
            - $ref: '#/components/schemas/Contact'
            - type: 'null'
        checkOutStatus:
          type:
            - string
            - 'null'
        checkOutTime:
          type:
            - string
            - 'null'
          format: date-time
        checkOutNotes:
          type:
            - string
            - 'null'
        checkOutImages:
          type: array
          items:
            type: string
        checkOutImagesWithCaption:
          type: array
          items:
            $ref: '#/components/schemas/Image'
        checkOutGeoLocation:
          anyOf:
            - $ref: '#/components/schemas/ServiceLatLong'
            - type: 'null'
        checkOutAudio:
          type:
            - string
            - 'null'
        checkOutAudioTranscription:
          type:
            - string
            - 'null'
        checkOutIsAudioTranslated:
          type:
            - boolean
            - 'null'
        checkOutIsAudioTranscriptionError:
          type:
            - boolean
            - 'null'
        numberOfTechs:
          type: integer
        workOrderId:
          type: integer
        locationId:
          type: integer
        buyerFacilityId:
          type: integer
        buyerCompanyId:
          type: integer
        revisionChanges:
          type:
            - array
            - 'null'
          items:
            type: object
            properties: {}
            additionalProperties: true
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
        isDeleted:
          type: boolean
        deletedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - supplierFacilityId
        - numberOfTechs
        - workOrderId
        - locationId
        - buyerFacilityId
        - buyerCompanyId
        - isDeleted
    WrenchModeEvent:
      type: object
      properties:
        id:
          type:
            - integer
            - 'null'
        scheduleId:
          type: integer
        supplierEmail:
          type: string
        locationId:
          type:
            - integer
            - 'null'
        workOrderId:
          type:
            - integer
            - 'null'
        note:
          type:
            - string
            - 'null'
        serviceCallId:
          type:
            - integer
            - 'null'
        eventType:
          type: string
          description: >-
            e.g. began_trip, trip_paused, trip_resumed, arrived, started_work,
            ended_work, location_started, location_paused, location_resumed, ...
        supplierFacilityId:
          type: integer
        isDeleted:
          type: boolean
        deletedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - scheduleId
        - supplierEmail
        - eventType
        - supplierFacilityId
        - isDeleted
    ServiceCallTech:
      type: object
      properties:
        email:
          type: string
        name:
          type:
            - string
            - 'null'
        role:
          type:
            - string
            - 'null'
        hourlyRate:
          type:
            - number
            - 'null'
          description: >-
            Populated only for techs of the buyer's own internal service team;
            third-party rates are never exposed.
        isLead:
          type: boolean
        contact:
          anyOf:
            - $ref: '#/components/schemas/Contact'
            - type: 'null'
      required:
        - email
        - isLead
    Contact:
      type: object
      properties:
        email:
          type: string
        nameGiven:
          type: string
        nameFamily:
          type: string
        title:
          type:
            - string
            - 'null'
        department:
          type:
            - string
            - 'null'
        facilityId:
          type:
            - integer
            - 'null'
        contactType:
          type: string
          description: '"buyer" or "supplier".'
        isSharedContact:
          type: boolean
        readOnlyAccess:
          type:
            - boolean
            - 'null'
        invitedByEmail:
          type:
            - string
            - 'null'
        invitedAt:
          type:
            - string
            - 'null'
          format: date-time
        invitedByName:
          type:
            - string
            - 'null'
        epaCertificationType:
          type:
            - string
            - 'null'
        epaCertificationNumber:
          type:
            - string
            - 'null'
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - email
        - nameGiven
        - nameFamily
        - contactType
      additionalProperties: true
      description: >-
        Contact record. Abridged: only fields observed in the provided sources
        are listed.
    SupplierFacility:
      type: object
      properties:
        id:
          type:
            - integer
            - 'null'
        name:
          type: string
        displayName:
          type: string
        status:
          type: string
        currencyId:
          type: string
        isClaimed:
          type: boolean
        about:
          type:
            - string
            - 'null'
        isNationalSupplier:
          type: boolean
        operatingHours:
          anyOf:
            - $ref: '#/components/schemas/OperatingHours'
            - type: 'null'
        w9:
          anyOf:
            - $ref: '#/components/schemas/FileDetails'
            - type: 'null'
        verifications:
          type: array
          items:
            type: object
            properties: {}
            additionalProperties: true
        licenses:
          type: array
          items:
            type: object
            properties: {}
            additionalProperties: true
        certifications:
          type: array
          items:
            type: object
            properties: {}
            additionalProperties: true
        insurances:
          type: array
          items:
            type: object
            properties: {}
            additionalProperties: true
        faqs:
          type: array
          items:
            type: object
            properties: {}
            additionalProperties: true
        isWomenOwned:
          type: boolean
        isMinorityOwned:
          type: boolean
        isVeteranOwned:
          type: boolean
        isDisabledOwned:
          type: boolean
        isLgbtOwned:
          type: boolean
        isSmallBusinessEnterprise:
          type: boolean
        categoryIds:
          type: array
          items:
            type: integer
        categoryNames:
          type: string
        duns:
          type:
            - string
            - 'null'
        taxId:
          type:
            - string
            - 'null'
        corporateURL:
          type:
            - string
            - 'null'
        storefrontURL:
          type:
            - string
            - 'null'
        logoURL:
          type:
            - string
            - 'null'
        poMethod:
          type:
            - string
            - 'null'
        poChangeMethod:
          type:
            - string
            - 'null'
        poEmail:
          type:
            - string
            - 'null'
        website:
          type:
            - string
            - 'null'
        primaryContactEmail:
          type:
            - string
            - 'null'
        primaryPhone:
          type:
            - string
            - 'null'
        primaryAddress:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        remitToAddress:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        latitude:
          type:
            - number
            - 'null'
        longitude:
          type:
            - number
            - 'null'
        radiusOfServiceInMiles:
          type:
            - number
            - 'null'
        serviceAreaSelfPerforming:
          type: array
          items:
            type: string
        serviceAreaNotSelfPerforming:
          type: array
          items:
            type: string
        averageRating:
          type:
            - number
            - 'null'
        numRatings:
          type:
            - integer
            - 'null'
        supplierCompanyId:
          type: integer
        isLandlord:
          type: boolean
      required:
        - name
        - displayName
        - status
        - currencyId
        - supplierCompanyId
        - isLandlord
      additionalProperties: true
      description: >-
        Supplier facility. Abridged: parsed service-area addresses, business
        codes, social media, webhook details and review tag rollups may also
        appear.
    Image:
      type: object
      properties:
        s3ObjectKey:
          type: string
        caption:
          type:
            - string
            - 'null'
        captionSource:
          type:
            - string
            - 'null'
        captionModel:
          type:
            - string
            - 'null'
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        createdBy:
          type:
            - string
            - 'null'
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - s3ObjectKey
    ServiceLatLong:
      type: object
      properties:
        lat:
          type: string
        long:
          type: string
      required:
        - lat
        - long
    OperatingHours:
      type: object
      properties:
        timeZoneId:
          type:
            - string
            - 'null'
        timeZoneName:
          type:
            - string
            - 'null'
        Monday:
          anyOf:
            - $ref: '#/components/schemas/Timings'
            - type: 'null'
        Tuesday:
          anyOf:
            - $ref: '#/components/schemas/Timings'
            - type: 'null'
        Wednesday:
          anyOf:
            - $ref: '#/components/schemas/Timings'
            - type: 'null'
        Thursday:
          anyOf:
            - $ref: '#/components/schemas/Timings'
            - type: 'null'
        Friday:
          anyOf:
            - $ref: '#/components/schemas/Timings'
            - type: 'null'
        Saturday:
          anyOf:
            - $ref: '#/components/schemas/Timings'
            - type: 'null'
        Sunday:
          anyOf:
            - $ref: '#/components/schemas/Timings'
            - type: 'null'
    FileDetails:
      type: object
      properties:
        fileName:
          type: string
          description: Original file name (non-ASCII characters stripped on upload).
        fileId:
          type: string
          description: Opaque file identifier used for later download.
      required:
        - fileName
        - fileId
      description: 'File reference: name plus storage identifier.'
    Address:
      type: object
      properties: {}
      additionalProperties: true
      description: Postal address object. Shape abridged (model not in provided sources).
    Timings:
      type: object
      properties: {}
      additionalProperties: true
      description: Opening/closing timings for one weekday. Shape abridged.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    OwKeyAuth:
      type: apiKey
      in: header
      name: OW-KEY
      description: >-
        OpenWrench shared secret. Required on every request alongside X-API-KEY;
        issued together with your API key.

````