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

# Get PSC Appointment

> Retrieve order PSC appointment via the Junction API. Requires authentication with your team API key.

```bash cURL theme={null}
curl --request GET \
     --url '{{BASE_URL}}/v3/order/413d7205-f8a9-42ed-aa4a-edb99e481ca0/psc/appointment' \
     --header 'accept: application/json' \
     --header 'x-vital-api-key: YOUR_API_KEY'
```

```python Python theme={null}
from junction import Junction
from junction.environment import JunctionEnvironment

client = Junction(
    api_key="YOUR_API_KEY",
    environment=JunctionEnvironment.SANDBOX,
)

data = client.lab_tests.get_psc_appointment("<order_id>")
```

```typescript TypeScript theme={null}
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";

const client = new JunctionClient({
    apiKey: "YOUR_API_KEY",
    environment: JunctionEnvironment.Sandbox,
});

const data = await client.labTests.getPscAppointment({ orderId: "<order_id>" });
```

```java Java theme={null}
import com.junction.api.Junction;
import com.junction.api.core.Environment;

Junction client = Junction.builder()
    .apiKey("YOUR_API_KEY")
    .environment(Environment.SANDBOX)
    .build();

var data = client.labTests().getPscAppointment("<order_id>");
```

```go Go theme={null}
import (
    "context"

    junction "github.com/junction-api/junction-go"
    "github.com/junction-api/junction-go/client"
    "github.com/junction-api/junction-go/option"
)

c := client.NewClient(
    option.WithApiKey("YOUR_API_KEY"),
    option.WithBaseURL(junction.Environments.Sandbox),
)

response, err := c.LabTests.GetPscAppointment(context.TODO(), &junction.GetPscAppointmentLabTestsRequest{
    OrderId: "<order_id>",
})
if err != nil {
    return err
}
fmt.Printf("Received data %s\n", response)
```

```json Response theme={null}
{
    "id": "413d7205-f8a9-42ed-aa4a-edb99e481ca0",
    "user_id": "202b2c2f-fb4c-44dc-a4f8-621186fde227",
    "address": {
        "first_line": "West Lincoln Street",
        "second_line": "",
        "city": "Phoenix",
        "state": "AZ",
        "zip_code": "85004",
        "unit": "14"
    },
    "location": {
        "lng": -112.0772235,
        "lat": 33.4421912
    },
    "start_at": "2023-05-17T20:00:00+00:00",
    "end_at": "2023-05-17T22:00:00+00:00",
    "iana_timezone": "America/Phoenix",
    "type": "patient_service_center",
    "provider": "quest",
    "status": "confirmed",
    "provider_id": "e89eb489-7382-4966-bb14-7ab4763eba6c",
    "can_reschedule": true
}
```


## OpenAPI

