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

# Notify DSS that a YWC member has left

> Close James's billed seat when the member is no longer in YWC.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/partners/members/left
openapi: 3.1.0
info:
  title: DSS Public API
  description: >-
    Public OAuth 2.0 API for Digital Sea Service. See
    https://docs.digitalseaservice.com for the developer guide.
  version: 1.0.0
  contact:
    name: DSS Developer Support
    email: admin@digitalseaservice.com
    url: https://docs.digitalseaservice.com
  license:
    name: Proprietary
  termsOfService: https://digitalseaservice.com/terms
servers:
  - url: https://api.digitalseaservice.com
    description: Production
  - url: https://api.dev.digitalseaservice.com
    description: Sandbox (dev)
security: []
paths:
  /v1/partners/members/left:
    post:
      tags:
        - partners
      summary: Notify DSS that a YWC member has left
      description: Close James's billed seat when the member is no longer in YWC.
      operationId: member_left_v1_partners_members_left_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemberLeftRequest'
      responses:
        '200':
          description: Seat closed, or already closed (idempotent).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberLeftResponse'
        '400':
          description: Neither user_id nor a resolvable external_ref was provided.
        '401':
          description: >-
            `invalid_token` — Basic credentials missing, malformed, or
            incorrect.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Caller is not Yacht Workers Council.
        '422':
          description: >-
            `invalid_request` — request validation failed; see the `errors`
            array.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '429':
          description: '`rate_limit_exceeded` — per-client request budget exhausted.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: >-
            `internal_error` — an unexpected error occurred; reference
            `instance`.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '503':
          description: >-
            `service_unavailable` — the dashboard member-left call failed; retry
            with backoff.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - basicAuth: []
components:
  schemas:
    MemberLeftRequest:
      properties:
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
          description: DSS user id from Connect (Firebase uid). Preferred.
        external_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: External Ref
          description: Partner's own id, e.g. ywc-user-123. Used if user_id is omitted.
        reason:
          anyOf:
            - type: string
              enum:
                - account_deleted
                - membership_lapsed
            - type: 'null'
          title: Reason
          description: Why they left. Both values close the billed seat the same way.
      type: object
      title: MemberLeftRequest
      description: Tell DSS this member is no longer in the partner's system.
      example:
        external_ref: ywc-user-123
        reason: membership_lapsed
        user_id: aQ0mtT8kRgVv7C3o1p2q3r4s5t6u
    MemberLeftResponse:
      properties:
        user_id:
          type: string
          title: User Id
        ended:
          type: boolean
          title: Ended
          description: True when an open billed seat was closed.
        downgraded:
          type: boolean
          title: Downgraded
          description: >-
            True when sponsored Crew Premium was dropped (false if already
            self-pay).
      type: object
      required:
        - user_id
        - ended
        - downgraded
      title: MemberLeftResponse
      description: Confirmation that DSS processed the leave (idempotent).
      example:
        downgraded: true
        ended: true
        user_id: aQ0mtT8kRgVv7C3o1p2q3r4s5t6u
    ProblemDetails:
      type: object
      description: >-
        RFC 7807 Problem Details. Returned with the `application/problem+json`
        content type on every resource (`/v1/*`) error.
      properties:
        type:
          type: string
          format: uri
          description: Stable URL identifying the error type; resolves to its docs page.
        title:
          type: string
          description: Short, human-readable summary of the error type.
        status:
          type: integer
          description: HTTP status code.
        detail:
          type: string
          description: Explanation specific to this occurrence.
        instance:
          type: string
          description: Request correlation id; matches the `X-Request-Id` header.
      required:
        - type
        - title
        - status
        - detail
        - instance
    ValidationProblemDetails:
      description: Problem Details for a 422, carrying a per-field `errors` array.
      allOf:
        - $ref: '#/components/schemas/ProblemDetails'
        - type: object
          properties:
            errors:
              type: array
              description: One entry per field that failed validation.
              items:
                type: object
                additionalProperties: true
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        HTTP Basic for `/v1/partners/*`. Username is the partner `client_id`;
        password is the `client_secret`.

````