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

# GET /api/v1/services/:serviceId — Fetch a Single Service

> GET /api/v1/services/:serviceId — fetches a single service by ID including owner and payment plans. Returns 404 if the service does not exist.

Use this endpoint to fetch a single service by its unique ID. The response includes the complete service object with the associated owner details and all attached payment plans. This is the best endpoint to use when you need the full service record — for example, before creating a checkout session or verifying plan configuration.

```
GET https://api.retempo.xyz/api/v1/services/:serviceId
```

## Path Parameters

<ParamField path="serviceId" type="string" required>
  The unique identifier of the service you want to retrieve. You receive this ID in the response body when you [create a service](/api/services/create) or from the [list services](/api/services/list) endpoint.
</ParamField>

## Response

A successful request returns HTTP `200 OK` with the full service object.

```json theme={null}
{
  "service": {
    "id": "clz1abc2def3ghi4",
    "name": "DataStream Pro",
    "description": "Real-time data streaming API",
    "status": "ACTIVE",
    "ownerId": "clz1owner123",
    "createdAt": "2025-06-01T10:00:00.000Z",
    "updatedAt": "2025-06-01T10:00:00.000Z",
    "owner": {
      "id": "clz1owner123",
      "email": "dev@example.com",
      "name": "Alice Dev",
      "role": "DEVELOPER"
    },
    "paymentPlans": []
  }
}
```

<ResponseField name="service" type="object">
  The full service object for the requested ID.

  <Expandable title="service fields">
    <ResponseField name="service.id" type="string">
      The unique identifier for the service.
    </ResponseField>

    <ResponseField name="service.name" type="string">
      The display name of the service.
    </ResponseField>

    <ResponseField name="service.description" type="string">
      The service description, if one was provided at creation.
    </ResponseField>

    <ResponseField name="service.status" type="string">
      The current lifecycle status: `DRAFT`, `ACTIVE`, or `DISABLED`.
    </ResponseField>

    <ResponseField name="service.ownerId" type="string">
      The ID of the user who owns this service.
    </ResponseField>

    <ResponseField name="service.createdAt" type="string">
      ISO 8601 timestamp recording when the service was created.
    </ResponseField>

    <ResponseField name="service.updatedAt" type="string">
      ISO 8601 timestamp recording when the service was last modified.
    </ResponseField>

    <ResponseField name="service.owner" type="object">
      The full owner user object, including `id`, `email`, `name`, and `role`.
    </ResponseField>

    <ResponseField name="service.paymentPlans" type="array">
      All payment plans attached to this service. Each element contains plan details including `pricingType`, `amount`, `billingInterval`, and `currency`.
    </ResponseField>
  </Expandable>
</ResponseField>

### Error Responses

| Status          | Message                  | Condition                                       |
| --------------- | ------------------------ | ----------------------------------------------- |
| `404 Not Found` | `Service was not found.` | No service exists for the provided `serviceId`. |

## Example

Replace `clz1abc2def3ghi4` with your actual service ID:

```bash theme={null}
curl https://api.retempo.xyz/api/v1/services/clz1abc2def3ghi4
```

**Example response:**

```json theme={null}
{
  "service": {
    "id": "clz1abc2def3ghi4",
    "name": "DataStream Pro",
    "description": "Real-time data streaming API",
    "status": "ACTIVE",
    "ownerId": "clz1owner123",
    "createdAt": "2025-06-01T10:00:00.000Z",
    "updatedAt": "2025-06-01T10:00:00.000Z",
    "owner": {
      "id": "clz1owner123",
      "email": "dev@example.com",
      "name": "Alice Dev",
      "role": "DEVELOPER"
    },
    "paymentPlans": []
  }
}
```

**Example 404 response:**

```json theme={null}
{
  "error": "Service was not found."
}
```

<Warning>
  Service IDs are case-sensitive. Passing an ID with incorrect casing returns a `404` even if a service with a similar ID exists.
</Warning>