````yaml GET /v3/order/{order_id}/psc/appointment
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.5.47
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v3/order/{order_id}/psc/appointment:
    get:
      tags:
        - order
      summary: Get Phlebotomy Appointment
      description: Get the appointment associated with an order.
      operationId: get_phlebotomy_appointment_v3_order__order_id__psc_appointment_get
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Your Order ID.
            title: Order Id
          description: Your Order ID.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientFacingAppointment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ClientFacingAppointment:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        user_id:
          type: string
          format: uuid4
          title: User Id
        order_id:
          type: string
          format: uuid4
          title: Order Id
        order_transaction_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Order Transaction Id
        address:
          $ref: '#/components/schemas/USAddress'
        location:
          $ref: '#/components/schemas/LngLat'
        location_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Name
        start_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start At
          description: Time is in UTC
        end_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End At
          description: Time is in UTC
        iana_timezone:
          anyOf:
            - type: string
              pattern: >-
                ^(?:(?:[A-Za-z_\-]+\/[A-Za-z_\-]+(?:\/[A-Za-z_\-]+)?)|(?:Etc\/[A-Za-z0-9+\-]+(?:\/[A-Za-z0-9]+)?|(?:CET|CST6CDT|EET|EST|EST5EDT|MET|MST|MST7MDT|PST8PDT|HST)))$
            - type: 'null'
          title: Iana Timezone
        type:
          $ref: '#/components/schemas/AppointmentType'
          description: ℹ️ This enum is non-exhaustive.
        provider:
          $ref: '#/components/schemas/AppointmentProvider'
          description: ℹ️ This enum is non-exhaustive.
        status:
          $ref: '#/components/schemas/AppointmentStatus'
          description: ℹ️ This enum is non-exhaustive.
        provider_id:
          type: string
          title: Provider Id
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        can_reschedule:
          type: boolean
          title: Can Reschedule
        appointment_notes:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Appointment Notes
        event_status:
          $ref: '#/components/schemas/AppointmentEventStatus'
          description: ℹ️ This enum is non-exhaustive.
        event_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Event Data
        events:
          items:
            $ref: '#/components/schemas/ClientFacingAppointmentEvent'
          type: array
          title: Events
      type: object
      required:
        - id
        - user_id
        - order_id
        - address
        - location
        - start_at
        - end_at
        - type
        - provider
        - status
        - provider_id
        - can_reschedule
        - event_status
        - events
      title: ClientFacingAppointment
      example:
        address:
          access_notes: 'Gate code #1234, use side entrance'
          city: San Francisco
          country: United States
          first_line: 123 Main St.
          second_line: Apt. 208
          state: CA
          zip_code: '91189'
        appointment_notes: Please bring photo ID
        can_reschedule: true
        end_at: '2022-01-01T00:00:00'
        event_data:
          description: >-
            Metadata field containing provider specific data, like cancellation
            reason or origin
        event_status: scheduled
        events:
          - created_at: '2022-01-01T00:00:00Z'
            status: scheduled
          - created_at: '2022-01-02T00:00:00Z'
            status: completed
        external_id: ext-123
        iana_timezone: America/New_York
        id: dd271ee5-cef5-489c-9813-49be17943c3e
        location:
          lat: 37.7749295
          lng: -122.4194155
        order_id: 105e69f2-8137-4ec8-aa82-eff940a1d968
        order_transaction_id: b26f9b2c-71f5-4f98-b46d-630a3789a69d
        provider: getlabs
        provider_id: '123'
        start_at: '2022-01-01T00:00:00'
        status: confirmed
        type: phlebotomy
        user_id: 63ea69ad-3e4e-47e9-a599-4b1d647ebbed
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    USAddress:
      properties:
        first_line:
          type: string
          title: First Line
        second_line:
          anyOf:
            - type: string
            - type: 'null'
          title: Second Line
        city:
          type: string
          title: City
        state:
          type: string
          title: State
        zip_code:
          type: string
          pattern: ^\d{5}(-\d{4})?$
          title: Zip Code
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
          description: >-
            Deprecated. Use `second_line` instead to provide the unit number.
            Subject to removal after 20 Nov 2023.
          deprecated: true
        access_notes:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Access Notes
      type: object
      required:
        - first_line
        - city
        - state
        - zip_code
      title: USAddress
    LngLat:
      properties:
        lng:
          type: number
          maximum: 180
          minimum: -180
          title: Lng
        lat:
          type: number
          maximum: 90
          minimum: -90
          title: Lat
      type: object
      required:
        - lng
        - lat
      title: LngLat
    AppointmentType:
      type: string
      enum:
        - phlebotomy
        - patient_service_center
      title: AppointmentType
      description: ℹ️ This enum is non-exhaustive.
    AppointmentProvider:
      type: string
      enum:
        - getlabs
        - phlebfinders
        - quest
        - sonora_quest
        - labcorp
        - moms
      title: AppointmentProvider
      description: ℹ️ This enum is non-exhaustive.
    AppointmentStatus:
      type: string
      enum:
        - confirmed
        - pending
        - reserved
        - in_progress
        - completed
        - cancelled
      title: AppointmentStatus
      description: ℹ️ This enum is non-exhaustive.
    AppointmentEventStatus:
      type: string
      enum:
        - pending
        - reserved
        - scheduled
        - completed
        - cancelled
        - in_progress
      title: AppointmentEventStatus
      description: ℹ️ This enum is non-exhaustive.
    ClientFacingAppointmentEvent:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/AppointmentEventStatus'
          description: ℹ️ This enum is non-exhaustive.
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
      type: object
      required:
        - created_at
        - status
      title: ClientFacingAppointmentEvent
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````

## Related topics

- [PSC Appointment Availability](https://docs.junction.com/api-reference/lab-testing/psc-scheduling/appointment-psc-availability.md)
- [Order and Appointment Lifecycle](https://docs.junction.com/lab/walk-in/order-lifecycle.md)
- [Schedule PSC Appointments](https://docs.junction.com/lab/walk-in/psc-appointment-scheduling.md)
- [PSC Appointment Cancellation Reasons](https://docs.junction.com/api-reference/lab-testing/psc-scheduling/appointment-psc-cancellation-reasons.md)
- [Get PSC Info](https://docs.junction.com/api-reference/lab-testing/psc-info.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.